Skip to content

Commit

Permalink
Fix psalm erros
Browse files Browse the repository at this point in the history
  • Loading branch information
turegjorup committed Oct 24, 2024
1 parent 1f9b2a2 commit 5afd9b3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 25 deletions.
27 changes: 6 additions & 21 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="5.22.2@d768d914152dbbf3486c36398802f74e80cfde48">
<files psalm-version="5.26.1@d747f6500b38ac4f7dfc5edbcae6e4b637d7add0">
<file src="src/Command/Feed/CreateFeedSourceCommand.php">
<RiskyTruthyFalsyComparison>
<code><![CDATA[$ulid]]></code>
Expand Down Expand Up @@ -525,11 +525,6 @@
<code><![CDATA[$value]]></code>
</MissingParamType>
</file>
<file src="src/Security/AzureOidcAuthenticator.php">
<RiskyTruthyFalsyComparison>
<code><![CDATA[empty($signInName)]]></code>
</RiskyTruthyFalsyComparison>
</file>
<file src="src/Security/Voter/UserVoter.php">
<MissingTemplateParam>
<code><![CDATA[UserVoter]]></code>
Expand Down Expand Up @@ -565,7 +560,6 @@
</LessSpecificReturnStatement>
<MissingParamType>
<code><![CDATA[$data]]></code>
<code><![CDATA[$object]]></code>
</MissingParamType>
<MissingTemplateParam>
<code><![CDATA[ProcessorInterface]]></code>
Expand Down Expand Up @@ -670,21 +664,12 @@
</PossiblyNullPropertyAssignmentValue>
</file>
<file src="src/State/ScreenProcessor.php">
<NullableReturnStatement>
<InvalidReturnStatement>
<code><![CDATA[$screen]]></code>
</NullableReturnStatement>
<PossiblyNullReference>
<code><![CDATA[setCreatedBy]]></code>
<code><![CDATA[setDescription]]></code>
<code><![CDATA[setEnableColorSchemeChange]]></code>
<code><![CDATA[setLocation]]></code>
<code><![CDATA[setModifiedBy]]></code>
<code><![CDATA[setOrientation]]></code>
<code><![CDATA[setResolution]]></code>
<code><![CDATA[setScreenLayout]]></code>
<code><![CDATA[setSize]]></code>
<code><![CDATA[setTitle]]></code>
</PossiblyNullReference>
</InvalidReturnStatement>
<InvalidReturnType>
<code><![CDATA[Screen]]></code>
</InvalidReturnType>
</file>
<file src="src/State/ScreenProvider.php">
<PossiblyNullPropertyAssignmentValue>
Expand Down
2 changes: 1 addition & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
resolveFromConfigFile="true"
findUnusedBaselineEntry="true"
findUnusedCode="false"
errorBaseline="./psalm-baseline.xml"
errorBaseline="psalm-baseline.xml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
Expand Down
4 changes: 2 additions & 2 deletions src/State/AbstractProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ public function toOutput(object $object): object
*
* This is needed to get an object handled by entity manager.
*
* @param $object
* @param \App\Entity\Tenant\Playlist|\App\Entity\Tenant\Screen|\App\Entity\Tenant\ScreenGroup|\App\Entity\Tenant\Slide|\App\Entity\Tenant\Theme $object
*
* @return mixed|object|null
*/
protected function loadPrevious($object, array $context)
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)
{
if ($previous = $context['previous_data'] ?? null) {
$repository = $this->entityManager->getRepository($object::class);
Expand Down
1 change: 0 additions & 1 deletion src/State/ScreenProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use ApiPlatform\Metadata\Operation;
use ApiPlatform\State\ProcessorInterface;
use App\Dto\ScreenInput;
use App\Entity\Tenant\Playlist;
use App\Entity\Tenant\PlaylistScreenRegion;
use App\Entity\Tenant\Screen;
use App\Repository\PlaylistRepository;
Expand Down

0 comments on commit 5afd9b3

Please sign in to comment.