| Total Complexity | 5 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | final class Node implements \JsonSerializable |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Kubernetes node name |
||
| 11 | * |
||
| 12 | * @var string|null |
||
| 13 | */ |
||
| 14 | private $name; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @param string|null $name |
||
| 18 | */ |
||
| 19 | 17 | public function __construct($name = null) |
|
| 20 | { |
||
| 21 | 17 | $this->name = $name; |
|
| 22 | 17 | } |
|
| 23 | |||
| 24 | /** |
||
| 25 | * @return string|null |
||
| 26 | */ |
||
| 27 | 1 | public function name() |
|
| 28 | { |
||
| 29 | 1 | return $this->name; |
|
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @return Node |
||
| 34 | */ |
||
| 35 | 14 | public static function discover() |
|
| 39 | 14 | ); |
|
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @return array |
||
| 44 | */ |
||
| 45 | 1 | public function jsonSerialize() |
|
| 49 | 1 | ]; |
|
| 50 | } |
||
| 52 |