[TASK] PSR-12: Add unified new statements and argument spacing 63/64163/4
authorBenni Mack <benni@typo3.org>
Tue, 14 Apr 2020 12:43:24 +0000 (14:43 +0200)
committerGeorg Ringer <georg.ringer@gmail.com>
Wed, 15 Apr 2020 12:42:18 +0000 (14:42 +0200)
TYPO3's PHP-CS-Fixer configuration is adapted
to move towards the PSR-12 standard by unifying the
new statement and adding proper braces argument methods
and arguments.

Resolves: #91026
Releases: master
Change-Id: If5eb945e18fb4a2330e3c9eeaf90134126638079
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/64163
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Alexander Schnitzler <git@alexanderschnitzler.de>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Alexander Schnitzler <git@alexanderschnitzler.de>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
86 files changed:
Build/.php_cs
Build/Scripts/annotationChecker.php
Build/Scripts/docBlockChecker.php
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/DatabaseRowInitializeNewTest.php
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/DatabaseUserPermissionCheckTest.php
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaCheckboxItemsTest.php
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaColumnsProcessCommonTest.php
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaColumnsProcessFieldLabelsTest.php
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaColumnsProcessRecordTitleTest.php
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaColumnsProcessShowitemTest.php
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaFlexPrepareTest.php
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaGroupTest.php
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaInlineConfigurationTest.php
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaInlineExpandCollapseStateTest.php
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaInlineTest.php
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaInputPlaceholdersTest.php
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaRadioItemsTest.php
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaRecordTitleTest.php
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaSelectItemsTest.php
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaSelectTreeItemsTest.php
typo3/sysext/backend/Tests/Unit/Form/InlineStackProcessorTest.php
typo3/sysext/backend/Tests/Unit/Http/RouteDispatcherTest.php
typo3/sysext/backend/Tests/Unit/Middleware/SiteResolverTest.php
typo3/sysext/core/Classes/Cache/Backend/MemcachedBackend.php
typo3/sysext/core/Classes/Context/UserAspect.php
typo3/sysext/core/Classes/Controller/FileDumpController.php
typo3/sysext/core/Classes/Core/Bootstrap.php
typo3/sysext/core/Classes/Localization/Locales.php
typo3/sysext/core/Classes/ServiceProvider.php
typo3/sysext/core/Tests/Functional/Error/ErrorHandlerTest.php
typo3/sysext/core/Tests/Unit/Console/CommandRegistryTest.php
typo3/sysext/core/Tests/Unit/DependencyInjection/FailsafeContainerTest.php
typo3/sysext/core/Tests/Unit/DependencyInjection/Fixtures/TestServiceProvider.php
typo3/sysext/core/Tests/Unit/DependencyInjection/ServiceProviderCompilationPassTest.php
typo3/sysext/core/Tests/Unit/EventDispatcher/EventDispatcherTest.php
typo3/sysext/core/Tests/Unit/EventDispatcher/ListenerProviderTest.php
typo3/sysext/core/Tests/Unit/Http/AbstractApplicationTest.php
typo3/sysext/core/Tests/Unit/Http/ClientTest.php
typo3/sysext/core/Tests/Unit/Http/MiddlewareDispatcherTest.php
typo3/sysext/core/Tests/Unit/Http/MiddlewareStackResolverTest.php
typo3/sysext/core/Tests/Unit/Imaging/IconRegistryTest.php
typo3/sysext/core/Tests/Unit/Localization/LocalesTest.php
typo3/sysext/core/Tests/Unit/Localization/Parser/XliffParserTest.php
typo3/sysext/core/Tests/Unit/Package/PackageManagerTest.php
typo3/sysext/core/Tests/Unit/Utility/ArrayUtilityTest.php
typo3/sysext/core/Tests/UnitDeprecated/Compatibility/PublicPropertyDeprecationTraitTest.php
typo3/sysext/core/Tests/UnitDeprecated/Localization/LocalizationFactoryTest.php
typo3/sysext/core/Tests/UnitDeprecated/Localization/Parser/LocallangXmlParserTest.php
typo3/sysext/extbase/Classes/Property/PropertyMappingConfiguration.php
typo3/sysext/extbase/Classes/Service/CacheService.php
typo3/sysext/extbase/Classes/Validation/Validator/ConjunctionValidator.php
typo3/sysext/extbase/Configuration/Services.php
typo3/sysext/extbase/Tests/Functional/Property/PropertyMapperTest.php
typo3/sysext/extbase/Tests/Functional/Property/TypeConverter/ObjectConverterTest.php
typo3/sysext/extbase/Tests/Unit/DomainObject/AbstractEntityTest.php
typo3/sysext/extbase/Tests/Unit/Mvc/Controller/MvcPropertyMappingConfigurationServiceTest.php
typo3/sysext/extbase/Tests/Unit/Object/Container/ContainerTest.php
typo3/sysext/extbase/Tests/Unit/Persistence/ObjectStorageTest.php
typo3/sysext/extbase/Tests/Unit/Reflection/ClassSchemaTest.php
typo3/sysext/extbase/Tests/Unit/Reflection/Fixture/Validation/Validator/DummyValidator.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/DateTimeValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/UrlValidatorTest.php
typo3/sysext/extensionmanager/Tests/Unit/Domain/Model/ExtensionTest.php
typo3/sysext/felogin/Tests/Unit/Service/ValidatorResolverServiceTest.php
typo3/sysext/fluid/Configuration/Services.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Widget/Controller/PaginateControllerTest.php
typo3/sysext/form/Tests/Unit/Controller/FormFrontendControllerTest.php
typo3/sysext/form/Tests/Unit/Domain/Configuration/FormDefinitionConversionServiceTest.php
typo3/sysext/form/Tests/Unit/Domain/Finishers/AbstractFinisherTest.php
typo3/sysext/form/Tests/Unit/Domain/Finishers/SaveToDatabaseFinisherTest.php
typo3/sysext/form/Tests/Unit/Domain/Runtime/FormRuntimeTest.php
typo3/sysext/form/Tests/Unit/Mvc/Configuration/TypoScriptServiceTest.php
typo3/sysext/frontend/Classes/Controller/ShowImageController.php
typo3/sysext/frontend/Tests/Functional/ContentObject/FluidTemplateContentObjectTest.php
typo3/sysext/frontend/Tests/Unit/ContentObject/ContentObjectRendererTest.php
typo3/sysext/frontend/Tests/Unit/ContentObject/Menu/MenuContentObjectFactoryTest.php
typo3/sysext/frontend/Tests/Unit/Middleware/PageArgumentValidatorTest.php
typo3/sysext/frontend/Tests/Unit/Middleware/PageResolverTest.php
typo3/sysext/frontend/Tests/Unit/Middleware/SiteBaseRedirectResolverTest.php
typo3/sysext/frontend/Tests/Unit/Middleware/SiteResolverTest.php
typo3/sysext/frontend/Tests/Unit/Middleware/StaticRouteResolverTest.php
typo3/sysext/install/Classes/Middleware/Maintenance.php
typo3/sysext/install/Classes/ServiceProvider.php
typo3/sysext/install/Classes/SystemEnvironment/DatabaseCheck.php
typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/Matcher/Fixtures/ClassNameMatcherFixture.php
typo3/sysext/reports/Tests/Unit/Report/Status/Typo3StatusTest.php

index b6c42dd..7639cff 100644 (file)
@@ -57,15 +57,19 @@ return PhpCsFixer\Config::create()
         '@PSR2' => true,
         'array_syntax' => ['syntax' => 'short'],
         'blank_line_after_opening_tag' => true,
+        'braces' => ['allow_single_line_closure' => true],
         'cast_spaces' => ['space' => 'none'],
+        'compact_nullable_typehint' => true,
         'concat_space' => ['spacing' => 'one'],
         'declare_equal_normalize' => ['space' => 'none'],
         'dir_constant' => true,
         'function_typehint_space' => true,
         'hash_to_slash_comment' => true,
         'lowercase_cast' => true,
+        'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
         'modernize_types_casting' => true,
         'native_function_casing' => true,
+        'new_with_braces' => true,
         'no_alias_functions' => true,
         'no_blank_lines_after_phpdoc' => true,
         'no_empty_phpdoc' => true,
index cf33794..0d43c30 100755 (executable)
@@ -95,7 +95,7 @@ class NodeVisitor extends NodeVisitorAbstract
     }
 }
 
-$parser = (new ParserFactory)->create(ParserFactory::ONLY_PHP7);
+$parser = (new ParserFactory())->create(ParserFactory::ONLY_PHP7);
 
 $finder = new Symfony\Component\Finder\Finder();
 $finder->files()
index a289cfc..6161abf 100755 (executable)
@@ -202,7 +202,7 @@ class NodeVisitor implements \PhpParser\NodeVisitor
     }
 }
 
-$parser = (new ParserFactory)->create(ParserFactory::ONLY_PHP7);
+$parser = (new ParserFactory())->create(ParserFactory::ONLY_PHP7);
 
 $finder = new Symfony\Component\Finder\Finder();
 $finder->files()
index 91580e6..dd88dec 100644 (file)
@@ -43,7 +43,7 @@ class DatabaseRowInitializeNewTest extends UnitTestCase
                 ],
             ],
         ];
