| Total Complexity | 4 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | class CommandRegistry |
||
| 17 | { |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var DeviceInterface |
||
| 21 | */ |
||
| 22 | protected $device; |
||
| 23 | /** |
||
| 24 | * @var array |
||
| 25 | */ |
||
| 26 | protected $commandsRegistry = []; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * CommandRegistry constructor. |
||
| 30 | * @param DeviceInterface $device |
||
| 31 | */ |
||
| 32 | public function __construct(DeviceInterface $device) |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @param CommandInterface $command |
||
| 39 | * @param string $name |
||
| 40 | */ |
||
| 41 | public function setCommand(CommandInterface $command, string $name): void |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @param string $name |
||
| 48 | */ |
||
| 49 | public function executeCommand(string $name): void |
||
| 56 |