Conditions | 3 |
Paths | 3 |
Total Lines | 7 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
48 | 5 | public function validateCommand($command, $commands) |
|
49 | { |
||
50 | 5 | if (!isset($command['name'])) { |
|
51 | 1 | throw new InvalidArgumentDescriptionException("Command description must contain a name"); |
|
52 | } |
||
53 | 5 | if (isset($commands[$command['name']])) { |
|
54 | 1 | throw new CommandExistsException("Command ${command['name']} already exists."); |
|
55 | } |
||
57 | } |