[TOOLS] Fix all issues found by PHPStan level 2

This commit is contained in:
2021-09-06 23:47:28 +01:00
parent 4b1780a2ee
commit 4e30e5aad9
33 changed files with 114 additions and 89 deletions

View File

@@ -143,14 +143,14 @@ class Cover
*/
public function cover()
{
$cover = DB::find('cover', ['gsactor_id' => Common::user()->getId()]);
if ($cover == null) {
return new Response('Cover not found',Response::HTTP_NOT_FOUND);
}
$file = $cover->getFile();
if ($file == null) {
return new Response('Cover File not found',Response::HTTP_NOT_FOUND);
}
return GSFile::sendFile($cover->getFilePath(), $file->getMimetype(), $file->getTitle());
// $cover = DB::find('cover', ['gsactor_id' => Common::user()->getId()]);
// if ($cover == null) {
// return new Response('Cover not found',Response::HTTP_NOT_FOUND);
// }
// $file = $cover->getFile();
// if ($file == null) {
// return new Response('Cover File not found',Response::HTTP_NOT_FOUND);
// }
// return GSFile::sendFile($cover->getFilePath(), $file->getMimetype(), $file->getTitle());
}
}