| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 49 | 12 | public function setIdentifier(string $identifier) : ErrorDoc |
|
| 50 | { |
||
| 51 | // Sanitize Identifier => remove space and slashes |
||
| 52 | 12 | $this->identifier = strtr( |
|
| 53 | 12 | ucwords(strtr( |
|
| 54 | 12 | $identifier, |
|
| 55 | 12 | ['_' => ' ', '/' => '-', '.' => '_ ', '\\' => '_ '] |
|
| 56 | )), |
||
| 57 | 12 | [' ' => ''] |
|
| 58 | ); |
||
| 59 | |||
| 60 | 12 | return $this; |
|
| 61 | } |
||
| 115 |