Passed
Push — master ( 152012...15afa8 )
by Jakub
01:52
created
tests/bootstrap.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 declare(strict_types=1);
3 3
 
4 4
 require __DIR__ . "/../vendor/autoload.php";
5
-Testbench\Bootstrap::setup(__DIR__ . '/_temp', function (\Nette\Configurator $configurator) {
6
-  $configurator->addParameters(["appDir" => __DIR__,]);
5
+Testbench\Bootstrap::setup(__DIR__ . '/_temp', function(\Nette\Configurator $configurator) {
6
+  $configurator->addParameters(["appDir" => __DIR__, ]);
7 7
   $configurator->addConfig(__DIR__ . "/tests.neon");
8 8
 });
9 9
 ?>
10 10
\ No newline at end of file
Please login to merge, or discard this patch.
src/ChatCommandsProcessor.php 1 patch
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
   public function addCommand(IChatCommand $command): void {
25 25
     $name = $command->getName();
26 26
     if($this->hasCommand($name)) {
27
-      throw new CommandNameAlreadyUsedException("Command $name is already defined.");
27
+      throw new CommandNameAlreadyUsedException("command $name is already defined.");
28 28
     }
29 29
     $this->commands[] = $command;
30 30
   }
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
    * Extract parameters from text
75 75
    */
76 76
   public function extractParameters(string $text): array {
77
-    if(!Strings::startsWith($text, "/") OR !Strings::contains($text, " ")) {
77
+    if(!Strings::startsWith($text, "/") or !Strings::contains($text, " ")) {
78 78
       return [];
79 79
     }
80 80
     $params = explode(" ", $text);
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
         return $command;
106 106
       }
107 107
     }
108
-    throw new CommandNotFoundException("Command $name is not defined.");
108
+    throw new CommandNotFoundException("command $name is not defined.");
109 109
   }
110 110
 
111 111
   public function parse(string $text): ?string {
Please login to merge, or discard this patch.
src/DI/ChatExtension.php 1 patch
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,10 +50,10 @@  discard block
 block discarded – undo
50 50
     try {
51 51
       $rm = new \ReflectionMethod($interface, "create");
52 52
     } catch(\ReflectionException $e) {
53
-      throw new InvalidChatControlFactoryException("Interface $interface does not contain method create.", 0, $e);
53
+      throw new InvalidChatControlFactoryException("interface $interface does not contain method create.", 0, $e);
54 54
     }
55 55
     $returnType = $rm->getReturnType();
56
-    if(is_null($returnType) OR !is_subclass_of($returnType->getName(), ChatControl::class)) {
56
+    if(is_null($returnType) or !is_subclass_of($returnType->getName(), ChatControl::class)) {
57 57
       throw new InvalidChatControlFactoryException("Return type of $interface::create() is not a subtype of " . ChatControl::class . ".");
58 58
     }
59 59
   }
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     /** @var \stdClass $config */
87 87
     $config = $this->getConfig();
88 88
     foreach($config->messageProcessors as $name => $processor) {
89
-      if(!class_exists($processor) OR !is_subclass_of($processor, IChatMessageProcessor::class)) {
89
+      if(!class_exists($processor) or !is_subclass_of($processor, IChatMessageProcessor::class)) {
90 90
         throw new InvalidMessageProcessorException("Invalid message processor $processor.");
91 91
       }
92 92
       $messageProcessors[$name] = $processor;
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
     /** @var \stdClass $config */
102 102
     $config = $this->getConfig();
103 103
     $adapter = $config->databaseAdapter;
104
-    if(!class_exists($adapter) OR !is_subclass_of($adapter, IDatabaseAdapter::class)) {
104
+    if(!class_exists($adapter) or !is_subclass_of($adapter, IDatabaseAdapter::class)) {
105 105
       throw new InvalidDatabaseAdapterException("Invalid database adapter $adapter.");
106 106
     }
107 107
     return $adapter;
Please login to merge, or discard this patch.