From 53a3ecdcd3d6c6f6dcf49155d66e5f6c43ac25c6 Mon Sep 17 00:00:00 2001 From: Geert Eltink Date: Sat, 15 May 2021 17:40:07 +0200 Subject: [PATCH] feat: laminas coding standard 2.2.0 Signed-off-by: Geert Eltink --- .gitignore | 2 + composer.json | 4 +- composer.lock | 337 ++++++++++++++++---- phpcs.xml | 16 +- src/AuthorizationInterface.php | 2 +- src/AuthorizationMiddleware.php | 12 +- src/AuthorizationMiddlewareFactory.php | 5 +- src/ConfigProvider.php | 8 +- test/AuthorizationMiddlewareFactoryTest.php | 10 +- test/AuthorizationMiddlewareTest.php | 10 +- test/ConfigProviderTest.php | 2 +- test/ExceptionTest.php | 4 +- 12 files changed, 323 insertions(+), 89 deletions(-) diff --git a/.gitignore b/.gitignore index 7ee0948..f6f6e63 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +/.phpcs-cache +/.phpunit.result.cache /clover.xml /coveralls-upload.json /docs/html/ diff --git a/composer.json b/composer.json index 32bd07b..212df3a 100644 --- a/composer.json +++ b/composer.json @@ -36,9 +36,9 @@ "psr/http-server-middleware": "^1.0" }, "require-dev": { - "laminas/laminas-coding-standard": "~1.0.0", - "phpspec/prophecy-phpunit": "^2.0", + "laminas/laminas-coding-standard": "~2.2.0", "phpspec/prophecy": "^1.12", + "phpspec/prophecy-phpunit": "^2.0", "phpunit/phpunit": "^9.3" }, "conflict": { diff --git a/composer.lock b/composer.lock index d883fc5..579a71b 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "1ee030c72b7f5685906adbd0964ddd1c", + "content-hash": "99ae9ce246514403be5680fd2c91d048", "packages": [ { "name": "laminas/laminas-zendframework-bridge", @@ -506,6 +506,76 @@ } ], "packages-dev": [ + { + "name": "dealerdirect/phpcodesniffer-composer-installer", + "version": "v0.7.1", + "source": { + "type": "git", + "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", + "reference": "fe390591e0241955f22eb9ba327d137e501c771c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/fe390591e0241955f22eb9ba327d137e501c771c", + "reference": "fe390591e0241955f22eb9ba327d137e501c771c", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0 || ^2.0", + "php": ">=5.3", + "squizlabs/php_codesniffer": "^2.0 || ^3.0 || ^4.0" + }, + "require-dev": { + "composer/composer": "*", + "phpcompatibility/php-compatibility": "^9.0", + "sensiolabs/security-checker": "^4.1.0" + }, + "type": "composer-plugin", + "extra": { + "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" + }, + "autoload": { + "psr-4": { + "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Franck Nijhof", + "email": "franck.nijhof@dealerdirect.com", + "homepage": "http://www.frenck.nl", + "role": "Developer / IT Manager" + } + ], + "description": "PHP_CodeSniffer Standards Composer Installer Plugin", + "homepage": "http://www.dealerdirect.com", + "keywords": [ + "PHPCodeSniffer", + "PHP_CodeSniffer", + "code quality", + "codesniffer", + "composer", + "installer", + "phpcs", + "plugin", + "qa", + "quality", + "standard", + "standards", + "style guide", + "stylecheck", + "tests" + ], + "support": { + "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues", + "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" + }, + "time": "2020-12-07T18:04:37+00:00" + }, { "name": "doctrine/instantiator", "version": "1.4.0", @@ -577,31 +647,36 @@ }, { "name": "laminas/laminas-coding-standard", - "version": "1.0.0", + "version": "2.2.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-coding-standard.git", - "reference": "08880ce2fbfe62d471cd3cb766a91da630b32539" + "reference": "af23a4ceca36b887415585040c6afaff081ccc33" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-coding-standard/zipball/08880ce2fbfe62d471cd3cb766a91da630b32539", - "reference": "08880ce2fbfe62d471cd3cb766a91da630b32539", + "url": "https://api.github.com/repos/laminas/laminas-coding-standard/zipball/af23a4ceca36b887415585040c6afaff081ccc33", + "reference": "af23a4ceca36b887415585040c6afaff081ccc33", "shasum": "" }, "require": { - "laminas/laminas-zendframework-bridge": "^1.0", - "squizlabs/php_codesniffer": "^2.7" + "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7", + "php": "^7.3 || ~8.0.0", + "slevomat/coding-standard": "^6.4.1", + "squizlabs/php_codesniffer": "^3.5.8", + "webimpress/coding-standard": "^1.1.6" }, - "replace": { - "zendframework/zend-coding-standard": "self.version" + "type": "phpcodesniffer-standard", + "autoload": { + "psr-4": { + "LaminasCodingStandard\\": "src/LaminasCodingStandard/" + } }, - "type": "library", "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "description": "Laminas coding standard", + "description": "Laminas Coding Standard", "homepage": "https://laminas.dev", "keywords": [ "Coding Standard", @@ -615,7 +690,13 @@ "rss": "https://github.com/laminas/laminas-coding-standard/releases.atom", "source": "https://github.com/laminas/laminas-coding-standard" }, - "time": "2019-12-31T16:28:26+00:00" + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2021-05-15T09:20:49+00:00" }, { "name": "myclabs/deep-copy", @@ -677,16 +758,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.10.4", + "version": "v4.10.5", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e" + "reference": "4432ba399e47c66624bc73c8c0f811e5c109576f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/c6d052fc58cb876152f89f532b95a8d7907e7f0e", - "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4432ba399e47c66624bc73c8c0f811e5c109576f", + "reference": "4432ba399e47c66624bc73c8c0f811e5c109576f", "shasum": "" }, "require": { @@ -727,9 +808,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.10.4" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.10.5" }, - "time": "2020-12-20T10:01:03+00:00" + "time": "2021-05-03T19:11:20+00:00" }, { "name": "phar-io/manifest", @@ -1119,6 +1200,59 @@ }, "time": "2020-07-09T08:33:42+00:00" }, + { + "name": "phpstan/phpdoc-parser", + "version": "0.4.9", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpdoc-parser.git", + "reference": "98a088b17966bdf6ee25c8a4b634df313d8aa531" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/98a088b17966bdf6ee25c8a4b634df313d8aa531", + "reference": "98a088b17966bdf6ee25c8a4b634df313d8aa531", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "consistence/coding-standard": "^3.5", + "ergebnis/composer-normalize": "^2.0.2", + "jakub-onderka/php-parallel-lint": "^0.9.2", + "phing/phing": "^2.16.0", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^0.12.26", + "phpstan/phpstan-strict-rules": "^0.12", + "phpunit/phpunit": "^6.3", + "slevomat/coding-standard": "^4.7.2", + "symfony/process": "^4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.4-dev" + } + }, + "autoload": { + "psr-4": { + "PHPStan\\PhpDocParser\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPDoc parser with support for nullable, intersection and generic types", + "support": { + "issues": "https://github.com/phpstan/phpdoc-parser/issues", + "source": "https://github.com/phpstan/phpdoc-parser/tree/master" + }, + "time": "2020-08-03T20:32:43+00:00" + }, { "name": "phpunit/php-code-coverage", "version": "9.2.6", @@ -2504,66 +2638,100 @@ ], "time": "2020-09-28T06:39:44+00:00" }, + { + "name": "slevomat/coding-standard", + "version": "6.4.1", + "source": { + "type": "git", + "url": "https://github.com/slevomat/coding-standard.git", + "reference": "696dcca217d0c9da2c40d02731526c1e25b65346" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/696dcca217d0c9da2c40d02731526c1e25b65346", + "reference": "696dcca217d0c9da2c40d02731526c1e25b65346", + "shasum": "" + }, + "require": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7", + "php": "^7.1 || ^8.0", + "phpstan/phpdoc-parser": "0.4.5 - 0.4.9", + "squizlabs/php_codesniffer": "^3.5.6" + }, + "require-dev": { + "phing/phing": "2.16.3", + "php-parallel-lint/php-parallel-lint": "1.2.0", + "phpstan/phpstan": "0.12.48", + "phpstan/phpstan-deprecation-rules": "0.12.5", + "phpstan/phpstan-phpunit": "0.12.16", + "phpstan/phpstan-strict-rules": "0.12.5", + "phpunit/phpunit": "7.5.20|8.5.5|9.4.0" + }, + "type": "phpcodesniffer-standard", + "extra": { + "branch-alias": { + "dev-master": "6.x-dev" + } + }, + "autoload": { + "psr-4": { + "SlevomatCodingStandard\\": "SlevomatCodingStandard" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.", + "support": { + "issues": "https://github.com/slevomat/coding-standard/issues", + "source": "https://github.com/slevomat/coding-standard/tree/6.4.1" + }, + "funding": [ + { + "url": "https://github.com/kukulich", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/slevomat/coding-standard", + "type": "tidelift" + } + ], + "time": "2020-10-05T12:39:37+00:00" + }, { "name": "squizlabs/php_codesniffer", - "version": "2.9.2", + "version": "3.6.0", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "2acf168de78487db620ab4bc524135a13cfe6745" + "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/2acf168de78487db620ab4bc524135a13cfe6745", - "reference": "2acf168de78487db620ab4bc524135a13cfe6745", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ffced0d2c8fa8e6cdc4d695a743271fab6c38625", + "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625", "shasum": "" }, "require": { "ext-simplexml": "*", "ext-tokenizer": "*", "ext-xmlwriter": "*", - "php": ">=5.1.2" + "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" }, "bin": [ - "scripts/phpcs", - "scripts/phpcbf" + "bin/phpcs", + "bin/phpcbf" ], "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev" + "dev-master": "3.x-dev" } }, - "autoload": { - "classmap": [ - "CodeSniffer.php", - "CodeSniffer/CLI.php", - "CodeSniffer/Exception.php", - "CodeSniffer/File.php", - "CodeSniffer/Fixer.php", - "CodeSniffer/Report.php", - "CodeSniffer/Reporting.php", - "CodeSniffer/Sniff.php", - "CodeSniffer/Tokens.php", - "CodeSniffer/Reports/", - "CodeSniffer/Tokenizers/", - "CodeSniffer/DocGenerators/", - "CodeSniffer/Standards/AbstractPatternSniff.php", - "CodeSniffer/Standards/AbstractScopeSniff.php", - "CodeSniffer/Standards/AbstractVariableSniff.php", - "CodeSniffer/Standards/IncorrectPatternException.php", - "CodeSniffer/Standards/Generic/Sniffs/", - "CodeSniffer/Standards/MySource/Sniffs/", - "CodeSniffer/Standards/PEAR/Sniffs/", - "CodeSniffer/Standards/PSR1/Sniffs/", - "CodeSniffer/Standards/PSR2/Sniffs/", - "CodeSniffer/Standards/Squiz/Sniffs/", - "CodeSniffer/Standards/Zend/Sniffs/" - ] - }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" @@ -2575,7 +2743,7 @@ } ], "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "http://www.squizlabs.com/php-codesniffer", + "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", "keywords": [ "phpcs", "standards" @@ -2585,7 +2753,7 @@ "source": "https://github.com/squizlabs/PHP_CodeSniffer", "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" }, - "time": "2018-11-07T22:31:41+00:00" + "time": "2021-04-09T00:54:41+00:00" }, { "name": "theseer/tokenizer", @@ -2636,6 +2804,61 @@ } ], "time": "2020-07-12T23:59:07+00:00" + }, + { + "name": "webimpress/coding-standard", + "version": "1.2.2", + "source": { + "type": "git", + "url": "https://github.com/webimpress/coding-standard.git", + "reference": "8f4a220de33f471a8101836f7ec72b852c3f9f03" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webimpress/coding-standard/zipball/8f4a220de33f471a8101836f7ec72b852c3f9f03", + "reference": "8f4a220de33f471a8101836f7ec72b852c3f9f03", + "shasum": "" + }, + "require": { + "php": "^7.3 || ^8.0", + "squizlabs/php_codesniffer": "^3.6" + }, + "require-dev": { + "phpunit/phpunit": "^9.5.4" + }, + "type": "phpcodesniffer-standard", + "extra": { + "dev-master": "1.2.x-dev", + "dev-develop": "1.3.x-dev" + }, + "autoload": { + "psr-4": { + "WebimpressCodingStandard\\": "src/WebimpressCodingStandard/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "description": "Webimpress Coding Standard", + "keywords": [ + "Coding Standard", + "PSR-2", + "phpcs", + "psr-12", + "webimpress" + ], + "support": { + "issues": "https://github.com/webimpress/coding-standard/issues", + "source": "https://github.com/webimpress/coding-standard/tree/1.2.2" + }, + "funding": [ + { + "url": "https://github.com/michalbundyra", + "type": "github" + } + ], + "time": "2021-04-12T12:51:27+00:00" } ], "aliases": [], @@ -2644,7 +2867,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.1 || ~8.0.0" + "php": "^7.3 || ~8.0.0" }, "platform-dev": [], "plugin-api-version": "2.0.0" diff --git a/phpcs.xml b/phpcs.xml index 1a80a86..1efe663 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -1,8 +1,20 @@ - - + + + + + + + + + + src test + + + diff --git a/src/AuthorizationInterface.php b/src/AuthorizationInterface.php index 7b4fba2..867da6a 100644 --- a/src/AuthorizationInterface.php +++ b/src/AuthorizationInterface.php @@ -11,5 +11,5 @@ interface AuthorizationInterface /** * Check if a role is granted for the request */ - public function isGranted(string $role, ServerRequestInterface $request) : bool; + public function isGranted(string $role, ServerRequestInterface $request): bool; } diff --git a/src/AuthorizationMiddleware.php b/src/AuthorizationMiddleware.php index 99caa1f..b58551b 100644 --- a/src/AuthorizationMiddleware.php +++ b/src/AuthorizationMiddleware.php @@ -12,14 +12,10 @@ class AuthorizationMiddleware implements MiddlewareInterface { - /** - * @var AuthorizationInterface - */ + /** @var AuthorizationInterface */ private $authorization; - /** - * @var callable - */ + /** @var callable */ private $responseFactory; public function __construct(AuthorizationInterface $authorization, callable $responseFactory) @@ -27,7 +23,7 @@ public function __construct(AuthorizationInterface $authorization, callable $res $this->authorization = $authorization; // Ensures type safety of the composed factory - $this->responseFactory = function () use ($responseFactory) : ResponseInterface { + $this->responseFactory = function () use ($responseFactory): ResponseInterface { return $responseFactory(); }; } @@ -35,7 +31,7 @@ public function __construct(AuthorizationInterface $authorization, callable $res /** * {@inheritDoc} */ - public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface + public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface { $user = $request->getAttribute(UserInterface::class, false); if (! $user instanceof UserInterface) { diff --git a/src/AuthorizationMiddlewareFactory.php b/src/AuthorizationMiddlewareFactory.php index 5fb4f89..b0fc4d1 100644 --- a/src/AuthorizationMiddlewareFactory.php +++ b/src/AuthorizationMiddlewareFactory.php @@ -11,9 +11,10 @@ class AuthorizationMiddlewareFactory { - public function __invoke(ContainerInterface $container) : AuthorizationMiddleware + public function __invoke(ContainerInterface $container): AuthorizationMiddleware { - if (! $container->has(AuthorizationInterface::class) + if ( + ! $container->has(AuthorizationInterface::class) && ! $container->has(\Zend\Expressive\Authorization\AuthorizationInterface::class) ) { throw new Exception\InvalidConfigException(sprintf( diff --git a/src/ConfigProvider.php b/src/ConfigProvider.php index 6606126..fbee564 100644 --- a/src/ConfigProvider.php +++ b/src/ConfigProvider.php @@ -9,7 +9,7 @@ class ConfigProvider /** * Return the configuration array. */ - public function __invoke() : array + public function __invoke(): array { return [ 'dependencies' => $this->getDependencies(), @@ -20,7 +20,7 @@ public function __invoke() : array /** * Returns the configuration for the AuthorizationInterface adapter */ - public function getAuthorizationConfig() : array + public function getAuthorizationConfig(): array { return [ /** @@ -59,10 +59,10 @@ public function getAuthorizationConfig() : array /** * Returns the container dependencies */ - public function getDependencies() : array + public function getDependencies(): array { return [ - 'aliases' => [ + 'aliases' => [ // Provide an alias for the AuthorizationInterface based on the adapter you are using. // AuthorizationInterface::class => LaminasAcl::class, // AuthorizationInterface::class => LaminasRbac::class, diff --git a/test/AuthorizationMiddlewareFactoryTest.php b/test/AuthorizationMiddlewareFactoryTest.php index 6651585..5be7220 100644 --- a/test/AuthorizationMiddlewareFactoryTest.php +++ b/test/AuthorizationMiddlewareFactoryTest.php @@ -37,11 +37,11 @@ class AuthorizationMiddlewareFactoryTest extends TestCase protected function setUp(): void { - $this->container = $this->prophesize(ContainerInterface::class); - $this->factory = new AuthorizationMiddlewareFactory(); - $this->authorization = $this->prophesize(AuthorizationInterface::class); + $this->container = $this->prophesize(ContainerInterface::class); + $this->factory = new AuthorizationMiddlewareFactory(); + $this->authorization = $this->prophesize(AuthorizationInterface::class); $this->responsePrototype = $this->prophesize(ResponseInterface::class); - $this->responseFactory = function () { + $this->responseFactory = function () { return $this->responsePrototype->reveal(); }; @@ -75,7 +75,7 @@ public function testFactory() public static function assertResponseFactoryReturns( ResponseInterface $expected, AuthorizationMiddleware $middleware - ) : void { + ): void { $r = new ReflectionProperty($middleware, 'responseFactory'); $r->setAccessible(true); $responseFactory = $r->getValue($middleware); diff --git a/test/AuthorizationMiddlewareTest.php b/test/AuthorizationMiddlewareTest.php index 07fa026..e89d3c3 100644 --- a/test/AuthorizationMiddlewareTest.php +++ b/test/AuthorizationMiddlewareTest.php @@ -37,11 +37,11 @@ class AuthorizationMiddlewareTest extends TestCase protected function setUp(): void { - $this->authorization = $this->prophesize(AuthorizationInterface::class); - $this->request = $this->prophesize(ServerRequestInterface::class); - $this->handler = $this->prophesize(RequestHandlerInterface::class); + $this->authorization = $this->prophesize(AuthorizationInterface::class); + $this->request = $this->prophesize(ServerRequestInterface::class); + $this->handler = $this->prophesize(RequestHandlerInterface::class); $this->responsePrototype = $this->prophesize(ResponseInterface::class); - $this->responseFactory = function () { + $this->responseFactory = function () { return $this->responsePrototype->reveal(); }; } @@ -120,7 +120,7 @@ public function testProcessRoleGranted() $this->assertSame($this->responsePrototype->reveal(), $response); } - private function generateUser(string $identity, array $roles = []) : DefaultUser + private function generateUser(string $identity, array $roles = []): DefaultUser { return new DefaultUser($identity, $roles); } diff --git a/test/ConfigProviderTest.php b/test/ConfigProviderTest.php index 252d980..dbbd0e7 100644 --- a/test/ConfigProviderTest.php +++ b/test/ConfigProviderTest.php @@ -20,7 +20,7 @@ protected function setUp(): void public function testProviderDefinesExpectedFactoryServices() { - $config = $this->provider->getDependencies(); + $config = $this->provider->getDependencies(); $factories = $config['factories']; $this->assertArrayHasKey(AuthorizationMiddleware::class, $factories); diff --git a/test/ExceptionTest.php b/test/ExceptionTest.php index 16fa64f..298eb2a 100644 --- a/test/ExceptionTest.php +++ b/test/ExceptionTest.php @@ -16,7 +16,7 @@ class ExceptionTest extends TestCase { - public function exception() : Generator + public function exception(): Generator { $namespace = substr(ExceptionInterface::class, 0, strrpos(ExceptionInterface::class, '\\') + 1); @@ -31,7 +31,7 @@ public function exception() : Generator /** * @dataProvider exception */ - public function testExceptionIsInstanceOfExceptionInterface(string $exception) : void + public function testExceptionIsInstanceOfExceptionInterface(string $exception): void { self::assertStringContainsString('Exception', $exception); self::assertTrue(is_a($exception, ExceptionInterface::class, true));