| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 41 | 90 | public function assistant(string $assistant): Assistant |
|
| 42 | { |
||
| 43 | 90 | if (! $this->isAssistedBy($assistant)) { |
|
| 44 | 1 | throw new MissingAssistant('No assistant [' . $assistant . '] present on manager ' . get_class($this)); |
|
| 45 | } |
||
| 46 | |||
| 47 | 89 | $instance = app($this->getAssistantClass($assistant)); |
|
| 48 | 89 | $instance->manager($this); |
|
|
|
|||
| 49 | |||
| 50 | 89 | return $instance; |
|
| 51 | } |
||
| 68 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.