-        self::assertSame($input, (new DatabaseRowInitializeNew)->addData($input));
+        self::assertSame($input, (new DatabaseRowInitializeNew())->addData($input));
     }
 
     /**
@@ -58,7 +58,7 @@ class DatabaseRowInitializeNewTest extends UnitTestCase
         ];
         $this->expectException(\UnexpectedValueException::class);
         $this->expectExceptionCode(1444431128);
-        (new DatabaseRowInitializeNew)->addData($input);
+        (new DatabaseRowInitializeNew())->addData($input);
     }
 
     /**
@@ -79,7 +79,7 @@ class DatabaseRowInitializeNewTest extends UnitTestCase
         ];
         $expected = $input;
         $expected['databaseRow']['pid'] = 23;
-        self::assertSame($expected, (new DatabaseRowInitializeNew)->addData($input));
+        self::assertSame($expected, (new DatabaseRowInitializeNew())->addData($input));
     }
 
     /**
@@ -112,7 +112,7 @@ class DatabaseRowInitializeNewTest extends UnitTestCase
             'aField' => 'userTsValue',
             'pid' => 23,
         ];
-        $result = (new DatabaseRowInitializeNew)->addData($input);
+        $result = (new DatabaseRowInitializeNew())->addData($input);
         self::assertSame($expected, $result['databaseRow']);
     }
 
@@ -143,7 +143,7 @@ class DatabaseRowInitializeNewTest extends UnitTestCase
         $expected = [
             'pid' => 23,
         ];
-        $result = (new DatabaseRowInitializeNew)->addData($input);
+        $result = (new DatabaseRowInitializeNew())->addData($input);
         self::assertSame($expected, $result['databaseRow']);
     }
 
@@ -177,7 +177,7 @@ class DatabaseRowInitializeNewTest extends UnitTestCase
             'aField' => 'pageTsValue',
             'pid' => 23,
         ];
-        $result = (new DatabaseRowInitializeNew)->addData($input);
+        $result = (new DatabaseRowInitializeNew())->addData($input);
         self::assertSame($expected, $result['databaseRow']);
     }
 
@@ -208,7 +208,7 @@ class DatabaseRowInitializeNewTest extends UnitTestCase
         $expected = [
             'pid' => 23,
         ];
-        $result = (new DatabaseRowInitializeNew)->addData($input);
+        $result = (new DatabaseRowInitializeNew())->addData($input);
         self::assertSame($expected, $result['databaseRow']);
     }
 
@@ -249,7 +249,7 @@ class DatabaseRowInitializeNewTest extends UnitTestCase
             'aField' => 'pageTsValue',
             'pid' => 23,
         ];
-        $result = (new DatabaseRowInitializeNew)->addData($input);
+        $result = (new DatabaseRowInitializeNew())->addData($input);
         self::assertSame($expected, $result['databaseRow']);
     }
 
@@ -281,7 +281,7 @@ class DatabaseRowInitializeNewTest extends UnitTestCase
             'aField' => 'valueFromNeighbor',
             'pid' => 23,
         ];
-        $result = (new DatabaseRowInitializeNew)->addData($input);
+        $result = (new DatabaseRowInitializeNew())->addData($input);
         self::assertSame($expected, $result['databaseRow']);
     }
 
@@ -327,7 +327,7 @@ class DatabaseRowInitializeNewTest extends UnitTestCase
             'aField' => 'valueFromNeighbor',
             'pid' => 23,
         ];
-        $result = (new DatabaseRowInitializeNew)->addData($input);
+        $result = (new DatabaseRowInitializeNew())->addData($input);
         self::assertSame($expected, $result['databaseRow']);
     }
 
@@ -359,7 +359,7 @@ class DatabaseRowInitializeNewTest extends UnitTestCase
             'aField' => 'getValue',
             'pid' => 23,
         ];
-        $result = (new DatabaseRowInitializeNew)->addData($input);
+        $result = (new DatabaseRowInitializeNew())->addData($input);
         self::assertSame($expected, $result['databaseRow']);
     }
 
@@ -395,7 +395,7 @@ class DatabaseRowInitializeNewTest extends UnitTestCase
         $expected = [
             'pid' => 23,
         ];
-        $result = (new DatabaseRowInitializeNew)->addData($input);
+        $result = (new DatabaseRowInitializeNew())->addData($input);
         self::assertSame($expected, $result['databaseRow']);
     }
 
@@ -446,7 +446,7 @@ class DatabaseRowInitializeNewTest extends UnitTestCase
             'aField' => 'postValue',
             'pid' => 23,
         ];
-        $result = (new DatabaseRowInitializeNew)->addData($input);
+        $result = (new DatabaseRowInitializeNew())->addData($input);
         self::assertSame($expected, $result['databaseRow']);
     }
 
@@ -465,7 +465,7 @@ class DatabaseRowInitializeNewTest extends UnitTestCase
         ];
         $this->expectException(\UnexpectedValueException::class);
         $this->expectExceptionCode(1444434102);
-        (new DatabaseRowInitializeNew)->addData($input);
+        (new DatabaseRowInitializeNew())->addData($input);
     }
 
     /**
@@ -483,7 +483,7 @@ class DatabaseRowInitializeNewTest extends UnitTestCase
         ];
         $this->expectException(\UnexpectedValueException::class);
         $this->expectExceptionCode(1444434103);
-        (new DatabaseRowInitializeNew)->addData($input);
+        (new DatabaseRowInitializeNew())->addData($input);
     }
 
     /**
@@ -515,7 +515,7 @@ class DatabaseRowInitializeNewTest extends UnitTestCase
         $expected = $input;
         $expected['databaseRow']['theForeignSelectorField'] = 42;
         $expected['databaseRow']['pid'] = 5;
-        self::assertSame($expected, (new DatabaseRowInitializeNew)->addData($input));
+        self::assertSame($expected, (new DatabaseRowInitializeNew())->addData($input));
     }
 
     /**
@@ -545,7 +545,7 @@ class DatabaseRowInitializeNewTest extends UnitTestCase
         ];
         $this->expectException(\UnexpectedValueException::class);
         $this->expectExceptionCode(1444434104);
-        (new DatabaseRowInitializeNew)->addData($input);
+        (new DatabaseRowInitializeNew())->addData($input);
     }
 
     /**
@@ -575,7 +575,7 @@ class DatabaseRowInitializeNewTest extends UnitTestCase
         ];
         $this->expectException(\UnexpectedValueException::class);
         $this->expectExceptionCode(1490360772);
-        (new DatabaseRowInitializeNew)->addData($input);
+        (new DatabaseRowInitializeNew())->addData($input);
     }
 
     /**
@@ -609,7 +609,7 @@ class DatabaseRowInitializeNewTest extends UnitTestCase
             'sys_language_uid' => 42,
             'pid' => 1,
         ];
-        $result = (new DatabaseRowInitializeNew)->addData($input);
+        $result = (new DatabaseRowInitializeNew())->addData($input);
         self::assertSame($expected, $result);
     }
 
@@ -629,7 +629,7 @@ class DatabaseRowInitializeNewTest extends UnitTestCase
         ];
         $expected = [];
         $expected['pid'] = 23;
-        $result = (new DatabaseRowInitializeNew)->addData($input);
+        $result = (new DatabaseRowInitializeNew())->addData($input);
         self::assertSame($expected, $result['databaseRow']);
     }
 
@@ -656,7 +656,7 @@ class DatabaseRowInitializeNewTest extends UnitTestCase
         ];
         $expected = $input;
         $expected['databaseRow']['pid'] = 23;
-        self::assertSame($expected, (new DatabaseRowInitializeNew)->addData($input));
+        self::assertSame($expected, (new DatabaseRowInitializeNew())->addData($input));
     }
 
     /**
@@ -682,7 +682,7 @@ class DatabaseRowInitializeNewTest extends UnitTestCase
         ];
         $this->expectException(\UnexpectedValueException::class);
         $this->expectExceptionCode(1461598332);
-        (new DatabaseRowInitializeNew)->addData($input);
+        (new DatabaseRowInitializeNew())->addData($input);
     }
 
     /**
@@ -708,7 +708,7 @@ class DatabaseRowInitializeNewTest extends UnitTestCase
         ];
         $expected = $input;
         $expected['databaseRow']['pid'] = 42;
-        self::assertSame($expected, (new DatabaseRowInitializeNew)->addData($input));
+        self::assertSame($expected, (new DatabaseRowInitializeNew())->addData($input));
     }
 
     /**
@@ -732,6 +732,6 @@ class DatabaseRowInitializeNewTest extends UnitTestCase
         $expected = $input;
         $expected['databaseRow']['theParentField'] = 42;
         $expected['databaseRow']['pid'] = 23;
-        self::assertSame($expected, (new DatabaseRowInitializeNew)->addData($input));
+        self::assertSame($expected, (new DatabaseRowInitializeNew())->addData($input));
     }
 }
index 4773d9f..4c37985 100644 (file)
@@ -54,7 +54,7 @@ class DatabaseUserPermissionCheckTest extends UnitTestCase
     {
         $this->beUserProphecy->isAdmin()->willReturn(true);
 
-        $result = (new DatabaseUserPermissionCheck)->addData([]);
+        $result = (new DatabaseUserPermissionCheck())->addData([]);
 
         self::assertSame(Permission::ALL, $result['userPermissionOnPage']);
     }
@@ -73,7 +73,7 @@ class DatabaseUserPermissionCheckTest extends UnitTestCase
         $this->expectException(AccessDeniedTableModifyException::class);
         $this->expectExceptionCode(1437683248);
 
-        (new DatabaseUserPermissionCheck)->addData($input);
+        (new DatabaseUserPermissionCheck())->addData($input);
     }
 
     /**
@@ -97,7 +97,7 @@ class DatabaseUserPermissionCheckTest extends UnitTestCase
         $this->expectException(AccessDeniedContentEditException::class);
         $this->expectExceptionCode(1437679657);
 
-        (new DatabaseUserPermissionCheck)->addData($input);
+        (new DatabaseUserPermissionCheck())->addData($input);
     }
 
     /**
@@ -119,7 +119,7 @@ class DatabaseUserPermissionCheckTest extends UnitTestCase
         $this->beUserProphecy->calcPerms(['pid' => 321])->willReturn(Permission::CONTENT_EDIT);
         $this->beUserProphecy->recordEditAccessInternals($input['tableName'], Argument::any())->willReturn(true);
 
-        $result = (new DatabaseUserPermissionCheck)->addData($input);
+        $result = (new DatabaseUserPermissionCheck())->addData($input);
 
         self::assertSame(Permission::CONTENT_EDIT, $result['userPermissionOnPage']);
     }
@@ -145,7 +145,7 @@ class DatabaseUserPermissionCheckTest extends UnitTestCase
         $this->expectException(AccessDeniedPageEditException::class);
         $this->expectExceptionCode(1437679336);
 
-        (new DatabaseUserPermissionCheck)->addData($input);
+        (new DatabaseUserPermissionCheck())->addData($input);
     }
 
     /**
@@ -177,7 +177,7 @@ class DatabaseUserPermissionCheckTest extends UnitTestCase
         $this->expectException(AccessDeniedPageEditException::class);
         $this->expectExceptionCode(1437679336);
 
-        (new DatabaseUserPermissionCheck)->addData($input);
+        (new DatabaseUserPermissionCheck())->addData($input);
     }
 
     /**
@@ -206,7 +206,7 @@ class DatabaseUserPermissionCheckTest extends UnitTestCase
         $this->beUserProphecy->calcPerms($input['databaseRow'])->willReturn(Permission::PAGE_EDIT);
         $this->beUserProphecy->recordEditAccessInternals($input['tableName'], Argument::cetera())->willReturn(true);
 
-        $result = (new DatabaseUserPermissionCheck)->addData($input);
+        $result = (new DatabaseUserPermissionCheck())->addData($input);
 
         self::assertSame(Permission::PAGE_EDIT, $result['userPermissionOnPage']);
     }
@@ -230,7 +230,7 @@ class DatabaseUserPermissionCheckTest extends UnitTestCase
         $this->beUserProphecy->recordEditAccessInternals($input['tableName'], Argument::cetera())->willReturn(true);
         $GLOBALS['TCA'][$input['tableName']]['ctrl']['security']['ignoreRootLevelRestriction'] = true;
 
-        $result = (new DatabaseUserPermissionCheck)->addData($input);
+        $result = (new DatabaseUserPermissionCheck())->addData($input);
 
         self::assertSame(Permission::ALL, $result['userPermissionOnPage']);
     }
@@ -256,7 +256,7 @@ class DatabaseUserPermissionCheckTest extends UnitTestCase
         $this->expectException(AccessDeniedRootNodeException::class);
         $this->expectExceptionCode(1437679856);
 
-        (new DatabaseUserPermissionCheck)->addData($input);
+        (new DatabaseUserPermissionCheck())->addData($input);
     }
 
     /**
@@ -282,7 +282,7 @@ class DatabaseUserPermissionCheckTest extends UnitTestCase
         $this->expectException(AccessDeniedEditInternalsException::class);
         $this->expectExceptionCode(1437687404);
 
-        (new DatabaseUserPermissionCheck)->addData($input);
+        (new DatabaseUserPermissionCheck())->addData($input);
     }
 
     /**
@@ -306,7 +306,7 @@ class DatabaseUserPermissionCheckTest extends UnitTestCase
         $this->expectException(AccessDeniedContentEditException::class);
         $this->expectExceptionCode(1437745759);
 
-        (new DatabaseUserPermissionCheck)->addData($input);
+        (new DatabaseUserPermissionCheck())->addData($input);
     }
 
     /**
@@ -333,7 +333,7 @@ class DatabaseUserPermissionCheckTest extends UnitTestCase
         $this->expectException(AccessDeniedPageNewException::class);
         $this->expectExceptionCode(1437745640);
 
-        (new DatabaseUserPermissionCheck)->addData($input);
+        (new DatabaseUserPermissionCheck())->addData($input);
     }
 
     /**
@@ -367,7 +367,7 @@ class DatabaseUserPermissionCheckTest extends UnitTestCase
         $this->expectException(AccessDeniedHookException::class);
         $this->expectExceptionCode(1437689705);
 
-        (new DatabaseUserPermissionCheck)->addData($input);
+        (new DatabaseUserPermissionCheck())->addData($input);
     }
 
     /**
@@ -398,7 +398,7 @@ class DatabaseUserPermissionCheckTest extends UnitTestCase
             }
         ];
 
-        $result = (new DatabaseUserPermissionCheck)->addData($input);
+        $result = (new DatabaseUserPermissionCheck())->addData($input);
 
         self::assertSame(Permission::CONTENT_EDIT, $result['userPermissionOnPage']);
     }
@@ -422,7 +422,7 @@ class DatabaseUserPermissionCheckTest extends UnitTestCase
         $this->beUserProphecy->calcPerms($input['parentPageRow'])->willReturn(Permission::PAGE_NEW);
         $this->beUserProphecy->recordEditAccessInternals($input['tableName'], Argument::cetera())->willReturn(true);
 
-        $result = (new DatabaseUserPermissionCheck)->addData($input);
+        $result = (new DatabaseUserPermissionCheck())->addData($input);
 
         self::assertSame(Permission::PAGE_NEW, $result['userPermissionOnPage']);
     }
@@ -446,7 +446,7 @@ class DatabaseUserPermissionCheckTest extends UnitTestCase
         $this->beUserProphecy->calcPerms($input['parentPageRow'])->willReturn(Permission::CONTENT_EDIT);
         $this->beUserProphecy->recordEditAccessInternals($input['tableName'], Argument::cetera())->willReturn(true);
 
-        $result = (new DatabaseUserPermissionCheck)->addData($input);
+        $result = (new DatabaseUserPermissionCheck())->addData($input);
 
         self::assertSame(Permission::CONTENT_EDIT, $result['userPermissionOnPage']);
     }
@@ -467,7 +467,7 @@ class DatabaseUserPermissionCheckTest extends UnitTestCase
         $this->beUserProphecy->recordEditAccessInternals($input['tableName'], Argument::cetera())->willReturn(true);
         $GLOBALS['TCA'][$input['tableName']]['ctrl']['security']['ignoreRootLevelRestriction'] = true;
 
-        $result = (new DatabaseUserPermissionCheck)->addData($input);
+        $result = (new DatabaseUserPermissionCheck())->addData($input);
 
         self::assertSame(Permission::ALL, $result['userPermissionOnPage']);
     }
@@ -490,6 +490,6 @@ class DatabaseUserPermissionCheckTest extends UnitTestCase
         $this->expectException(AccessDeniedRootNodeException::class);
         $this->expectExceptionCode(1437745221);
 
-        (new DatabaseUserPermissionCheck)->addData($input);
+        (new DatabaseUserPermissionCheck())->addData($input);
     }
 }
index b3f71b6..cbd6f65 100644 (file)
@@ -410,7 +410,7 @@ class TcaCheckboxItemsTest extends UnitTestCase
         $GLOBALS['LANG'] = $languageService->reveal();
         $languageService->sL(Argument::cetera())->willReturnArgument(0);
 
-        self::assertSame($expectedResult, (new TcaCheckboxItems)->addData($input));
+        self::assertSame($expectedResult, (new TcaCheckboxItems())->addData($input));
     }
 
     /**
@@ -440,7 +440,7 @@ class TcaCheckboxItemsTest extends UnitTestCase
 
         $this->expectException(\UnexpectedValueException::class);
         $this->expectExceptionCode(1440499337);
-        (new TcaCheckboxItems)->addData($input);
+        (new TcaCheckboxItems())->addData($input);
     }
 
     /**
@@ -472,7 +472,7 @@ class TcaCheckboxItemsTest extends UnitTestCase
 
         $this->expectException(\UnexpectedValueException::class);
         $this->expectExceptionCode(1440499338);
-        (new TcaCheckboxItems)->addData($input);
+        (new TcaCheckboxItems())->addData($input);
     }
 
     /**
@@ -509,7 +509,7 @@ class TcaCheckboxItemsTest extends UnitTestCase
         $expected['processedTca']['columns']['aField']['config']['items'][0][0] = 'translated';
         $expected['processedTca']['columns']['aField']['config']['items'][0]['invertStateDisplay'] = false;
 
-        self::assertSame($expected, (new TcaCheckboxItems)->addData($input));
+        self::assertSame($expected, (new TcaCheckboxItems())->addData($input));
     }
 
     /**
@@ -548,7 +548,7 @@ class TcaCheckboxItemsTest extends UnitTestCase
                 'foo' => 'bar',
             ],
         ];
-        self::assertSame($expected, (new TcaCheckboxItems)->addData($input));
+        self::assertSame($expected, (new TcaCheckboxItems())->addData($input));
     }
 
     /**
@@ -623,7 +623,7 @@ class TcaCheckboxItemsTest extends UnitTestCase
         // itemsProcFunc must NOT have raised an exception
         $flashMessageQueue->enqueue($flashMessage)->shouldNotBeCalled();
 
-        (new TcaCheckboxItems)->addData($input);
+        (new TcaCheckboxItems())->addData($input);
     }
 
     /**
@@ -682,7 +682,7 @@ class TcaCheckboxItemsTest extends UnitTestCase
 
         $flashMessageQueue->enqueue($flashMessage)->shouldBeCalled();
 
-        (new TcaCheckboxItems)->addData($input);
+        (new TcaCheckboxItems())->addData($input);
     }
 
     /**
@@ -731,6 +731,6 @@ class TcaCheckboxItemsTest extends UnitTestCase
         $expected['processedTca']['columns']['aField']['config']['items'][0][0] = 'labelOverride';
         $expected['processedTca']['columns']['aField']['config']['items'][0]['invertStateDisplay'] = false;
 
-        self::assertSame($expected, (new TcaCheckboxItems)->addData($input));
+        self::assertSame($expected, (new TcaCheckboxItems())->addData($input));
     }
 }
index 627036b..cde0a35 100644 (file)
@@ -40,7 +40,7 @@ class TcaColumnsProcessCommonTest extends UnitTestCase
 
         $expected = $input;
         $expected['columnsToProcess'] = ['t3_origuid'];
-        self::assertSame($expected, (new TcaColumnsProcessCommon)->addData($input));
+        self::assertSame($expected, (new TcaColumnsProcessCommon())->addData($input));
     }
 
     /**
@@ -60,7 +60,7 @@ class TcaColumnsProcessCommonTest extends UnitTestCase
 
         $expected = $input;
         $expected['columnsToProcess'] = ['doktype'];
-        self::assertSame($expected, (new TcaColumnsProcessCommon)->addData($input));
+        self::assertSame($expected, (new TcaColumnsProcessCommon())->addData($input));
     }
 
     /**
@@ -80,7 +80,7 @@ class TcaColumnsProcessCommonTest extends UnitTestCase
 
         $expected = $input;
         $expected['columnsToProcess'] = ['relation_field'];
-        self::assertSame($expected, (new TcaColumnsProcessCommon)->addData($input));
+        self::assertSame($expected, (new TcaColumnsProcessCommon())->addData($input));
     }
 
     /**
@@ -100,7 +100,7 @@ class TcaColumnsProcessCommonTest extends UnitTestCase
 
         $expected = $input;
         $expected['columnsToProcess'] = ['sys_language_uid'];
-        self::assertSame($expected, (new TcaColumnsProcessCommon)->addData($input));
+        self::assertSame($expected, (new TcaColumnsProcessCommon())->addData($input));
     }
 
     /**
@@ -120,7 +120,7 @@ class TcaColumnsProcessCommonTest extends UnitTestCase
 
         $expected = $input;
         $expected['columnsToProcess'] = ['l10n_parent'];
-        self::assertSame($expected, (new TcaColumnsProcessCommon)->addData($input));
+        self::assertSame($expected, (new TcaColumnsProcessCommon())->addData($input));
     }
 
     /**
@@ -140,7 +140,7 @@ class TcaColumnsProcessCommonTest extends UnitTestCase
 
         $expected = $input;
         $expected['columnsToProcess'] = ['l18n_diffsource'];
-        self::assertSame($expected, (new TcaColumnsProcessCommon)->addData($input));
+        self::assertSame($expected, (new TcaColumnsProcessCommon())->addData($input));
     }
 
     /**
@@ -169,7 +169,7 @@ class TcaColumnsProcessCommonTest extends UnitTestCase
 
         $expected = $input;
         $expected['columnsToProcess'] = ['aField'];
-        self::assertSame($expected, (new TcaColumnsProcessCommon)->addData($input));
+        self::assertSame($expected, (new TcaColumnsProcessCommon())->addData($input));
     }
 
     /**
@@ -198,6 +198,6 @@ class TcaColumnsProcessCommonTest extends UnitTestCase
 
         $expected = $input;
         $expected['columnsToProcess'] = ['aField', 'bField'];
-        self::assertSame($expected, (new TcaColumnsProcessCommon)->addData($input));
+        self::assertSame($expected, (new TcaColumnsProcessCommon())->addData($input));
     }
 }
index 923b9ce..003fff3 100644 (file)
@@ -45,7 +45,7 @@ class TcaColumnsProcessFieldLabelsTest extends UnitTestCase
         $GLOBALS['LANG'] = $languageServiceProphecy->reveal();
 
         $expected = $input;
-        self::assertSame($expected, (new TcaColumnsProcessFieldLabels)->addData($input));
+        self::assertSame($expected, (new TcaColumnsProcessFieldLabels())->addData($input));
     }
 
     /**
@@ -75,7 +75,7 @@ class TcaColumnsProcessFieldLabelsTest extends UnitTestCase
 
         $expected = $input;
         $expected['processedTca']['columns']['aField']['label'] = 'aLabelOverride';
-        self::assertSame($expected, (new TcaColumnsProcessFieldLabels)->addData($input));
+        self::assertSame($expected, (new TcaColumnsProcessFieldLabels())->addData($input));
     }
 
     /**
@@ -110,7 +110,7 @@ class TcaColumnsProcessFieldLabelsTest extends UnitTestCase
 
         $expected = $input;
         $expected['processedTca']['columns']['aField']['label'] = 'aLabelOverride';
-        self::assertSame($expected, (new TcaColumnsProcessFieldLabels)->addData($input));
+        self::assertSame($expected, (new TcaColumnsProcessFieldLabels())->addData($input));
     }
 
     /**
@@ -144,7 +144,7 @@ class TcaColumnsProcessFieldLabelsTest extends UnitTestCase
 
         $expected = $input;
         $expected['processedTca']['columns']['aField']['label'] = 'aLabelOverride';
-        self::assertSame($expected, (new TcaColumnsProcessFieldLabels)->addData($input));
+        self::assertSame($expected, (new TcaColumnsProcessFieldLabels())->addData($input));
     }
 
     /**
@@ -181,6 +181,6 @@ class TcaColumnsProcessFieldLabelsTest extends UnitTestCase
 
         $expected = $input;
         $expected['processedTca']['columns']['aField']['label'] = 'aLabelOverride';
-        self::assertSame($expected, (new TcaColumnsProcessFieldLabels)->addData($input));
+        self::assertSame($expected, (new TcaColumnsProcessFieldLabels())->addData($input));
     }
 }
index 23852e4..8468205 100644 (file)
@@ -41,7 +41,7 @@ class TcaColumnsProcessRecordTitleTest extends UnitTestCase
 
         $expected = $input;
         $expected['columnsToProcess'] = ['uid'];
-        self::assertSame($expected, (new TcaColumnsProcessRecordTitle)->addData($input));
+        self::assertSame($expected, (new TcaColumnsProcessRecordTitle())->addData($input));
     }
 
     /**
@@ -63,7 +63,7 @@ class TcaColumnsProcessRecordTitleTest extends UnitTestCase
 
         $expected = $input;
         $expected['columnsToProcess'] = ['uid', 'aField', 'anotherField'];
-        self::assertSame($expected, (new TcaColumnsProcessRecordTitle)->addData($input));
+        self::assertSame($expected, (new TcaColumnsProcessRecordTitle())->addData($input));
     }
 
     /**
@@ -81,7 +81,7 @@ class TcaColumnsProcessRecordTitleTest extends UnitTestCase
 
         $expected = $input;
         $expected['columnsToProcess'] = [ 'aForeignLabelField' ];
-        self::assertSame($expected, (new TcaColumnsProcessRecordTitle)->addData($input));
+        self::assertSame($expected, (new TcaColumnsProcessRecordTitle())->addData($input));
     }
 
     /**
@@ -99,6 +99,6 @@ class TcaColumnsProcessRecordTitleTest extends UnitTestCase
 
         $expected = $input;
         $expected['columnsToProcess'] = [ 'aSymmetricLabelField' ];
-        self::assertSame($expected, (new TcaColumnsProcessRecordTitle)->addData($input));
+        self::assertSame($expected, (new TcaColumnsProcessRecordTitle())->addData($input));
     }
 }
index b317df1..62b040b 100644 (file)
@@ -44,7 +44,7 @@ class TcaColumnsProcessShowitemTest extends UnitTestCase
         ];
         $this->expectException(\UnexpectedValueException::class);
         $this->expectExceptionCode(1438614542);
-        (new TcaColumnsProcessShowitem)->addData($input);
+        (new TcaColumnsProcessShowitem())->addData($input);
     }
 
     /**
@@ -81,7 +81,7 @@ class TcaColumnsProcessShowitemTest extends UnitTestCase
         $expected = $input;
         $expected['columnsToProcess'] = ['keepMe'];
 
-        self::assertSame($expected, (new TcaColumnsProcessShowitem)->addData($input));
+        self::assertSame($expected, (new TcaColumnsProcessShowitem())->addData($input));
     }
 
     /**
@@ -123,7 +123,7 @@ class TcaColumnsProcessShowitemTest extends UnitTestCase
         $expected = $input;
         $expected['columnsToProcess'] = ['keepMe'];
 
-        self::assertSame($expected, (new TcaColumnsProcessShowitem)->addData($input));
+        self::assertSame($expected, (new TcaColumnsProcessShowitem())->addData($input));
     }
 
     /**
@@ -169,7 +169,7 @@ class TcaColumnsProcessShowitemTest extends UnitTestCase
         $expected = $input;
         $expected['columnsToProcess'] = ['aField', 'anotherField'];
 
-        self::assertSame($expected, (new TcaColumnsProcessShowitem)->addData($input));
+        self::assertSame($expected, (new TcaColumnsProcessShowitem())->addData($input));
     }
 
     /**
@@ -206,7 +206,7 @@ class TcaColumnsProcessShowitemTest extends UnitTestCase
             'inlineExpandCollapseStateArray' => [],
         ];
         $expected = $input;
-        self::assertSame($expected, (new TcaColumnsProcessShowitem)->addData($input));
+        self::assertSame($expected, (new TcaColumnsProcessShowitem())->addData($input));
     }
 
     /**
@@ -250,7 +250,7 @@ class TcaColumnsProcessShowitemTest extends UnitTestCase
             ],
         ];
         $expected = $input;
-        self::assertSame($expected, (new TcaColumnsProcessShowitem)->addData($input));
+        self::assertSame($expected, (new TcaColumnsProcessShowitem())->addData($input));
     }
 
     /**
@@ -292,6 +292,6 @@ class TcaColumnsProcessShowitemTest extends UnitTestCase
         ];
         $expected = $input;
         $expected['columnsToProcess'] = ['aField'];
-        self::assertSame($expected, (new TcaColumnsProcessShowitem)->addData($input));
+        self::assertSame($expected, (new TcaColumnsProcessShowitem())->addData($input));
     }
 }
index 2f18aea..bc7d05a 100644 (file)
@@ -89,7 +89,7 @@ class TcaFlexPrepareTest extends UnitTestCase
             ],
         ];
         $expected = $input;
-        self::assertEquals($expected, (new TcaFlexPrepare)->addData($input));
+        self::assertEquals($expected, (new TcaFlexPrepare())->addData($input));
     }
 
     /**
@@ -160,7 +160,7 @@ class TcaFlexPrepareTest extends UnitTestCase
             'meta' => [],
         ];
 
-        self::assertEquals($expected, (new TcaFlexPrepare)->addData($input));
+        self::assertEquals($expected, (new TcaFlexPrepare())->addData($input));
     }
 
     /**
@@ -239,7 +239,7 @@ class TcaFlexPrepareTest extends UnitTestCase
             'meta' => [],
         ];
 
-        self::assertEquals($expected, (new TcaFlexPrepare)->addData($input));
+        self::assertEquals($expected, (new TcaFlexPrepare())->addData($input));
     }
 
     /**
@@ -283,6 +283,6 @@ class TcaFlexPrepareTest extends UnitTestCase
             'meta' => []
         ];
 
-        self::assertEquals($expected, (new TcaFlexPrepare)->addData($input));
+        self::assertEquals($expected, (new TcaFlexPrepare())->addData($input));
     }
 }
index 77aa713..7fc9de4 100644 (file)
@@ -55,7 +55,7 @@ class TcaGroupTest extends UnitTestCase
             ],
         ];
         $expected = $input;
-        self::assertSame($expected, (new TcaGroup)->addData($input));
+        self::assertSame($expected, (new TcaGroup())->addData($input));
     }
 
     /**
@@ -78,7 +78,7 @@ class TcaGroupTest extends UnitTestCase
         ];
         $this->expectException(\UnexpectedValueException::class);
         $this->expectExceptionCode(1438780511);
-        (new TcaGroup)->addData($input);
+        (new TcaGroup())->addData($input);
     }
 
     /**
@@ -120,7 +120,7 @@ class TcaGroupTest extends UnitTestCase
             ]
         ];
         $expected['processedTca']['columns']['aField']['config']['clipboardElements'] = [];
-        self::assertSame($expected, (new TcaGroup)->addData($input));
+        self::assertSame($expected, (new TcaGroup())->addData($input));
     }
 
     /**
@@ -191,6 +191,6 @@ class TcaGroupTest extends UnitTestCase
         ];
         $expected['processedTca']['columns']['aField']['config']['clipboardElements'] = [];
 
-        self::assertSame($expected, (new TcaGroup)->addData($input));
+        self::assertSame($expected, (new TcaGroup())->addData($input));
     }
 }
index 758fefa..af46c09 100644 (file)
@@ -67,7 +67,7 @@ class TcaInlineConfigurationTest extends UnitTestCase
         ];
         $this->expectException(\UnexpectedValueException::class);
         $this->expectExceptionCode(1443793404);
-        (new TcaInlineConfiguration)->addData($input);
+        (new TcaInlineConfiguration())->addData($input);
     }
 
     /**
@@ -89,7 +89,7 @@ class TcaInlineConfigurationTest extends UnitTestCase
         ];
         $expected = [];
         $expected['processedTca']['columns']['aField']['config'] = $this->defaultConfig;
-        self::assertEquals($expected, (new TcaInlineConfiguration)->addData($input));
+        self::assertEquals($expected, (new TcaInlineConfiguration())->addData($input));
     }
 
     /**
@@ -113,7 +113,7 @@ class TcaInlineConfigurationTest extends UnitTestCase
         $expected = [];
         $expected['processedTca']['columns']['aField']['config'] = $this->defaultConfig;
         $expected['processedTca']['columns']['aField']['config']['minitems'] = 23;
-        self::assertEquals($expected, (new TcaInlineConfiguration)->addData($input));
+        self::assertEquals($expected, (new TcaInlineConfiguration())->addData($input));
     }
 
     /**
@@ -137,7 +137,7 @@ class TcaInlineConfigurationTest extends UnitTestCase
         $expected = [];
         $expected['processedTca']['columns']['aField']['config'] = $this->defaultConfig;
         $expected['processedTca']['columns']['aField']['config']['minitems'] = 0;
-        self::assertEquals($expected, (new TcaInlineConfiguration)->addData($input));
+        self::assertEquals($expected, (new TcaInlineConfiguration())->addData($input));
     }
 
     /**
@@ -161,7 +161,7 @@ class TcaInlineConfigurationTest extends UnitTestCase
         $expected = [];
         $expected['processedTca']['columns']['aField']['config'] = $this->defaultConfig;
         $expected['processedTca']['columns']['aField']['config']['maxitems'] = 23;
-        self::assertEquals($expected, (new TcaInlineConfiguration)->addData($input));
+        self::assertEquals($expected, (new TcaInlineConfiguration())->addData($input));
     }
 
     /**
@@ -185,7 +185,7 @@ class TcaInlineConfigurationTest extends UnitTestCase
         $expected = [];
         $expected['processedTca']['columns']['aField']['config'] = $this->defaultConfig;
         $expected['processedTca']['columns']['aField']['config']['maxitems'] = 1;
-        self::assertEquals($expected, (new TcaInlineConfiguration)->addData($input));
+        self::assertEquals($expected, (new TcaInlineConfiguration())->addData($input));
     }
 
     /**
@@ -215,7 +215,7 @@ class TcaInlineConfigurationTest extends UnitTestCase
         $expected['processedTca']['columns']['aField']['config'] = $this->defaultConfig;
         $expected['processedTca']['columns']['aField']['config']['appearance']['levelLinksPosition'] = 'both';
         $expected['processedTca']['columns']['aField']['config']['appearance']['enabledControls']['dragdrop'] = false;
-        self::assertEquals($expected, (new TcaInlineConfiguration)->addData($input));
+        self::assertEquals($expected, (new TcaInlineConfiguration())->addData($input));
     }
 
     /**
@@ -257,7 +257,7 @@ class TcaInlineConfigurationTest extends UnitTestCase
             'foreignTable' => 'anotherForeignTableName',
         ];
         $expected['processedTca']['columns']['aField']['config']['appearance']['levelLinksPosition'] = 'none';
-        self::assertEquals($expected, (new TcaInlineConfiguration)->addData($input));
+        self::assertEquals($expected, (new TcaInlineConfiguration())->addData($input));
     }
 
     /**
@@ -301,7 +301,7 @@ class TcaInlineConfigurationTest extends UnitTestCase
         ];
         $expected['processedTca']['columns']['aField']['config']['appearance']['useCombination'] = true;
         $expected['processedTca']['columns']['aField']['config']['appearance']['levelLinksPosition'] = 'both';
-        self::assertEquals($expected, (new TcaInlineConfiguration)->addData($input));
+        self::assertEquals($expected, (new TcaInlineConfiguration())->addData($input));
     }
 
     /**
@@ -327,7 +327,7 @@ class TcaInlineConfigurationTest extends UnitTestCase
         $expected = [];
         $expected['processedTca']['columns']['aField']['config'] = $this->defaultConfig;
         $expected['processedTca']['columns']['aField']['config']['appearance']['showPossibleLocalizationRecords'] = true;
-        self::assertEquals($expected, (new TcaInlineConfiguration)->addData($input));
+        self::assertEquals($expected, (new TcaInlineConfiguration())->addData($input));
     }
 
     /**
@@ -353,7 +353,7 @@ class TcaInlineConfigurationTest extends UnitTestCase
         $expected = [];
         $expected['processedTca']['columns']['aField']['config'] = $this->defaultConfig;
         $expected['processedTca']['columns']['aField']['config']['appearance']['showPossibleLocalizationRecords'] = false;
-        self::assertEquals($expected, (new TcaInlineConfiguration)->addData($input));
+        self::assertEquals($expected, (new TcaInlineConfiguration())->addData($input));
     }
 
     /**
@@ -379,7 +379,7 @@ class TcaInlineConfigurationTest extends UnitTestCase
         $expected = [];
         $expected['processedTca']['columns']['aField']['config'] = $this->defaultConfig;
         $expected['processedTca']['columns']['aField']['config']['appearance']['showRemovedLocalizationRecords'] = true;
-        self::assertEquals($expected, (new TcaInlineConfiguration)->addData($input));
+        self::assertEquals($expected, (new TcaInlineConfiguration())->addData($input));
     }
 
     /**
@@ -405,7 +405,7 @@ class TcaInlineConfigurationTest extends UnitTestCase
         $expected = [];
         $expected['processedTca']['columns']['aField']['config'] = $this->defaultConfig;
         $expected['processedTca']['columns']['aField']['config']['appearance']['showRemovedLocalizationRecords'] = false;
-        self::assertEquals($expected, (new TcaInlineConfiguration)->addData($input));
+        self::assertEquals($expected, (new TcaInlineConfiguration())->addData($input));
     }
 
     /**
@@ -430,7 +430,7 @@ class TcaInlineConfigurationTest extends UnitTestCase
         ];
         $this->expectException(\UnexpectedValueException::class);
         $this->expectExceptionCode(1444995464);
-        (new TcaInlineConfiguration)->addData($input);
+        (new TcaInlineConfiguration())->addData($input);
     }
 
     /**
@@ -454,7 +454,7 @@ class TcaInlineConfigurationTest extends UnitTestCase
         ];
         $this->expectException(\UnexpectedValueException::class);
         $this->expectExceptionCode(1444996537);
-        (new TcaInlineConfiguration)->addData($input);
+        (new TcaInlineConfiguration())->addData($input);
     }
 
     /**
@@ -478,7 +478,7 @@ class TcaInlineConfigurationTest extends UnitTestCase
         ];
         $this->expectException(\UnexpectedValueException::class);
         $this->expectExceptionCode(1444996537);
-        (new TcaInlineConfiguration)->addData($input);
+        (new TcaInlineConfiguration())->addData($input);
     }
 
     /**
@@ -505,7 +505,7 @@ class TcaInlineConfigurationTest extends UnitTestCase
         ];
         $this->expectException(\UnexpectedValueException::class);
         $this->expectExceptionCode(1444996537);
-        (new TcaInlineConfiguration)->addData($input);
+        (new TcaInlineConfiguration())->addData($input);
     }
 
     /**
@@ -533,7 +533,7 @@ class TcaInlineConfigurationTest extends UnitTestCase
         ];
         $this->expectException(\UnexpectedValueException::class);
         $this->expectExceptionCode(1444999130);
-        (new TcaInlineConfiguration)->addData($input);
+        (new TcaInlineConfiguration())->addData($input);
     }
 
     /**
@@ -560,7 +560,7 @@ class TcaInlineConfigurationTest extends UnitTestCase
         ];
         $this->expectException(\UnexpectedValueException::class);
         $this->expectExceptionCode(1445078627);
-        (new TcaInlineConfiguration)->addData($input);
+        (new TcaInlineConfiguration())->addData($input);
     }
 
     /**
@@ -588,7 +588,7 @@ class TcaInlineConfigurationTest extends UnitTestCase
         ];
         $this->expectException(\UnexpectedValueException::class);
         $this->expectExceptionCode(1445078628);
-        (new TcaInlineConfiguration)->addData($input);
+        (new TcaInlineConfiguration())->addData($input);
     }
 
     /**
@@ -626,7 +626,7 @@ class TcaInlineConfigurationTest extends UnitTestCase
             ],
             'foreignTable' => 'anotherForeignTableName',
         ];
-        self::assertEquals($expected, (new TcaInlineConfiguration)->addData($input));
+        self::assertEquals($expected, (new TcaInlineConfiguration())->addData($input));
     }
 
     /**
@@ -702,6 +702,6 @@ class TcaInlineConfigurationTest extends UnitTestCase
             ],
             'foreignTable' => 'anotherForeignTableName',
         ];
-        self::assertEquals($expected, (new TcaInlineConfiguration)->addData($input));
+        self::assertEquals($expected, (new TcaInlineConfiguration())->addData($input));
     }
 }
index 6eeabc6..6d6af97 100644 (file)
@@ -58,7 +58,7 @@ class TcaInlineExpandCollapseStateTest extends UnitTestCase
         ];
         $expected = $input;
         $expected['inlineExpandCollapseStateArray'] = $inlineState['aParentTable'][5];
-        self::assertSame($expected, (new TcaInlineExpandCollapseState)->addData($input));
+        self::assertSame($expected, (new TcaInlineExpandCollapseState())->addData($input));
     }
 
     /**
@@ -102,7 +102,7 @@ class TcaInlineExpandCollapseStateTest extends UnitTestCase
         ];
         $expected = $input;
         $expected['inlineExpandCollapseStateArray'] = $inlineState['aParentTable'][5];
-        self::assertSame($expected, (new TcaInlineExpandCollapseState)->addData($input));
+        self::assertSame($expected, (new TcaInlineExpandCollapseState())->addData($input));
     }
 
     /**
@@ -335,6 +335,6 @@ class TcaInlineExpandCollapseStateTest extends UnitTestCase
 
         $expected = $input;
         $expected['isInlineChildExpanded'] = $expectedIsInlineChildExpanded;
-        self::assertSame($expected, (new TcaInlineExpandCollapseState)->addData($input));
+        self::assertSame($expected, (new TcaInlineExpandCollapseState())->addData($input));
     }
 }
index 5d7f565..1f77c5a 100644 (file)
@@ -66,7 +66,7 @@ class TcaInlineTest extends UnitTestCase
 
         $expected = $input;
         $expected['processedTca']['columns']['aField']['children'] = [];
-        self::assertEquals($expected, (new TcaInline)->addData($input));
+        self::assertEquals($expected, (new TcaInline())->addData($input));
     }
 
     /**
@@ -97,7 +97,7 @@ class TcaInlineTest extends UnitTestCase
 
         $expected = $input;
         $expected['processedTca']['columns']['aField']['config']['type'] = 'input';
-        self::assertEquals($expected, (new TcaInline)->addData($input));
+        self::assertEquals($expected, (new TcaInline())->addData($input));
     }
 
     /**
@@ -130,6 +130,6 @@ class TcaInlineTest extends UnitTestCase
 
         $expected = $input;
         $expected['processedTca']['columns']['aField']['children'] = [];
-        self::assertEquals($expected, (new TcaInline)->addData($input));
+        self::assertEquals($expected, (new TcaInline())->addData($input));
     }
 }
index a86ced5..7717ce9 100644 (file)
@@ -51,7 +51,7 @@ class TcaInputPlaceholdersTest extends UnitTestCase
         $expected = $input;
         unset($expected['processedTca']['columns']['aField']['config']['placeholder']);
 
-        self::assertSame($expected, (new TcaInputPlaceholders)->addData($input));
+        self::assertSame($expected, (new TcaInputPlaceholders())->addData($input));
     }
 
     /**
@@ -76,7 +76,7 @@ class TcaInputPlaceholdersTest extends UnitTestCase
 
         $expected = $input;
 
-        self::assertSame($expected, (new TcaInputPlaceholders)->addData($input));
+        self::assertSame($expected, (new TcaInputPlaceholders())->addData($input));
     }
 
     /**
@@ -104,7 +104,7 @@ class TcaInputPlaceholdersTest extends UnitTestCase
         $expected = $input;
         $expected['processedTca']['columns']['aField']['config']['placeholder'] = 'anotherPlaceholder';
 
-        self::assertSame($expected, (new TcaInputPlaceholders)->addData($input));
+        self::assertSame($expected, (new TcaInputPlaceholders())->addData($input));
     }
 
     /**
@@ -168,7 +168,7 @@ class TcaInputPlaceholdersTest extends UnitTestCase
         $expected = $input;
         $expected['processedTca']['columns']['aField']['config']['placeholder'] = $aForeignTableInput['databaseRow']['aForeignField'];
 
-        self::assertSame($expected, (new TcaInputPlaceholders)->addData($input));
+        self::assertSame($expected, (new TcaInputPlaceholders())->addData($input));
     }
 
     /**
@@ -203,7 +203,7 @@ class TcaInputPlaceholdersTest extends UnitTestCase
         $expected = $input;
         unset($expected['processedTca']['columns']['aField']['config']['placeholder']);
 
-        self::assertSame($expected, (new TcaInputPlaceholders)->addData($input));
+        self::assertSame($expected, (new TcaInputPlaceholders())->addData($input));
     }
 
     /**
@@ -277,7 +277,7 @@ class TcaInputPlaceholdersTest extends UnitTestCase
         $expected = $input;
         $expected['processedTca']['columns']['aField']['config']['placeholder'] = $sysFileProphecyResult['databaseRow']['sha1'];
 
-        self::assertSame($expected, (new TcaInputPlaceholders)->addData($input));
+        self::assertSame($expected, (new TcaInputPlaceholders())->addData($input));
     }
 
     /**
@@ -343,7 +343,7 @@ class TcaInputPlaceholdersTest extends UnitTestCase
         $expected = $input;
         $expected['processedTca']['columns']['aField']['config']['placeholder'] = $sysFileMetadataProphecyResult['databaseRow']['title'];
 
-        self::assertSame($expected, (new TcaInputPlaceholders)->addData($input));
+        self::assertSame($expected, (new TcaInputPlaceholders())->addData($input));
     }
 
     /**
@@ -447,7 +447,7 @@ class TcaInputPlaceholdersTest extends UnitTestCase
         $expected = $input;
         $expected['processedTca']['columns']['aField']['config']['placeholder'] = $sysFileMetadataProphecyResult['databaseRow']['title'];
 
-        self::assertSame($expected, (new TcaInputPlaceholders)->addData($input));
+        self::assertSame($expected, (new TcaInputPlaceholders())->addData($input));
     }
 
     /**
@@ -479,6 +479,6 @@ class TcaInputPlaceholdersTest extends UnitTestCase
         $GLOBALS['LANG'] = $languageService->reveal();
         $languageService->sL($labelString)->shouldBeCalled()->willReturn($localizedString);
 
-        self::assertSame($expected, (new TcaInputPlaceholders)->addData($input));
+        self::assertSame($expected, (new TcaInputPlaceholders())->addData($input));
     }
 }
index 90713f6..bff6ff6 100644 (file)
@@ -63,7 +63,7 @@ class TcaRadioItemsTest extends UnitTestCase
 
         $this->expectException(\UnexpectedValueException::class);
         $this->expectExceptionCode(1438594829);
-        (new TcaRadioItems)->addData($input);
+        (new TcaRadioItems())->addData($input);
     }
 
     /**
@@ -94,7 +94,7 @@ class TcaRadioItemsTest extends UnitTestCase
         $languageService->sL(Argument::cetera())->willReturnArgument(0);
 
         $expected = $input;
-        self::assertSame($expected, (new TcaRadioItems)->addData($input));
+        self::assertSame($expected, (new TcaRadioItems())->addData($input));
     }
 
     /**
@@ -124,7 +124,7 @@ class TcaRadioItemsTest extends UnitTestCase
 
         $this->expectException(\UnexpectedValueException::class);
         $this->expectExceptionCode(1438607163);
-        (new TcaRadioItems)->addData($input);
+        (new TcaRadioItems())->addData($input);
     }
 
     /**
@@ -156,7 +156,7 @@ class TcaRadioItemsTest extends UnitTestCase
 
         $this->expectException(\UnexpectedValueException::class);
         $this->expectExceptionCode(1438607164);
-        (new TcaRadioItems)->addData($input);
+        (new TcaRadioItems())->addData($input);
     }
 
     /**
@@ -188,7 +188,7 @@ class TcaRadioItemsTest extends UnitTestCase
 
         $this->expectException(\UnexpectedValueException::class);
         $this->expectExceptionCode(1438607165);
-        (new TcaRadioItems)->addData($input);
+        (new TcaRadioItems())->addData($input);
     }
 
     /**
@@ -224,8 +224,8 @@ class TcaRadioItemsTest extends UnitTestCase
         $expected = $input;
         $expected['processedTca']['columns']['aField']['config']['items'][0][0] = 'translated';
 
-        self::assertSame($expected, (new TcaRadioItems)->addData($input));
-        (new TcaRadioItems)->addData($input);
+        self::assertSame($expected, (new TcaRadioItems())->addData($input));
+        (new TcaRadioItems())->addData($input);
     }
 
     /**
@@ -264,7 +264,7 @@ class TcaRadioItemsTest extends UnitTestCase
                 'foo' => 'bar',
             ],
         ];
-        self::assertSame($expected, (new TcaRadioItems)->addData($input));
+        self::assertSame($expected, (new TcaRadioItems())->addData($input));
     }
 
     /**
@@ -333,7 +333,7 @@ class TcaRadioItemsTest extends UnitTestCase
         // itemsProcFunc must NOT have raised an exception
         $flashMessageQueue->enqueue($flashMessage)->shouldNotBeCalled();
 
-        (new TcaRadioItems)->addData($input);
+        (new TcaRadioItems())->addData($input);
     }
 
     /**
@@ -392,7 +392,7 @@ class TcaRadioItemsTest extends UnitTestCase
 
         $flashMessageQueue->enqueue($flashMessage)->shouldBeCalled();
 
-        (new TcaRadioItems)->addData($input);
+        (new TcaRadioItems())->addData($input);
     }
 
     /**
@@ -440,7 +440,7 @@ class TcaRadioItemsTest extends UnitTestCase
         $expected = $input;
         $expected['processedTca']['columns']['aField']['config']['items'][0][0] = 'labelOverride';
 
-        self::assertSame($expected, (new TcaRadioItems)->addData($input));
-        (new TcaRadioItems)->addData($input);
+        self::assertSame($expected, (new TcaRadioItems())->addData($input));
+        (new TcaRadioItems())->addData($input);
     }
 }
index 496ad50..6ef6044 100644 (file)
@@ -58,7 +58,7 @@ class TcaRecordTitleTest extends UnitTestCase
         ];
         $this->expectException(\UnexpectedValueException::class);
         $this->expectExceptionCode(1443706103);
-        (new TcaRecordTitle)->addData($input);
+        (new TcaRecordTitle())->addData($input);
     }
 
     /**
@@ -84,7 +84,7 @@ class TcaRecordTitleTest extends UnitTestCase
         $expected = $input;
         $expected['recordTitle'] = 'Test';
 
-        self::assertSame($expected, (new TcaRecordTitle)->addData($input));
+        self::assertSame($expected, (new TcaRecordTitle())->addData($input));
     }
 
     /**
@@ -116,7 +116,7 @@ class TcaRecordTitleTest extends UnitTestCase
         $expected = $input;
         $expected['recordTitle'] = 'Test';
 
-        self::assertSame($expected, (new TcaRecordTitle)->addData($input));
+        self::assertSame($expected, (new TcaRecordTitle())->addData($input));
     }
 
     /**
@@ -152,7 +152,7 @@ class TcaRecordTitleTest extends UnitTestCase
         ];
         $expected = $input;
         $expected['recordTitle'] = 'aValue';
-        self::assertSame($expected, (new TcaRecordTitle)->addData($input));
+        self::assertSame($expected, (new TcaRecordTitle())->addData($input));
     }
 
     /**
@@ -189,7 +189,7 @@ class TcaRecordTitleTest extends UnitTestCase
         ];
         $expected = $input;
         $expected['recordTitle'] = 'aFormattedLabel';
-        self::assertSame($expected, (new TcaRecordTitle)->addData($input));
+        self::assertSame($expected, (new TcaRecordTitle())->addData($input));
     }
 
     /**
@@ -222,7 +222,7 @@ class TcaRecordTitleTest extends UnitTestCase
         ];
         $expected = $input;
         $expected['recordTitle'] = 'aValue';
-        self::assertSame($expected, (new TcaRecordTitle)->addData($input));
+        self::assertSame($expected, (new TcaRecordTitle())->addData($input));
     }
 
     /**
@@ -251,7 +251,7 @@ class TcaRecordTitleTest extends UnitTestCase
 
         $expected = $input;
         $expected['recordTitle'] = 'NEW56017ee37d10e587251374';
-        self::assertSame($expected, (new TcaRecordTitle)->addData($input));
+        self::assertSame($expected, (new TcaRecordTitle())->addData($input));
     }
 
     /**
@@ -400,7 +400,7 @@ class TcaRecordTitleTest extends UnitTestCase
 
         $expected = $input;
         $expected['recordTitle'] = $expectedTitle;
-        self::assertSame($expected, (new TcaRecordTitle)->addData($input));
+        self::assertSame($expected, (new TcaRecordTitle())->addData($input));
     }
 
     /**
@@ -438,7 +438,7 @@ class TcaRecordTitleTest extends UnitTestCase
 
         $expected = $input;
         $expected['recordTitle'] = 'anotherValue';
-        self::assertSame($expected, (new TcaRecordTitle)->addData($input));
+        self::assertSame($expected, (new TcaRecordTitle())->addData($input));
     }
 
     /**
@@ -482,7 +482,7 @@ class TcaRecordTitleTest extends UnitTestCase
 
         $expected = $input;
         $expected['recordTitle'] = 'additionalValue';
-        self::assertSame($expected, (new TcaRecordTitle)->addData($input));
+        self::assertSame($expected, (new TcaRecordTitle())->addData($input));
     }
 
     /**
@@ -521,7 +521,7 @@ class TcaRecordTitleTest extends UnitTestCase
 
         $expected = $input;
         $expected['recordTitle'] = 'aField, anotherField';
-        self::assertSame($expected, (new TcaRecordTitle)->addData($input));
+        self::assertSame($expected, (new TcaRecordTitle())->addData($input));
     }
 
     /**
@@ -566,7 +566,7 @@ class TcaRecordTitleTest extends UnitTestCase
 
         $expected = $input;
         $expected['recordTitle'] = 'aField, anotherField, additionalValue';
-        self::assertSame($expected, (new TcaRecordTitle)->addData($input));
+        self::assertSame($expected, (new TcaRecordTitle())->addData($input));
     }
 
     /**
@@ -611,7 +611,7 @@ class TcaRecordTitleTest extends UnitTestCase
 
         $expected = $input;
         $expected['recordTitle'] = 'aField, additionalValue';
-        self::assertSame($expected, (new TcaRecordTitle)->addData($input));
+        self::assertSame($expected, (new TcaRecordTitle())->addData($input));
     }
 
     /**
@@ -647,7 +647,7 @@ class TcaRecordTitleTest extends UnitTestCase
 
         $expected = $input;
         $expected['recordTitle'] = 'bar';
-        self::assertSame($expected, (new TcaRecordTitle)->addData($input));
+        self::assertSame($expected, (new TcaRecordTitle())->addData($input));
     }
 
     /**
@@ -684,7 +684,7 @@ class TcaRecordTitleTest extends UnitTestCase
 
         $expected = $input;
         $expected['recordTitle'] = 'foo';
-        self::assertSame($expected, (new TcaRecordTitle)->addData($input));
+        self::assertSame($expected, (new TcaRecordTitle())->addData($input));
     }
 
     /**
@@ -824,7 +824,7 @@ class TcaRecordTitleTest extends UnitTestCase
 
         $expected = $input;
         $expected['recordTitle'] = $expectedTitle;
-        self::assertSame($expected, (new TcaRecordTitle)->addData($input));
+        self::assertSame($expected, (new TcaRecordTitle())->addData($input));
     }
 
     /**
@@ -868,7 +868,7 @@ class TcaRecordTitleTest extends UnitTestCase
 
         $expected = $input;
         $expected['recordTitle'] = 'aValue, anotherValue';
-        self::assertSame($expected, (new TcaRecordTitle)->addData($input));
+        self::assertSame($expected, (new TcaRecordTitle())->addData($input));
     }
 
     /**
@@ -903,7 +903,7 @@ class TcaRecordTitleTest extends UnitTestCase
 
         $expected = $input;
         $expected['recordTitle'] = 'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:yes';
-        self::assertSame($expected, (new TcaRecordTitle)->addData($input));
+        self::assertSame($expected, (new TcaRecordTitle())->addData($input));
     }
 
     /**
@@ -943,7 +943,7 @@ class TcaRecordTitleTest extends UnitTestCase
 
         $expected = $input;
         $expected['recordTitle'] = 'foo, baz';
-        self::assertSame($expected, (new TcaRecordTitle)->addData($input));
+        self::assertSame($expected, (new TcaRecordTitle())->addData($input));
     }
 
     /**
@@ -1001,7 +1001,7 @@ class TcaRecordTitleTest extends UnitTestCase
 
         $expected = $input;
         $expected['recordTitle'] = '';
-        self::assertSame($expected, (new TcaRecordTitle)->addData($input));
+        self::assertSame($expected, (new TcaRecordTitle())->addData($input));
     }
 
     /**
@@ -1039,7 +1039,7 @@ class TcaRecordTitleTest extends UnitTestCase
 
         $expected = $input;
         $expected['recordTitle'] = 'foo, bar';
-        self::assertSame($expected, (new TcaRecordTitle)->addData($input));
+        self::assertSame($expected, (new TcaRecordTitle())->addData($input));
     }
 
     /**
@@ -1069,6 +1069,6 @@ class TcaRecordTitleTest extends UnitTestCase
 
         $expected = $input;
         $expected['recordTitle'] = 'text';
-        self::assertSame($expected, (new TcaRecordTitle)->addData($input));
+        self::assertSame($expected, (new TcaRecordTitle())->addData($input));
     }
 }
index 415d400..10fa53b 100644 (file)
@@ -203,7 +203,7 @@ class TcaSelectItemsTest extends UnitTestCase
         ];
 
         $expected = $input;
-        self::assertSame($expected, (new TcaSelectItems)->addData($input));
+        self::assertSame($expected, (new TcaSelectItems())->addData($input));
     }
 
     /**
@@ -231,7 +231,7 @@ class TcaSelectItemsTest extends UnitTestCase
         $this->expectException(\UnexpectedValueException::class);
         $this->expectExceptionCode(1439288036);
 
-        (new TcaSelectItems)->addData($input);
+        (new TcaSelectItems())->addData($input);
     }
 
     /**
@@ -277,7 +277,7 @@ class TcaSelectItemsTest extends UnitTestCase
 
         $expected['databaseRow']['aField'] = ['aValue'];
 
-        self::assertSame($expected, (new TcaSelectItems)->addData($input));
+        self::assertSame($expected, (new TcaSelectItems())->addData($input));
     }
 
     /**
@@ -314,7 +314,7 @@ class TcaSelectItemsTest extends UnitTestCase
         $expected = $input;
         $expected['databaseRow']['aField'] = ['aValue'];
 
-        self::assertSame($expected, (new TcaSelectItems)->addData($input));
+        self::assertSame($expected, (new TcaSelectItems())->addData($input));
     }
 
     /**
@@ -340,7 +340,7 @@ class TcaSelectItemsTest extends UnitTestCase
         $this->expectException(\UnexpectedValueException::class);
         $this->expectExceptionCode(1439298496);
 
-        (new TcaSelectItems)->addData($input);
+        (new TcaSelectItems())->addData($input);
     }
 
     /**
@@ -402,7 +402,7 @@ class TcaSelectItemsTest extends UnitTestCase
             ]
         ];
 
-        self::assertSame($expected, (new TcaSelectItems)->addData($input));
+        self::assertSame($expected, (new TcaSelectItems())->addData($input));
     }
 
     /**
@@ -464,7 +464,7 @@ class TcaSelectItemsTest extends UnitTestCase
             ]
         ];
 
-        self::assertSame($expected, (new TcaSelectItems)->addData($input));
+        self::assertSame($expected, (new TcaSelectItems())->addData($input));
     }
 
     /**
@@ -608,7 +608,7 @@ class TcaSelectItemsTest extends UnitTestCase
         ];
         $GLOBALS['TCA'] = $tca;
 
-        $result = (new TcaSelectItems)->addData($input);
+        $result = (new TcaSelectItems())->addData($input);
 
         self::assertSame($expectedItems, $result['processedTca']['columns']['aField']['config']['items']);
     }
@@ -687,7 +687,7 @@ class TcaSelectItemsTest extends UnitTestCase
             ],
         ];
 
-        $result = (new TcaSelectItems)->addData($input);
+        $result = (new TcaSelectItems())->addData($input);
 
         self::assertSame($expectedItems, $result['processedTca']['columns']['aField']['config']['items']);
     }
@@ -758,7 +758,7 @@ class TcaSelectItemsTest extends UnitTestCase
             ],
         ];
 
-        $result = (new TcaSelectItems)->addData($input);
+        $result = (new TcaSelectItems())->addData($input);
 
         self::assertSame($expectedItems, $result['processedTca']['columns']['aField']['config']['items']);
     }
@@ -829,7 +829,7 @@ class TcaSelectItemsTest extends UnitTestCase
             ],
         ];
 
-        $result = (new TcaSelectItems)->addData($input);
+        $result = (new TcaSelectItems())->addData($input);
 
         self::assertSame($expectedItems, $result['processedTca']['columns']['aField']['config']['items']);
     }
@@ -921,7 +921,7 @@ class TcaSelectItemsTest extends UnitTestCase
             ],
         ];
 
-        $result = (new TcaSelectItems)->addData($input);
+        $result = (new TcaSelectItems())->addData($input);
 
         self::assertSame($expectedItems, $result['processedTca']['columns']['aField']['config']['items']);
     }
@@ -1013,7 +1013,7 @@ class TcaSelectItemsTest extends UnitTestCase
             ],
         ];
 
-        $result = (new TcaSelectItems)->addData($input);
+        $result = (new TcaSelectItems())->addData($input);
 
         self::assertSame($expectedItems, $result['processedTca']['columns']['aField']['config']['items']);
     }
@@ -1065,7 +1065,7 @@ class TcaSelectItemsTest extends UnitTestCase
             ],
         ];
 
-        $result = (new TcaSelectItems)->addData($input);
+        $result = (new TcaSelectItems())->addData($input);
 
         self::assertSame($expectedItems, $result['processedTca']['columns']['aField']['config']['items']);
     }
@@ -1128,7 +1128,7 @@ class TcaSelectItemsTest extends UnitTestCase
             ],
         ];
 
-        $result = (new TcaSelectItems)->addData($input);
+        $result = (new TcaSelectItems())->addData($input);
 
         self::assertSame($expectedItems, $result['processedTca']['columns']['aField']['config']['items']);
     }
@@ -1186,7 +1186,7 @@ class TcaSelectItemsTest extends UnitTestCase
             ],
         ];
 
-        $result = (new TcaSelectItems)->addData($input);
+        $result = (new TcaSelectItems())->addData($input);
 
         $result['processedTca']['columns']['aField']['config']['items'][0][2] = str_replace([CR, LF, "\t"], '', $result['processedTca']['columns']['aField']['config']['items'][0][2]);
         self::assertSame($expectedItems, $result['processedTca']['columns']['aField']['config']['items']);
@@ -1239,7 +1239,7 @@ class TcaSelectItemsTest extends UnitTestCase
             ],
         ];
 
-        $result = (new TcaSelectItems)->addData($input);
+        $result = (new TcaSelectItems())->addData($input);
 
         self::assertSame($expectedItems, $result['processedTca']['columns']['aField']['config']['items']);
     }
@@ -1267,7 +1267,7 @@ class TcaSelectItemsTest extends UnitTestCase
 
         $this->expectException(\RuntimeException::class);
         $this->expectExceptionCode(1479399227);
-        (new TcaSelectItems)->addData($input);
+        (new TcaSelectItems())->addData($input);
     }
 
     /**
@@ -1321,7 +1321,7 @@ class TcaSelectItemsTest extends UnitTestCase
             null,
         ];
 
-        self::assertEquals($expected, (new TcaSelectItems)->addData($input));
+        self::assertEquals($expected, (new TcaSelectItems())->addData($input));
     }
 
     /**
@@ -1375,7 +1375,7 @@ class TcaSelectItemsTest extends UnitTestCase
             null,
         ];
 
-        self::assertEquals($expected, (new TcaSelectItems)->addData($input));
+        self::assertEquals($expected, (new TcaSelectItems())->addData($input));
     }
 
     /**
@@ -1699,7 +1699,7 @@ class TcaSelectItemsTest extends UnitTestCase
         $GLOBALS['BE_USER'] = $backendUserProphecy->reveal();
         $backendUserProphecy->getPagePermsClause(1)->shouldBeCalled()->willReturn(' 1=1');
 
-        (new TcaSelectItems)->addData($input);
+        (new TcaSelectItems())->addData($input);
     }
 
     /**
@@ -1725,7 +1725,7 @@ class TcaSelectItemsTest extends UnitTestCase
         $this->expectException(\UnexpectedValueException::class);
         $this->expectExceptionCode(1439569743);
 
-        (new TcaSelectItems)->addData($input);
+        (new TcaSelectItems())->addData($input);
     }
 
     /**
@@ -1790,7 +1790,7 @@ class TcaSelectItemsTest extends UnitTestCase
         GeneralUtility::addInstance(ConnectionPool::class, $connectionPoolProphet->reveal());
         GeneralUtility::addInstance(ConnectionPool::class, $connectionPoolProphet->reveal());
 
-        (new TcaSelectItems)->addData($input);
+        (new TcaSelectItems())->addData($input);
     }
 
     /**
@@ -1868,7 +1868,7 @@ class TcaSelectItemsTest extends UnitTestCase
         $expected = $input;
         $expected['databaseRow']['aField'] = [];
 
-        self::assertEquals($expected, (new TcaSelectItems)->addData($input));
+        self::assertEquals($expected, (new TcaSelectItems())->addData($input));
     }
 
     /**
@@ -1975,7 +1975,7 @@ class TcaSelectItemsTest extends UnitTestCase
 
         $expected['databaseRow']['aField'] = [];
 
-        self::assertEquals($expected, (new TcaSelectItems)->addData($input));
+        self::assertEquals($expected, (new TcaSelectItems())->addData($input));
     }
 
     /**
@@ -2073,7 +2073,7 @@ class TcaSelectItemsTest extends UnitTestCase
 
         $expected['databaseRow']['aField'] = [];
 
-        self::assertEquals($expected, (new TcaSelectItems)->addData($input));
+        self::assertEquals($expected, (new TcaSelectItems())->addData($input));
     }
 
     /**
@@ -2159,7 +2159,7 @@ class TcaSelectItemsTest extends UnitTestCase
         ];
         $expected['databaseRow']['aField'] = [];
 
-        self::assertEquals($expected, (new TcaSelectItems)->addData($input));
+        self::assertEquals($expected, (new TcaSelectItems())->addData($input));
     }
 
     /**
@@ -2217,7 +2217,7 @@ class TcaSelectItemsTest extends UnitTestCase
             $expected['processedTca']['columns']['aField']['config']['items'][2]
         );
 
-        self::assertEquals($expected, (new TcaSelectItems)->addData($input));
+        self::assertEquals($expected, (new TcaSelectItems())->addData($input));
     }
 
     /**
@@ -2268,7 +2268,7 @@ class TcaSelectItemsTest extends UnitTestCase
         $expected['databaseRow']['aField'] = [];
         $expected['processedTca']['columns']['aField']['config']['items'] = [];
 
-        self::assertEquals($expected, (new TcaSelectItems)->addData($input));
+        self::assertEquals($expected, (new TcaSelectItems())->addData($input));
     }
 
     /**
@@ -2342,7 +2342,7 @@ class TcaSelectItemsTest extends UnitTestCase
             ],
         ];
 
-        self::assertEquals($expected, (new TcaSelectItems)->addData($input));
+        self::assertEquals($expected, (new TcaSelectItems())->addData($input));
     }
 
     /**
@@ -2399,7 +2399,7 @@ class TcaSelectItemsTest extends UnitTestCase
         $expected['databaseRow']['aField'] = [];
         unset($expected['processedTca']['columns']['aField']['config']['items'][1]);
         $expected['processedTca']['columns']['aField']['config']['items'] = array_values($expected['processedTca']['columns']['aField']['config']['items']);
-        self::assertEquals($expected, (new TcaSelectItems)->addData($input));
+        self::assertEquals($expected, (new TcaSelectItems())->addData($input));
     }
 
     /**
@@ -2455,7 +2455,7 @@ class TcaSelectItemsTest extends UnitTestCase
         $expected = $input;
         $expected['databaseRow']['aField'] = [];
         unset($expected['processedTca']['columns']['aField']['config']['items'][2]);
-        self::assertEquals($expected, (new TcaSelectItems)->addData($input));
+        self::assertEquals($expected, (new TcaSelectItems())->addData($input));
     }
 
     /**
@@ -2509,7 +2509,7 @@ class TcaSelectItemsTest extends UnitTestCase
         $expected['databaseRow']['aField'] = [];
         unset($expected['processedTca']['columns']['aField']['config']['items'][1]);
 
-        self::assertEquals($expected, (new TcaSelectItems)->addData($input));
+        self::assertEquals($expected, (new TcaSelectItems())->addData($input));
     }
 
     /**
@@ -2569,7 +2569,7 @@ class TcaSelectItemsTest extends UnitTestCase
             [ 'keepMe', 'keep', null, null ],
         ];
 
-        self::assertEquals($expected, (new TcaSelectItems)->addData($input));
+        self::assertEquals($expected, (new TcaSelectItems())->addData($input));
     }
 
     /**
@@ -2618,7 +2618,7 @@ class TcaSelectItemsTest extends UnitTestCase
         $expected['databaseRow']['aField'] = ['keep'];
         unset($expected['processedTca']['columns']['aField']['config']['items'][1]);
 
-        self::assertEquals($expected, (new TcaSelectItems)->addData($input));
+        self::assertEquals($expected, (new TcaSelectItems())->addData($input));
     }
 
     /**
@@ -2660,7 +2660,7 @@ class TcaSelectItemsTest extends UnitTestCase
         $expected = $input;
         $expected['databaseRow']['doktype'] = ['keep'];
 
-        self::assertEquals($expected, (new TcaSelectItems)->addData($input));
+        self::assertEquals($expected, (new TcaSelectItems())->addData($input));
     }
 
     /**
@@ -2710,7 +2710,7 @@ class TcaSelectItemsTest extends UnitTestCase
         $expected['databaseRow']['doktype'] = ['keep'];
         unset($expected['processedTca']['columns']['doktype']['config']['items'][1]);
 
-        self::assertEquals($expected, (new TcaSelectItems)->addData($input));
+        self::assertEquals($expected, (new TcaSelectItems())->addData($input));
     }
 
     /**
@@ -2762,7 +2762,7 @@ class TcaSelectItemsTest extends UnitTestCase
             'maxitems' => 99999,
         ];
 
-        self::assertSame($expected, (new TcaSelectItems)->addData($input));
+        self::assertSame($expected, (new TcaSelectItems())->addData($input));
     }
 
     /**
@@ -2851,7 +2851,7 @@ class TcaSelectItemsTest extends UnitTestCase
             0 => '2' // the selected value stored in db
         ];
 
-        self::assertEquals($expected, (new TcaSelectItems)->addData($input));
+        self::assertEquals($expected, (new TcaSelectItems())->addData($input));
     }
 
     /**
@@ -2959,7 +2959,7 @@ class TcaSelectItemsTest extends UnitTestCase
 
         $expected['databaseRow']['aField'] = [];
 
-        self::assertEquals($expected, (new TcaSelectItems)->addData($input));
+        self::assertEquals($expected, (new TcaSelectItems())->addData($input));
     }
 
     /**
@@ -3076,7 +3076,7 @@ class TcaSelectItemsTest extends UnitTestCase
 
         $expected['databaseRow']['aField'] = [];
 
-        self::assertEquals($expected, (new TcaSelectItems)->addData($input));
+        self::assertEquals($expected, (new TcaSelectItems())->addData($input));
     }
 
     /**
@@ -3201,7 +3201,7 @@ class TcaSelectItemsTest extends UnitTestCase
 
         $expected['databaseRow']['aField'] = [];
 
-        self::assertEquals($expected, (new TcaSelectItems)->addData($input));
+        self::assertEquals($expected, (new TcaSelectItems())->addData($input));
     }
 
     /**
@@ -3271,7 +3271,7 @@ class TcaSelectItemsTest extends UnitTestCase
         // itemsProcFunc must NOT have raised an exception
         $flashMessageQueue->enqueue($flashMessage)->shouldNotBeCalled();
 
-        (new TcaSelectItems)->addData($input);
+        (new TcaSelectItems())->addData($input);
     }
 
     /**
@@ -3331,7 +3331,7 @@ class TcaSelectItemsTest extends UnitTestCase
 
         $flashMessageQueue->enqueue($flashMessage)->shouldBeCalled();
 
-        (new TcaSelectItems)->addData($input);
+        (new TcaSelectItems())->addData($input);
     }
 
     /**
@@ -3387,7 +3387,7 @@ class TcaSelectItemsTest extends UnitTestCase
         $expected['databaseRow']['aField'] = ['aValue'];
         $expected['processedTca']['columns']['aField']['config']['items'][0][0] = 'labelOverride';
 
-        self::assertSame($expected, (new TcaSelectItems)->addData($input));
+        self::assertSame($expected, (new TcaSelectItems())->addData($input));
     }
 
     /**
@@ -3448,7 +3448,7 @@ class TcaSelectItemsTest extends UnitTestCase
         $expected = $input;
         $expected['databaseRow']['aField'] = $relationHandlerUids;
 
-        self::assertEquals($expected, (new TcaSelectItems)->addData($input));
+        self::assertEquals($expected, (new TcaSelectItems())->addData($input));
     }
 
     /**
@@ -3507,7 +3507,7 @@ class TcaSelectItemsTest extends UnitTestCase
         $expected = $input;
         $expected['databaseRow']['aField'] = $relationHandlerUids;
 
-        self::assertEquals($expected, (new TcaSelectItems)->addData($input));
+        self::assertEquals($expected, (new TcaSelectItems())->addData($input));
     }
 
     /**
@@ -3560,7 +3560,7 @@ class TcaSelectItemsTest extends UnitTestCase
         $expected = $input;
         $expected['databaseRow']['aField'] = [1, 'foo'];
 
-        self::assertEquals($expected, (new TcaSelectItems)->addData($input));
+        self::assertEquals($expected, (new TcaSelectItems())->addData($input));
     }
 
     /**
@@ -3596,7 +3596,7 @@ class TcaSelectItemsTest extends UnitTestCase
             'bar'
         ];
 
-        self::assertEquals($expected, (new TcaSelectItems)->addData($input));
+        self::assertEquals($expected, (new TcaSelectItems())->addData($input));
     }
 
     /**
@@ -3626,7 +3626,7 @@ class TcaSelectItemsTest extends UnitTestCase
         $expected = $input;
         $expected['databaseRow']['aField'] = [];
 
-        self::assertEquals($expected, (new TcaSelectItems)->addData($input));
+        self::assertEquals($expected, (new TcaSelectItems())->addData($input));
     }
 
     /**
@@ -3663,7 +3663,7 @@ class TcaSelectItemsTest extends UnitTestCase
             'c',
         ];
 
-        self::assertEquals($expected, (new TcaSelectItems)->addData($input));
+        self::assertEquals($expected, (new TcaSelectItems())->addData($input));
     }
 
     /**
@@ -3700,7 +3700,7 @@ class TcaSelectItemsTest extends UnitTestCase
         $expected = $input;
         $expected['databaseRow']['aField'] = ['foo'];
 
-        self::assertEquals($expected, (new TcaSelectItems)->addData($input));
+        self::assertEquals($expected, (new TcaSelectItems())->addData($input));
     }
 
     /**
@@ -3747,7 +3747,7 @@ class TcaSelectItemsTest extends UnitTestCase
             ['[ INVALID VALUE "1" ]', '1', null, null],
             ['foo', 'foo', null, null],
         ];
-        self::assertEquals($expected, (new TcaSelectItems)->addData($input));
+        self::assertEquals($expected, (new TcaSelectItems())->addData($input));
     }
 
     /**
@@ -3789,7 +3789,7 @@ class TcaSelectItemsTest extends UnitTestCase
             'bar'
         ];
 
-        self::assertEquals($expected, (new TcaSelectItems)->addData($input));
+        self::assertEquals($expected, (new TcaSelectItems())->addData($input));
     }
 
     /**
@@ -3830,7 +3830,7 @@ class TcaSelectItemsTest extends UnitTestCase
             4 => 'bar',
         ];
 
-        self::assertEquals($expected, (new TcaSelectItems)->addData($input));
+        self::assertEquals($expected, (new TcaSelectItems())->addData($input));
     }
 
     /**
@@ -4006,6 +4006,6 @@ class TcaSelectItemsTest extends UnitTestCase
         $expected = $input;
         $expected['databaseRow']['aField'] = $relationHandlerUids;
 
-        self::assertEquals($expected, (new TcaSelectItems)->addData($input));
+        self::assertEquals($expected, (new TcaSelectItems())->addData($input));
     }
 }
index d632e3f..6f78134 100644 (file)
@@ -179,7 +179,7 @@ class TcaSelectTreeItemsTest extends UnitTestCase
         $expected['processedTca']['columns']['aField']['config']['items'] = [
             'fake', 'tree', 'data',
         ];
-        self::assertEquals($expected, (new TcaSelectTreeItems)->addData($input));
+        self::assertEquals($expected, (new TcaSelectTreeItems())->addData($input));
     }
 
     /**
@@ -262,7 +262,7 @@ class TcaSelectTreeItemsTest extends UnitTestCase
             'selectTreeCompileItems' => true,
         ];
 
-        (new TcaSelectTreeItems)->addData($input);
+        (new TcaSelectTreeItems())->addData($input);
 
         $treeDataProviderProphecy->setRootUid(42)->shouldHaveBeenCalled();
         $treeDataProviderProphecy->setExpandAll(true)->shouldHaveBeenCalled();
index eee13b2..bed60b9 100644 (file)
@@ -290,7 +290,7 @@ class InlineStackProcessorTest extends UnitTestCase
     public function getCurrentStructureFormPrefixReturnsExpectedStringAfterInitializationByStructureString($string, array $_, array $expectedFormName)
     {
         /** @var InlineStackProcessor|\PHPUnit\Framework\MockObject\MockObject|\TYPO3\TestingFramework\Core\AccessibleObjectInterface $subject */
