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