| Total Complexity | 5 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | class Sources |
||
| 12 | { |
||
| 13 | protected string $address = ''; |
||
| 14 | protected string $path = ''; |
||
| 15 | |||
| 16 | 3 | public function __toString() |
|
| 17 | { |
||
| 18 | 3 | return $this->getAddress(); |
|
| 19 | } |
||
| 20 | |||
| 21 | 9 | public function setAddress(string $address): void |
|
| 22 | { |
||
| 23 | // address which begins on two and more slashes might can be understand as relative one with FQDN |
||
| 24 | 9 | $this->address = strval(preg_replace('#^(//+)#', '/', $address)); |
|
| 25 | 9 | } |
|
| 26 | |||
| 27 | 9 | public function getAddress(): string |
|
| 28 | { |
||
| 29 | 9 | return $this->address; |
|
| 30 | } |
||
| 31 | |||
| 32 | 7 | public function setPath(string $path): void |
|
| 35 | 7 | } |
|
| 36 | |||
| 37 | 1 | public function getPath(): string |
|
| 40 | } |
||
| 41 | } |
||
| 42 |