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