Conditions | 3 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | 4 | public function __construct(string $className, string $methodName) |
|
16 | { |
||
17 | // If the method does not actually exist, we'll also check if __call exists (mainly for |
||
18 | // legacy purposes). That said, we won't rewrite the method name to __call because our |
||
19 | // static analysis checker might still be able to infer data from the original method name. |
||
20 | 4 | if (! method_exists($className, $methodName) && ! method_exists($className, '__call')) { |
|
21 | 1 | throw MethodDoesNotExist::on($className, $methodName); |
|
22 | } |
||
23 | |||
24 | 3 | $this->className = $className; |
|
25 | 3 | $this->methodName = $methodName; |
|
26 | 3 | } |
|
38 |