psalm: refactor suppressions
Signed-off-by: Varun Patil <radialapps@gmail.com>pull/888/head
parent
c9e87c4cf6
commit
46366d6715
|
@ -57,13 +57,8 @@ class IndexOpts
|
|||
|
||||
class Index extends Command
|
||||
{
|
||||
/** @psalm-suppress PropertyNotSetInConstructor */
|
||||
private InputInterface $input;
|
||||
|
||||
/** @psalm-suppress PropertyNotSetInConstructor */
|
||||
private OutputInterface $output;
|
||||
|
||||
/** @psalm-suppress PropertyNotSetInConstructor */
|
||||
private IndexOpts $opts;
|
||||
|
||||
public function __construct(
|
||||
|
|
|
@ -44,10 +44,7 @@ class MigrateGoogleTakeout extends Command
|
|||
protected const MIGRATOR_VERSION = 1;
|
||||
protected const MIGRATED_KEY = 'memoriesMigratorVersion';
|
||||
|
||||
/** @psalm-suppress PropertyNotSetInConstructor */
|
||||
protected OutputInterface $output;
|
||||
|
||||
/** @psalm-suppress PropertyNotSetInConstructor */
|
||||
protected InputInterface $input;
|
||||
|
||||
// Stats
|
||||
|
|
|
@ -31,7 +31,6 @@ use Symfony\Component\Console\Output\OutputInterface;
|
|||
|
||||
class PlacesSetup extends Command
|
||||
{
|
||||
/** @psalm-suppress PropertyNotSetInConstructor */
|
||||
protected OutputInterface $output;
|
||||
|
||||
public function __construct(protected Places $places)
|
||||
|
|
|
@ -149,6 +149,7 @@ class AlbumsQuery
|
|||
public function getIfAllowed(string $uid, string $albumId): ?array
|
||||
{
|
||||
$album = null;
|
||||
$albumUid = null;
|
||||
|
||||
// Split name and uid
|
||||
$parts = explode('/', $albumId);
|
||||
|
@ -173,7 +174,6 @@ class AlbumsQuery
|
|||
}
|
||||
|
||||
// Check if user is owner
|
||||
/** @psalm-suppress PossiblyUndefinedVariable */
|
||||
if ($albumUid === $uid) {
|
||||
return $album;
|
||||
}
|
||||
|
|
|
@ -81,12 +81,13 @@ trait TimelineWriteOrphans
|
|||
protected function getSomeOrphans(int $count, array $fields): array
|
||||
{
|
||||
$query = $this->connection->getQueryBuilder();
|
||||
$query->select(...$fields)
|
||||
|
||||
return $query->select(...$fields)
|
||||
->from('memories')
|
||||
->where($query->expr()->eq('orphan', $query->expr()->literal(1)))
|
||||
->setMaxResults($count)
|
||||
->executeQuery()
|
||||
->fetchAll()
|
||||
;
|
||||
|
||||
return $query->executeQuery()->fetchAll();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,6 +43,11 @@
|
|||
<file name="lib/Service/FileRobotMagick.php" />
|
||||
</errorLevel>
|
||||
</PossiblyUnusedMethod>
|
||||
<PropertyNotSetInConstructor>
|
||||
<errorLevel type="suppress">
|
||||
<directory name="lib/Command" />
|
||||
</errorLevel>
|
||||
</PropertyNotSetInConstructor>
|
||||
</issueHandlers>
|
||||
<forbiddenFunctions>
|
||||
<function name="var_dump" />
|
||||
|
|
|
@ -42,6 +42,11 @@
|
|||
<file name="lib/Service/FileRobotMagick.php" />
|
||||
</errorLevel>
|
||||
</PossiblyUnusedMethod>
|
||||
<PropertyNotSetInConstructor>
|
||||
<errorLevel type="suppress">
|
||||
<directory name="lib/Command" />
|
||||
</errorLevel>
|
||||
</PropertyNotSetInConstructor>
|
||||
</issueHandlers>
|
||||
<forbiddenFunctions>
|
||||
<function name="var_dump" />
|
||||
|
|
Loading…
Reference in New Issue