| @@ 46-55 (lines=10) @@ | ||
| 43 | * |
|
| 44 | * @return string[] |
|
| 45 | */ |
|
| 46 | public function wrap(array $input) |
|
| 47 | { |
|
| 48 | $out = []; |
|
| 49 | foreach ($input as $line) { |
|
| 50 | foreach ($this->chunk($line) as $new) { |
|
| 51 | $out[] = $new; |
|
| 52 | } |
|
| 53 | } |
|
| 54 | return $out; |
|
| 55 | } |
|
| 56 | ||
| 57 | /** |
|
| 58 | * @param string[] $input |
|
| @@ 62-70 (lines=9) @@ | ||
| 59 | * |
|
| 60 | * @return string[] |
|
| 61 | */ |
|
| 62 | public function trim(array $input) |
|
| 63 | { |
|
| 64 | $out = []; |
|
| 65 | foreach ($input as $line) { |
|
| 66 | $chunk = $this->chunk($line); |
|
| 67 | $out[] = reset($chunk); |
|
| 68 | } |
|
| 69 | return $out; |
|
| 70 | } |
|
| 71 | ||
| 72 | /** |
|
| 73 | * @param string $line |
|