Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2.108 |
Changes | 0 |
1 | <?php |
||
24 | 86 | public function add($name, $callback) |
|
25 | { |
||
26 | 86 | if ($this->exists($name)) { |
|
27 | 2 | throw new LogicException( |
|
28 | 2 | 'The template function name "' . $name . '" is already registered.' |
|
29 | 2 | ); |
|
30 | } |
||
31 | |||
32 | 86 | $this->functions[$name] = new Func($name, $callback); |
|
33 | |||
34 | 86 | return $this; |
|
35 | } |
||
36 | |||
79 |