| @@ 57-66 (lines=10) @@ | ||
| 54 | * |
|
| 55 | * @return string[] |
|
| 56 | */ |
|
| 57 | public function wrap(array $input) |
|
| 58 | { |
|
| 59 | $out = []; |
|
| 60 | foreach ($input as $line) { |
|
| 61 | foreach ($this->chunk($line) as $new) { |
|
| 62 | $out[] = $new; |
|
| 63 | } |
|
| 64 | } |
|
| 65 | return $out; |
|
| 66 | } |
|
| 67 | ||
| 68 | /** |
|
| 69 | * @param string[] $input |
|
| @@ 73-81 (lines=9) @@ | ||
| 70 | * |
|
| 71 | * @return string[] |
|
| 72 | */ |
|
| 73 | public function trim(array $input) |
|
| 74 | { |
|
| 75 | $out = []; |
|
| 76 | foreach ($input as $line) { |
|
| 77 | $chunk = $this->chunk($line); |
|
| 78 | $out[] = reset($chunk); |
|
| 79 | } |
|
| 80 | return $out; |
|
| 81 | } |
|
| 82 | ||
| 83 | /** |
|
| 84 | * @param string $line |
|