diff --git a/Classes/Cache/CacheFactory.php b/Classes/Cache/CacheFactory.php index 22ce60b..cfde8c6 100644 --- a/Classes/Cache/CacheFactory.php +++ b/Classes/Cache/CacheFactory.php @@ -3,7 +3,7 @@ declare(strict_types=1); /* - * This file is part of the "extender" Extension for TYPO3 CMS. + * This file is developed by evoWeb. * * It is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License, either version 2 @@ -15,11 +15,11 @@ namespace Evoweb\Extender\Cache; -use TYPO3\CMS\Core\Core\Bootstrap; use TYPO3\CMS\Core\Cache\Backend\AbstractBackend; use TYPO3\CMS\Core\Cache\Backend\FileBackend; use TYPO3\CMS\Core\Cache\Frontend\FrontendInterface; use TYPO3\CMS\Core\Cache\Frontend\PhpFrontend; +use TYPO3\CMS\Core\Core\Bootstrap; class CacheFactory { diff --git a/Classes/Cache/ClassCacheManager.php b/Classes/Cache/ClassCacheManager.php index f3722f7..915ae49 100644 --- a/Classes/Cache/ClassCacheManager.php +++ b/Classes/Cache/ClassCacheManager.php @@ -3,7 +3,7 @@ declare(strict_types=1); /* - * This file is part of the "extender" Extension for TYPO3 CMS. + * This file is developed by evoWeb. * * It is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License, either version 2 @@ -32,8 +32,7 @@ public function __construct( protected ClassParser $classParser, protected ClassComposer $classComposer, protected ClassRegister $classRegister - ) { - } + ) {} /** * Build merged file and cache for base and extending files @@ -45,7 +44,7 @@ public function build(string $cacheEntryIdentifier, string $className): void { $fileSegments = [ $this->getBaseClassFileSegments($className), - ...$this->getExtendingClassesFileSegments($className) + ...$this->getExtendingClassesFileSegments($className), ]; $code = $this->getMergedFileCode($fileSegments); diff --git a/Classes/Command/ClearCommand.php b/Classes/Command/ClearCommand.php index 5a0701b..3ee6805 100644 --- a/Classes/Command/ClearCommand.php +++ b/Classes/Command/ClearCommand.php @@ -3,7 +3,7 @@ declare(strict_types=1); /* - * This file is part of the "extender" Extension for TYPO3 CMS. + * This file is developed by evoWeb. * * It is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License, either version 2 diff --git a/Classes/Composer/ClassComposer.php b/Classes/Composer/ClassComposer.php index 644212f..e1d232a 100644 --- a/Classes/Composer/ClassComposer.php +++ b/Classes/Composer/ClassComposer.php @@ -3,7 +3,7 @@ declare(strict_types=1); /* - * This file is part of the "extender" Extension for TYPO3 CMS. + * This file is developed by evoWeb. * * It is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License, either version 2 diff --git a/Classes/Composer/Generator/ClassGenerator.php b/Classes/Composer/Generator/ClassGenerator.php index 61d6191..39aae6b 100644 --- a/Classes/Composer/Generator/ClassGenerator.php +++ b/Classes/Composer/Generator/ClassGenerator.php @@ -3,7 +3,7 @@ declare(strict_types=1); /* - * This file is part of the "extender" Extension for TYPO3 CMS. + * This file is developed by evoWeb. * * It is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License, either version 2 diff --git a/Classes/Composer/Generator/ClassMethodGenerator.php b/Classes/Composer/Generator/ClassMethodGenerator.php index e577db3..206f0a2 100644 --- a/Classes/Composer/Generator/ClassMethodGenerator.php +++ b/Classes/Composer/Generator/ClassMethodGenerator.php @@ -3,7 +3,7 @@ declare(strict_types=1); /* - * This file is part of the "extender" Extension for TYPO3 CMS. + * This file is developed by evoWeb. * * It is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License, either version 2 diff --git a/Classes/Composer/Generator/ConstantGenerator.php b/Classes/Composer/Generator/ConstantGenerator.php index 9908f70..56b078d 100644 --- a/Classes/Composer/Generator/ConstantGenerator.php +++ b/Classes/Composer/Generator/ConstantGenerator.php @@ -3,7 +3,7 @@ declare(strict_types=1); /* - * This file is part of the "extender" Extension for TYPO3 CMS. + * This file is developed by evoWeb. * * It is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License, either version 2 @@ -17,8 +17,8 @@ use Evoweb\Extender\Parser\FileSegments; use PhpParser\Node\Stmt\Class_; -use PhpParser\Node\Stmt\Namespace_; use PhpParser\Node\Stmt\ClassConst; +use PhpParser\Node\Stmt\Namespace_; class ConstantGenerator implements GeneratorInterface { diff --git a/Classes/Composer/Generator/ConstructorGenerator.php b/Classes/Composer/Generator/ConstructorGenerator.php index 820d121..0171a8d 100644 --- a/Classes/Composer/Generator/ConstructorGenerator.php +++ b/Classes/Composer/Generator/ConstructorGenerator.php @@ -3,7 +3,7 @@ declare(strict_types=1); /* - * This file is part of the "extender" Extension for TYPO3 CMS. + * This file is developed by evoWeb. * * It is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License, either version 2 diff --git a/Classes/Composer/Generator/FileCommentGenerator.php b/Classes/Composer/Generator/FileCommentGenerator.php index 19689dd..cb253e4 100644 --- a/Classes/Composer/Generator/FileCommentGenerator.php +++ b/Classes/Composer/Generator/FileCommentGenerator.php @@ -3,7 +3,7 @@ declare(strict_types=1); /* - * This file is part of the "extender" Extension for TYPO3 CMS. + * This file is developed by evoWeb. * * It is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License, either version 2 diff --git a/Classes/Composer/Generator/GeneratorInterface.php b/Classes/Composer/Generator/GeneratorInterface.php index 8083335..0486d0d 100644 --- a/Classes/Composer/Generator/GeneratorInterface.php +++ b/Classes/Composer/Generator/GeneratorInterface.php @@ -3,7 +3,7 @@ declare(strict_types=1); /* - * This file is part of the "extender" Extension for TYPO3 CMS. + * This file is developed by evoWeb. * * It is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License, either version 2 diff --git a/Classes/Composer/Generator/InitializeObjectGenerator.php b/Classes/Composer/Generator/InitializeObjectGenerator.php index d35331a..512a4cb 100644 --- a/Classes/Composer/Generator/InitializeObjectGenerator.php +++ b/Classes/Composer/Generator/InitializeObjectGenerator.php @@ -3,7 +3,7 @@ declare(strict_types=1); /* - * This file is part of the "extender" Extension for TYPO3 CMS. + * This file is developed by evoWeb. * * It is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License, either version 2 diff --git a/Classes/Composer/Generator/NamespaceGenerator.php b/Classes/Composer/Generator/NamespaceGenerator.php index 7cb0ffc..9464951 100644 --- a/Classes/Composer/Generator/NamespaceGenerator.php +++ b/Classes/Composer/Generator/NamespaceGenerator.php @@ -3,7 +3,7 @@ declare(strict_types=1); /* - * This file is part of the "extender" Extension for TYPO3 CMS. + * This file is developed by evoWeb. * * It is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License, either version 2 diff --git a/Classes/Composer/Generator/PropertyGenerator.php b/Classes/Composer/Generator/PropertyGenerator.php index e30ba2e..0eb37b9 100644 --- a/Classes/Composer/Generator/PropertyGenerator.php +++ b/Classes/Composer/Generator/PropertyGenerator.php @@ -3,7 +3,7 @@ declare(strict_types=1); /* - * This file is part of the "extender" Extension for TYPO3 CMS. + * This file is developed by evoWeb. * * It is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License, either version 2 diff --git a/Classes/Composer/Generator/TraitGenerator.php b/Classes/Composer/Generator/TraitGenerator.php index d0295fd..4914ae4 100644 --- a/Classes/Composer/Generator/TraitGenerator.php +++ b/Classes/Composer/Generator/TraitGenerator.php @@ -3,7 +3,7 @@ declare(strict_types=1); /* - * This file is part of the "extender" Extension for TYPO3 CMS. + * This file is developed by evoWeb. * * It is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License, either version 2 diff --git a/Classes/Composer/Generator/UseGenerator.php b/Classes/Composer/Generator/UseGenerator.php index 3b4ff93..73250a3 100644 --- a/Classes/Composer/Generator/UseGenerator.php +++ b/Classes/Composer/Generator/UseGenerator.php @@ -3,7 +3,7 @@ declare(strict_types=1); /* - * This file is part of the "extender" Extension for TYPO3 CMS. + * This file is developed by evoWeb. * * It is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License, either version 2 diff --git a/Classes/Configuration/ClassRegister.php b/Classes/Configuration/ClassRegister.php index a607f39..ef6d66a 100644 --- a/Classes/Configuration/ClassRegister.php +++ b/Classes/Configuration/ClassRegister.php @@ -17,9 +17,7 @@ class ClassRegister { - public function __construct(protected array $extendedClasses = []) - { - } + public function __construct(protected array $extendedClasses = []) {} public function hasBaseClassName(string $className): bool { diff --git a/Classes/DependencyInjection/RegisterExtenderPass.php b/Classes/DependencyInjection/RegisterExtenderPass.php index 337b947..7816578 100644 --- a/Classes/DependencyInjection/RegisterExtenderPass.php +++ b/Classes/DependencyInjection/RegisterExtenderPass.php @@ -3,7 +3,7 @@ declare(strict_types=1); /* - * This file is part of the "extender" Extension for TYPO3 CMS. + * This file is developed by evoWeb. * * It is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License, either version 2 diff --git a/Classes/Event/RegisterAutoloaderEvent.php b/Classes/Event/RegisterAutoloaderEvent.php index 4b191de..d324279 100644 --- a/Classes/Event/RegisterAutoloaderEvent.php +++ b/Classes/Event/RegisterAutoloaderEvent.php @@ -3,7 +3,7 @@ declare(strict_types=1); /* - * This file is part of the "extender" Extension for TYPO3 CMS. + * This file is developed by evoWeb. * * It is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License, either version 2 diff --git a/Classes/Exception/BaseFileNotFoundException.php b/Classes/Exception/BaseFileNotFoundException.php index 4c4dfc4..2f0a366 100644 --- a/Classes/Exception/BaseFileNotFoundException.php +++ b/Classes/Exception/BaseFileNotFoundException.php @@ -3,7 +3,7 @@ declare(strict_types=1); /* - * This file is part of the "extender" Extension for TYPO3 CMS. + * This file is developed by evoWeb. * * It is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License, either version 2 @@ -15,6 +15,4 @@ namespace Evoweb\Extender\Exception; -class BaseFileNotFoundException extends \RuntimeException -{ -} +class BaseFileNotFoundException extends \RuntimeException {} diff --git a/Classes/Exception/ExtendingFileNotFoundException.php b/Classes/Exception/ExtendingFileNotFoundException.php index 932e097..29e8873 100644 --- a/Classes/Exception/ExtendingFileNotFoundException.php +++ b/Classes/Exception/ExtendingFileNotFoundException.php @@ -3,7 +3,7 @@ declare(strict_types=1); /* - * This file is part of the "extender" Extension for TYPO3 CMS. + * This file is developed by evoWeb. * * It is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License, either version 2 @@ -15,6 +15,4 @@ namespace Evoweb\Extender\Exception; -class ExtendingFileNotFoundException extends \RuntimeException -{ -} +class ExtendingFileNotFoundException extends \RuntimeException {} diff --git a/Classes/Loader/ClassLoader.php b/Classes/Loader/ClassLoader.php index 35b3c1b..d9bf468 100644 --- a/Classes/Loader/ClassLoader.php +++ b/Classes/Loader/ClassLoader.php @@ -3,7 +3,7 @@ declare(strict_types=1); /* - * This file is part of the "extender" Extension for TYPO3 CMS. + * This file is developed by evoWeb. * * It is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License, either version 2 @@ -27,8 +27,7 @@ public function __construct( protected FrontendInterface|PhpFrontend $classCache, protected ClassCacheManager $classCacheManager, protected ClassRegister $classRegister - ) { - } + ) {} /** * Loads php files containing classes or interfaces part of the diff --git a/Classes/Parser/ClassParser.php b/Classes/Parser/ClassParser.php index a5bfd4a..a300a9b 100644 --- a/Classes/Parser/ClassParser.php +++ b/Classes/Parser/ClassParser.php @@ -3,7 +3,7 @@ declare(strict_types=1); /* - * This file is part of the "extender" Extension for TYPO3 CMS. + * This file is developed by evoWeb. * * It is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License, either version 2 @@ -33,9 +33,7 @@ class ClassParser Visitor\ClassMethodVisitor::class, ]; - public function __construct(protected ParserFactory $parserFactory) - { - } + public function __construct(protected ParserFactory $parserFactory) {} public function getFileSegments(string $filePath): FileSegments { diff --git a/Classes/Parser/FileSegments.php b/Classes/Parser/FileSegments.php index af81806..739709b 100644 --- a/Classes/Parser/FileSegments.php +++ b/Classes/Parser/FileSegments.php @@ -3,7 +3,7 @@ declare(strict_types=1); /* - * This file is part of the "extender" Extension for TYPO3 CMS. + * This file is developed by evoWeb. * * It is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License, either version 2 @@ -17,8 +17,8 @@ use PhpParser\Node\Name; use PhpParser\Node\Stmt\Class_; -use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\ClassConst; +use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Property; use PhpParser\Node\Stmt\TraitUse; use PhpParser\Node\Stmt\UseUse; diff --git a/Classes/Parser/Visitor/AbstractVisitor.php b/Classes/Parser/Visitor/AbstractVisitor.php index 79a4dd4..4f8562f 100644 --- a/Classes/Parser/Visitor/AbstractVisitor.php +++ b/Classes/Parser/Visitor/AbstractVisitor.php @@ -3,7 +3,7 @@ declare(strict_types=1); /* - * This file is part of the "extender" Extension for TYPO3 CMS. + * This file is developed by evoWeb. * * It is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License, either version 2 @@ -20,7 +20,5 @@ abstract class AbstractVisitor extends NodeVisitorAbstract { - public function __construct(protected FileSegments $fileSegment) - { - } + public function __construct(protected FileSegments $fileSegment) {} } diff --git a/Classes/Parser/Visitor/ClassMethodVisitor.php b/Classes/Parser/Visitor/ClassMethodVisitor.php index 3a16982..7d80709 100644 --- a/Classes/Parser/Visitor/ClassMethodVisitor.php +++ b/Classes/Parser/Visitor/ClassMethodVisitor.php @@ -3,7 +3,7 @@ declare(strict_types=1); /* - * This file is part of the "extender" Extension for TYPO3 CMS. + * This file is developed by evoWeb. * * It is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License, either version 2 diff --git a/Classes/Parser/Visitor/ClassVisitor.php b/Classes/Parser/Visitor/ClassVisitor.php index 117e55e..afabe18 100644 --- a/Classes/Parser/Visitor/ClassVisitor.php +++ b/Classes/Parser/Visitor/ClassVisitor.php @@ -3,7 +3,7 @@ declare(strict_types=1); /* - * This file is part of the "extender" Extension for TYPO3 CMS. + * This file is developed by evoWeb. * * It is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License, either version 2 diff --git a/Classes/Parser/Visitor/ConstantVisitor.php b/Classes/Parser/Visitor/ConstantVisitor.php index 7445a01..5131b22 100644 --- a/Classes/Parser/Visitor/ConstantVisitor.php +++ b/Classes/Parser/Visitor/ConstantVisitor.php @@ -3,7 +3,7 @@ declare(strict_types=1); /* - * This file is part of the "extender" Extension for TYPO3 CMS. + * This file is developed by evoWeb. * * It is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License, either version 2 diff --git a/Classes/Parser/Visitor/ConstructorVisitor.php b/Classes/Parser/Visitor/ConstructorVisitor.php index 0b2d288..93c88f2 100644 --- a/Classes/Parser/Visitor/ConstructorVisitor.php +++ b/Classes/Parser/Visitor/ConstructorVisitor.php @@ -3,7 +3,7 @@ declare(strict_types=1); /* - * This file is part of the "extender" Extension for TYPO3 CMS. + * This file is developed by evoWeb. * * It is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License, either version 2 diff --git a/Classes/Parser/Visitor/InitializeObjectVisitor.php b/Classes/Parser/Visitor/InitializeObjectVisitor.php index c455566..62592ab 100644 --- a/Classes/Parser/Visitor/InitializeObjectVisitor.php +++ b/Classes/Parser/Visitor/InitializeObjectVisitor.php @@ -3,7 +3,7 @@ declare(strict_types=1); /* - * This file is part of the "extender" Extension for TYPO3 CMS. + * This file is developed by evoWeb. * * It is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License, either version 2 diff --git a/Classes/Parser/Visitor/NamespaceVisitor.php b/Classes/Parser/Visitor/NamespaceVisitor.php index d35ab74..eab26af 100644 --- a/Classes/Parser/Visitor/NamespaceVisitor.php +++ b/Classes/Parser/Visitor/NamespaceVisitor.php @@ -3,7 +3,7 @@ declare(strict_types=1); /* - * This file is part of the "extender" Extension for TYPO3 CMS. + * This file is developed by evoWeb. * * It is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License, either version 2 diff --git a/Classes/Parser/Visitor/PropertyVisitor.php b/Classes/Parser/Visitor/PropertyVisitor.php index 9cde846..8463d23 100644 --- a/Classes/Parser/Visitor/PropertyVisitor.php +++ b/Classes/Parser/Visitor/PropertyVisitor.php @@ -3,7 +3,7 @@ declare(strict_types=1); /* - * This file is part of the "extender" Extension for TYPO3 CMS. + * This file is developed by evoWeb. * * It is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License, either version 2 diff --git a/Classes/Parser/Visitor/TraitVisitor.php b/Classes/Parser/Visitor/TraitVisitor.php index 1f562ad..6a5c96a 100644 --- a/Classes/Parser/Visitor/TraitVisitor.php +++ b/Classes/Parser/Visitor/TraitVisitor.php @@ -3,7 +3,7 @@ declare(strict_types=1); /* - * This file is part of the "extender" Extension for TYPO3 CMS. + * This file is developed by evoWeb. * * It is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License, either version 2 diff --git a/Classes/Parser/Visitor/UseVisitor.php b/Classes/Parser/Visitor/UseVisitor.php index 89f6d7f..b9140fd 100644 --- a/Classes/Parser/Visitor/UseVisitor.php +++ b/Classes/Parser/Visitor/UseVisitor.php @@ -3,7 +3,7 @@ declare(strict_types=1); /* - * This file is part of the "extender" Extension for TYPO3 CMS. + * This file is developed by evoWeb. * * It is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License, either version 2 diff --git a/Tests/Fixtures/Extensions/base_extension/Classes/Domain/Model/AnotherBlob.php b/Tests/Fixtures/Extensions/base_extension/Classes/Domain/Model/AnotherBlob.php index bc807ca..d189c87 100644 --- a/Tests/Fixtures/Extensions/base_extension/Classes/Domain/Model/AnotherBlob.php +++ b/Tests/Fixtures/Extensions/base_extension/Classes/Domain/Model/AnotherBlob.php @@ -1,5 +1,16 @@ setConstructorArgs([$classCache, $classLoader, $classParser, $classComposer, $classRegister]) ->getMock(); - $subject->expects($this->once())->method('getBaseClassFileSegments')->willReturn(new FileSegments()); - $subject->expects($this->once())->method('getExtendingClassesFileSegments')->willReturn([]); - $subject->expects($this->once())->method('getMergedFileCode')->willReturn(''); - $subject->expects($this->once())->method('addFileToCache'); + $subject->expects(self::once())->method('getBaseClassFileSegments')->willReturn(new FileSegments()); + $subject->expects(self::once())->method('getExtendingClassesFileSegments')->willReturn([]); + $subject->expects(self::once())->method('getMergedFileCode')->willReturn(''); + $subject->expects(self::once())->method('addFileToCache'); $subject->build('test', Blob::class); } @@ -91,7 +102,7 @@ public function getExtendingClassesFileSegments(): void $classComposer = $this->createMock(ClassComposer::class); $classRegister = $this->createMock(ClassRegister::class); - $classRegister->expects($this->once())->method('getExtendingClasses')->willReturn(['test2', 'test3']); + $classRegister->expects(self::once())->method('getExtendingClasses')->willReturn(['test2', 'test3']); $subject = new class ( $classCache, @@ -113,7 +124,7 @@ protected function getFileSegments(string $className, bool $baseClass, string $e $expected = [ new FileSegments(), - new FileSegments() + new FileSegments(), ]; $actual = $subject->getExtendingClassesFileSegments('test'); @@ -133,13 +144,13 @@ public function getFileSegments(): void ); $ClassLoader = $this->createMock(ClassLoader::class); - $ClassLoader->expects($this->once())->method('findFile')->willReturn($basePath); + $ClassLoader->expects(self::once())->method('findFile')->willReturn($basePath); $expected = new FileSegments(); $expected->setBaseClass(true); $classParser = $this->createMock(ClassParser::class); - $classParser->expects($this->once())->method('getFileSegments')->willReturn($expected); + $classParser->expects(self::once())->method('getFileSegments')->willReturn($expected); $subject = new class ( $classCache, @@ -168,7 +179,7 @@ public function getMergedFileCode(): void $classRegister = $this->createMock(ClassRegister::class); $classComposer = $this->createMock(ClassComposer::class); - $classComposer->expects($this->once())->method('composeMergedFileCode')->willReturn(''); + $classComposer->expects(self::once())->method('composeMergedFileCode')->willReturn(''); $subject = new class ( $classCache, @@ -199,7 +210,7 @@ public function addFileToCache(): void $classRegister = $this->createMock(ClassRegister::class); $classCache = $this->createMock(FrontendInterface::class); - $classCache->expects($this->once())->method('set')->willReturn(null); + $classCache->expects(self::once())->method('set')->willReturn(null); $subject = new class ( $classCache, diff --git a/Tests/Functional/Composer/ClassComposerTest.php b/Tests/Functional/Composer/ClassComposerTest.php index fdab071..f0a6f29 100644 --- a/Tests/Functional/Composer/ClassComposerTest.php +++ b/Tests/Functional/Composer/ClassComposerTest.php @@ -1,5 +1,16 @@ get(ClassLoader::class), 'loadClass']; $subject = new class () extends RegisterAutoloaderEvent { - public function __construct() - { - } + public function __construct() {} public function autoloaderAlreadyRegistered(array $autoloader): bool { @@ -52,9 +61,7 @@ public function unregisterAutoloader(): void spl_autoload_register($autoloader, true, true); $subject = new class () extends RegisterAutoloaderEvent { - public function __construct() - { - } + public function __construct() {} public function unregisterAutoloader(array $autoloader): void { diff --git a/Tests/Functional/Loader/ClassLoaderTest.php b/Tests/Functional/Loader/ClassLoaderTest.php index e5d3159..4b5550b 100644 --- a/Tests/Functional/Loader/ClassLoaderTest.php +++ b/Tests/Functional/Loader/ClassLoaderTest.php @@ -1,11 +1,22 @@ getMockBuilder(PhpFrontend::class) ->setConstructorArgs(['extender', $cacheBackend]) ->getMock(); - $cacheMock->expects($this->once())->method('has')->willReturn(true); - $cacheMock->expects($this->once())->method('requireOnce')->willReturn(true); + $cacheMock->expects(self::once())->method('has')->willReturn(true); + $cacheMock->expects(self::once())->method('requireOnce')->willReturn(true); $subject = new ClassLoader($cacheMock, $classCacheManager, $classRegister); diff --git a/Tests/Functional/Parser/ClassParserTest.php b/Tests/Functional/Parser/ClassParserTest.php index c73ca7a..b24f1fc 100644 --- a/Tests/Functional/Parser/ClassParserTest.php +++ b/Tests/Functional/Parser/ClassParserTest.php @@ -1,5 +1,16 @@ getMockBuilder(Php7::class) ->disableOriginalConstructor() ->getMock(); - $parser->expects($this->once())->method('parse')->willReturn([ + $parser->expects(self::once())->method('parse')->willReturn([ new Stmt\Namespace_(new Node\Name('Fixture\BaseExtension\Domain\Model')), new Node\UseItem(new Node\Name('Evoweb\Domain\Model\Test')), new Stmt\Class_('GetFileSegments'), @@ -35,7 +46,7 @@ public function getFileSegments(): void /** @var ParserFactory|MockObject $parserFactory */ $parserFactory = $this->createMock(ParserFactory::class); $parserFactory - ->expects($this->once()) + ->expects(self::once()) ->method('createForVersion') ->willReturn($parser); diff --git a/composer.json b/composer.json index e861fa4..4ee4b64 100644 --- a/composer.json +++ b/composer.json @@ -29,12 +29,12 @@ } }, "require": { - "typo3/cms-core": "^13.0 || 13.0.x-dev || dev-main", "nikic/php-parser": "^5.0", "psr/container": "^2.0", "psr/event-dispatcher": "^1.0", "symfony/console": "^7.0", - "symfony/dependency-injection": "^7.0" + "symfony/dependency-injection": "^7.0", + "typo3/cms-core": "^13.0" }, "require-dev": { "evoweb/base_extension": "*",