Skip to content

Commit 3b73cde

Browse files
authored
Merge pull request #1554 from MetaModels/hotfix/fix_code_style
Fix code style
2 parents a6bb2f7 + d51db54 commit 3b73cde

File tree

13 files changed

+47
-46
lines changed

13 files changed

+47
-46
lines changed

src/Attribute/AttributeFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function setServiceContainer(IMetaModelsServiceContainer $serviceContaine
8989
if ($deprecationNotice) {
9090
// @codingStandardsIgnoreStart
9191
@trigger_error(
92-
'"' .__METHOD__ . '" is deprecated and will get removed.',
92+
'"' . __METHOD__ . '" is deprecated and will get removed.',
9393
E_USER_DEPRECATED
9494
);
9595
// @codingStandardsIgnoreEnd
@@ -129,7 +129,7 @@ public function getServiceContainer()
129129
{
130130
// @codingStandardsIgnoreStart
131131
@trigger_error(
132-
'"' .__METHOD__ . '" is deprecated - use the services from the service container.',
132+
'"' . __METHOD__ . '" is deprecated - use the services from the service container.',
133133
E_USER_DEPRECATED
134134
);
135135
// @codingStandardsIgnoreEnd

src/Attribute/Base.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ public function hookAdditionalFormatters($arrBaseFormatted, $arrRowData, $strOut
238238
if (isset($GLOBALS['METAMODEL_HOOKS']['parseValue']) && \is_array($GLOBALS['METAMODEL_HOOKS']['parseValue'])) {
239239
// @codingStandardsIgnoreStart
240240
@trigger_error(
241-
'"' .__METHOD__ . '" is deprecated and will get removed.',
241+
'"' . __METHOD__ . '" is deprecated and will get removed.',
242242
E_USER_DEPRECATED
243243
);
244244
// @codingStandardsIgnoreEnd

src/CoreBundle/Contao/InsertTag/ResolveLanguageTag.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function resolve(string $queryString): string
6565
return $queryString;
6666
}
6767

68-
if (false === ($tags = \preg_split('~{{(ifn?lng[^{}]*)}}~', $queryString, -1, PREG_SPLIT_DELIM_CAPTURE ))) {
68+
if (false === ($tags = \preg_split('~{{(ifn?lng[^{}]*)}}~', $queryString, -1, PREG_SPLIT_DELIM_CAPTURE))) {
6969
return $queryString;
7070
}
7171

@@ -75,10 +75,10 @@ public function resolve(string $queryString): string
7575
for ($_rit = 0, $_cnt = \count($tags); $_rit < $_cnt; $_rit += 2) {
7676
$strBuffer .= $tags[$_rit];
7777

78-
if (!isset($tags[$_rit+1])) {
78+
if (!isset($tags[$_rit + 1])) {
7979
continue;
8080
}
81-
$strTag = $tags[$_rit+1];
81+
$strTag = $tags[$_rit + 1];
8282

8383
if (!$strTag) {
8484
continue;
@@ -94,13 +94,14 @@ public function resolve(string $queryString): string
9494
'' !== $elements[1] &&
9595
$this->languageMatches($elements[1]) === (\strtolower($elements[0]) === 'ifnlng')
9696
) {
97-
for (; $_rit<$_cnt; $_rit+=2) {
97+
for (; $_rit < $_cnt; $_rit += 2) {
9898
if (
9999
1 === \preg_match(
100-
'/^' . \preg_quote($elements[0], '/') . '(?:$|::|\|)/i', $tags[$_rit+3] ?? ''
100+
'/^' . \preg_quote($elements[0], '/') . '(?:$|::|\|)/i',
101+
$tags[$_rit + 3] ?? ''
101102
)
102103
) {
103-
$tags[$_rit+2] = '';
104+
$tags[$_rit + 2] = '';
104105
break;
105106
}
106107
}

src/CoreBundle/EventListener/InsertTagsListener.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
/**
4242
* This class handles the replacement of all MetaModels insert tags.
4343
*
44-
* @codingStandardsIgnoreStart
44+
* phpcs:disable
4545
*
4646
* Available insert tags:
4747
*
@@ -59,7 +59,7 @@
5959
* -- JumpTo --
6060
* mm::jumpTo::[MM Table-Name|ID]::[Item ID]::[ID render setting](::[Parameter (Default:url)|label|page|params.attname])
6161
*
62-
* @codingStandardsIgnoreEnd
62+
* phpcs:enable
6363
*
6464
* @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
6565
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)

src/Factory.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* This file is part of MetaModels/core.
55
*
6-
* (c) 2012-2023 The MetaModels team.
6+
* (c) 2012-2026 The MetaModels team.
77
*
88
* For the full copyright and license information, please view the LICENSE
99
* file that was distributed with this source code.
@@ -15,7 +15,7 @@
1515
* @author David Maack <david.maack@arcor.de>
1616
* @author Sven Baumann <baumann.sv@gmail.com>
1717
* @author Ingolf Steinhardt <info@e-spin.de>
18-
* @copyright 2012-2023 The MetaModels team.
18+
* @copyright 2012-2026 The MetaModels team.
1919
* @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later
2020
* @filesource
2121
*/
@@ -87,7 +87,7 @@ public function setServiceContainer(IMetaModelsServiceContainer $serviceContaine
8787
if ($deprecationNotice) {
8888
// @codingStandardsIgnoreStart
8989
@trigger_error(
90-
'"' .__METHOD__ . '" is deprecated and will get removed.',
90+
'"' . __METHOD__ . '" is deprecated and will get removed.',
9191
E_USER_DEPRECATED
9292
);
9393
// @codingStandardsIgnoreEnd
@@ -116,7 +116,7 @@ public function getServiceContainer()
116116

117117
// @codingStandardsIgnoreStart
118118
@trigger_error(
119-
'"' .__METHOD__ . '" is deprecated - use the services from the service container.',
119+
'"' . __METHOD__ . '" is deprecated - use the services from the service container.',
120120
E_USER_DEPRECATED
121121
);
122122
// @codingStandardsIgnoreEnd

src/Filter/Setting/FilterSettingFactory.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* This file is part of MetaModels/core.
55
*
6-
* (c) 2012-2023 The MetaModels team.
6+
* (c) 2012-2026 The MetaModels team.
77
*
88
* For the full copyright and license information, please view the LICENSE
99
* file that was distributed with this source code.
@@ -14,7 +14,7 @@
1414
* @author Christian Schiffler <c.schiffler@cyberspectrum.de>
1515
* @author Sven Baumann <baumann.sv@gmail.com>
1616
* @author Ingolf Steinhardt <info@e-spin.de>
17-
* @copyright 2012-2023 The MetaModels team.
17+
* @copyright 2012-2026 The MetaModels team.
1818
* @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later
1919
* @filesource
2020
*/
@@ -101,7 +101,7 @@ public function setServiceContainer(IMetaModelsServiceContainer $serviceContaine
101101
if ($deprecationNotice) {
102102
// @codingStandardsIgnoreStart
103103
@trigger_error(
104-
'"' .__METHOD__ . '" is deprecated and will get removed.',
104+
'"' . __METHOD__ . '" is deprecated and will get removed.',
105105
E_USER_DEPRECATED
106106
);
107107
// @codingStandardsIgnoreEnd
@@ -136,7 +136,7 @@ public function getServiceContainer()
136136
{
137137
// @codingStandardsIgnoreStart
138138
@trigger_error(
139-
'"' .__METHOD__ . '" is deprecated - use the services from the service container.',
139+
'"' . __METHOD__ . '" is deprecated - use the services from the service container.',
140140
E_USER_DEPRECATED
141141
);
142142
// @codingStandardsIgnoreEnd

src/FrontendIntegration/MetaModelHybrid.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public function getServiceContainer()
105105
{
106106
// @codingStandardsIgnoreStart
107107
@trigger_error(
108-
'"' .__METHOD__ . '" is deprecated as the service container will get removed.',
108+
'"' . __METHOD__ . '" is deprecated as the service container will get removed.',
109109
E_USER_DEPRECATED
110110
);
111111
// @codingStandardsIgnoreEnd

src/Helper/PaginationLimitCalculator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ public function setCurrentPage(int $currentPage): self
329329

330330
// @codingStandardsIgnoreStart
331331
@trigger_error(
332-
'"' .__METHOD__ . '" is deprecated - the page is determined automatically from the current request.',
332+
'"' . __METHOD__ . '" is deprecated - the page is determined automatically from the current request.',
333333
E_USER_DEPRECATED
334334
);
335335
// @codingStandardsIgnoreEnd

src/Item.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public function getServiceContainer()
111111
{
112112
// @codingStandardsIgnoreStart
113113
@trigger_error(
114-
'"' .__METHOD__ . '" is deprecated and will get removed in MetaModels 3.0.',
114+
'"' . __METHOD__ . '" is deprecated and will get removed in MetaModels 3.0.',
115115
E_USER_DEPRECATED
116116
);
117117
// @codingStandardsIgnoreEnd

src/ItemList.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* This file is part of MetaModels/core.
55
*
6-
* (c) 2012-2025 The MetaModels team.
6+
* (c) 2012-2026 The MetaModels team.
77
*
88
* For the full copyright and license information, please view the LICENSE
99
* file that was distributed with this source code.
@@ -25,7 +25,7 @@
2525
* @author David Molineus <david.molineus@netzmacht.de>
2626
* @author Ingolf Steinhardt <info@e-spin.de>
2727
* @author Fritz Michael Gschwantner <fmg@inspiredminds.at>
28-
* @copyright 2012-2025 The MetaModels team.
28+
* @copyright 2012-2026 The MetaModels team.
2929
* @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later
3030
* @filesource
3131
*/
@@ -524,19 +524,19 @@ public function setMetaModel(string|int $intMetaModel, string|int $intView): sel
524524
{
525525
if (is_int($intMetaModel)) {
526526
$intMetaModel = (string) $intMetaModel;
527-
// @codingStandardsIgnoreStart Silencing errors is discouraged
527+
// phpcs:disable
528528
@trigger_error(
529-
'Parameter $intMetaModel in "' . __CLASS__ . '::' .__METHOD__. '" has been changed from int to string.',
529+
'Parameter $intMetaModel in "' . __CLASS__ . '::' . __METHOD__ . '" has been changed from int to string.',
530530
E_USER_DEPRECATED
531531
);
532-
// @codingStandardsIgnoreEnd
532+
// phpcs:enable
533533
}
534534

535535
if (is_int($intView)) {
536536
$intView = (string) $intView;
537537
// @codingStandardsIgnoreStart Silencing errors is discouraged
538538
@trigger_error(
539-
'Parameter $intView in "' . __CLASS__ . '::' .__METHOD__. '" has been changed from int to string.',
539+
'Parameter $intView in "' . __CLASS__ . '::' . __METHOD__ . '" has been changed from int to string.',
540540
E_USER_DEPRECATED
541541
);
542542
// @codingStandardsIgnoreEnd
@@ -702,7 +702,7 @@ public function setFilterSettings(string|int $intFilter): self
702702
$intFilter = (string) $intFilter;
703703
// @codingStandardsIgnoreStart Silencing errors is discouraged
704704
@trigger_error(
705-
'Parameter $intFilter in "' . __CLASS__ . '::' .__METHOD__. '" has been changed from int to string.',
705+
'Parameter $intFilter in "' . __CLASS__ . '::' . __METHOD__ . '" has been changed from int to string.',
706706
E_USER_DEPRECATED
707707
);
708708
// @codingStandardsIgnoreEnd
@@ -1017,7 +1017,7 @@ public function getObjItems(): IItems
10171017
{
10181018
// @codingStandardsIgnoreStart
10191019
@trigger_error(
1020-
'"' .__METHOD__ . '" is deprecated - use \'getItems()\'.',
1020+
'"' . __METHOD__ . '" is deprecated - use \'getItems()\'.',
10211021
E_USER_DEPRECATED
10221022
);
10231023
// @codingStandardsIgnoreEnd

0 commit comments

Comments
 (0)