-        $subject = new InlineStackProcessor;
+        $subject = new InlineStackProcessor();
         $subject->initializeByParsingDomObjectIdString($string);
         self::assertEquals($expectedFormName['form'], $subject->getCurrentStructureFormPrefix());
     }
@@ -302,7 +302,7 @@ class InlineStackProcessorTest extends UnitTestCase
     public function getCurrentStructureDomObjectIdPrefixReturnsExpectedStringAfterInitializationByStructureString($string, array $_, array $expectedFormName)
     {
         /** @var InlineStackProcessor|\PHPUnit\Framework\MockObject\MockObject|\TYPO3\TestingFramework\Core\AccessibleObjectInterface $subject */
-        $subject = new InlineStackProcessor;
+        $subject = new InlineStackProcessor();
         $subject->initializeByParsingDomObjectIdString($string);
         self::assertEquals($expectedFormName['object'], $subject->getCurrentStructureDomObjectIdPrefix('pageId'));
     }
index c47209f..02dc429 100644 (file)
@@ -199,7 +199,7 @@ class RouteDispatcherTest extends UnitTestCase
         $requestProphecy->withAttribute('target', $target)->willReturn($requestProphecy->reveal());
         $containerProphecy = $this->prophesize(ContainerInterface::class);
         $containerProphecy->has($target)->willReturn(true);
