Skip to content

Commit 45ba7b4

Browse files
github-actions[bot]DACHCOM Bot
and
DACHCOM Bot
authored
[CS] Refactor (#241)
Co-authored-by: DACHCOM Bot <bot@dachcom.ch>
1 parent ebc2f89 commit 45ba7b4

File tree

112 files changed

+1275
-96
lines changed

Some content is hidden

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

112 files changed

+1275
-96
lines changed

src/Builder/AbstractConfigBuilder.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 ToolboxBundle\Builder;
415

516
use Pimcore\Model\Document\Editable\Area\Info;
@@ -38,7 +49,6 @@ protected function parseConfigElements(
3849
$acStoreProcessed = false;
3950

4051
foreach ($configElements as $configElementName => $elementData) {
41-
4252
// skip inline rendered config elements
4353
if ($isInlineContext === true && array_key_exists('inline_rendered', $elementData) && $elementData['inline_rendered'] === true) {
4454
continue;
@@ -139,5 +149,4 @@ private function checkColumnAdjusterField(string $brickId, ?string $tab, array $
139149

140150
return $editableNodes;
141151
}
142-
143152
}

src/Builder/BrickConfigBuilder.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 ToolboxBundle\Builder;
415

516
use Pimcore\Extension\Document\Areabrick\EditableDialogBoxConfiguration;
@@ -35,7 +46,6 @@ public function buildConfigurationData(Info $info, string $brickId, array $areaC
3546
$configElements = $areaConfig['config_elements'] ?? [];
3647

3748
foreach ($configElements as $itemName => $elementData) {
38-
3949
if ($isInlineContext === true && array_key_exists('inline_rendered', $elementData) && $elementData['inline_rendered'] === true) {
4050
continue;
4151
}

src/Builder/BrickConfigBuilderInterface.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 ToolboxBundle\Builder;
415

516
use Pimcore\Extension\Document\Areabrick\EditableDialogBoxConfiguration;

src/Builder/InlineConfigBuilder.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 ToolboxBundle\Builder;
415

516
use Pimcore\Model\Document\Editable\Area\Info;
@@ -29,7 +40,6 @@ public function buildInlineConfiguration(Info $info, string $brickId, array $are
2940
$items = $this->parseConfigElements($info, $brickId, $themeOptions, $inlineConfigElements, [], false);
3041

3142
foreach ($items as $item) {
32-
3343
$headlessInfo = $this->editableInfoFactory->createViaBrick($info, $editMode, $item);
3444
$renderedEditable = $this->headlessEditableRenderer->buildEditable($headlessInfo);
3545

@@ -52,7 +62,6 @@ public function buildInlineConfigurationData(Info $info, string $brickId, array
5262
$inlineConfigElements = $areaConfig['inline_config_elements'] ?? [];
5363

5464
foreach ($inlineConfigElements as $itemName => $item) {
55-
5665
$item['name'] = $itemName;
5766

5867
$headlessInfo = $this->editableInfoFactory->createViaBrick($info, false, $item);

src/Builder/InlineConfigBuilderInterface.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 ToolboxBundle\Builder;
415

516
use Pimcore\Model\Document\Editable\Area\Info;

src/Calculator/Bootstrap3/ColumnCalculator.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 ToolboxBundle\Calculator\Bootstrap3;
415

516
use ToolboxBundle\Calculator\ColumnCalculatorInterface;

src/Calculator/Bootstrap3/SlideColumnCalculator.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 ToolboxBundle\Calculator\Bootstrap3;
415

516
use ToolboxBundle\Calculator\SlideColumnCalculatorInterface;

src/Calculator/Bootstrap4/ColumnCalculator.php

Lines changed: 12 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 ToolboxBundle\Calculator\Bootstrap4;
415

516
use ToolboxBundle\Calculator\ColumnCalculatorInterface;
@@ -89,7 +100,7 @@ public function calculateColumns(?string $value, ?array $customColumnConfigurati
89100
foreach ($customBreakPoints as $customBreakPointName => $customBreakPointData) {
90101
$customBreakPointDataColumns = explode('_', $customBreakPointData);
91102
$customColAmount = $customBreakPointDataColumns[$i] ?? $gridSize;
92-
if (str_starts_with($customColAmount, 'o')) {
103+
if (str_starts_with($customColAmount, 'o')) {
93104
$customOffset = (int) substr($customColAmount, 1);
94105
$bpPrefix = $customBreakPointName === 'xs' ? '' : $customBreakPointName . '-';
95106
$bootstrapOffsetConfig[$customBreakPointName] = 'offset-' . $bpPrefix . $customOffset;

src/Calculator/Bootstrap4/SlideColumnCalculator.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 ToolboxBundle\Calculator\Bootstrap4;
415

516
use ToolboxBundle\Calculator\SlideColumnCalculatorInterface;

src/Calculator/ColumnCalculatorInterface.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 ToolboxBundle\Calculator;
415

516
use ToolboxBundle\Manager\ConfigManagerInterface;

src/Calculator/SlideColumnCalculatorInterface.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 ToolboxBundle\Calculator;
415

516
interface SlideColumnCalculatorInterface

src/Calculator/UIkit3/ColumnCalculator.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 ToolboxBundle\Calculator\UIkit3;
415

516
use ToolboxBundle\Calculator\ColumnCalculatorInterface;

src/Calculator/UIkit3/SlideColumnCalculator.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 ToolboxBundle\Calculator\UIkit3;
415

516
use ToolboxBundle\Calculator\SlideColumnCalculatorInterface;

src/Command/AreaConfigurationCommand.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 ToolboxBundle\Command;
415

516
use Symfony\Component\Console\Command\Command;
@@ -10,8 +21,6 @@
1021
use Symfony\Component\Console\Input\InputOption;
1122
use Symfony\Component\Console\Output\OutputInterface;
1223
use ToolboxBundle\Manager\AdaptiveConfigManagerInterface;
13-
use ToolboxBundle\Manager\ConfigManagerInterface;
14-
use ToolboxBundle\ToolboxConfig;
1524

1625
class AreaConfigurationCommand extends Command
1726
{

src/Connector/BundleConnector.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 ToolboxBundle\Connector;
415

516
use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;

src/Controller/Admin/ColumnAdjusterController.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 ToolboxBundle\Controller\Admin;
415

516
use Pimcore\Bundle\AdminBundle\Controller\AdminAbstractController;

src/Controller/Admin/SettingsController.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 ToolboxBundle\Controller\Admin;
415

516
use Exception;

src/Controller/AjaxController.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
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 ToolboxBundle\Controller;
415

16+
use Pimcore\Controller\FrontendController;
517
use Symfony\Component\HttpFoundation\JsonResponse;
618
use Symfony\Component\HttpFoundation\Request;
7-
use Pimcore\Controller\FrontendController;
819
use Symfony\Component\HttpFoundation\Response;
920
use ToolboxBundle\Manager\ConfigManagerInterface;
1021
use ToolboxBundle\Manager\LayoutManagerInterface;

src/Controller/HeadlessController.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
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 ToolboxBundle\Controller;
415

5-
use Symfony\Component\HttpFoundation\Request;
616
use Pimcore\Controller\FrontendController;
17+
use Symfony\Component\HttpFoundation\Request;
718
use Symfony\Component\HttpFoundation\Response;
819
use ToolboxBundle\HeadlessDocument\HeadlessDocumentResolver;
920

0 commit comments

Comments
 (0)