File tree Expand file tree Collapse file tree 7 files changed +92
-66
lines changed Expand file tree Collapse file tree 7 files changed +92
-66
lines changed Original file line number Diff line number Diff line change 2424 <code ><![CDATA[ $service::{$handler->method}(...)]]> </code >
2525 </MixedMethodCall >
2626 </file >
27- <file src =" src/Console/DoctrineHelper.php" >
28- <ClassNotFinal >
29- <code ><![CDATA[ class DoctrineHelper]]> </code >
30- </ClassNotFinal >
31- </file >
3227 <file src =" src/Cryptography/DoctrineCipherKeyStore.php" >
3328 <ArgumentTypeCoercion >
3429 <code ><![CDATA[ base64_decode($result['crypto_iv'])]]> </code >
Original file line number Diff line number Diff line change 3737 },
3838 "require-dev" : {
3939 "ext-pdo_sqlite" : " ~8.2.0 || ~8.3.0 || ~8.4.0" ,
40- "cspray/phinal" : " dev-main#9826c3407056a4618f8bba303800403e47ccb3a7" ,
4140 "doctrine/orm" : " ^2.18.0 || ^3.0.0" ,
4241 "infection/infection" : " ^0.29.12" ,
4342 "jangregor/phpstan-prophecy" : " ^2.0" ,
4443 "league/commonmark" : " ^2.6.1" ,
4544 "patchlevel/coding-standard" : " ^1.3.0" ,
4645 "patchlevel/event-sourcing-psalm-plugin" : " ^3.1.0" ,
46+ "phpat/phpat" : " ^0.11.3" ,
4747 "phpbench/phpbench" : " ^1.4.1" ,
4848 "phpspec/prophecy-phpunit" : " ^2.3.0" ,
4949 "phpstan/phpstan" : " ^2.1.11" ,
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ includes:
22 - phpstan-baseline.neon
33 - vendor/phpstan/phpstan-phpunit/extension.neon
44 - vendor/jangregor/phpstan-prophecy/extension.neon
5+ - vendor/phpat/phpat/extension.neon
56
67parameters:
78 level: max
@@ -13,3 +14,8 @@ parameters:
1314 identifier: missingType.generics
1415 reportUnmatchedIgnoredErrors: false
1516
17+ services:
18+ -
19+ class: Patchlevel\EventSourcing\Tests\Architecture\FinalClassesTest
20+ tags:
21+ - phpat.test
Original file line number Diff line number Diff line change 1818
1919 <plugins >
2020 <pluginClass class =" Patchlevel\EventSourcingPsalmPlugin\Plugin" />
21- <pluginClass class =" Cspray\Phinal\Plugin" />
2221 </plugins >
2322</psalm >
Original file line number Diff line number Diff line change 55namespace Patchlevel \EventSourcing \Attribute ;
66
77use Attribute ;
8- use Cspray \Phinal \AllowInheritance ;
98use Patchlevel \EventSourcing \Subscription \RunMode ;
109
1110#[Attribute(Attribute::TARGET_CLASS )]
12- #[AllowInheritance('You can create specific attributes with default group and run mode ' )]
1311class Subscriber
1412{
1513 public function __construct (
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace Patchlevel \EventSourcing \Tests \Architecture ;
6+
7+ use Patchlevel \EventSourcing \Attribute \Subscriber ;
8+ use PHPat \Selector \Selector ;
9+ use PHPat \Test \Builder \Rule ;
10+ use PHPat \Test \PHPat ;
11+
12+ final class FinalClassesTest
13+ {
14+ public function testFinalClasses (): Rule
15+ {
16+ return PHPat::rule ()
17+ ->classes (
18+ Selector::AllOf (
19+ Selector::inNamespace ('Patchlevel\EventSourcing ' ),
20+ Selector::NOT (Selector::isAbstract ()),
21+ Selector::NOT (Selector::isInterface ()),
22+ Selector::NOT (Selector::classname (Subscriber::class)),
23+ ),
24+ )
25+ ->shouldBeFinal ();
26+ }
27+ }
You can’t perform that action at this time.
0 commit comments