| Conditions | 1 |
| Paths | 1 |
| Total Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | public function it_can_be_call_with_any_method() |
||
| 18 | { |
||
| 19 | $subject = new NullDriver(); |
||
| 20 | |||
| 21 | $this->assertNull($subject->whatever()); |
||
|
|
|||
| 22 | $this->assertNull($subject->subscription()); |
||
| 23 | $this->assertNull($subject->addTags('[email protected]', ['tags'])); |
||
| 24 | } |
||
| 25 | |||
| 43 |
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: