| 1 | <?php |
||
| 20 | trait SpecificationTrait |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * @param string $method |
||
| 24 | * @param array $arguments |
||
| 25 | * |
||
| 26 | * @throws \BadMethodCallException |
||
| 27 | */ |
||
| 28 | public function __call($method, array $arguments) |
||
| 36 | |||
| 37 | /** |
||
| 38 | * {@inheritdoc} |
||
| 39 | */ |
||
| 40 | public function andX(SpecificationInterface $specification) |
||
| 44 | |||
| 45 | /** |
||
| 46 | * {@inheritdoc} |
||
| 47 | */ |
||
| 48 | public function orX(SpecificationInterface $specification) |
||
| 52 | |||
| 53 | /** |
||
| 54 | * {@inheritdoc} |
||
| 55 | */ |
||
| 56 | public function not() |
||
| 60 | |||
| 61 | /** |
||
| 62 | * {@inheritdoc} |
||
| 63 | */ |
||
| 64 | public function accept(VisitorInterface $visitor) |
||
| 72 | } |
||
| 73 |
If you implement
__calland you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.This is often the case, when
__callis implemented by a parent class and only the child class knows which methods exist: