| Total Complexity | 3 |
| Total Lines | 16 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class CustomMethods |
||
| 10 | { |
||
| 11 | /** @psalm-var array<non-empty-string, callable> */ |
||
| 12 | protected array $methods = []; |
||
| 13 | |||
| 14 | /** @psalm-param non-empty-string $name */ |
||
| 15 | 2 | public function add(string $name, callable $callable): void |
|
| 16 | { |
||
| 17 | 2 | $this->methods[$name] = $callable; |
|
| 18 | } |
||
| 19 | |||
| 20 | 3 | public function get(string $name): callable |
|
| 25 | } |
||
| 26 | } |
||
| 27 |