| Total Complexity | 2 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 12 | class Desktop implements ComputerInterface |
||
| 13 | { |
||
| 14 | private array $components = []; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Sets an element |
||
| 18 | * --------------------- |
||
| 19 | * Устанавливает элемент |
||
| 20 | * |
||
| 21 | * @param array $part |
||
| 22 | */ |
||
| 23 | public function __construct(array $part) |
||
| 24 | { |
||
| 25 | $this->components = $part; |
||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Gets an element |
||
| 30 | * ---------------- |
||
| 31 | * Получает элемент |
||
| 32 | * |
||
| 33 | * @param string $part |
||
| 34 | * @return AbstractPart |
||
| 35 | */ |
||
| 36 | public function getComponent(string $part): AbstractPart |
||
| 39 | } |
||
| 40 | } |
||
| 41 |