Total Complexity | 4 |
Total Lines | 22 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | final class ExcludeInternalClass implements ClassBased |
||
15 | { |
||
16 | /** @var ClassBased */ |
||
17 | private $check; |
||
18 | |||
19 | public function __construct(ClassBased $check) |
||
20 | { |
||
21 | $this->check = $check; |
||
22 | } |
||
23 | |||
24 | public function __invoke(ReflectionClass $fromClass, ReflectionClass $toClass) : Changes |
||
25 | { |
||
26 | if ($this->isInternalDocComment($fromClass->getDocComment())) { |
||
27 | return Changes::empty(); |
||
28 | } |
||
29 | |||
30 | return $this->check->__invoke($fromClass, $toClass); |
||
31 | } |
||
32 | |||
33 | private function isInternalDocComment(string $comment) : bool |
||
36 | } |
||
37 | } |
||
38 |