Skip to content

Commit

Permalink
Fix psalm issues
Browse files Browse the repository at this point in the history
  • Loading branch information
franmomu committed Jul 26, 2023
1 parent 6ce7fe6 commit e4062ed
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 16 deletions.
4 changes: 1 addition & 3 deletions Tests/Command/CommandTestKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Routing\Loader\Configurator\RouteConfigurator;
use Symfony\Component\Routing\RouteCollectionBuilder;

use function sys_get_temp_dir;

Expand All @@ -32,8 +31,7 @@ public function registerBundles(): array
];
}

/** @param RouteConfigurator|RouteCollectionBuilder $routes */
public function configureRoutes($routes): void
public function configureRoutes(RouteConfigurator $routes): void
{
}

Expand Down
4 changes: 1 addition & 3 deletions Tests/FixtureIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Routing\Loader\Configurator\RouteConfigurator;
use Symfony\Component\Routing\RouteCollectionBuilder;

use function array_map;
use function assert;
Expand Down Expand Up @@ -310,8 +309,7 @@ public function addServices(callable $callback): void
$this->servicesCallback = $callback;
}

/** @param RouteConfigurator|RouteCollectionBuilder $routes */
protected function configureRoutes($routes): void
protected function configureRoutes(RouteConfigurator $routes): void
{
}

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"symfony/stopwatch": "^5.4|^6.2",
"symfony/validator": "^5.4|^6.2",
"symfony/yaml": "^5.4|^6.2",
"vimeo/psalm": "^5.6"
"vimeo/psalm": "^5.12"
},
"suggest": {
"doctrine/data-fixtures": "Load data fixtures"
Expand Down
18 changes: 17 additions & 1 deletion 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.6.0@e784128902dfe01d489c4123d69918a9f3c1eac5">
<files psalm-version="5.12.0@f90118cdeacd0088e7215e64c0c99ceca819e176">
<file src="Command/LoadDataFixturesDoctrineODMCommand.php">
<UndefinedInterfaceMethod>
<code>ask</code>
Expand All @@ -10,6 +10,22 @@
<code>int</code>
</InvalidReturnType>
</file>
<file src="DependencyInjection/Configuration.php">
<UndefinedInterfaceMethod>
<code>arrayNode</code>
<code>end</code>
<code>scalarNode</code>
<code>scalarNode</code>
</UndefinedInterfaceMethod>
<UndefinedMethod>
<code>children</code>
</UndefinedMethod>
</file>
<file src="Form/Type/DocumentType.php">
<MethodSignatureMustProvideReturnType>
<code>configureOptions</code>
</MethodSignatureMustProvideReturnType>
</file>
<file src="Tests/Form/Type/GuesserTestType.php">
<MissingTemplateParam>
<code>GuesserTestType</code>
Expand Down
8 changes: 0 additions & 8 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,4 @@
<directory name="vendor"/>
</ignoreFiles>
</projectFiles>

<issueHandlers>
<UndefinedDocblockClass>
<errorLevel type="info">
<referencedClass name="Symfony\Component\Routing\RouteCollectionBuilder" /> <!-- for backwards compatibility with symfony/routing ^4.4 -->
</errorLevel>
</UndefinedDocblockClass>
</issueHandlers>
</psalm>

0 comments on commit e4062ed

Please sign in to comment.