-        $containerProphecy->get($target)->willReturn(new RouteDispatcherClassInvokeFixture);
+        $containerProphecy->get($target)->willReturn(new RouteDispatcherClassInvokeFixture());
 
         $this->expectException(\RuntimeException::class);
         $this->expectExceptionCode(1520756623);
index 7eabfbc..5d66e88 100644 (file)
@@ -41,7 +41,7 @@ class SiteResolverTest extends UnitTestCase
 
         $incomingRequest = new ServerRequest($incomingUrl, 'GET');
         $incomingRequest = $incomingRequest->withQueryParams(['id' => '9831:/styleguide/']);
-        $requestHandler = new class implements RequestHandlerInterface {
+        $requestHandler = new class() implements RequestHandlerInterface {
             public $incomingRequest;
             public function handle(ServerRequestInterface $request): ResponseInterface
             {
index 137d211..7dd6a59 100644 (file)
@@ -158,7 +158,7 @@ class MemcachedBackend extends AbstractBackend implements TaggableBackendInterfa
             throw new Exception('No servers were given to Memcache', 1213115903);
         }
         $memcachedPlugin = '\\' . ucfirst($this->usedPeclModule);
-        $this->memcache = new $memcachedPlugin;
+        $this->memcache = new $memcachedPlugin();
         $defaultPort = $this->usedPeclModule === 'memcache' ? ini_get('memcache.default_port') : 11211;
         foreach ($this->servers as $server) {
             if (strpos($server, 'unix://') === 0) {
index 384a2d1..10d61f6 100644 (file)
@@ -63,7 +63,7 @@ class UserAspect implements AspectInterface
      */
     private function createPseudoUser(): object
     {
-        $user = new \stdClass;
+        $user = new \stdClass();
         $user->user = [];
         return $user;
     }
index af7f195..c81cb02 100644 (file)
@@ -60,11 +60,11 @@ class FileDumpController
         $parameters = $this->buildParametersFromRequest($request);
 
         if (!$this->isTokenValid($parameters, $request)) {
-            return (new Response)->withStatus(403);
+            return (new Response())->withStatus(403);
         }
         $file = $this->createFileObjectByParameters($parameters);
         if ($file === null) {
-            return (new Response)->withStatus(404);
+            return (new Response())->withStatus(404);
         }
 
         // Hook: allow some other process to do some security/access checks. Hook should return 403 response if access is rejected, void otherwise
index 8879bd8..935f0d2 100644 (file)
@@ -116,7 +116,7 @@ class Bootstrap
         $assetsCache = static::createCache('assets', $disableCaching);
         $dependencyInjectionContainerCache = static::createCache('di');
 
-        $bootState = new \stdClass;
+        $bootState = new \stdClass();
         $bootState->done = false;
         $bootState->cacheDisabled = $disableCaching;
 
index 6136bf1..5c880b4 100644 (file)
@@ -159,7 +159,7 @@ class Locales implements SingletonInterface
     public static function initialize(): Locales
     {
         trigger_error('Locales::initialize() will be removed in TYPO3 v11.0, fetch the instance of a class via GeneralUtility::makeInstance() or DependencyInjection', E_USER_DEPRECATED);
-        return new self;
+        return new self();
     }
 
     /**
index a7a88c2..fc8a922 100644 (file)
@@ -107,17 +107,17 @@ class ServiceProvider extends AbstractServiceProvider
 
     public static function getDependencyOrderingService(ContainerInterface $container): Service\DependencyOrderingService
     {
-        return new Service\DependencyOrderingService;
+        return new Service\DependencyOrderingService();
     }
 
     public static function getContext(ContainerInterface $container): Context\Context
     {
-        return new Context\Context;
+        return new Context\Context();
     }
 
     public static function getPasswordHashFactory(ContainerInterface $container): Crypto\PasswordHashing\PasswordHashFactory
     {
-        return new Crypto\PasswordHashing\PasswordHashFactory;
+        return new Crypto\PasswordHashing\PasswordHashFactory();
     }
 
     public static function getMiddlewareStackResolver(ContainerInterface $container): Http\MiddlewareStackResolver
index b723b21..1ac6d99 100644 (file)
@@ -93,7 +93,7 @@ class ErrorHandlerTest extends FunctionalTestCase
         );
         $coreErrorHandler->setLogger($logger);
 
-        $customErrorHandler = new class {
+        $customErrorHandler = new class() {
             protected $existingHandler;
 
             public function setExistingHandler($existingHandler)
index 8f544d9..f0e11b9 100644 (file)
@@ -78,8 +78,8 @@ class CommandRegistryTest extends UnitTestCase
         $command1MockClass = $this->getMockClass(Command::class, ['dummy']);
         $command2MockClass = $this->getMockClass(Command::class, ['dummy']);
 
-        $this->containerProphecy->get('command1')->willReturn(new $command1MockClass);
-        $this->containerProphecy->get('command2')->willReturn(new $command2MockClass);
+        $this->containerProphecy->get('command1')->willReturn(new $command1MockClass());
+        $this->containerProphecy->get('command2')->willReturn(new $command2MockClass());
 
         $commandRegistry = new CommandRegistry($this->packageManagerProphecy->reveal(), $this->containerProphecy->reveal());
         $commandRegistry->addLazyCommand('test:command', 'command1');
@@ -123,7 +123,7 @@ class CommandRegistryTest extends UnitTestCase
 
         $this->packageManagerProphecy->getActivePackages()->willReturn([$package->reveal()]);
 
-        $this->containerProphecy->get($commandMockClass)->willReturn(new $commandMockClass);
+        $this->containerProphecy->get($commandMockClass)->willReturn(new $commandMockClass());
 
         $commandRegistry = new CommandRegistry($this->packageManagerProphecy->reveal(), $this->containerProphecy->reveal());
         $commandRegistry->addLazyCommand('first:command', $commandMockClass);
index 60ff744..80fc3f5 100644 (file)
@@ -54,7 +54,7 @@ class FailsafeContainerTest extends UnitTestCase
 
     public function testImplementsInterface(): void
     {
-        self::assertInstanceOf(ContainerInterface::class, new Container);
+        self::assertInstanceOf(ContainerInterface::class, new Container());
     }
 
     public function testWithString(): void
@@ -378,7 +378,7 @@ class FailsafeContainerTest extends UnitTestCase
 
     public function testNullContainer(): void
     {
-        $container = new Container;
+        $container = new Container();
         self::assertFalse($container->has('foo'));
     }
 
@@ -412,7 +412,7 @@ class FailsafeContainerTest extends UnitTestCase
             ],
             [
                 // Invokable
-                new class {
+                new class() {
                     public function __invoke(): Service
                     {
                         return new Service();
@@ -422,7 +422,7 @@ class FailsafeContainerTest extends UnitTestCase
             [
                 // Non static factory
                 [
-                    new class {
+                    new class() {
                         public function factory(): Service
                         {
                             return new Service();
index 4e59e79..fd143fe 100644 (file)
@@ -40,7 +40,7 @@ class TestServiceProvider implements ServiceProviderInterface
             'serviceC' => function (ContainerInterface $container): \stdClass {
                 return new \stdClass();
             },
-            'serviceD' => new class {
+            'serviceD' => new class() {
                 public function __invoke(ContainerInterface $container): \stdClass
                 {
                     return new \stdClass();
index 0bb9c05..c3b4c65 100644 (file)
@@ -38,14 +38,14 @@ class ServiceProviderCompilationPassTest extends UnitTestCase
         $serviceProviderRegistryProphecy = $this->prophesize(ServiceProviderRegistry::class);
         $serviceProviderRegistryProphecy->getIterator()->will(function () use ($serviceProviders): \Generator {
             foreach ($serviceProviders as $id => $serviceProvider) {
-                yield (string)$id => new $serviceProvider;
+                yield (string)$id => new $serviceProvider();
             }
         });
 
         foreach ($serviceProviders as $id => $serviceProvider) {
             $packageKey = (string)$id;
 
-            $instance = new $serviceProvider;
+            $instance = new $serviceProvider();
             $factories = $instance->getFactories();
             $extensions = $instance->getExtensions();
 
@@ -198,7 +198,7 @@ class ServiceProviderCompilationPassTest extends UnitTestCase
         $this->expectException(\TypeError::class);
 
         $registry = new ServiceProviderRegistry([
-            new class implements ServiceProviderInterface {
+            new class() implements ServiceProviderInterface {
                 public function getFactories()
                 {
                     return [
index 593a620..cc80b49 100644 (file)
@@ -65,7 +65,7 @@ class EventDispatcherTest extends UnitTestCase
      */
     public function dispatchesEvent(callable $callable)
     {
-        $event = new \stdClass;
+        $event = new \stdClass();
         $event->invoked = 0;
 
         $this->listenerProviderProphecy->getListenersForEvent($event)->will(function () use ($callable): iterable {
@@ -83,7 +83,7 @@ class EventDispatcherTest extends UnitTestCase
      */
     public function doesNotDispatchStoppedEvent(callable $callable)
     {
-        $event = new class implements StoppableEventInterface {
+        $event = new class() implements StoppableEventInterface {
             public $invoked = 0;
 
             public function isPropagationStopped(): bool
@@ -107,7 +107,7 @@ class EventDispatcherTest extends UnitTestCase
      */
     public function dispatchesMultipleListeners(callable $callable)
     {
-        $event = new \stdClass;
+        $event = new \stdClass();
         $event->invoked = 0;
 
         $this->listenerProviderProphecy->getListenersForEvent($event)->will(function () use ($callable): iterable {
@@ -126,7 +126,7 @@ class EventDispatcherTest extends UnitTestCase
      */
     public function stopsOnStoppedEvent(callable $callable)
     {
-        $event = new class implements StoppableEventInterface {
+        $event = new class() implements StoppableEventInterface {
             public $invoked = 0;
             public $stopped = false;
 
@@ -158,7 +158,7 @@ class EventDispatcherTest extends UnitTestCase
         $this->expectException(\BadMethodCallException::class);
         $this->expectExceptionCode(1563270337);
 
-        $event = new \stdClass;
+        $event = new \stdClass();
 
         $this->listenerProviderProphecy->getListenersForEvent($event)->will(function (): iterable {
             yield function (object $event): void {
@@ -178,7 +178,7 @@ class EventDispatcherTest extends UnitTestCase
         return [
             [
                 // Invokable
-                new class {
+                new class() {
                     public function __invoke(object $event): void
                     {
                         $event->invoked += 1;
@@ -188,7 +188,7 @@ class EventDispatcherTest extends UnitTestCase
             [
                 // Class + method
                 [
-                    new class {
+                    new class() {
                         public function onEvent(object $event): void
                         {
                             $event->invoked += 1;
index ca6760d..558e15f 100644 (file)
@@ -80,7 +80,7 @@ class ListenerProviderTest extends UnitTestCase
      */
     public function dispatchesEvent($listener, string $method = null)
     {
-        $event = new \stdClass;
+        $event = new \stdClass();
         $event->invoked = 0;
 
         $this->containerProphecy->get('listener')->willReturn($listener);
@@ -99,7 +99,7 @@ class ListenerProviderTest extends UnitTestCase
      */
     public function associatesToEventParentClass($listener, string $method = null)
     {
-        $extendedEvent = new class extends \stdClass {
+        $extendedEvent = new class() extends \stdClass {
             public $invoked = 0;
         };
 
@@ -118,12 +118,12 @@ class ListenerProviderTest extends UnitTestCase
      */
     public function associatesToImplementedInterfaces($listener, string $method = null)
     {
-        $eventImplementation = new class implements \IteratorAggregate {
+        $eventImplementation = new class() implements \IteratorAggregate {
             public $invoked = 0;
 
             public function getIterator(): \Traversable
             {
-                throw new \BadMethodCallException;
+                throw new \BadMethodCallException('Test', 1586942436);
             }
         };
 
@@ -144,7 +144,7 @@ class ListenerProviderTest extends UnitTestCase
         $this->listenerProvider->addListener(\stdClass::class, 'listener1');
         $this->listenerProvider->addListener(\stdClass::class, 'listener2');
 
-        $event = new \stdClass;
+        $event = new \stdClass();
         $event->sequence = '';
         $this->containerProphecy->get('listener1')->willReturn(function (object $event): void {
             $event->sequence .= 'a';
@@ -167,8 +167,8 @@ class ListenerProviderTest extends UnitTestCase
         $this->expectException(\InvalidArgumentException::class);
         $this->expectExceptionCode(1549988537);
 
-        $event = new \stdClass;
-        $this->containerProphecy->get('listener')->willReturn(new \stdClass);
+        $event = new \stdClass();
+        $this->containerProphecy->get('listener')->willReturn(new \stdClass());
         $this->listenerProvider->addListener(\stdClass::class, 'listener');
         foreach ($this->listenerProvider->getListenersForEvent($event) as $listener) {
             $listener($event);
@@ -184,7 +184,7 @@ class ListenerProviderTest extends UnitTestCase
         return [
             [
                 // Invokable
-                'listener' => new class {
+                'listener' => new class() {
                     public function __invoke(object $event): void
                     {
                         $event->invoked = 1;
@@ -194,7 +194,7 @@ class ListenerProviderTest extends UnitTestCase
             ],
             [
                 // Class + method
-                'listener' => new class {
+                'listener' => new class() {
                     public function onEvent(object $event): void
                     {
                         $event->invoked = 1;
index 34c4f6f..3c068a7 100644 (file)
@@ -31,7 +31,7 @@ class AbstractApplicationTest extends UnitTestCase
             self::markTestSkipped('This test can only be executed if xdebug is present.');
         }
 
-        $application = new class extends AbstractApplication {
+        $application = new class() extends AbstractApplication {
             public function sendResponse(ResponseInterface $response)
             {
                 parent::sendResponse($response);
index b0cde35..3d68a5f 100644 (file)
@@ -115,7 +115,7 @@ class ClientTest extends UnitTestCase
     {
         $request = new Request('https://example.com', 'GET', 'php://temp');
         $mock = new GuzzleMockHandler([
-            new class extends \RuntimeException implements GuzzleExceptionInterface {
+            new class() extends \RuntimeException implements GuzzleExceptionInterface {
             }
         ]);
         $handler = GuzzleHandlerStack::create($mock);
index 77d7704..00db87a 100644 (file)
@@ -38,15 +38,15 @@ class MiddlewareDispatcherTest extends UnitTestCase
      */
     public function executesKernelWithEmptyMiddlewareStack()
     {
-        $kernel = new class implements RequestHandlerInterface {
+        $kernel = new class() implements RequestHandlerInterface {
             public function handle(ServerRequestInterface $request): ResponseInterface
             {
-                return (new Response)->withStatus(204);
+                return (new Response())->withStatus(204);
             }
         };
 
         $dispatcher = new MiddlewareDispatcher($kernel);
-        $response = $dispatcher->handle(new ServerRequest);
+        $response = $dispatcher->handle(new ServerRequest());
 
         self::assertSame(204, $response->getStatusCode());
     }
@@ -56,16 +56,16 @@ class MiddlewareDispatcherTest extends UnitTestCase
      */
     public function executesMiddlewaresLastInFirstOut()
     {
-        $kernel = new class implements RequestHandlerInterface {
+        $kernel = new class() implements RequestHandlerInterface {
             public function handle(ServerRequestInterface $request): ResponseInterface
             {
-                return (new Response)
+                return (new Response())
                     ->withStatus(204)
                     ->withHeader('X-SEQ-PRE-REQ-HANDLER', $request->getHeader('X-SEQ-PRE-REQ-HANDLER'));
             }
         };
 
-        $middleware1 = new class implements MiddlewareInterface {
+        $middleware1 = new class() implements MiddlewareInterface {
             public $id = '0';
 
             public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
@@ -89,7 +89,7 @@ class MiddlewareDispatcherTest extends UnitTestCase
         $dispatcher->lazy(MiddlewareFixture::class);
         $dispatcher->add($middleware4);
 
-        $response = $dispatcher->handle(new ServerRequest);
+        $response = $dispatcher->handle(new ServerRequest());
 
         self::assertSame(['3', '2', '1', '0'], $response->getHeader('X-SEQ-PRE-REQ-HANDLER'));
         self::assertSame(['0', '1', '2', '3'], $response->getHeader('X-SEQ-POST-REQ-HANDLER'));
@@ -101,22 +101,22 @@ class MiddlewareDispatcherTest extends UnitTestCase
      */
     public function doesNotInstantiateLazyMiddlewareInCaseOfAnEarlyReturningOuterMiddleware()
     {
-        $kernel = new class implements RequestHandlerInterface {
+        $kernel = new class() implements RequestHandlerInterface {
             public function handle(ServerRequestInterface $request): ResponseInterface
             {
-                return new Response;
+                return new Response();
             }
         };
-        $middleware = new class implements MiddlewareInterface {
+        $middleware = new class() implements MiddlewareInterface {
             public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
             {
-                return (new Response)->withStatus(404);
+                return (new Response())->withStatus(404);
             }
         };
 
         MiddlewareFixture::$hasBeenInstantiated = false;
         $dispatcher = new MiddlewareDispatcher($kernel, [MiddlewareFixture::class, $middleware]);
-        $response = $dispatcher->handle(new ServerRequest);
+        $response = $dispatcher->handle(new ServerRequest());
 
         self::assertFalse(MiddlewareFixture::$hasBeenInstantiated);
         self::assertSame(404, $response->getStatusCode());
@@ -130,17 +130,17 @@ class MiddlewareDispatcherTest extends UnitTestCase
         $this->expectException(\InvalidArgumentException::class);
         $this->expectExceptionCode(1516821342);
 
-        $kernel = new class implements RequestHandlerInterface {
+        $kernel = new class() implements RequestHandlerInterface {
             public function handle(ServerRequestInterface $request): ResponseInterface
             {
-                return new Response;
+                return new Response();
             }
         };
 
         MiddlewareFixture::$hasBeenInstantiated = false;
         $dispatcher = new MiddlewareDispatcher($kernel);
         $dispatcher->lazy(\stdClass::class);
-        $dispatcher->handle(new ServerRequest);
+        $dispatcher->handle(new ServerRequest());
     }
 
     /**
@@ -148,24 +148,24 @@ class MiddlewareDispatcherTest extends UnitTestCase
      */
     public function canBeExecutedMultipleTimes()
     {
-        $kernel = new class implements RequestHandlerInterface {
+        $kernel = new class() implements RequestHandlerInterface {
             public function handle(ServerRequestInterface $request): ResponseInterface
             {
-                return new Response;
+                return new Response();
             }
         };
-        $middleware = new class implements MiddlewareInterface {
+        $middleware = new class() implements MiddlewareInterface {
             public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
             {
-                return (new Response)->withStatus(204);
+                return (new Response())->withStatus(204);
             }
         };
 
         $dispatcher = new MiddlewareDispatcher($kernel);
         $dispatcher->add($middleware);
 
-        $response1 = $dispatcher->handle(new ServerRequest);
-        $response2 = $dispatcher->handle(new ServerRequest);
+        $response1 = $dispatcher->handle(new ServerRequest());
+        $response2 = $dispatcher->handle(new ServerRequest());
 
         self::assertSame(204, $response1->getStatusCode());
         self::assertSame(204, $response2->getStatusCode());
@@ -176,10 +176,10 @@ class MiddlewareDispatcherTest extends UnitTestCase
      */
     public function canBeReExecutedRecursivelyDuringDispatch()
     {
-        $kernel = new class implements RequestHandlerInterface {
+        $kernel = new class() implements RequestHandlerInterface {
             public function handle(ServerRequestInterface $request): ResponseInterface
             {
-                return new Response;
+                return new Response();
             }
         };
 
@@ -196,7 +196,7 @@ class MiddlewareDispatcherTest extends UnitTestCase
             public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
             {
                 if ($request->hasHeader('X-NESTED')) {
-                    return (new Response)->withStatus(204)->withAddedHeader('X-TRACE', 'nested');
+                    return (new Response())->withStatus(204)->withAddedHeader('X-TRACE', 'nested');
                 }
 
                 $response = $this->dispatcher->handle($request->withAddedHeader('X-NESTED', '1'));
@@ -205,7 +205,7 @@ class MiddlewareDispatcherTest extends UnitTestCase
             }
         });
 
-        $response = $dispatcher->handle(new ServerRequest);
+        $response = $dispatcher->handle(new ServerRequest());
 
         self::assertSame(204, $response->getStatusCode());
         self::assertSame(['nested', 'outer'], $response->getHeader('X-TRACE'));
@@ -216,17 +216,17 @@ class MiddlewareDispatcherTest extends UnitTestCase
      */
     public function fetchesMiddlewareFromContainer()
     {
-        $kernel = new class implements RequestHandlerInterface {
+        $kernel = new class() implements RequestHandlerInterface {
             public function handle(ServerRequestInterface $request): ResponseInterface
             {
-                return new Response;
+                return new Response();
             }
         };
 
-        $middleware = new class implements MiddlewareInterface {
+        $middleware = new class() implements MiddlewareInterface {
             public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
             {
-                return (new Response)->withStatus(404);
+                return (new Response())->withStatus(404);
             }
         };
 
@@ -236,7 +236,7 @@ class MiddlewareDispatcherTest extends UnitTestCase
         $containerProphecy->get('somemiddlewarename')->willReturn($middleware);
 
         $dispatcher = new MiddlewareDispatcher($kernel, ['somemiddlewarename'], $containerProphecy->reveal());
-        $response = $dispatcher->handle(new ServerRequest);
+        $response = $dispatcher->handle(new ServerRequest());
 
         self::assertSame(404, $response->getStatusCode());
     }
index 839c3ac..77f7bf2 100644 (file)
@@ -66,7 +66,7 @@ class MiddlewareStackResolverTest extends UnitTestCase
      */
     public function resolveReturnsEmptyMiddlewareStackForZeroPackages()
     {
-        $middlewares = new ArrayObject;
+        $middlewares = new ArrayObject();
         $containerProphecy = $this->prophesize();
         $containerProphecy->willImplement(ContainerInterface::class);
         $containerProphecy->get('middlewares')->willReturn($middlewares);
index 6230f00..6c6f046 100644 (file)
@@ -57,7 +57,7 @@ class IconRegistryTest extends UnitTestCase
      */
     public function getDefaultIconIdentifierReturnsTheCorrectDefaultIconIdentifierString()
     {
-        $result = (new IconRegistry)->getDefaultIconIdentifier();
+        $result = (new IconRegistry())->getDefaultIconIdentifier();
         self::assertEquals($result, 'default-not-found');
     }
 
@@ -76,7 +76,7 @@ class IconRegistryTest extends UnitTestCase
      */
     public function isRegisteredReturnsFalseForNotRegisteredIcon()
     {
-        $result = (new IconRegistry)->isRegistered($this->notRegisteredIconIdentifier);
+        $result = (new IconRegistry())->isRegistered($this->notRegisteredIconIdentifier);
         self::assertEquals($result, false);
     }
 
@@ -103,7 +103,7 @@ class IconRegistryTest extends UnitTestCase
         $this->expectException(\InvalidArgumentException::class);
         $this->expectExceptionCode(1437425803);
 
-        (new IconRegistry)->registerIcon($this->notRegisteredIconIdentifier, GeneralUtility::class);
+        (new IconRegistry())->registerIcon($this->notRegisteredIconIdentifier, GeneralUtility::class);
     }
 
     /**
@@ -114,7 +114,7 @@ class IconRegistryTest extends UnitTestCase
         $this->expectException(\TYPO3\CMS\Core\Exception::class);
         $this->expectExceptionCode(1437425804);
 
-        (new IconRegistry)->getIconConfigurationByIdentifier($this->notRegisteredIconIdentifier);
+        (new IconRegistry())->getIconConfigurationByIdentifier($this->notRegisteredIconIdentifier);
     }
 
     /**
@@ -122,7 +122,7 @@ class IconRegistryTest extends UnitTestCase
      */
     public function getIconConfigurationByIdentifierReturnsCorrectConfiguration()
     {
-        $result = (new IconRegistry)->getIconConfigurationByIdentifier('default-not-found');
+        $result = (new IconRegistry())->getIconConfigurationByIdentifier('default-not-found');
         // result must contain at least provider and options array
         self::assertArrayHasKey('provider', $result);
         self::assertArrayHasKey('options', $result);
@@ -135,7 +135,7 @@ class IconRegistryTest extends UnitTestCase
      */
     public function getAllRegisteredIconIdentifiersReturnsAnArrayWithIconIdentifiers()
     {
-        self::assertIsArray((new IconRegistry)->getAllRegisteredIconIdentifiers());
+        self::assertIsArray((new IconRegistry())->getAllRegisteredIconIdentifiers());
     }
 
     /**
@@ -143,7 +143,7 @@ class IconRegistryTest extends UnitTestCase
      */
     public function getAllRegisteredIconIdentifiersReturnsArrayWithAllRegisteredIconIdentifiers()
     {
-        $result = (new IconRegistry)->getAllRegisteredIconIdentifiers();
+        $result = (new IconRegistry())->getAllRegisteredIconIdentifiers();
         self::assertIsArray($result);
         self::assertContains('default-not-found', $result);
     }
@@ -153,7 +153,7 @@ class IconRegistryTest extends UnitTestCase
      */
     public function getIconIdentifierForFileExtensionReturnsDefaultIconIdentifierForEmptyFileExtension()
     {
-        $result = (new IconRegistry)->getIconIdentifierForFileExtension('');
+        $result = (new IconRegistry())->getIconIdentifierForFileExtension('');
         self::assertEquals('mimetypes-other-other', $result);
     }
 
@@ -162,7 +162,7 @@ class IconRegistryTest extends UnitTestCase
      */
     public function getIconIdentifierForFileExtensionReturnsDefaultIconIdentifierForUnknownFileExtension()
     {
-        $result = (new IconRegistry)->getIconIdentifierForFileExtension('xyz');
+        $result = (new IconRegistry())->getIconIdentifierForFileExtension('xyz');
         self::assertEquals('mimetypes-other-other', $result);
     }
 
@@ -171,7 +171,7 @@ class IconRegistryTest extends UnitTestCase
      */
     public function getIconIdentifierForFileExtensionReturnsImageIconIdentifierForImageFileExtension()
     {
-        $result = (new IconRegistry)->getIconIdentifierForFileExtension('jpg');
+        $result = (new IconRegistry())->getIconIdentifierForFileExtension('jpg');
         self::assertEquals('mimetypes-media-image', $result);
     }
 
@@ -224,7 +224,7 @@ class IconRegistryTest extends UnitTestCase
      */
     public function getIconIdentifierForMimeTypeWithUnknownMimeTypeReturnNull()
     {
-        $result = (new IconRegistry)->getIconIdentifierForMimeType('bar/foo');
+        $result = (new IconRegistry())->getIconIdentifierForMimeType('bar/foo');
         self::assertNull($result);
     }
 }
index 3fdce5f..fe6244c 100644 (file)
@@ -80,7 +80,7 @@ class LocalesTest extends UnitTestCase
      */
     public function browserLanguageDetectionWorks(string $acceptLanguageHeader, string $expected)
     {
-        $detectedLanguage = (new Locales)->getPreferredClientLanguage(
+        $detectedLanguage = (new Locales())->getPreferredClientLanguage(
             $acceptLanguageHeader
         );
         self::assertSame($expected, $detectedLanguage);
index a000cd0..6f99e62 100644 (file)
@@ -72,7 +72,7 @@ class XliffParserTest extends UnitTestCase
      */
     public function canParseXliffInEnglish()
     {
-        $LOCAL_LANG = (new XliffParser)->getParsedData($this->xliffFileNames['locallang'], 'default');
+        $LOCAL_LANG = (new XliffParser())->getParsedData($this->xliffFileNames['locallang'], 'default');
         self::assertArrayHasKey('default', $LOCAL_LANG, 'default key not found in $LOCAL_LANG');
         $expectedLabels = [
             'label1' => 'This is label #1',
@@ -89,7 +89,7 @@ class XliffParserTest extends UnitTestCase
      */
     public function canParseXliffInFrench()
     {
-        $LOCAL_LANG = (new XliffParser)->getParsedData($this->xliffFileNames['locallang'], 'fr');
+        $LOCAL_LANG = (new XliffParser())->getParsedData($this->xliffFileNames['locallang'], 'fr');
         self::assertArrayHasKey('fr', $LOCAL_LANG, 'fr key not found in $LOCAL_LANG');
         $expectedLabels = [
             'label1' => 'Ceci est le libellĂ© no. 1',
@@ -107,7 +107,7 @@ class XliffParserTest extends UnitTestCase
     public function canOverrideXliff()
     {
         /** @var $factory LocalizationFactory */
-        $factory = new LocalizationFactory;
+        $factory = new LocalizationFactory();
 
         $GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride'][$this->xliffFileNames['locallang']][] = $this->xliffFileNames['locallang_override'];
         $GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride']['fr'][$this->xliffFileNames['locallang']][] = $this->xliffFileNames['locallang_override_fr'];
@@ -144,7 +144,7 @@ class XliffParserTest extends UnitTestCase
      */
     public function canOverrideXliffWithFrenchOnly()
     {
-        $factory = new LocalizationFactory;
+        $factory = new LocalizationFactory();
 
         $GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride']['fr'][$this->xliffFileNames['locallang']][] = $this->xliffFileNames['locallang_override_fr'];
         $LOCAL_LANG = $factory->getParsedData($this->xliffFileNames['locallang'], 'fr');
index 53b8da2..4da45e0 100644 (file)
@@ -64,7 +64,7 @@ class PackageManagerTest extends UnitTestCase
         $this->packageManager = $this->getAccessibleMock(
             PackageManager::class,
             ['sortAndSavePackageStates', 'sortActivePackagesByDependencies', 'registerTransientClassLoadingInformationForPackage'],
-            [new DependencyOrderingService]
+            [new DependencyOrderingService()]
         );
 
         mkdir('vfs://Test/Packages/Application', 0700, true);
@@ -143,7 +143,7 @@ class PackageManagerTest extends UnitTestCase
             file_put_contents($packagePath . 'composer.json', '{"name": "' . $packageKey . '", "type": "typo3-test"}');
         }
 
-        $packageManager = $this->getAccessibleMock(PackageManager::class, ['sortAndSavePackageStates'], [new DependencyOrderingService]);
+        $packageManager = $this->getAccessibleMock(PackageManager::class, ['sortAndSavePackageStates'], [new DependencyOrderingService()]);
         $packageManager->_set('packagesBasePath', 'vfs://Test/Packages/');
         $packageManager->_set('packageStatesPathAndFilename', 'vfs://Test/Configuration/PackageStates.php');
 
@@ -178,7 +178,7 @@ class PackageManagerTest extends UnitTestCase
         }
 
         /** @var PackageManager|\PHPUnit\Framework\MockObject\MockObject|\TYPO3\TestingFramework\Core\AccessibleObjectInterface $packageManager */
-        $packageManager = $this->getAccessibleMock(PackageManager::class, ['dummy'], [new DependencyOrderingService]);
+        $packageManager = $this->getAccessibleMock(PackageManager::class, ['dummy'], [new DependencyOrderingService()]);
         $packageManager->_set('packagesBasePaths', $packagePaths);
         $packageManager->_set('packagesBasePath', 'vfs://Test/Packages/');
         $packageManager->_set('packageStatesPathAndFilename', 'vfs://Test/Configuration/PackageStates.php');
@@ -221,7 +221,7 @@ class PackageManagerTest extends UnitTestCase
         }
 
         /** @var PackageManager|\PHPUnit\Framework\MockObject\MockObject|\TYPO3\TestingFramework\Core\AccessibleObjectInterface $packageManager */
-        $packageManager = $this->getAccessibleMock(PackageManager::class, ['sortAndSavePackageStates', 'registerTransientClassLoadingInformationForPackage'], [new DependencyOrderingService]);
+        $packageManager = $this->getAccessibleMock(PackageManager::class, ['sortAndSavePackageStates', 'registerTransientClassLoadingInformationForPackage'], [new DependencyOrderingService()]);
         $packageManager->_set('packagesBasePaths', $packagePaths);
         $packageManager->_set('packagesBasePath', 'vfs://Test/Packages/');
         $packageManager->_set('packageStatesPathAndFilename', 'vfs://Test/Configuration/PackageStates.php');
@@ -396,7 +396,7 @@ class PackageManagerTest extends UnitTestCase
             'imagine/imagine' => 'imagine.Imagine'
         ];
 
-        $packageManager = $this->getAccessibleMock(PackageManager::class, ['resolvePackageDependencies'], [new DependencyOrderingService]);
+        $packageManager = $this->getAccessibleMock(PackageManager::class, ['resolvePackageDependencies'], [new DependencyOrderingService()]);
         $packageManager->_set('packageStatesConfiguration', $packageStatesConfiguration);
         $packageManager->_set('composerNameToPackageKeyMap', $composerNameToPackageKeyMap);
 
@@ -653,7 +653,7 @@ class PackageManagerTest extends UnitTestCase
      */
     public function buildDependencyGraphBuildsCorrectGraph(array $unsortedPackageStatesConfiguration, array $frameworkPackageKeys, array $expectedGraph): void
     {
-        $packageManager = $this->getAccessibleMock(PackageManager::class, ['findFrameworkPackages'], [new DependencyOrderingService]);
+        $packageManager = $this->getAccessibleMock(PackageManager::class, ['findFrameworkPackages'], [new DependencyOrderingService()]);
         $packageManager->expects(self::any())->method('findFrameworkPackages')->willReturn($frameworkPackageKeys);
 
         $dependencyGraph = $packageManager->_call('buildDependencyGraph', $unsortedPackageStatesConfiguration);
@@ -782,7 +782,7 @@ class PackageManagerTest extends UnitTestCase
      */
     public function sortPackageStatesConfigurationByDependencyMakesSureThatDependantPackagesAreStandingBeforeAPackageInTheInternalPackagesAndPackagesConfigurationArrays($unsortedPackageStatesConfiguration, $frameworkPackageKeys, $expectedSortedPackageKeys): void
     {
-        $packageManager = $this->getAccessibleMock(PackageManager::class, ['findFrameworkPackages'], [new DependencyOrderingService]);
+        $packageManager = $this->getAccessibleMock(PackageManager::class, ['findFrameworkPackages'], [new DependencyOrderingService()]);
         $packageManager->expects(self::any())->method('findFrameworkPackages')->willReturn($frameworkPackageKeys);
 
         $sortedPackageKeys = $packageManager->_call('sortPackageStatesConfigurationByDependency', $unsortedPackageStatesConfiguration);
@@ -807,7 +807,7 @@ class PackageManagerTest extends UnitTestCase
         $this->expectException(\UnexpectedValueException::class);
         $this->expectExceptionCode(1381960494);
 
-        $packageManager = $this->getAccessibleMock(PackageManager::class, ['findFrameworkPackages'], [new DependencyOrderingService]);
+        $packageManager = $this->getAccessibleMock(PackageManager::class, ['findFrameworkPackages'], [new DependencyOrderingService()]);
         $packageManager->expects(self::any())->method('findFrameworkPackages')->willReturn([]);
 
         $packageManager->_call('sortPackageStatesConfigurationByDependency', $unsortedPackageStatesConfiguration);
index 8a2c1a3..980574e 100644 (file)
@@ -2855,7 +2855,7 @@ class ArrayUtilityTest extends UnitTestCase
             'integer' => 1,
             'float' => 1.9,
             'object' => $testObject,
-            'objectWithStringConversion' => new class {
+            'objectWithStringConversion' => new class() {
                 /**
                  * @return string
                  */
index 493b2d7..4b53547 100644 (file)
@@ -40,7 +40,7 @@ class PublicPropertyDeprecationTraitTest extends UnitTestCase
     protected function setUp(): void
     {
         parent::setUp();
-        $this->fixture = new class {
+        $this->fixture = new class() {
             use PublicPropertyDeprecationTrait;
             private $deprecatedPublicProperties = [
                 'taggedProperty' => 'taggedProperty is deprecated',
index 423e5e0..bd46793 100644 (file)
@@ -51,7 +51,7 @@ class LocalizationFactoryTest extends UnitTestCase
         $cacheFrontendProphecy->get(Argument::cetera())->willReturn(false);
         $cacheFrontendProphecy->set(Argument::cetera())->willReturn(null);
 
-        $subject = new LocalizationFactory;
+        $subject = new LocalizationFactory();
 
         $unique = 'locallangXMLOverrideTest' . substr(StringUtility::getUniqueId(), 0, 10);
         $xml = '<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
index f89c2dd..ba188a7 100644 (file)
@@ -70,7 +70,7 @@ class LocallangXmlParserTest extends UnitTestCase
      */
     public function canParseLlxmlInEnglish()
     {
-        $LOCAL_LANG = (new LocallangXmlParser)->getParsedData(self::getFixtureFilePath('locallang.xml'), 'default');
+        $LOCAL_LANG = (new LocallangXmlParser())->getParsedData(self::getFixtureFilePath('locallang.xml'), 'default');
         self::assertArrayHasKey('default', $LOCAL_LANG, 'default key not found in $LOCAL_LANG');
         $expectedLabels = [
             'label1' => 'This is label #1',
@@ -87,7 +87,7 @@ class LocallangXmlParserTest extends UnitTestCase
      */
     public function canParseLlxmlInMd5Code()
     {
-        $LOCAL_LANG = (new LocallangXmlParser)->getParsedData(self::getFixtureFilePath('locallang.xml'), 'md5');
+        $LOCAL_LANG = (new LocallangXmlParser())->getParsedData(self::getFixtureFilePath('locallang.xml'), 'md5');
         self::assertArrayHasKey('md5', $LOCAL_LANG, 'md5 key not found in $LOCAL_LANG');
         $expectedLabels = [
             'label1' => '409a6edbc70dbeeccbfe5f1e569d6717',
@@ -104,7 +104,7 @@ class LocallangXmlParserTest extends UnitTestCase
      */
     public function canParseLlxmlInFrenchAndReturnsNullLabelsIfNoTranslationIsFound()
     {
-        $localLang = (new LocallangXmlParser)->getParsedData(
+        $localLang = (new LocallangXmlParser())->getParsedData(
             self::getFixtureFilePath('locallangOnlyDefaultLanguage.xml'),
             'fr'
         );
@@ -122,7 +122,7 @@ class LocallangXmlParserTest extends UnitTestCase
     public function canOverrideLlxml()
     {
         /** @var $factory LocalizationFactory */
-        $factory = new LocalizationFactory;
+        $factory = new LocalizationFactory();
 
         $GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride'][self::getFixtureFilePath('locallang.xml')][] = self::getFixtureFilePath('locallang_override.xml');
         $LOCAL_LANG = array_merge(
@@ -183,7 +183,7 @@ class LocallangXmlParserTest extends UnitTestCase
     public function canTranslateNumericKeys($key, $expectedResult)
     {
         /** @var $factory LocalizationFactory */
-        $factory = new LocalizationFactory;
+        $factory = new LocalizationFactory();
 
         $LOCAL_LANG = $factory->getParsedData(self::getFixtureFilePath('locallangNumericKeys.xml'), 'fr');
 
index 153912f..cef49fc 100644 (file)
@@ -351,7 +351,7 @@ class PropertyMappingConfiguration implements PropertyMappingConfigurationInterf
             if (isset($this->subConfigurationForProperty[self::PROPERTY_PATH_PLACEHOLDER])) {
                 $this->subConfigurationForProperty[$currentProperty] = clone $this->subConfigurationForProperty[self::PROPERTY_PATH_PLACEHOLDER];
             } else {
-                $this->subConfigurationForProperty[$currentProperty] = new $type;
+                $this->subConfigurationForProperty[$currentProperty] = new $type();
             }
         }
         return $this->subConfigurationForProperty[$currentProperty]->traverseProperties($splittedPropertyPath);
index 3644128..2b9ff81 100644 (file)
@@ -46,7 +46,7 @@ class CacheService implements \TYPO3\CMS\Core\SingletonInterface
      */
     public function __construct()
     {
-        $this->pageIdStack = new \SplStack;
+        $this->pageIdStack = new \SplStack();
     }
 
     /**
index ac9c657..a71c053 100644 (file)
@@ -44,7 +44,7 @@ class ConjunctionValidator extends AbstractCompositeValidator
                 }
             }
         } else {
-            $result = new Result;
+            $result = new Result();
         }
 
         return $result;
index 4269670..32f4f65 100644 (file)
@@ -14,7 +14,7 @@ return function (ContainerConfigurator $containerConfigurator, ContainerBuilder
     $container->registerForAutoconfiguration(Mvc\Controller\ActionController::class)->addTag('extbase.action_controller');
     $container->registerForAutoconfiguration(Mvc\View\ViewInterface::class)->addTag('extbase.view');
 
-    $container->addCompilerPass(new class implements CompilerPassInterface {
+    $container->addCompilerPass(new class() implements CompilerPassInterface {
         public function process(ContainerBuilder $container): void
         {
             foreach ($container->findTaggedServiceIds('extbase.request_handler') as $id => $tags) {
index a36b9ae..54f19cc 100644 (file)
@@ -42,7 +42,7 @@ class PropertyMapperTest extends FunctionalTestCase
     {
         static::expectExceptionCode(1297951378);
 
-        $class = new class extends ArrayConverter {
+        $class = new class() extends ArrayConverter {
         };
         ExtensionUtility::registerTypeConverter(get_class($class));
         GeneralUtility::getContainer()->get(PropertyMapper::class);
@@ -138,7 +138,7 @@ class PropertyMapperTest extends FunctionalTestCase
         static::expectExceptionCode(1297759968);
         static::expectExceptionMessage('There exist at least two converters which handle the conversion to an interface with priority "10"');
 
-        $converterOne = new class extends AbstractTypeConverter {
+        $converterOne = new class() extends AbstractTypeConverter {
             protected $priority = 10;
             protected $sourceTypes = ['integer'];
             protected $targetType = \Countable::class;
@@ -149,7 +149,7 @@ class PropertyMapperTest extends FunctionalTestCase
             }
         };
 
-        $converterTwo = new class extends AbstractTypeConverter {
+        $converterTwo = new class() extends AbstractTypeConverter {
             protected $priority = 10;
             protected $sourceTypes = ['integer'];
             protected $targetType = ExtendedCountableInterface::class;
@@ -160,7 +160,7 @@ class PropertyMapperTest extends FunctionalTestCase
             }
         };
 
-        $counter = new class implements ExtendedCountableInterface {
+        $counter = new class() implements ExtendedCountableInterface {
             public function count()
             {
                 return 1;
@@ -194,7 +194,7 @@ class PropertyMapperTest extends FunctionalTestCase
      */
     public function findTypeConverterReturnsTheConverterFromThePropertyMappingConfiguration()
     {
-        $class = new class extends IntegerConverter {
+        $class = new class() extends IntegerConverter {
             public function convertFrom($source, string $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null)
             {
                 return 1575648246;
@@ -250,7 +250,7 @@ class PropertyMapperTest extends FunctionalTestCase
      */
     public function findFirstEligibleTypeConverterInObjectHierarchyFindsConverterFromStringToObject()
     {
-        $converter = new class extends AbstractTypeConverter {
+        $converter = new class() extends AbstractTypeConverter {
             protected $priority = 10;
             protected $sourceTypes = ['string'];
             protected $targetType = Cat::class;
@@ -272,7 +272,7 @@ class PropertyMapperTest extends FunctionalTestCase
      */
     public function findFirstEligibleTypeConverterInObjectHierarchyReturnsConverterForParentClass()
     {
-        $converter = new class extends AbstractTypeConverter {
+        $converter = new class() extends AbstractTypeConverter {
             protected $priority = 10;
             protected $sourceTypes = ['string'];
             protected $targetType = Animal::class;
@@ -294,7 +294,7 @@ class PropertyMapperTest extends FunctionalTestCase
      */
     public function findFirstEligibleTypeConverterInObjectHierarchyReturnsConverterForInterfaces()
     {
-        $converter = new class extends AbstractTypeConverter {
+        $converter = new class() extends AbstractTypeConverter {
             protected $priority = 10;
             protected $sourceTypes = ['integer'];
             protected $targetType = \Countable::class;
@@ -305,7 +305,7 @@ class PropertyMapperTest extends FunctionalTestCase
             }
         };
 
-        $counter = new class implements \Countable {
+        $counter = new class() implements \Countable {
             public function count()
             {
                 return 1;
index 5259ce3..c135f08 100644 (file)
@@ -36,7 +36,7 @@ class ObjectConverterTest extends FunctionalTestCase
     {
         $propertyMapper = GeneralUtility::getContainer()->get(PropertyMapper::class);
 
-        $model = new class extends AbstractEntity {
+        $model = new class() extends AbstractEntity {
             /**
              * @var string
              */
@@ -86,7 +86,7 @@ class ObjectConverterTest extends FunctionalTestCase
      */
     public function getTypeOfChildPropertyReturnsTypeDefinedByPropertyMappingConfiguration()
     {
-        $class = new class {
+        $class = new class() {
             public $name;
         };
 
@@ -146,7 +146,7 @@ class ObjectConverterTest extends FunctionalTestCase
      */
     public function getTypeOfChildPropertyReturnsTypeDefinedBySetter()
     {
-        $class = new class {
+        $class = new class() {
             private $name;
             public function setName(string $name)
             {
@@ -176,7 +176,7 @@ class ObjectConverterTest extends FunctionalTestCase
      */
     public function getTypeOfChildPropertyThrowsInvalidTargetExceptionIfPropertyIsNotAccessible()
     {
-        $class = new class {
+        $class = new class() {
         };
 
         $className = get_class($class);
@@ -202,7 +202,7 @@ class ObjectConverterTest extends FunctionalTestCase
      */
     public function getTypeOfChildPropertyThrowsInvalidTargetExceptionIfPropertyTypeCannotBeDerivedFromNonExistingConstructorArgument()
     {
-        $class = new class {
+        $class = new class() {
             public function __construct()
             {
             }
@@ -231,7 +231,7 @@ class ObjectConverterTest extends FunctionalTestCase
      */
     public function getTypeOfChildPropertyThrowsInvalidTargetExceptionIfPropertyTypeCannotBeDerivedFromExistingConstructorArgument()
     {
-        $class = new class {
+        $class = new class() {
             public function __construct($name = null)
             {
             }
@@ -264,7 +264,7 @@ class ObjectConverterTest extends FunctionalTestCase
         static::expectExceptionCode(1297759968);
         static::expectExceptionMessage('Exception while property mapping at property path "": Setter for property "name" had no type hint or documentation in target object of type "');
 
-        $class = new class {
+        $class = new class() {
             public function setName($name)
             {
             }
@@ -290,7 +290,7 @@ class ObjectConverterTest extends FunctionalTestCase
         static::expectExceptionCode(1297759968);
         static::expectExceptionMessage('Exception while property mapping at property path "": Property "name" having a value of type "string" could not be set in target object of type "');
 
-        $class = new class {
+        $class = new class() {
             private $name;
         };
 
@@ -371,7 +371,7 @@ class ObjectConverterTest extends FunctionalTestCase
         static::expectExceptionCode(1297759968);
         static::expectExceptionMessage('Exception while property mapping at property path "": Override of target type not allowed. To enable this, you need to set the PropertyMappingConfiguration Value "CONFIGURATION_OVERRIDE_TARGET_TYPE_ALLOWED" to TRUE.');
 
-        $class = new class {
+        $class = new class() {
         };
 
         GeneralUtility::getContainer()->get(PropertyMapper::class)->convert(
@@ -389,7 +389,7 @@ class ObjectConverterTest extends FunctionalTestCase
         static::expectExceptionCode(1297759968);
         static::expectExceptionMessage('Exception while property mapping at property path "": The given type "TYPO3\CMS\Extbase\Tests\Functional\Property\Fixtures\Animal" is not a subtype of "');
 
-        $class = new class {
+        $class = new class() {
         };
 
         $propertyMapperConfiguration = new PropertyMappingConfiguration();
index c4ee26a..5583d28 100644 (file)
@@ -29,7 +29,7 @@ class AbstractEntityTest extends UnitTestCase
      */
     public function objectIsNotDirtyAfterCallingMemorizeCleanStateWithSimpleProperties()
     {
-        $domainObject = new class extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
+        $domainObject = new class() extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
             public $foo = 'Test';
             public $bar = 'It is raining outside';
         };
@@ -43,7 +43,7 @@ class AbstractEntityTest extends UnitTestCase
      */
     public function objectIsDirtyAfterCallingMemorizeCleanStateWithSimplePropertiesAndModifyingThePropertiesAfterwards()
     {
-        $domainObject = new class extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
+        $domainObject = new class() extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
             public $foo = 'Test';
             public $bar = 'It is raining outside';
         };
@@ -58,7 +58,7 @@ class AbstractEntityTest extends UnitTestCase
      */
     public function objectIsNotDirtyAfterCallingMemorizeCleanStateWithObjectProperties()
     {
-        $domainObject = new class extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
+        $domainObject = new class() extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
             public $foo;
             public $bar = 'It is raining outside';
         };
@@ -73,12 +73,12 @@ class AbstractEntityTest extends UnitTestCase
      */
     public function objectIsNotDirtyAfterCallingMemorizeCleanStateWithOtherDomainObjectsAsProperties()
     {
-        $domainObject = new class extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
+        $domainObject = new class() extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
             public $foo;
             public $bar;
         };
 
-        $secondDomainObject = new class extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
+        $secondDomainObject = new class() extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
             public $foo;
             public $bar;
         };
index 1a4c1ce..529f664 100644 (file)
@@ -182,7 +182,7 @@ class MvcPropertyMappingConfigurationServiceTest extends UnitTestCase
         $request->expects(self::any())->method('getInternalArgument')->with('__trustedProperties')->willReturn(null);
         $arguments = new \TYPO3\CMS\Extbase\Mvc\Controller\Arguments();
 
-        $requestHashService = new MvcPropertyMappingConfigurationService;
+        $requestHashService = new MvcPropertyMappingConfigurationService();
         $requestHashService->initializePropertyMappingConfigurationFromRequest($request, $arguments);
     }
 
@@ -199,7 +199,7 @@ class MvcPropertyMappingConfigurationServiceTest extends UnitTestCase
         $arguments = new \TYPO3\CMS\Extbase\Mvc\Controller\Arguments();
 
         $hashService = new \TYPO3\CMS\Extbase\Security\Cryptography\HashService();
-        $requestHashService = new MvcPropertyMappingConfigurationService;
+        $requestHashService = new MvcPropertyMappingConfigurationService();
         $requestHashService->injectHashService($hashService);
         $requestHashService->initializePropertyMappingConfigurationFromRequest($request, $arguments);
     }
index 08797d7..f3ae366 100644 (file)
@@ -53,9 +53,9 @@ class ContainerTest extends UnitTestCase
             ->setMethods(['notice'])
             ->disableOriginalConstructor()
             ->getMock();
-        $reflectionService = new \TYPO3\CMS\Extbase\Reflection\ReflectionService;
+        $reflectionService = new \TYPO3\CMS\Extbase\Reflection\ReflectionService();
 
-        $notFoundException = new class extends \Exception implements \Psr\Container\NotFoundExceptionInterface {
+        $notFoundException = new class() extends \Exception implements \Psr\Container\NotFoundExceptionInterface {
         };
 
         $psrContainer = $this->getMockBuilder(\Psr\Container\ContainerInterface::class)
index 83871da..51ac281 100644 (file)
@@ -281,9 +281,9 @@ class ObjectStorageTest extends UnitTestCase
     public function allRelationsAreNotDirtyOnAttachingAndRemoving()
     {
         $objectStorage = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
-        $object1 = new \stdClass;
-        $object2 = new \stdClass;
-        $object3 = new \stdClass;
+        $object1 = new \stdClass();
+        $object2 = new \stdClass();
+        $object3 = new \stdClass();
         $objectStorage->attach($object1);
         $objectStorage->attach($object2);
         $objectStorage->detach($object2);
@@ -298,8 +298,8 @@ class ObjectStorageTest extends UnitTestCase
     public function theRelationsAreNotDirtyOnReAddingAtSamePosition()
     {
         $objectStorage = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
-        $object1 = new \stdClass;
-        $object2 = new \stdClass;
+        $object1 = new \stdClass();
+        $object2 = new \stdClass();
         $objectStorage->attach($object1);
         $objectStorage->attach($object2);
         $clonedStorage = clone $objectStorage;
@@ -316,8 +316,8 @@ class ObjectStorageTest extends UnitTestCase
     public function theRelationsAreDirtyOnReAddingAtOtherPosition()
     {
         $objectStorage = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
-        $object1 = new \stdClass;
-        $object2 = new \stdClass;
+        $object1 = new \stdClass();
+        $object2 = new \stdClass();
         $objectStorage->attach($object1);
         $objectStorage->attach($object2);
         $clonedStorage = clone $objectStorage;
index b6afd99..0f7805c 100644 (file)
@@ -251,7 +251,7 @@ class ClassSchemaTest extends UnitTestCase
      */
     public function classSchemaDetectsMethodParameterTypeViaReflection(): void
     {
-        $class = new class {
+        $class = new class() {
             public function foo(string $foo)
             {
             }
@@ -271,7 +271,7 @@ class ClassSchemaTest extends UnitTestCase
      */
     public function classSchemaPrefersMethodParameterTypeDetectionViaReflection(): void
     {
-        $class = new class {
+        $class = new class() {
             /**
              * @param ClassSchema $foo
              */
index 78c7288..569289f 100644 (file)
@@ -30,7 +30,7 @@ class DummyValidator implements ValidatorInterface
      */
     public function validate($value)
     {
-        return new \TYPO3\CMS\Extbase\Error\Result;
+        return new \TYPO3\CMS\Extbase\Error\Result();
     }
 
     /**
index 9f522a5..1eb1f4e 100644 (file)
@@ -47,14 +47,14 @@ class DateTimeValidatorTest extends UnitTestCase
                 new \DateTime(),
             ],
             'Extended ' . \DateTime::class => [
-                new class extends \DateTime {
+                new class() extends \DateTime {
                 },
             ],
             \DateTimeImmutable::class => [
                 new \DateTimeImmutable(),
             ],
             'Extended ' . \DateTimeImmutable::class => [
-                new class extends \DateTimeImmutable {
+                new class() extends \DateTimeImmutable {
                 },
             ],
         ];
index dbee36b..815468c 100644 (file)
@@ -109,7 +109,7 @@ class UrlValidatorTest extends UnitTestCase
                 'isValid' => false,
             ],
             'Invalid value is object' => [
-                'value' => new \stdClass,
+                'value' => new \stdClass(),
                 'isValid' => false,
             ],
             'Invalid value is closure' => [
index 22b789a..57232b9 100644 (file)
@@ -85,7 +85,7 @@ class ExtensionTest extends UnitTestCase
      */
     public function getCategoryIndexFromStringOrNumberReturnsIndex($input, $expected)
     {
-        $extension = new \TYPO3\CMS\Extensionmanager\Domain\Model\Extension;
+        $extension = new \TYPO3\CMS\Extensionmanager\Domain\Model\Extension();
         self::assertEquals($expected, $extension->getCategoryIndexFromStringOrNumber($input));
     }
 }
index 848321e..e3026d5 100644 (file)
@@ -73,7 +73,7 @@ class ValidatorResolverServiceTest extends UnitTestCase
 
     protected function setUp(): void
     {
-        $this->subject = new ValidatorResolverService;
+        $this->subject = new ValidatorResolverService();
 
         parent::setUp();
     }
index 68b0892..d01edf8 100644 (file)
@@ -11,7 +11,7 @@ use TYPO3Fluid\Fluid\Core\ViewHelper\ViewHelperInterface;
 return function (ContainerConfigurator $container, ContainerBuilder $containerBuilder) {
     $containerBuilder->registerForAutoconfiguration(ViewHelperInterface::class)->addTag('fluid.viewhelper');
 
-    $containerBuilder->addCompilerPass(new class implements CompilerPassInterface {
+    $containerBuilder->addCompilerPass(new class() implements CompilerPassInterface {
         public function process(ContainerBuilder $container)
         {
             foreach ($container->findTaggedServiceIds('fluid.viewhelper') as $id => $tags) {
index c70a19e..53de5e2 100644 (file)
@@ -200,7 +200,7 @@ class PaginateControllerTest extends UnitTestCase
     {
         $objects = new ObjectStorage();
         for ($i = 0; $i <= 25; $i++) {
-            $item = new \stdClass;
+            $item = new \stdClass();
             $objects->attach($item);
         }
         $this->controller->_set('objects', $objects);
@@ -219,7 +219,7 @@ class PaginateControllerTest extends UnitTestCase
         $this->controller->_set('currentPage', 2);
         $objects = new ObjectStorage();
         for ($i = 0; $i <= 55; $i++) {
-            $item = new \stdClass;
+            $item = new \stdClass();
             $objects->attach($item);
         }
         $this->controller->_set('objects', $objects);
@@ -238,7 +238,7 @@ class PaginateControllerTest extends UnitTestCase
         $this->controller->_set('currentPage', 3);
         $objects = new ObjectStorage();
         for ($i = 0; $i <= 25; $i++) {
-            $item = new \stdClass;
+            $item = new \stdClass();
             $objects->attach($item);
         }
         $this->controller->_set('objects', $objects);
@@ -256,7 +256,7 @@ class PaginateControllerTest extends UnitTestCase
     {
         $objects = [];
         for ($i = 0; $i <= 25; $i++) {
-            $item = new \stdClass;
+            $item = new \stdClass();
             $objects[] = $item;
         }
         $this->controller->_set('objects', $objects);
@@ -275,7 +275,7 @@ class PaginateControllerTest extends UnitTestCase
         $this->controller->_set('currentPage', 2);
         $objects = [];
         for ($i = 0; $i <= 55; $i++) {
-            $item = new \stdClass;
+            $item = new \stdClass();
             $objects[] = $item;
         }
         $this->controller->_set('objects', $objects);
index ef80305..28fd78f 100644 (file)
@@ -75,7 +75,7 @@ class FormFrontendControllerTest extends UnitTestCase
             ])
         );
 
-        $flexFormTools = new FlexFormTools;
+        $flexFormTools = new FlexFormTools();
         $contentObject = new ContentObjectRenderer();
         $contentObject->data = [
             'pi_flexform' => $flexFormTools->flexArray2Xml([
@@ -209,7 +209,7 @@ class FormFrontendControllerTest extends UnitTestCase
             ])
         );
 
-        $flexFormTools = new FlexFormTools;
+        $flexFormTools = new FlexFormTools();
         $contentObject = new ContentObjectRenderer();
         $contentObject->data = [
             'pi_flexform' => $flexFormTools->flexArray2Xml([
@@ -359,7 +359,7 @@ class FormFrontendControllerTest extends UnitTestCase
             ])
         );
 
-        $flexFormTools = new FlexFormTools;
+        $flexFormTools = new FlexFormTools();
         $contentObject = new ContentObjectRenderer();
         $contentObject->data = [
             'pi_flexform' => $flexFormTools->flexArray2Xml([
index d6d6007..27b6443 100644 (file)
@@ -130,7 +130,7 @@ class FormDefinitionConversionServiceTest extends UnitTestCase
      */
     public function removeHmacDataRemoveHmacs()
     {
-        $formDefinitionConversionService = new FormDefinitionConversionService;
+        $formDefinitionConversionService = new FormDefinitionConversionService();
         GeneralUtility::setSingletonInstance(FormDefinitionConversionService::class, $formDefinitionConversionService);
 
         $input = [
index dc74c6c..abbd453 100644 (file)
@@ -141,7 +141,7 @@ class AbstractFinisherTest extends UnitTestCase
         $finisherContextProphecy->getFormRuntime(Argument::cetera())
             ->willReturn($formRuntimeProphecy->reveal());
         $finisherContextProphecy->getFinisherVariableProvider(Argument::cetera())
-            ->willReturn(new FinisherVariableProvider);
+            ->willReturn(new FinisherVariableProvider());
 
         $mockAbstractFinisher->_set('finisherContext', $finisherContextProphecy->reveal());
 
@@ -420,7 +420,7 @@ class AbstractFinisherTest extends UnitTestCase
         ]);
 
         $finisherContextProphecy = $this->prophesize(FinisherContext::class);
-        $finisherContextProphecy->getFinisherVariableProvider(Argument::cetera())->willReturn(new FinisherVariableProvider);
+        $finisherContextProphecy->getFinisherVariableProvider(Argument::cetera())->willReturn(new FinisherVariableProvider());
         $mockAbstractFinisher->_set('finisherContext', $finisherContextProphecy->reveal());
 
         self::assertSame($expected, $mockAbstractFinisher->_call('substituteRuntimeReferences', $input, $formRuntimeProphecy->reveal()));
@@ -494,7 +494,7 @@ class AbstractFinisherTest extends UnitTestCase
             'date-1' => $date,
         ]);
 
-        $stringableElement = new class implements StringableFormElementInterface {
+        $stringableElement = new class() implements StringableFormElementInterface {
             /**
              * @param \DateTimeInterface $value
              */
@@ -572,7 +572,7 @@ class AbstractFinisherTest extends UnitTestCase
         ]);
 
         $finisherContextProphecy = $this->prophesize(FinisherContext::class);
-        $finisherContextProphecy->getFinisherVariableProvider(Argument::cetera())->willReturn(new FinisherVariableProvider);
+        $finisherContextProphecy->getFinisherVariableProvider(Argument::cetera())->willReturn(new FinisherVariableProvider());
         $mockAbstractFinisher->_set('finisherContext', $finisherContextProphecy->reveal());
 
         $this->expectException(FinisherException::class);
index ff18c69..7ea7e76 100644 (file)
@@ -190,7 +190,7 @@ class SaveToDatabaseFinisherTest extends UnitTestCase
 
         $saveToDatabaseFinisher = $this->getAccessibleMock(SaveToDatabaseFinisher::class, ['getFormValues', 'getElementByIdentifier']);
         $saveToDatabaseFinisher->method('getFormValues')->willReturn([
-            'date' => new \DateTime,
+            'date' => new \DateTime(),
         ]);
         $saveToDatabaseFinisher->method('getElementByIdentifier')->willReturn($this->prophesize(FormElementInterface::class)->reveal());
         $databaseData = $saveToDatabaseFinisher->_call('prepareData', $elementsConfiguration, []);
index e4fd786..861c0ca 100644 (file)
@@ -129,7 +129,7 @@ class FormRuntimeTest extends UnitTestCase
 
         $objectManagerProphecy
             ->get('fooRenderer')
-            ->willReturn(new \stdClass);
+            ->willReturn(new \stdClass());
 
         $mockFormRuntime->_set('formState', $mockFormState);
         $mockFormRuntime->_set('currentPage', $mockPage);
index a8f4f35..8c2c812 100644 (file)
@@ -37,7 +37,7 @@ class TypoScriptServiceTest extends UnitTestCase
             ContentObjectRenderer::class
         )->getMock();
 
-        $fakeTypoScriptFrontendController = new \stdClass;
+        $fakeTypoScriptFrontendController = new \stdClass();
         $fakeTypoScriptFrontendController->cObj = $mockContentObjectRenderer;
 
         $mockContentObjectRenderer
index 18b6853..647a897 100644 (file)
@@ -204,9 +204,9 @@ EOF;
             return $response;
         } catch (\InvalidArgumentException $e) {
             // add a 410 "gone" if invalid parameters given
-            return (new Response)->withStatus(410);
+            return (new Response())->withStatus(410);
         } catch (Exception $e) {
-            return (new Response)->withStatus(404);
+            return (new Response())->withStatus(404);
         }
     }
 }
index cdc340e..b2a12c8 100644 (file)
@@ -66,7 +66,7 @@ class FluidTemplateContentObjectTest extends \TYPO3\TestingFramework\Core\Functi
         ];
         $expectedResult = 'ABC';
 
-        $contentObjectRenderer = new \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
+        $contentObjectRenderer = new \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer();
         $contentObjectRenderer->setContentObjectClassMap([
             'FLUIDTEMPLATE' => FluidTemplateContentObject::class,
             'TEXT' => TextContentObject::class,
@@ -114,7 +114,7 @@ class FluidTemplateContentObjectTest extends \TYPO3\TestingFramework\Core\Functi
         ];
         $expectedResult = 'DefaultLayoutLayoutOverride';
 
-        $contentObjectRenderer = new \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
+        $contentObjectRenderer = new \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer();
         $contentObjectRenderer->setContentObjectClassMap([
             'FLUIDTEMPLATE' => FluidTemplateContentObject::class,
             'TEXT' => TextContentObject::class,
index f515640..b78fab8 100644 (file)
@@ -1717,7 +1717,7 @@ class ContentObjectRendererTest extends UnitTestCase
      */
     public function getDataWithTypeSiteWithBaseVariants(): void
     {
-        $packageManager = new PackageManager(new DependencyOrderingService);
+        $packageManager = new PackageManager(new DependencyOrderingService());
         GeneralUtility::setSingletonInstance(PackageManager::class, $packageManager);
         $cacheManagerProphecy = $this->prophesize(CacheManager::class);
         $cacheManagerProphecy->getCache('core')->willReturn(new NullFrontend('core'));
index fd04c98..c6b63e4 100644 (file)
@@ -32,7 +32,7 @@ class MenuContentObjectFactoryTest extends UnitTestCase
     {
         $this->expectException(NoSuchMenuTypeException::class);
         $this->expectExceptionCode(1363278130);
-        $factory = new MenuContentObjectFactory;
+        $factory = new MenuContentObjectFactory();
         $factory->getMenuObjectByType(StringUtility::getUniqueId('foo_'));
     }
 
@@ -41,7 +41,7 @@ class MenuContentObjectFactoryTest extends UnitTestCase
      */
     public function getMenuObjectByTypeReturnsObjectForRegisteredMenuType()
     {
-        $factory = new MenuContentObjectFactory;
+        $factory = new MenuContentObjectFactory();
         self::assertIsObject($factory->getMenuObjectByType('TMENU'));
     }
 
@@ -50,7 +50,7 @@ class MenuContentObjectFactoryTest extends UnitTestCase
      */
     public function getMenuObjectByTypeReturnsObjectWithLowercasedMenuType()
     {
-        $factory = new MenuContentObjectFactory;
+        $factory = new MenuContentObjectFactory();
         self::assertIsObject($factory->getMenuObjectByType('tmenu'));
     }
 
@@ -59,7 +59,7 @@ class MenuContentObjectFactoryTest extends UnitTestCase
      */
     public function getMenuObjectByTypeReturnsInstanceOfOwnRegisteredTypeInsteadOfInternalType()
     {
-        $factory = new MenuContentObjectFactory;
+        $factory = new MenuContentObjectFactory();
         $selfClassName = static::class;
         $factory->registerMenuType('TMENU', $selfClassName);
         self::assertInstanceOf($selfClassName, $factory->getMenuObjectByType('TMENU'));
@@ -70,7 +70,7 @@ class MenuContentObjectFactoryTest extends UnitTestCase
      */
     public function getMenuObjectByTypeReturnsInstanceOfNewRegisteredType()
     {
-        $factory = new MenuContentObjectFactory;
+        $factory = new MenuContentObjectFactory();
         $selfClassName = static::class;
         $uniqueMenuType = StringUtility::getUniqueId('foo_');
         $factory->registerMenuType($uniqueMenuType, $selfClassName);
@@ -84,7 +84,7 @@ class MenuContentObjectFactoryTest extends UnitTestCase
     {
         $this->expectException(\InvalidArgumentException::class);
         $this->expectExceptionCode(1363429303);
-        $factory = new MenuContentObjectFactory;
+        $factory = new MenuContentObjectFactory();
         $factory->registerMenuType([], 'foo');
     }
 
@@ -95,7 +95,7 @@ class MenuContentObjectFactoryTest extends UnitTestCase
     {
         $this->expectException(\InvalidArgumentException::class);
         $this->expectExceptionCode(1363429303);
-        $factory = new MenuContentObjectFactory;
+        $factory = new MenuContentObjectFactory();
         $factory->registerMenuType('foo', []);
     }
 }
index 71fc2f7..da0925d 100644 (file)
@@ -62,7 +62,7 @@ class PageArgumentValidatorTest extends UnitTestCase
         $this->cacheHashCalculator = new CacheHashCalculator();
 
         // A request handler which only runs through
-        $this->responseOutputHandler = new class implements RequestHandlerInterface {
+        $this->responseOutputHandler = new class() implements RequestHandlerInterface {
             public function handle(ServerRequestInterface $request): ResponseInterface
             {
                 return new Response();
index 0fe68b7..b28beec 100644 (file)
@@ -65,7 +65,7 @@ class PageResolverTest extends UnitTestCase
         $this->controller = $this->getAccessibleMock(TypoScriptFrontendController::class, ['getSiteScript', 'determineId', 'isBackendUserLoggedIn'], [], '', false);
 
         // A request handler which expects a site with some more details are found.
-        $this->responseOutputHandler = new class implements RequestHandlerInterface {
+        $this->responseOutputHandler = new class() implements RequestHandlerInterface {
             public function handle(ServerRequestInterface $request): ResponseInterface
             {
                 /** @var SiteInterface $site */
index 0e25df3..50d7385 100644 (file)
@@ -50,7 +50,7 @@ class SiteBaseRedirectResolverTest extends UnitTestCase
     {
         parent::setUp();
         // A request handler which expects a site to be found.
-        $this->siteFoundRequestHandler = new class implements RequestHandlerInterface {
+        $this->siteFoundRequestHandler = new class() implements RequestHandlerInterface {
             public function handle(ServerRequestInterface $request): ResponseInterface
             {
                 /** @var Site $site */
index 2cde193..368049d 100644 (file)
@@ -65,7 +65,7 @@ class SiteResolverTest extends UnitTestCase
         $this->siteFinder = $this->getAccessibleMock(SiteFinder::class, ['dummy'], [], '', false);
 
         // A request handler which expects a site to be found.
-        $this->siteFoundRequestHandler = new class implements RequestHandlerInterface {
+        $this->siteFoundRequestHandler = new class() implements RequestHandlerInterface {
             public function handle(ServerRequestInterface $request): ResponseInterface
             {
                 /** @var Site $site */
index beb3ba0..1374bdd 100644 (file)
@@ -40,7 +40,7 @@ class StaticRouteResolverTest extends UnitTestCase
     {
         parent::setUp();
         // A request handler which expects a site to be found.
-        $this->requestHandler = new class implements RequestHandlerInterface {
+        $this->requestHandler = new class() implements RequestHandlerInterface {
             public function handle(ServerRequestInterface $request): ResponseInterface
             {
                 return new NullResponse();
index b07c016..fa74623 100644 (file)
@@ -221,7 +221,7 @@ class Maintenance implements MiddlewareInterface
             $this->recreatePackageStatesFileIfMissing();
             $className = $this->controllers[$controllerName];
             /** @var AbstractController $controller */
-            $controller = $this->container->has($className) ? $this->container->get($className) : new $className;
+            $controller = $this->container->has($className) ? $this->container->get($className) : new $className();
             if (!method_exists($controller, $action)) {
                 throw new \RuntimeException(
                     'Unknown action method ' . $action . ' in controller ' . $controllerName,
index e97ca02..ce153a6 100644 (file)
@@ -76,7 +76,7 @@ class ServiceProvider extends AbstractServiceProvider
 
     public static function getNotFoundRequestHandler(ContainerInterface $container): Http\NotFoundRequestHandler
     {
-        return new Http\NotFoundRequestHandler;
+        return new Http\NotFoundRequestHandler();
     }
 
     public static function getLateBootService(ContainerInterface $container): Service\LateBootService
index 1839ff8..4cf2044 100644 (file)
@@ -177,7 +177,7 @@ class DatabaseCheck implements CheckInterface
     {
         if (!empty($this->databaseDriverCheckMap[$databaseDriver])) {
             /** @var CheckInterface $databaseDriverCheck */
-            $databaseDriverCheck = new $this->databaseDriverCheckMap[$databaseDriver];
+            $databaseDriverCheck = new $this->databaseDriverCheckMap[$databaseDriver]();
             foreach ($databaseDriverCheck->getStatus() as $message) {
                 $this->messageQueue->addMessage($message);
             }
@@ -213,7 +213,7 @@ class DatabaseCheck implements CheckInterface
         }
 
         if (!empty(static::$databaseDriverToPlatformMapping[$databaseDriver])) {
-            $platformMessageQueue = (new $databasePlatformClass)->getStatus();
+            $platformMessageQueue = (new $databasePlatformClass())->getStatus();
             foreach ($platformMessageQueue as $message) {
                 $this->messageQueue->enqueue($message);
             }
index 0731799..266b839 100644 (file)
@@ -33,10 +33,10 @@ class ClassNameMatcherFixture extends App2 implements App3, Con\Application
     {
         // Matches
         $foo = new \RemoveXSS();
-        $foo = new \RemoveXSS;
+        $foo = new \RemoveXSS();
         (new \RemoveXSS())->foo();
         $foo = new \TYPO3\CMS\Backend\Console\Application();
-        (new \TYPO3\CMS\Backend\Console\Application)->foo();
+        (new \TYPO3\CMS\Backend\Console\Application())->foo();
         Application::foo();
         App1::bar();
         \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(App2::class)->foo();
index 364fa56..c201231 100644 (file)
@@ -37,7 +37,7 @@ class Typo3StatusTest extends UnitTestCase
     public function getStatusReturnsXclassStatusObjectWithSeverityOkIfNoXclassExists()
     {
         $GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'] = [];
-        $fixture = new \TYPO3\CMS\Reports\Report\Status\Typo3Status;
+        $fixture = new \TYPO3\CMS\Reports\Report\Status\Typo3Status();
         $result = $fixture->getStatus();
         $statusObject = $result['registeredXclass'];
         self::assertSame(\TYPO3\CMS\Reports\Status::OK, $statusObject->getSeverity());
@@ -53,7 +53,7 @@ class Typo3StatusTest extends UnitTestCase
                 'className' => 'bar',
             ]
         ];
-        $fixture = new \TYPO3\CMS\Reports\Report\Status\Typo3Status;
+        $fixture = new \TYPO3\CMS\Reports\Report\Status\Typo3Status();
         $result = $fixture->getStatus();
         $statusObject = $result['registeredXclass'];
         self::assertSame(\TYPO3\CMS\Reports\Status::NOTICE, $statusObject->getSeverity());