diff --git a/src/Attribute/AttributeFactory.php b/src/Attribute/AttributeFactory.php index 406f561cf..2a6b3518b 100644 --- a/src/Attribute/AttributeFactory.php +++ b/src/Attribute/AttributeFactory.php @@ -89,7 +89,7 @@ public function setServiceContainer(IMetaModelsServiceContainer $serviceContaine if ($deprecationNotice) { // @codingStandardsIgnoreStart @trigger_error( - '"' .__METHOD__ . '" is deprecated and will get removed.', + '"' . __METHOD__ . '" is deprecated and will get removed.', E_USER_DEPRECATED ); // @codingStandardsIgnoreEnd @@ -129,7 +129,7 @@ public function getServiceContainer() { // @codingStandardsIgnoreStart @trigger_error( - '"' .__METHOD__ . '" is deprecated - use the services from the service container.', + '"' . __METHOD__ . '" is deprecated - use the services from the service container.', E_USER_DEPRECATED ); // @codingStandardsIgnoreEnd diff --git a/src/Attribute/Base.php b/src/Attribute/Base.php index e383552c4..58db16bac 100644 --- a/src/Attribute/Base.php +++ b/src/Attribute/Base.php @@ -238,7 +238,7 @@ public function hookAdditionalFormatters($arrBaseFormatted, $arrRowData, $strOut if (isset($GLOBALS['METAMODEL_HOOKS']['parseValue']) && \is_array($GLOBALS['METAMODEL_HOOKS']['parseValue'])) { // @codingStandardsIgnoreStart @trigger_error( - '"' .__METHOD__ . '" is deprecated and will get removed.', + '"' . __METHOD__ . '" is deprecated and will get removed.', E_USER_DEPRECATED ); // @codingStandardsIgnoreEnd diff --git a/src/CoreBundle/Contao/InsertTag/ResolveLanguageTag.php b/src/CoreBundle/Contao/InsertTag/ResolveLanguageTag.php index b155d5b8b..5472c73af 100644 --- a/src/CoreBundle/Contao/InsertTag/ResolveLanguageTag.php +++ b/src/CoreBundle/Contao/InsertTag/ResolveLanguageTag.php @@ -65,7 +65,7 @@ public function resolve(string $queryString): string return $queryString; } - if (false === ($tags = \preg_split('~{{(ifn?lng[^{}]*)}}~', $queryString, -1, PREG_SPLIT_DELIM_CAPTURE ))) { + if (false === ($tags = \preg_split('~{{(ifn?lng[^{}]*)}}~', $queryString, -1, PREG_SPLIT_DELIM_CAPTURE))) { return $queryString; } @@ -75,10 +75,10 @@ public function resolve(string $queryString): string for ($_rit = 0, $_cnt = \count($tags); $_rit < $_cnt; $_rit += 2) { $strBuffer .= $tags[$_rit]; - if (!isset($tags[$_rit+1])) { + if (!isset($tags[$_rit + 1])) { continue; } - $strTag = $tags[$_rit+1]; + $strTag = $tags[$_rit + 1]; if (!$strTag) { continue; @@ -94,13 +94,14 @@ public function resolve(string $queryString): string '' !== $elements[1] && $this->languageMatches($elements[1]) === (\strtolower($elements[0]) === 'ifnlng') ) { - for (; $_rit<$_cnt; $_rit+=2) { + for (; $_rit < $_cnt; $_rit += 2) { if ( 1 === \preg_match( - '/^' . \preg_quote($elements[0], '/') . '(?:$|::|\|)/i', $tags[$_rit+3] ?? '' + '/^' . \preg_quote($elements[0], '/') . '(?:$|::|\|)/i', + $tags[$_rit + 3] ?? '' ) ) { - $tags[$_rit+2] = ''; + $tags[$_rit + 2] = ''; break; } } diff --git a/src/CoreBundle/EventListener/InsertTagsListener.php b/src/CoreBundle/EventListener/InsertTagsListener.php index e7c2523ba..70e7c56ae 100644 --- a/src/CoreBundle/EventListener/InsertTagsListener.php +++ b/src/CoreBundle/EventListener/InsertTagsListener.php @@ -41,7 +41,7 @@ /** * This class handles the replacement of all MetaModels insert tags. * - * @codingStandardsIgnoreStart + * phpcs:disable * * Available insert tags: * @@ -59,7 +59,7 @@ * -- JumpTo -- * mm::jumpTo::[MM Table-Name|ID]::[Item ID]::[ID render setting](::[Parameter (Default:url)|label|page|params.attname]) * - * @codingStandardsIgnoreEnd + * phpcs:enable * * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) * @SuppressWarnings(PHPMD.CouplingBetweenObjects) diff --git a/src/Factory.php b/src/Factory.php index a9f82e359..659935226 100644 --- a/src/Factory.php +++ b/src/Factory.php @@ -3,7 +3,7 @@ /** * This file is part of MetaModels/core. * - * (c) 2012-2023 The MetaModels team. + * (c) 2012-2026 The MetaModels team. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -15,7 +15,7 @@ * @author David Maack * @author Sven Baumann * @author Ingolf Steinhardt - * @copyright 2012-2023 The MetaModels team. + * @copyright 2012-2026 The MetaModels team. * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later * @filesource */ @@ -87,7 +87,7 @@ public function setServiceContainer(IMetaModelsServiceContainer $serviceContaine if ($deprecationNotice) { // @codingStandardsIgnoreStart @trigger_error( - '"' .__METHOD__ . '" is deprecated and will get removed.', + '"' . __METHOD__ . '" is deprecated and will get removed.', E_USER_DEPRECATED ); // @codingStandardsIgnoreEnd @@ -116,7 +116,7 @@ public function getServiceContainer() // @codingStandardsIgnoreStart @trigger_error( - '"' .__METHOD__ . '" is deprecated - use the services from the service container.', + '"' . __METHOD__ . '" is deprecated - use the services from the service container.', E_USER_DEPRECATED ); // @codingStandardsIgnoreEnd diff --git a/src/Filter/Setting/FilterSettingFactory.php b/src/Filter/Setting/FilterSettingFactory.php index 97d372281..3cf5074fd 100644 --- a/src/Filter/Setting/FilterSettingFactory.php +++ b/src/Filter/Setting/FilterSettingFactory.php @@ -3,7 +3,7 @@ /** * This file is part of MetaModels/core. * - * (c) 2012-2023 The MetaModels team. + * (c) 2012-2026 The MetaModels team. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -14,7 +14,7 @@ * @author Christian Schiffler * @author Sven Baumann * @author Ingolf Steinhardt - * @copyright 2012-2023 The MetaModels team. + * @copyright 2012-2026 The MetaModels team. * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later * @filesource */ @@ -101,7 +101,7 @@ public function setServiceContainer(IMetaModelsServiceContainer $serviceContaine if ($deprecationNotice) { // @codingStandardsIgnoreStart @trigger_error( - '"' .__METHOD__ . '" is deprecated and will get removed.', + '"' . __METHOD__ . '" is deprecated and will get removed.', E_USER_DEPRECATED ); // @codingStandardsIgnoreEnd @@ -136,7 +136,7 @@ public function getServiceContainer() { // @codingStandardsIgnoreStart @trigger_error( - '"' .__METHOD__ . '" is deprecated - use the services from the service container.', + '"' . __METHOD__ . '" is deprecated - use the services from the service container.', E_USER_DEPRECATED ); // @codingStandardsIgnoreEnd diff --git a/src/FrontendIntegration/MetaModelHybrid.php b/src/FrontendIntegration/MetaModelHybrid.php index b0b4a3ae1..2265d8308 100644 --- a/src/FrontendIntegration/MetaModelHybrid.php +++ b/src/FrontendIntegration/MetaModelHybrid.php @@ -105,7 +105,7 @@ public function getServiceContainer() { // @codingStandardsIgnoreStart @trigger_error( - '"' .__METHOD__ . '" is deprecated as the service container will get removed.', + '"' . __METHOD__ . '" is deprecated as the service container will get removed.', E_USER_DEPRECATED ); // @codingStandardsIgnoreEnd diff --git a/src/Helper/PaginationLimitCalculator.php b/src/Helper/PaginationLimitCalculator.php index 14d033bc9..6f9ecd513 100644 --- a/src/Helper/PaginationLimitCalculator.php +++ b/src/Helper/PaginationLimitCalculator.php @@ -329,7 +329,7 @@ public function setCurrentPage(int $currentPage): self // @codingStandardsIgnoreStart @trigger_error( - '"' .__METHOD__ . '" is deprecated - the page is determined automatically from the current request.', + '"' . __METHOD__ . '" is deprecated - the page is determined automatically from the current request.', E_USER_DEPRECATED ); // @codingStandardsIgnoreEnd diff --git a/src/Item.php b/src/Item.php index 39994e7f7..4e2697b7f 100644 --- a/src/Item.php +++ b/src/Item.php @@ -111,7 +111,7 @@ public function getServiceContainer() { // @codingStandardsIgnoreStart @trigger_error( - '"' .__METHOD__ . '" is deprecated and will get removed in MetaModels 3.0.', + '"' . __METHOD__ . '" is deprecated and will get removed in MetaModels 3.0.', E_USER_DEPRECATED ); // @codingStandardsIgnoreEnd diff --git a/src/ItemList.php b/src/ItemList.php index 7f650efe7..4952b2ad3 100644 --- a/src/ItemList.php +++ b/src/ItemList.php @@ -3,7 +3,7 @@ /** * This file is part of MetaModels/core. * - * (c) 2012-2025 The MetaModels team. + * (c) 2012-2026 The MetaModels team. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -25,7 +25,7 @@ * @author David Molineus * @author Ingolf Steinhardt * @author Fritz Michael Gschwantner - * @copyright 2012-2025 The MetaModels team. + * @copyright 2012-2026 The MetaModels team. * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later * @filesource */ @@ -524,19 +524,19 @@ public function setMetaModel(string|int $intMetaModel, string|int $intView): sel { if (is_int($intMetaModel)) { $intMetaModel = (string) $intMetaModel; - // @codingStandardsIgnoreStart Silencing errors is discouraged + // phpcs:disable @trigger_error( - 'Parameter $intMetaModel in "' . __CLASS__ . '::' .__METHOD__. '" has been changed from int to string.', + 'Parameter $intMetaModel in "' . __CLASS__ . '::' . __METHOD__ . '" has been changed from int to string.', E_USER_DEPRECATED ); - // @codingStandardsIgnoreEnd + // phpcs:enable } if (is_int($intView)) { $intView = (string) $intView; // @codingStandardsIgnoreStart Silencing errors is discouraged @trigger_error( - 'Parameter $intView in "' . __CLASS__ . '::' .__METHOD__. '" has been changed from int to string.', + 'Parameter $intView in "' . __CLASS__ . '::' . __METHOD__ . '" has been changed from int to string.', E_USER_DEPRECATED ); // @codingStandardsIgnoreEnd @@ -702,7 +702,7 @@ public function setFilterSettings(string|int $intFilter): self $intFilter = (string) $intFilter; // @codingStandardsIgnoreStart Silencing errors is discouraged @trigger_error( - 'Parameter $intFilter in "' . __CLASS__ . '::' .__METHOD__. '" has been changed from int to string.', + 'Parameter $intFilter in "' . __CLASS__ . '::' . __METHOD__ . '" has been changed from int to string.', E_USER_DEPRECATED ); // @codingStandardsIgnoreEnd @@ -1017,7 +1017,7 @@ public function getObjItems(): IItems { // @codingStandardsIgnoreStart @trigger_error( - '"' .__METHOD__ . '" is deprecated - use \'getItems()\'.', + '"' . __METHOD__ . '" is deprecated - use \'getItems()\'.', E_USER_DEPRECATED ); // @codingStandardsIgnoreEnd diff --git a/src/MetaModel.php b/src/MetaModel.php index b9cbf0967..6ca89bd5a 100644 --- a/src/MetaModel.php +++ b/src/MetaModel.php @@ -171,7 +171,7 @@ public function getServiceContainer() { // @codingStandardsIgnoreStart @trigger_error( - '"' .__METHOD__ . '" is deprecated and will get removed.', + '"' . __METHOD__ . '" is deprecated and will get removed.', E_USER_DEPRECATED ); // @codingStandardsIgnoreEnd @@ -203,7 +203,7 @@ public function setServiceContainer($serviceContainer, $deprecationNotice = true if ($deprecationNotice) { // @codingStandardsIgnoreStart @trigger_error( - '"' .__METHOD__ . '" is deprecated and will get removed.', + '"' . __METHOD__ . '" is deprecated and will get removed.', E_USER_DEPRECATED ); // @codingStandardsIgnoreEnd @@ -224,7 +224,7 @@ protected function getDatabase() { // @codingStandardsIgnoreStart @trigger_error( - '"' .__METHOD__ . '" is deprecated and will get removed.', + '"' . __METHOD__ . '" is deprecated and will get removed.', E_USER_DEPRECATED ); // @codingStandardsIgnoreEnd @@ -786,7 +786,7 @@ public function getAvailableLanguages() // @codingStandardsIgnoreStart @\trigger_error( \sprintf('The method "%s" is deprecated since MetaModels 2.2 and to be removed in 3.0. ' . - 'Please test for "instanceof "\MetaModels\ITranslatedMetaModel" and use '. + 'Please test for "instanceof "\MetaModels\ITranslatedMetaModel" and use ' . '"\MetaModels\ITranslatedMetaModel::getLanguages" instead.', __METHOD__), E_USER_DEPRECATED ); @@ -1328,7 +1328,7 @@ public function saveItem($objItem, $timestamp = null) } elseif ($this->isTranslated(false)) { // @codingStandardsIgnoreStart @\trigger_error( - \sprintf('Support for translated MetaModels not implementing "\MetaModels\ITranslatedMetaModel" '. + \sprintf('Support for translated MetaModels not implementing "\MetaModels\ITranslatedMetaModel" ' . 'is %s deprecated since MetaModels 2.2 and to be removed in 3.0. ' . 'Please implement interface "\MetaModels\ITranslatedMetaModel".', __METHOD__), E_USER_DEPRECATED diff --git a/src/MetaModelsServiceContainer.php b/src/MetaModelsServiceContainer.php index a81b500f2..68908c21f 100644 --- a/src/MetaModelsServiceContainer.php +++ b/src/MetaModelsServiceContainer.php @@ -130,7 +130,7 @@ public function getFactory() { // @codingStandardsIgnoreStart @trigger_error( - '"' .__METHOD__ . '" is deprecated as the service container will get removed.', + '"' . __METHOD__ . '" is deprecated as the service container will get removed.', E_USER_DEPRECATED ); // @codingStandardsIgnoreEnd @@ -167,7 +167,7 @@ public function getAttributeFactory() { // @codingStandardsIgnoreStart @trigger_error( - '"' .__METHOD__ . '" is deprecated as the service container will get removed.', + '"' . __METHOD__ . '" is deprecated as the service container will get removed.', E_USER_DEPRECATED ); // @codingStandardsIgnoreEnd @@ -204,7 +204,7 @@ public function getFilterFactory() { // @codingStandardsIgnoreStart @trigger_error( - '"' .__METHOD__ . '" is deprecated as the service container will get removed.', + '"' . __METHOD__ . '" is deprecated as the service container will get removed.', E_USER_DEPRECATED ); // @codingStandardsIgnoreEnd @@ -241,7 +241,7 @@ public function getRenderSettingFactory() { // @codingStandardsIgnoreStart @trigger_error( - '"' .__METHOD__ . '" is deprecated as the service container will get removed.', + '"' . __METHOD__ . '" is deprecated as the service container will get removed.', E_USER_DEPRECATED ); // @codingStandardsIgnoreEnd @@ -278,7 +278,7 @@ public function getEventDispatcher() { // @codingStandardsIgnoreStart @trigger_error( - '"' .__METHOD__ . '" is deprecated as the service container will get removed.', + '"' . __METHOD__ . '" is deprecated as the service container will get removed.', E_USER_DEPRECATED ); // @codingStandardsIgnoreEnd @@ -314,7 +314,7 @@ public function getDatabase() { // @codingStandardsIgnoreStart @trigger_error( - '"' .__METHOD__ . '" is deprecated as the service container will get removed.', + '"' . __METHOD__ . '" is deprecated as the service container will get removed.', E_USER_DEPRECATED ); // @codingStandardsIgnoreEnd @@ -338,7 +338,7 @@ public function getCache() { // @codingStandardsIgnoreStart @trigger_error( - '"' .__METHOD__ . '" is deprecated as the service container will get removed.', + '"' . __METHOD__ . '" is deprecated as the service container will get removed.', E_USER_DEPRECATED ); // @codingStandardsIgnoreEnd @@ -376,7 +376,7 @@ public function setService($service, $serviceName = null) { // @codingStandardsIgnoreStart @trigger_error( - '"' .__METHOD__ . '" is deprecated as the service container will get removed.', + '"' . __METHOD__ . '" is deprecated as the service container will get removed.', E_USER_DEPRECATED ); // @codingStandardsIgnoreEnd @@ -408,7 +408,7 @@ public function getService($serviceName) { // @codingStandardsIgnoreStart @trigger_error( - '"' .__METHOD__ . '" is deprecated as the service container will get removed.', + '"' . __METHOD__ . '" is deprecated as the service container will get removed.', E_USER_DEPRECATED ); // @codingStandardsIgnoreEnd diff --git a/src/Render/Setting/RenderSettingFactory.php b/src/Render/Setting/RenderSettingFactory.php index 1898fe2a1..ff0cf2f1b 100644 --- a/src/Render/Setting/RenderSettingFactory.php +++ b/src/Render/Setting/RenderSettingFactory.php @@ -125,7 +125,7 @@ public function setServiceContainer(IMetaModelsServiceContainer $serviceContaine if ($deprecationNotice) { // @codingStandardsIgnoreStart @trigger_error( - '"' .__METHOD__ . '" is deprecated and will get removed.', + '"' . __METHOD__ . '" is deprecated and will get removed.', E_USER_DEPRECATED ); // @codingStandardsIgnoreEnd @@ -170,7 +170,7 @@ public function getServiceContainer() { // @codingStandardsIgnoreStart @trigger_error( - '"' .__METHOD__ . '" is deprecated - use the services from the service container.', + '"' . __METHOD__ . '" is deprecated - use the services from the service container.', E_USER_DEPRECATED ); // @codingStandardsIgnoreEnd