Skip to content

Commit 5afd9b3

Browse files
committed
Fix psalm erros
1 parent 1f9b2a2 commit 5afd9b3

File tree

4 files changed

+9
-25
lines changed

4 files changed

+9
-25
lines changed

psalm-baseline.xml

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<files psalm-version="5.22.2@d768d914152dbbf3486c36398802f74e80cfde48">
2+
<files psalm-version="5.26.1@d747f6500b38ac4f7dfc5edbcae6e4b637d7add0">
33
<file src="src/Command/Feed/CreateFeedSourceCommand.php">
44
<RiskyTruthyFalsyComparison>
55
<code><![CDATA[$ulid]]></code>
@@ -525,11 +525,6 @@
525525
<code><![CDATA[$value]]></code>
526526
</MissingParamType>
527527
</file>
528-
<file src="src/Security/AzureOidcAuthenticator.php">
529-
<RiskyTruthyFalsyComparison>
530-
<code><![CDATA[empty($signInName)]]></code>
531-
</RiskyTruthyFalsyComparison>
532-
</file>
533528
<file src="src/Security/Voter/UserVoter.php">
534529
<MissingTemplateParam>
535530
<code><![CDATA[UserVoter]]></code>
@@ -565,7 +560,6 @@
565560
</LessSpecificReturnStatement>
566561
<MissingParamType>
567562
<code><![CDATA[$data]]></code>
568-
<code><![CDATA[$object]]></code>
569563
</MissingParamType>
570564
<MissingTemplateParam>
571565
<code><![CDATA[ProcessorInterface]]></code>
@@ -670,21 +664,12 @@
670664
</PossiblyNullPropertyAssignmentValue>
671665
</file>
672666
<file src="src/State/ScreenProcessor.php">
673-
<NullableReturnStatement>
667+
<InvalidReturnStatement>
674668
<code><![CDATA[$screen]]></code>
675-
</NullableReturnStatement>
676-
<PossiblyNullReference>
677-
<code><![CDATA[setCreatedBy]]></code>
678-
<code><![CDATA[setDescription]]></code>
679-
<code><![CDATA[setEnableColorSchemeChange]]></code>
680-
<code><![CDATA[setLocation]]></code>
681-
<code><![CDATA[setModifiedBy]]></code>
682-
<code><![CDATA[setOrientation]]></code>
683-
<code><![CDATA[setResolution]]></code>
684-
<code><![CDATA[setScreenLayout]]></code>
685-
<code><![CDATA[setSize]]></code>
686-
<code><![CDATA[setTitle]]></code>
687-
</PossiblyNullReference>
669+
</InvalidReturnStatement>
670+
<InvalidReturnType>
671+
<code><![CDATA[Screen]]></code>
672+
</InvalidReturnType>
688673
</file>
689674
<file src="src/State/ScreenProvider.php">
690675
<PossiblyNullPropertyAssignmentValue>

psalm.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
resolveFromConfigFile="true"
55
findUnusedBaselineEntry="true"
66
findUnusedCode="false"
7-
errorBaseline="./psalm-baseline.xml"
7+
errorBaseline="psalm-baseline.xml"
88
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xmlns="https://getpsalm.org/schema/config"
1010
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"

src/State/AbstractProcessor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ public function toOutput(object $object): object
5353
*
5454
* This is needed to get an object handled by entity manager.
5555
*
56-
* @param $object
56+
* @param \App\Entity\Tenant\Playlist|\App\Entity\Tenant\Screen|\App\Entity\Tenant\ScreenGroup|\App\Entity\Tenant\Slide|\App\Entity\Tenant\Theme $object
5757
*
5858
* @return mixed|object|null
5959
*/
60-
protected function loadPrevious($object, array $context)
60+
protected function loadPrevious(\App\Entity\Tenant\Playlist|\App\Entity\Tenant\ScreenGroup|\App\Entity\Tenant\Screen|\App\Entity\Tenant\Slide|\App\Entity\Tenant\Theme $object, array $context)
6161
{
6262
if ($previous = $context['previous_data'] ?? null) {
6363
$repository = $this->entityManager->getRepository($object::class);

src/State/ScreenProcessor.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
use ApiPlatform\Metadata\Operation;
99
use ApiPlatform\State\ProcessorInterface;
1010
use App\Dto\ScreenInput;
11-
use App\Entity\Tenant\Playlist;
1211
use App\Entity\Tenant\PlaylistScreenRegion;
1312
use App\Entity\Tenant\Screen;
1413
use App\Repository\PlaylistRepository;

0 commit comments

Comments
 (0)