Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Attribute/AttributeFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Attribute/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 7 additions & 6 deletions src/CoreBundle/Contao/InsertTag/ResolveLanguageTag.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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;
Expand All @@ -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;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/CoreBundle/EventListener/InsertTagsListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
/**
* This class handles the replacement of all MetaModels insert tags.
*
* @codingStandardsIgnoreStart
* phpcs:disable
*
* Available insert tags:
*
Expand All @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions src/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -15,7 +15,7 @@
* @author David Maack <david.maack@arcor.de>
* @author Sven Baumann <baumann.sv@gmail.com>
* @author Ingolf Steinhardt <info@e-spin.de>
* @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
*/
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions src/Filter/Setting/FilterSettingFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -14,7 +14,7 @@
* @author Christian Schiffler <c.schiffler@cyberspectrum.de>
* @author Sven Baumann <baumann.sv@gmail.com>
* @author Ingolf Steinhardt <info@e-spin.de>
* @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
*/
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/FrontendIntegration/MetaModelHybrid.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Helper/PaginationLimitCalculator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Item.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 8 additions & 8 deletions src/ItemList.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -25,7 +25,7 @@
* @author David Molineus <david.molineus@netzmacht.de>
* @author Ingolf Steinhardt <info@e-spin.de>
* @author Fritz Michael Gschwantner <fmg@inspiredminds.at>
* @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
*/
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions src/MetaModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
);
Expand Down Expand Up @@ -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
Expand Down
18 changes: 9 additions & 9 deletions src/MetaModelsServiceContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/Render/Setting/RenderSettingFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading