Total Complexity | 4 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
10 | final class Transformation implements WordInflector |
||
11 | { |
||
12 | /** @var Pattern */ |
||
13 | private $pattern; |
||
14 | |||
15 | /** @var string */ |
||
16 | private $replacement; |
||
17 | |||
18 | 764 | public function __construct(Pattern $pattern, string $replacement) |
|
19 | { |
||
20 | 764 | $this->pattern = $pattern; |
|
21 | 764 | $this->replacement = $replacement; |
|
22 | 764 | } |
|
23 | |||
24 | 343 | public function getPattern() : Pattern |
|
27 | } |
||
28 | |||
29 | 1 | public function getReplacement() : string |
|
32 | } |
||
33 | |||
34 | 341 | public function inflect(string $word) : string |
|
37 | } |
||
38 | } |
||
39 |