@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | public function addCommand(IChatCommand $command): void { |
| 23 | 23 | $name = $command->getName(); |
| 24 | 24 | if($this->hasCommand($name)) { |
| 25 | - throw new CommandNameAlreadyUsedException("Command $name is already defined."); |
|
| 25 | + throw new CommandNameAlreadyUsedException("command $name is already defined."); |
|
| 26 | 26 | } |
| 27 | 27 | $this->commands[] = $command; |
| 28 | 28 | } |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | return $command; |
| 104 | 104 | } |
| 105 | 105 | } |
| 106 | - throw new CommandNotFoundException("Command $name is not defined."); |
|
| 106 | + throw new CommandNotFoundException("command $name is not defined."); |
|
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | public function parse(string $text): ?string { |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | try { |
| 53 | 53 | $rm = new \ReflectionMethod($interface, "create"); |
| 54 | 54 | } catch(\ReflectionException $e) { |
| 55 | - throw new InvalidChatControlFactoryException("Interface $interface does not contain method create.", 0, $e); |
|
| 55 | + throw new InvalidChatControlFactoryException("interface $interface does not contain method create.", 0, $e); |
|
| 56 | 56 | } |
| 57 | 57 | $returnType = $rm->getReturnType(); |
| 58 | 58 | if($returnType === null || !is_subclass_of($returnType->getName(), ChatControl::class)) { |
@@ -146,7 +146,7 @@ |
||
| 146 | 146 | try { |
| 147 | 147 | /** @var ServiceDefinition $processor */ |
| 148 | 148 | $processor = $builder->getDefinition($this->prefix(self::SERVICE_CHAT_COMMANDS_PROCESSOR)); |
| 149 | - } catch(MissingServiceException ) { |
|
| 149 | + } catch(MissingServiceException) { |
|
| 150 | 150 | return; |
| 151 | 151 | } |
| 152 | 152 | $chatCommands = $builder->findByType(IChatCommand::class); |
@@ -2,8 +2,8 @@ |
||
| 2 | 2 | declare(strict_types=1); |
| 3 | 3 | |
| 4 | 4 | require __DIR__ . "/../vendor/autoload.php"; |
| 5 | -Testbench\Bootstrap::setup(__DIR__ . '/_temp', function (\Nette\Bootstrap\Configurator $configurator): void { |
|
| 6 | - $configurator->addStaticParameters(["appDir" => __DIR__,]); |
|
| 5 | +Testbench\Bootstrap::setup(__DIR__ . '/_temp', function(\Nette\Bootstrap\Configurator $configurator): void { |
|
| 6 | + $configurator->addStaticParameters(["appDir" => __DIR__, ]); |
|
| 7 | 7 | $configurator->addConfig(__DIR__ . "/tests.neon"); |
| 8 | 8 | }); |
| 9 | 9 | ?> |
| 10 | 10 | \ No newline at end of file |