Passed
Branch master (dcbc70)
by Jakub
03:12
created
tests/HeroesofAbenez/Chat/DI/IFakeFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace HeroesofAbenez\Chat\DI;
5 5
 
Please login to merge, or discard this patch.
tests/HeroesofAbenez/Chat/Test2Command.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace HeroesofAbenez\Chat;
5 5
 
Please login to merge, or discard this patch.
tests/HeroesofAbenez/Chat/FakeDatabaseAdapter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace HeroesofAbenez\Chat;
5 5
 
Please login to merge, or discard this patch.
tests/HeroesofAbenez/Chat/TestCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace HeroesofAbenez\Chat;
5 5
 
Please login to merge, or discard this patch.
tests/HeroesofAbenez/Chat/IExampleChatControlFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace HeroesofAbenez\Chat;
5 5
 
Please login to merge, or discard this patch.
tests/HeroesofAbenez/Chat/ExampleChatControl.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace HeroesofAbenez\Chat;
5 5
 
Please login to merge, or discard this patch.
tests/bootstrap.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
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/DI/ChatExtension.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace HeroesofAbenez\Chat\DI;
5 5
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     try {
41 41
       $rc = new \ReflectionClass($interface);
42 42
     } catch(\ReflectionException $e) {
43
-      throw new InvalidChatControlFactoryException("Interface $interface not found.", 0, $e);
43
+      throw new InvalidChatControlFactoryException("interface $interface not found.", 0, $e);
44 44
     }
45 45
     if(!$rc->isInterface()) {
46 46
       throw new InvalidChatControlFactoryException("$interface is not an interface.");
@@ -48,10 +48,10 @@  discard block
 block discarded – undo
48 48
     try {
49 49
       $rm = new \ReflectionMethod($interface, "create");
50 50
     } catch(\ReflectionException $e) {
51
-      throw new InvalidChatControlFactoryException("Interface $interface does not contain method create.", 0, $e);
51
+      throw new InvalidChatControlFactoryException("interface $interface does not contain method create.", 0, $e);
52 52
     }
53 53
     $returnType = $rm->getReturnType();
54
-    if(is_null($returnType) OR !is_subclass_of($returnType->getName(), ChatControl::class)) {
54
+    if(is_null($returnType) or !is_subclass_of($returnType->getName(), ChatControl::class)) {
55 55
       throw new InvalidChatControlFactoryException("Return type of $interface::create() is not a subtype of " . ChatControl::class . ".");
56 56
     }
57 57
   }
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     $config = $this->getConfig($this->defaults);
81 81
     Validators::assertField($config, "messageProcessors", "array");
82 82
     foreach($config["messageProcessors"] as $name => $processor) {
83
-      if(!class_exists($processor) OR !is_subclass_of($processor, IChatMessageProcessor::class)) {
83
+      if(!class_exists($processor) or !is_subclass_of($processor, IChatMessageProcessor::class)) {
84 84
         throw new InvalidMessageProcessorException("Invalid message processor $processor.");
85 85
       }
86 86
       $messageProcessors[$name] = $processor;
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
     $config = $this->getConfig($this->defaults);
97 97
     Validators::assertField($config, "databaseAdapter", "string");
98 98
     $adapter = $config["databaseAdapter"];
99
-    if(!class_exists($adapter) OR !is_subclass_of($adapter, IDatabaseAdapter::class)) {
99
+    if(!class_exists($adapter) or !is_subclass_of($adapter, IDatabaseAdapter::class)) {
100 100
       throw new InvalidDatabaseAdapterException("Invalid database adapter $adapter.");
101 101
     }
102 102
     return $adapter;
Please login to merge, or discard this patch.
src/IChatMessageProcessor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace HeroesofAbenez\Chat;
5 5
 
Please login to merge, or discard this patch.