File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 11<?php
2+
23declare (strict_types=1 );
34
45namespace Arkitect \PHPUnit ;
1011use Arkitect \CLI \Progress \VoidProgress ;
1112use Arkitect \CLI \Runner ;
1213use Arkitect \CLI \TargetPhpVersion ;
13- use Arkitect \Rules \ArchRule ;
1414use Arkitect \Rules \ParsingErrors ;
1515use Arkitect \Rules \Violations ;
1616use PHPUnit \Framework \Constraint \Constraint ;
1717
18+ /**
19+ * @psalm-suppress UndefinedClass
20+ *
21+ * Since we declared phpunit as a dev dependency we cannot be sure the class PHPUnit\Framework\Constraint\Constraint
22+ * will be available at runtime. Given arkitect will be used in a development environment, we can ignore this but it
23+ * would be nice to have a way to check if the class is available at runtime.
24+ */
1825class ArchRuleCheckerConstraintAdapter extends Constraint
1926{
2027 /** @var ClassSet */
@@ -47,8 +54,10 @@ public function toString(): string
4754 return 'satisfies all architectural constraints ' ;
4855 }
4956
50- protected function matches (/** @var $rule ArchRule */ $ other ): bool
51- {
57+ protected function matches (
58+ /** @var $rule ArchRule */
59+ $ other
60+ ): bool {
5261 $ this ->runner ->check (
5362 ClassSetRules::create ($ this ->classSet , $ other ),
5463 new VoidProgress (),
You can’t perform that action at this time.
0 commit comments