| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | function validate(string $value, \CharlotteDunois\Livia\Commands\Context $context, ?\CharlotteDunois\Livia\Arguments\Argument $arg = null) { |
||
| 29 | $commands = $this->client->registry->findCommands($value); |
||
| 30 | if(\count($commands) === 1) { |
||
| 31 | return true; |
||
| 32 | } |
||
| 33 | |||
| 34 | if(\count($commands) === 0) { |
||
| 35 | return false; |
||
| 36 | } |
||
| 37 | |||
| 38 | return \CharlotteDunois\Livia\Utils\DataHelpers::disambiguation($commands, 'commands', 'name').\PHP_EOL; |
||
| 39 | } |
||
| 54 |