Skip to content

Commit

Permalink
CS
Browse files Browse the repository at this point in the history
  • Loading branch information
aschempp committed Jul 20, 2020
1 parent b895744 commit 3295ed8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
Expand Up @@ -13,8 +13,8 @@
namespace Contao\CoreBundle\DependencyInjection\Compiler;

use Contao\CoreBundle\Routing\Page\ContentCompositionInterface;
use Contao\CoreBundle\Routing\Page\PageRegistry;
use Contao\CoreBundle\Routing\Page\DynamicRouteInterface;
use Contao\CoreBundle\Routing\Page\PageRegistry;
use Contao\CoreBundle\Routing\Page\RouteConfig;
use Contao\FrontendIndex;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
Expand Down
3 changes: 2 additions & 1 deletion core-bundle/src/Routing/Candidates/PageCandidates.php
Expand Up @@ -82,8 +82,9 @@ private function addRegexQuery(QueryBuilder $queryBuilder, string $pathInfo): bo
}

$paths = [];

foreach ($pathMap as $type => $pathRegex) {
$paths[] = '(?P<'.$type.'>'.substr($pathRegex, 2, strrpos($pathRegex, '$')-2).')';
$paths[] = '(?P<'.$type.'>'.substr($pathRegex, 2, strrpos($pathRegex, '$') - 2).')';
}

preg_match_all(
Expand Down
4 changes: 2 additions & 2 deletions core-bundle/src/Routing/Page/PageRegistry.php
Expand Up @@ -171,11 +171,11 @@ private function initializePrefixAndSuffix(): void
$urlSuffixes = [
array_column($results, 'urlSuffix'),
array_filter(array_map(
function (RouteConfig $config) {
static function (RouteConfig $config) {
return $config->getUrlSuffix();
},
$this->routeConfigs
))
)),
];

foreach ($this->routeConfigs as $config) {
Expand Down
2 changes: 1 addition & 1 deletion core-bundle/tests/Routing/Page/PageRegistryTest.php
Expand Up @@ -13,9 +13,9 @@
namespace Contao\CoreBundle\Tests\Routing\Page;

use Contao\CoreBundle\Routing\Page\ContentCompositionInterface;
use Contao\CoreBundle\Routing\Page\DynamicRouteInterface;
use Contao\CoreBundle\Routing\Page\PageRegistry;
use Contao\CoreBundle\Routing\Page\PageRoute;
use Contao\CoreBundle\Routing\Page\DynamicRouteInterface;
use Contao\CoreBundle\Routing\Page\RouteConfig;
use Contao\CoreBundle\Tests\TestCase;
use Contao\PageModel;
Expand Down

0 comments on commit 3295ed8

Please sign in to comment.