| Total Complexity | 4 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 5 | trait Prototypeable{ |
||
| 6 | |||
| 7 | /** |
||
| 8 | * @param string $name |
||
| 9 | * @param array $args |
||
| 10 | * @return mixed |
||
| 11 | */ |
||
| 12 | public function __call(string $name, array $args) |
||
| 13 | { |
||
| 14 | return Prototypes::call($this, $name, $args); |
||
| 15 | } |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @param string $name |
||
| 19 | * @param callable $fun |
||
| 20 | * @throws Exception |
||
| 21 | */ |
||
| 22 | public static function addMethod(string $name, callable $fun): void |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param string $name |
||
| 29 | * @param array $args |
||
| 30 | * @return mixed |
||
| 31 | */ |
||
| 32 | public static function __callStatic(string $name, array $args) |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @param string $name |
||
| 39 | * @param callable $fun |
||
| 40 | * @throws Exception |
||
| 41 | */ |
||
| 42 | public static function addStaticMethod(string $name, callable $fun): void |
||
| 48 |