Skip to content

Commit d4a83f7

Browse files
github-actions[bot]DACHCOM Bot
andauthored
[CS] Refactor (#173)
Co-authored-by: DACHCOM Bot <bot@dachcom.ch>
1 parent 5930192 commit d4a83f7

File tree

102 files changed

+1225
-138
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+1225
-138
lines changed

src/Adapter/LocaleProvider/AbstractLocaleProvider.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
<?php
22

3+
/*
4+
* This source file is available under two different licenses:
5+
* - GNU General Public License version 3 (GPLv3)
6+
* - DACHCOM Commercial License (DCL)
7+
* Full copyright and license information is available in
8+
* LICENSE.md which is distributed with this source code.
9+
*
10+
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
11+
* @license GPLv3 and DCL
12+
*/
13+
314
namespace I18nBundle\Adapter\LocaleProvider;
415

516
abstract class AbstractLocaleProvider implements LocaleProviderInterface

src/Adapter/LocaleProvider/LocaleProviderInterface.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
<?php
22

3+
/*
4+
* This source file is available under two different licenses:
5+
* - GNU General Public License version 3 (GPLv3)
6+
* - DACHCOM Commercial License (DCL)
7+
* Full copyright and license information is available in
8+
* LICENSE.md which is distributed with this source code.
9+
*
10+
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
11+
* @license GPLv3 and DCL
12+
*/
13+
314
namespace I18nBundle\Adapter\LocaleProvider;
415

516
use I18nBundle\Model\ZoneInterface;

src/Adapter/LocaleProvider/SystemLocaleProvider.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
<?php
22

3+
/*
4+
* This source file is available under two different licenses:
5+
* - GNU General Public License version 3 (GPLv3)
6+
* - DACHCOM Commercial License (DCL)
7+
* Full copyright and license information is available in
8+
* LICENSE.md which is distributed with this source code.
9+
*
10+
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
11+
* @license GPLv3 and DCL
12+
*/
13+
314
namespace I18nBundle\Adapter\LocaleProvider;
415

516
use I18nBundle\Definitions;

src/Adapter/PathGenerator/AbstractPathGenerator.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
<?php
22

3+
/*
4+
* This source file is available under two different licenses:
5+
* - GNU General Public License version 3 (GPLv3)
6+
* - DACHCOM Commercial License (DCL)
7+
* Full copyright and license information is available in
8+
* LICENSE.md which is distributed with this source code.
9+
*
10+
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
11+
* @license GPLv3 and DCL
12+
*/
13+
314
namespace I18nBundle\Adapter\PathGenerator;
415

516
use I18nBundle\Transformer\AlternateRouteItemTransformer;

src/Adapter/PathGenerator/Document.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
<?php
22

3+
/*
4+
* This source file is available under two different licenses:
5+
* - GNU General Public License version 3 (GPLv3)
6+
* - DACHCOM Commercial License (DCL)
7+
* Full copyright and license information is available in
8+
* LICENSE.md which is distributed with this source code.
9+
*
10+
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
11+
* @license GPLv3 and DCL
12+
*/
13+
314
namespace I18nBundle\Adapter\PathGenerator;
415

516
use I18nBundle\Context\I18nContextInterface;
@@ -91,7 +102,6 @@ private function resolveDocumentRoutes(I18nContextInterface $i18nContext, Pimcor
91102
}
92103

93104
foreach ($zoneSites as $zoneSite) {
94-
95105
if (empty($zoneSite->getLocale())) {
96106
continue;
97107
}
@@ -104,6 +114,7 @@ private function resolveDocumentRoutes(I18nContextInterface $i18nContext, Pimcor
104114
if ($zoneSite->getType() === 'hardlink') {
105115
$virtualProxyZoneSites[] = $zoneSite;
106116
}
117+
107118
continue;
108119
}
109120

@@ -135,7 +146,6 @@ private function resolveDocumentRoutes(I18nContextInterface $i18nContext, Pimcor
135146
}
136147

137148
foreach ($virtualProxyZoneSites as $virtualProxyZoneSite) {
138-
139149
$sameLanguageContextIndex = array_search($virtualProxyZoneSite->getLanguageIso(), array_column($routes, 'languageIso'), true);
140150
if ($sameLanguageContextIndex === false) {
141151
continue;

src/Adapter/PathGenerator/DynamicRoute.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
<?php
22

3+
/*
4+
* This source file is available under two different licenses:
5+
* - GNU General Public License version 3 (GPLv3)
6+
* - DACHCOM Commercial License (DCL)
7+
* Full copyright and license information is available in
8+
* LICENSE.md which is distributed with this source code.
9+
*
10+
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
11+
* @license GPLv3 and DCL
12+
*/
13+
314
namespace I18nBundle\Adapter\PathGenerator;
415

516
use I18nBundle\Context\I18nContextInterface;
@@ -37,7 +48,6 @@ protected function buildAlternateRoutesStack(I18nContextInterface $i18nContext,
3748
$this->eventDispatcher->dispatch($event, $eventName);
3849

3950
foreach ($event->getAlternateRouteItems() as $alternateRouteItem) {
40-
4151
if ($alternateRouteItem->isValidAlternateRoute() === false) {
4252
continue;
4353
}
@@ -55,4 +65,3 @@ protected function buildAlternateRoutesStack(I18nContextInterface $i18nContext,
5565
return $routes;
5666
}
5767
}
58-

src/Adapter/PathGenerator/PathGeneratorInterface.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
<?php
22

3+
/*
4+
* This source file is available under two different licenses:
5+
* - GNU General Public License version 3 (GPLv3)
6+
* - DACHCOM Commercial License (DCL)
7+
* Full copyright and license information is available in
8+
* LICENSE.md which is distributed with this source code.
9+
*
10+
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
11+
* @license GPLv3 and DCL
12+
*/
13+
314
namespace I18nBundle\Adapter\PathGenerator;
415

516
use I18nBundle\Context\I18nContextInterface;

src/Adapter/PathGenerator/StaticRoute.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
<?php
22

3+
/*
4+
* This source file is available under two different licenses:
5+
* - GNU General Public License version 3 (GPLv3)
6+
* - DACHCOM Commercial License (DCL)
7+
* Full copyright and license information is available in
8+
* LICENSE.md which is distributed with this source code.
9+
*
10+
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
11+
* @license GPLv3 and DCL
12+
*/
13+
314
namespace I18nBundle\Adapter\PathGenerator;
415

516
use I18nBundle\Context\I18nContextInterface;
@@ -45,4 +56,3 @@ protected function generateLink(AlternateRouteItemInterface $routeItem): string
4556
return $this->router->generate($routeItem->getRouteName() ?? '', $routeParameters, UrlGeneratorInterface::ABSOLUTE_URL);
4657
}
4758
}
48-

src/Adapter/PathGenerator/Symfony.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,26 @@
11
<?php
22

3+
/*
4+
* This source file is available under two different licenses:
5+
* - GNU General Public License version 3 (GPLv3)
6+
* - DACHCOM Commercial License (DCL)
7+
* Full copyright and license information is available in
8+
* LICENSE.md which is distributed with this source code.
9+
*
10+
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
11+
* @license GPLv3 and DCL
12+
*/
13+
314
namespace I18nBundle\Adapter\PathGenerator;
415

516
use I18nBundle\Context\I18nContextInterface;
617
use I18nBundle\I18nEvents;
718
use I18nBundle\Model\RouteItem\AlternateRouteItemInterface;
819
use I18nBundle\Model\RouteItem\RouteItemInterface;
20+
use Symfony\Component\OptionsResolver\OptionsResolver;
921
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
1022
use Symfony\Component\Routing\RouterInterface;
1123
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
12-
use Symfony\Component\OptionsResolver\OptionsResolver;
1324

1425
class Symfony extends DynamicRoute
1526
{

src/Adapter/Redirector/AbstractRedirector.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
<?php
22

3+
/*
4+
* This source file is available under two different licenses:
5+
* - GNU General Public License version 3 (GPLv3)
6+
* - DACHCOM Commercial License (DCL)
7+
* Full copyright and license information is available in
8+
* LICENSE.md which is distributed with this source code.
9+
*
10+
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
11+
* @license GPLv3 and DCL
12+
*/
13+
314
namespace I18nBundle\Adapter\Redirector;
415

516
use Symfony\Component\OptionsResolver\OptionsResolver;

0 commit comments

Comments
 (0)