| Total Complexity | 6 |
| Total Lines | 83 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | class Mirror |
||
| 22 | { |
||
| 23 | /** |
||
| 24 | * @var string |
||
| 25 | */ |
||
| 26 | protected $master; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @var array |
||
| 30 | */ |
||
| 31 | protected $slaves; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @var CircularArray |
||
| 35 | */ |
||
| 36 | protected $all; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @var array |
||
| 40 | */ |
||
| 41 | protected $data; |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @param string $master |
||
| 45 | * @param array $slaves |
||
| 46 | */ |
||
| 47 | public function __construct(string $master, array $slaves) |
||
| 53 | } |
||
| 54 | |||
| 55 | /** |
||
| 56 | * @return string |
||
| 57 | */ |
||
| 58 | public function getMaster():string |
||
| 61 | } |
||
| 62 | |||
| 63 | /** |
||
| 64 | * Get all mirrors. |
||
| 65 | * |
||
| 66 | * @return CircularArray |
||
| 67 | */ |
||
| 68 | public function getAll():CircularArray |
||
| 69 | { |
||
| 70 | return $this->all; |
||
| 71 | } |
||
| 72 | |||
| 73 | /** |
||
| 74 | * Get next item. |
||
| 75 | * |
||
| 76 | * @return string |
||
| 77 | */ |
||
| 78 | public function getNext():string |
||
| 83 | } |
||
| 84 | |||
| 85 | /** |
||
| 86 | * @param string $value |
||
| 87 | * |
||
| 88 | * @return CircularArray |
||
| 89 | */ |
||
| 90 | public function remove(string $value):CircularArray |
||
| 96 | } |
||
| 97 | |||
| 98 | /** |
||
| 99 | * @return array |
||
| 100 | */ |
||
| 101 | public function toArray():array |
||
| 106 |