1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | namespace Zwarthoorn\Ping\Entity; |
||
6 | |||
7 | |||
8 | class Url |
||
9 | { |
||
10 | private $url; |
||
11 | |||
12 | /** |
||
13 | * @return mixed |
||
14 | */ |
||
15 | public function getUrl() :array |
||
16 | { |
||
17 | return $this->url; |
||
18 | } |
||
19 | |||
20 | /** |
||
21 | * @param mixed $url |
||
22 | * @return url |
||
23 | */ |
||
24 | public function addUrl($url): self |
||
25 | { |
||
26 | $this->url[] = $url; |
||
27 | return $this; |
||
28 | } |
||
29 | |||
30 | public function removeUrl($result): self |
||
31 | { |
||
32 | unset($this->url[array_search($result, $this->url,[FALSE])]); |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
33 | |||
34 | return $this; |
||
35 | } |
||
36 | } |