Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
18 | 3 | public function run(array $args) |
|
19 | { |
||
20 | 3 | $this->expectFunction($args); |
|
21 | 2 | $library = new DocLibrary(); |
|
22 | 2 | $library->index(); |
|
23 | 2 | if (!isset($library->library()[$args[0]->value()])) { |
|
24 | 1 | throw new ArgumentException('"help": Function "' . $args[0]->value() . '" not found.'); |
|
25 | } |
||
26 | 1 | $doc = $library->library()[$args[0]->value()]; |
|
27 | 1 | return self::formatHelpText($doc); |
|
28 | } |
||
29 | |||
51 |