| Total Complexity | 4 |
| Total Lines | 43 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | abstract class AbstractHandler { |
||
| 14 | |||
| 15 | protected string $name; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var Pipeline |
||
| 19 | */ |
||
| 20 | protected Pipeline $pipeline; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @param string $segment |
||
| 24 | * |
||
| 25 | * @return string |
||
| 26 | * |
||
| 27 | */ |
||
| 28 | public abstract function transform( string $segment ): string; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * AbstractHandler constructor. |
||
| 32 | */ |
||
| 33 | 114 | public function __construct() { |
|
| 34 | 114 | $this->name = get_class( $this ); |
|
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @return string |
||
| 39 | */ |
||
| 40 | 12 | public function getName(): string { |
|
| 41 | 12 | return $this->name; |
|
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @param Pipeline $pipeline |
||
| 46 | */ |
||
| 47 | 113 | public function setPipeline( Pipeline $pipeline ) { |
|
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @return Pipeline |
||
| 53 | */ |
||
| 54 | 95 | public function getPipeline(): Pipeline { |
|
| 58 | } |