1 | <?php |
||
13 | class MergeSuffix extends AbstractPass |
||
14 | { |
||
15 | /** |
||
16 | * {@inheritdoc} |
||
17 | */ |
||
18 | 8 | protected function canRun(array $strings) |
|
22 | |||
23 | /** |
||
24 | * {@inheritdoc} |
||
25 | */ |
||
26 | 5 | protected function runPass(array $strings) |
|
38 | |||
39 | /** |
||
40 | * Test whether all given strings have the same last element |
||
41 | * |
||
42 | * @param array[] $strings |
||
43 | * @return bool |
||
44 | */ |
||
45 | 7 | protected function hasMatchingSuffix(array $strings) |
|
58 | |||
59 | /** |
||
60 | * Remove the last element of every string |
||
61 | * |
||
62 | * @param array[] $strings Original strings |
||
63 | * @return array[] Processed strings |
||
64 | */ |
||
65 | 5 | protected function pop(array $strings) |
|
83 | } |