Merge pull request #14559 from Art4/phpstan-level-1

Phpstan level 1
This commit is contained in:
Hypolite Petovan 2024-11-30 21:40:29 -05:00 committed by GitHub
commit e34d38182c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
88 changed files with 618 additions and 482 deletions

View file

@ -127,7 +127,11 @@ class Photos extends \Friendica\Module\BaseProfile
$visible = 0;
}
$ret = ['src' => '', 'filename' => '', 'filesize' => 0, 'type' => ''];
$ret = ['src' => '', 'filename' => '', 'filesize' => 0, 'type' => ''];
$src = null;
$filename = '';
$filesize = 0;
$type = '';
Hook::callAll('photo_post_file', $ret);
@ -167,7 +171,11 @@ class Photos extends \Friendica\Module\BaseProfile
$this->systemMessages->addNotice($this->t('Server can\'t accept new file upload at this time, please contact your administrator'));
break;
}
@unlink($src);
if ($src !== null) {
@unlink($src);
}
$foo = 0;
Hook::callAll('photo_post_end', $foo);
return;