| Conditions | 1 |
| Paths | 1 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 15 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | 4 | public function __construct(array $punctuation = ['.', ',', ':', ';']) |
|
| 23 | { |
||
| 24 | 4 | $this->punctuation = $punctuation; |
|
| 25 | |||
| 26 | 4 | $this->regex = sprintf( |
|
| 27 | 4 | '/[%s+]/', |
|
| 28 | 4 | implode( |
|
| 29 | 4 | '', |
|
| 30 | 4 | array_map( |
|
| 31 | 4 | function ($value) { |
|
| 32 | 4 | return preg_quote($value, '/'); |
|
| 33 | 4 | }, |
|
| 34 | 4 | $this->punctuation |
|
| 35 | 4 | ) |
|
| 36 | 4 | ) |
|
| 37 | 4 | ); |
|
| 38 | 4 | } |
|
| 39 | |||
| 78 |