Commit 9d03eaff authored by Wouter Wolters's avatar Wouter Wolters Committed by Oliver Bartsch
Browse files

[TASK] Replace redundant static:: in final classes

Replace static:: with self:: in final classes.

Resolves: #95319
Releases: master
Change-Id: If375daf637c31f94c86f24d9189e85f8bae32581
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/71190

Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
parent cb355fa5
......@@ -68,6 +68,6 @@ final class InformationStatus extends Enumeration
*/
public function isGreaterThan(InformationStatus $status)
{
return static::$statusIntegerMap[(string)$this] > static::$statusIntegerMap[(string)$status];
return self::$statusIntegerMap[(string)$this] > self::$statusIntegerMap[(string)$status];
}
}
......@@ -179,7 +179,7 @@ final class MigrateFeloginPlugins implements UpgradeWizardInterface
*/
protected function migrateFlexformSettings(string $oldValue): string
{
$fieldNames = implode('|', static::$flexFormFields);
$fieldNames = implode('|', self::$flexFormFields);
$pattern = '/<field index="(' . $fieldNames . ')">/';
$replacement = '<field index="settings.$1">';
......@@ -196,7 +196,7 @@ final class MigrateFeloginPlugins implements UpgradeWizardInterface
{
$constraints = [];
foreach (static::$flexFormFields as $flexFormField) {
foreach (self::$flexFormFields as $flexFormField) {
$value = '%<field index="' . $flexFormField . '">%';
$constraints[] = $queryBuilder->expr()->like('pi_flexform', $queryBuilder->createNamedParameter($value));
}
......
......@@ -29,9 +29,7 @@ final class TypeConverterException extends \TYPO3\CMS\Extbase\Property\Exception
public static function fromError(Error $error): TypeConverterException
{
// [phpstan] Unsafe usage of new static()
// todo: Either mark this class or its constructor final or use new self instead.
$exception = new static($error->getMessage(), $error->getCode());
$exception = new self($error->getMessage(), $error->getCode());
$exception->error = $error;
return $exception;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment