Fix some PHPStan errors

This commit is contained in:
Oliver Davies 2020-05-26 12:01:03 +01:00
parent f5767f7739
commit 4d3e0901d2
3 changed files with 3 additions and 3 deletions

View file

@ -27,7 +27,7 @@ final class ExportBodyValuesForThemePurgingCommand {
* *
* @command opdavies:export-body-values-for-theme-purging * @command opdavies:export-body-values-for-theme-purging
*/ */
public function handle() { public function handle(): void {
$values = Collection::make(self::$tableNames) $values = Collection::make(self::$tableNames)
->flatMap(fn(string $tableName) => $this->getValuesFromTable($tableName)) ->flatMap(fn(string $tableName) => $this->getValuesFromTable($tableName))
->implode(PHP_EOL); ->implode(PHP_EOL);

View file

@ -70,7 +70,7 @@ final class OpdTalk extends EntityContentBase {
}); });
} }
private function createVideoMedia(Row $row, EntityInterface $node) { private function createVideoMedia(Row $row, EntityInterface $node): void {
$video = $row->getSourceProperty('video'); $video = $row->getSourceProperty('video');
if (!empty($video['type']) && !empty($video['id'])) { if (!empty($video['type']) && !empty($video['id'])) {

View file

@ -8,7 +8,7 @@
/** /**
* Implements hook_preprocess_HOOK(). * Implements hook_preprocess_HOOK().
*/ */
function opdavies_preprocess_block(&$variables) { function opdavies_preprocess_block(array &$variables): void {
if ($variables['base_plugin_id'] == 'system_branding_block') { if ($variables['base_plugin_id'] == 'system_branding_block') {
$variables['site_logo'] = ''; $variables['site_logo'] = '';
if ($variables['content']['site_logo']['#access'] && $variables['content']['site_logo']['#uri']) { if ($variables['content']['site_logo']['#access'] && $variables['content']['site_logo']['#uri']) {