| Total Complexity | 4 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | final class Transformation |
||
| 10 | { |
||
| 11 | /** @var Pattern */ |
||
| 12 | private $pattern; |
||
| 13 | |||
| 14 | /** @var string */ |
||
| 15 | private $replacement; |
||
| 16 | |||
| 17 | 530 | public function __construct(Pattern $pattern, string $replacement) |
|
| 18 | { |
||
| 19 | 530 | $this->pattern = $pattern; |
|
| 20 | 530 | $this->replacement = $replacement; |
|
| 21 | 530 | } |
|
| 22 | |||
| 23 | 180 | public function getPattern() : Pattern |
|
| 24 | { |
||
| 25 | 180 | return $this->pattern; |
|
| 26 | } |
||
| 27 | |||
| 28 | 1 | public function getReplacement() : string |
|
| 29 | { |
||
| 30 | 1 | return $this->replacement; |
|
| 31 | } |
||
| 32 | |||
| 33 | 177 | public function replace(string $word) : string |
|
| 36 | } |
||
| 37 | } |
||
| 38 |