| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 26 | 2 | public function resolve($name) |
|
| 27 | { |
||
| 28 | // attempt to find a specific command |
||
| 29 | 2 | $className = 'Graze\\Dynamark3Client\\Command\\Command' . ucfirst($name); |
|
| 30 | 2 | if (class_exists($className)) { |
|
| 31 | 1 | return new $className(); |
|
| 32 | } |
||
| 33 | |||
| 34 | // using the generic command |
||
| 35 | 1 | return new CommandGeneric($this->camelCaseToCommand($name)); |
|
| 36 | } |
||
| 37 | |||
| 49 |