| Total Complexity | 6 |
| Total Lines | 53 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | trait SEndpoints |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * @var Endpoint[] |
||
| 18 | */ |
||
| 19 | private $endpoints = []; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @return Endpoint |
||
| 23 | */ |
||
| 24 | public function endpoint() : Endpoint |
||
| 30 | } |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @return Endpoint|null |
||
| 35 | */ |
||
| 36 | public function getEndpoint() : ?Endpoint |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @return Endpoint[] |
||
| 43 | */ |
||
| 44 | public function getEndpoints() : array |
||
| 45 | { |
||
| 46 | return $this->endpoints; |
||
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @param Endpoint ...$eps |
||
| 51 | * @return self |
||
| 52 | */ |
||
| 53 | public function addEndpoint(Endpoint ...$eps) : self |
||
| 57 | } |
||
| 58 | |||
| 59 | /** |
||
| 60 | * @param Endpoint ...$eps |
||
| 61 | * @return self |
||
| 62 | */ |
||
| 63 | public function setEndpoints(Endpoint ...$eps) : self |
||
| 69 |