| Conditions | 3 |
| Paths | 4 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php namespace Tarsana\Command\Console; |
||
| 38 | public function transform(string $text) : string |
||
| 39 | { |
||
| 40 | foreach ($this->aliases as $name => $value) { |
||
| 41 | $text = str_replace($name, $value, $text); |
||
| 42 | } |
||
| 43 | |||
| 44 | foreach (self::CONTROLS as $name => $value) { |
||
| 45 | $text = preg_replace("/<{$name}(:([^>]*))?>/", self::CSI . $value, $text); |
||
| 46 | } |
||
| 47 | |||
| 48 | return $text; |
||
| 49 | } |
||
| 50 | } |
||
| 51 |