### Functions   A last analyzed 2017-11-29 19:24 UTC

#### Coupling/Cohesion

 Components 1 Dependencies 1

#### Complexity

 Total Complexity 7

#### Size/Duplication

 Total Lines 69 Duplicated Lines 0 %

#### Test Coverage

 Coverage 64.52%

#### Importance

 Changes 0
Metric Value
wmc 7
c 0
b 0
f 0
lcom 1
cbo 1
dl 0
loc 69
ccs 20
cts 31
cp 0.6452
rs 10

#### 4 Methods

Rating   Name   Duplication   Size   Complexity
 1 `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 37 ` /**` 38 ` * Remove a template function.` 39 ` * @param string \$name;` 40 ` * @return Functions` 41 ` */` 42 8 ` public function remove(\$name)` 43 ` {` 44 8 ` if (!\$this->exists(\$name)) {` 45 4 ` throw new LogicException(` 46 4 ` 'The template function "' . \$name . '" was not found.'` 47 4 ` );` 48 ` }` 49 50 4 ` unset(\$this->functions[\$name]);` 51 52 4 ` return \$this;` 53 ` }` 54 55 ` /**` 56 ` * Get a template function.` 57 ` * @param string \$name` 58 ` * @return Func` 59 ` */` 60 14 ` public function get(\$name)` 61 ` {` 62 14 ` if (!\$this->exists(\$name)) {` 63 4 ` throw new LogicException('The template function "' . \$name . '" was not found.');` 64 ` }` 65 66 10 ` return \$this->functions[\$name];` 67 ` }` 68 69 ` /**` 70 ` * Check if a template function exists.` 71 ` * @param string \$name` 72 ` * @return boolean` 73 ` */` 74 96 ` public function exists(\$name)` 75 ` {` 76 96 ` return isset(\$this->functions[\$name]);` 77 ` }` 78 `}` 79