| Total Complexity | 11 |
| Total Lines | 82 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 17 | class Url extends Dsn |
||
| 18 | { |
||
| 19 | use UserPasswordTrait; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var string |
||
| 23 | */ |
||
| 24 | private $host; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var int|null |
||
| 28 | */ |
||
| 29 | private $port; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @var string|null |
||
| 33 | */ |
||
| 34 | private $path; |
||
| 35 | |||
| 36 | public function __construct(?string $scheme, string $host, ?int $port = null, ?string $path = null, array $parameters = [], array $authentication = []) |
||
| 43 | } |
||
| 44 | |||
| 45 | public function getHost(): string |
||
| 48 | } |
||
| 49 | |||
| 50 | public function withHost(string $host): self |
||
| 51 | { |
||
| 52 | $new = clone $this; |
||
| 53 | $new->host = $host; |
||
| 54 | |||
| 55 | return $new; |
||
| 56 | } |
||
| 57 | |||
| 58 | public function getPort(): ?int |
||
| 59 | { |
||
| 60 | return $this->port; |
||
| 61 | } |
||
| 62 | |||
| 63 | public function withPort(?int $port): self |
||
| 64 | { |
||
| 65 | $new = clone $this; |
||
| 66 | $new->port = $port; |
||
| 67 | |||
| 68 | return $new; |
||
| 69 | } |
||
| 70 | |||
| 71 | public function getPath(): ?string |
||
| 72 | { |
||
| 73 | return $this->path; |
||
| 74 | } |
||
| 75 | |||
| 76 | public function withPath(?string $path): self |
||
| 77 | { |
||
| 78 | $new = clone $this; |
||
| 79 | $new->path = $path; |
||
| 80 | |||
| 81 | return $new; |
||
| 82 | } |
||
| 83 | |||
| 84 | /** |
||
| 85 | * @var string |
||
| 86 | */ |
||
| 87 | public function __toString() |
||
| 99 | } |
||
| 100 | } |
||
| 101 |