Skip to content

Commit

Permalink
Fix CS
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Jul 20, 2022
1 parent 2365bd7 commit f7751fd
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Loader/XmlFileLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ protected function parseImport(RouteCollection $collection, \DOMElement $node, $
$this->setCurrentDir(\dirname($path));

/** @var RouteCollection[] $imported */
$imported = $this->import($resource, ('' !== $type ? $type : null), false, $file, $exclude) ?: [];
$imported = $this->import($resource, '' !== $type ? $type : null, false, $file, $exclude) ?: [];

if (!\is_array($imported)) {
$imported = [$imported];
Expand Down
2 changes: 1 addition & 1 deletion Tests/Generator/Dumper/CompiledUrlGeneratorDumperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function testDumpWithRoutes()

public function testDumpWithSimpleLocalizedRoutes()
{
$this->routeCollection->add('test', (new Route('/foo')));
$this->routeCollection->add('test', new Route('/foo'));
$this->routeCollection->add('test.en', (new Route('/testing/is/fun'))->setDefault('_locale', 'en')->setDefault('_canonical_route', 'test')->setRequirement('_locale', 'en'));
$this->routeCollection->add('test.nl', (new Route('/testen/is/leuk'))->setDefault('_locale', 'nl')->setDefault('_canonical_route', 'test')->setRequirement('_locale', 'nl'));

Expand Down
2 changes: 1 addition & 1 deletion Tests/Generator/Dumper/PhpGeneratorDumperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function testDumpWithRoutes()

public function testDumpWithSimpleLocalizedRoutes()
{
$this->routeCollection->add('test', (new Route('/foo')));
$this->routeCollection->add('test', new Route('/foo'));
$this->routeCollection->add('test.en', (new Route('/testing/is/fun'))->setDefault('_locale', 'en')->setDefault('_canonical_route', 'test')->setRequirement('_locale', 'en'));
$this->routeCollection->add('test.nl', (new Route('/testen/is/leuk'))->setDefault('_locale', 'nl')->setDefault('_canonical_route', 'test')->setRequirement('_locale', 'nl'));

Expand Down
2 changes: 1 addition & 1 deletion Tests/RouteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ public function testLocaleRequirementWithLocalizedRoutes(Route $route)
public function provideNonLocalizedRoutes()
{
return [
[(new Route('/foo'))],
[new Route('/foo')],
[(new Route('/foo'))->setDefault('_locale', 'en')],
[(new Route('/foo'))->setDefault('_locale', 'en')->setDefault('_canonical_route', 'foo')],
[(new Route('/foo'))->setDefault('_locale', 'en')->setDefault('_canonical_route', 'foo')->setRequirement('_locale', 'foobar')],
Expand Down

0 comments on commit f7751fd

Please sign in to comment.