1 | <?php |
||
21 | class OrPointcut extends AndPointcut |
||
22 | { |
||
23 | |||
24 | /** |
||
25 | * "Or" pointcut constructor |
||
26 | */ |
||
27 | 2 | public function __construct(Pointcut $first, Pointcut $second) |
|
35 | |||
36 | /** |
||
37 | * Performs matching of point of code |
||
38 | * |
||
39 | * @param mixed $point Specific part of code, can be any Reflection class |
||
40 | * @param null|mixed $context Related context, can be class or namespace |
||
41 | * @param null|string|object $instance Invocation instance or string for static calls |
||
42 | * @param null|array $arguments Dynamic arguments for method |
||
43 | */ |
||
44 | public function matches($point, $context = null, $instance = null, array $arguments = null): bool |
||
49 | |||
50 | /** |
||
51 | * @inheritDoc |
||
52 | */ |
||
53 | protected function matchPart(Pointcut $pointcut, $point, $context = null, $instance = null, array $arguments = null) |
||
67 | } |
||
68 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.