Passed
Push — master ( 6959b9...e4cb94 )
by Jakub
13:06
created
tests/HeroesofAbenez/Chat/ChatControlTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
     public function setUp(): void
23 23
     {
24 24
         static $control = null;
25
-        if ($control === null) {
25
+        if($control === null) {
26 26
             /** @var IExampleChatControlFactory $factory */
27 27
             $factory = $this->getService(IExampleChatControlFactory::class);
28 28
             $control = $factory->create();
Please login to merge, or discard this patch.
tests/HeroesofAbenez/Chat/DI/ChatExtensionTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,11 +41,11 @@  discard block
 block discarded – undo
41 41
                 ],
42 42
             ]
43 43
         ];
44
-        Assert::exception(function () use ($config) {
44
+        Assert::exception(function() use ($config) {
45 45
             $this->refreshContainer($config);
46 46
         }, InvalidChatControlFactoryException::class);
47 47
         $config["chat"]["chats"]["abc"] = IFakeFactory::class;
48
-        Assert::exception(function () use ($config) {
48
+        Assert::exception(function() use ($config) {
49 49
             $this->refreshContainer($config);
50 50
         }, InvalidChatControlFactoryException::class);
51 51
     }
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
                 ],
60 60
             ],
61 61
         ];
62
-        Assert::exception(function () use ($config) {
62
+        Assert::exception(function() use ($config) {
63 63
             $this->refreshContainer($config);
64 64
         }, InvalidMessageProcessorException::class);
65 65
     }
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
                 "databaseAdapter" => \stdClass::class,
72 72
             ],
73 73
         ];
74
-        Assert::exception(function () use ($config) {
74
+        Assert::exception(function() use ($config) {
75 75
             $this->refreshContainer($config);
76 76
         }, InvalidDatabaseAdapterException::class);
77 77
     }
Please login to merge, or discard this patch.
tests/HeroesofAbenez/Chat/DI/IFakeFactory.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,7 +8,6 @@
 block discarded – undo
8 8
  *
9 9
  * @author Jakub Konečný
10 10
  */
11
-interface IFakeFactory
12
-{
11
+interface IFakeFactory {
13 12
     public function create(): \stdClass;
14 13
 }
Please login to merge, or discard this patch.
tests/HeroesofAbenez/Chat/IExampleChatControlFactory.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,7 +8,6 @@
 block discarded – undo
8 8
  *
9 9
  * @author Jakub Konečný
10 10
  */
11
-interface IExampleChatControlFactory
12
-{
11
+interface IExampleChatControlFactory {
13 12
     public function create(): ExampleChatControl;
14 13
 }
Please login to merge, or discard this patch.
tests/HeroesofAbenez/Chat/TestCommand.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,7 @@
 block discarded – undo
3 3
 
4 4
 namespace HeroesofAbenez\Chat;
5 5
 
6
-final class TestCommand extends BaseChatCommand
7
-{
6
+final class TestCommand extends BaseChatCommand {
8 7
     /** @var string */
9 8
     protected string $name = "test1";
10 9
 
Please login to merge, or discard this patch.
tests/HeroesofAbenez/Chat/FakeDatabaseAdapter.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
     public function getTexts(string $column, $value, int $limit): ChatMessagesCollection
19 19
     {
20 20
         $texts = new ChatMessagesCollection();
21
-        for ($i = 1; $i <= $limit; $i++) {
21
+        for($i = 1; $i <= $limit; $i++) {
22 22
             $texts[] = new ChatMessage($i, "text", "now", $this->getFakeCharacter());
23 23
         }
24 24
         return $texts;
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,7 @@
 block discarded – undo
8 8
  *
9 9
  * @author Jakub Konečný
10 10
  */
11
-final class FakeDatabaseAdapter implements DatabaseAdapter
12
-{
11
+final class FakeDatabaseAdapter implements DatabaseAdapter {
13 12
     protected function getFakeCharacter(): ChatCharacter
14 13
     {
15 14
         return new ChatCharacter(1, "fake");
Please login to merge, or discard this patch.
tests/HeroesofAbenez/Chat/ExampleChatControl.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,10 +8,8 @@
 block discarded – undo
8 8
  *
9 9
  * @author Jakub Konečný
10 10
  */
11
-final class ExampleChatControl extends ChatControl
12
-{
13
-    public function __construct(DatabaseAdapter $databaseAdapter)
14
-    {
11
+final class ExampleChatControl extends ChatControl {
12
+    public function __construct(DatabaseAdapter $databaseAdapter) {
15 13
         parent::__construct($databaseAdapter, "example", 1);
16 14
     }
17 15
 }
Please login to merge, or discard this patch.
tests/HeroesofAbenez/Chat/Test2Command.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,7 @@
 block discarded – undo
3 3
 
4 4
 namespace HeroesofAbenez\Chat;
5 5
 
6
-final class Test2Command extends BaseChatCommand
7
-{
6
+final class Test2Command extends BaseChatCommand {
8 7
     public const NAME = "test2";
9 8
 
10 9
     public function execute(): string
Please login to merge, or discard this patch.
tests/HeroesofAbenez/Chat/ChatCommandsProcessorTest.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         $model = clone $this->model;
32 32
         $model->addCommand(new Test2Command());
33 33
         Assert::same("test", $model->parse("/" . Test2Command::NAME));
34
-        Assert::exception(function () use ($model) {
34
+        Assert::exception(function() use ($model) {
35 35
             $model->addCommand(new Test2Command());
36 36
         }, CommandNameAlreadyUsedException::class);
37 37
     }
@@ -41,10 +41,10 @@  discard block
 block discarded – undo
41 41
         $model = clone $this->model;
42 42
         $model->addAlias(self::COMMAND_NAME, "test");
43 43
         Assert::same("passed", $model->parse("/test"));
44
-        Assert::exception(function () use ($model) {
44
+        Assert::exception(function() use ($model) {
45 45
             $model->addAlias("abc", "test");
46 46
         }, CommandNotFoundException::class);
47
-        Assert::exception(function () use ($model) {
47
+        Assert::exception(function() use ($model) {
48 48
             $model->addAlias(self::COMMAND_NAME, "test");
49 49
         }, CommandNameAlreadyUsedException::class);
50 50
     }
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     public function getTexts(): array
63 63
     {
64 64
         return [
65
-            ["anagfdffd", "/anagfdffd",]
65
+            ["anagfdffd", "/anagfdffd", ]
66 66
         ];
67 67
     }
68 68
 
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
     public function testGetCommand(): void
93 93
     {
94 94
         Assert::type(IChatCommand::class, $this->model->getCommand(self::COMMAND_NAME));
95
-        Assert::exception(function () {
95
+        Assert::exception(function() {
96 96
             $this->model->getCommand("abc");
97 97
         }, CommandNotFoundException::class);
98 98
     }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,8 +20,7 @@
 block discarded – undo
20 20
 
21 21
     protected ChatCommandsProcessor $model;
22 22
 
23
-    public function __construct()
24
-    {
23
+    public function __construct() {
25 24
         $this->model = $this->getService(ChatCommandsProcessor::class); // @phpstan-ignore assign.propertyType
26 25
         $this->model->addCommand(new TestCommand());
27 26
     }
Please login to merge, or discard this patch.