Completed
Branch master (29ce5c)
by Maciej
04:42
created
Category
src/Cli/Command/ListManufacturersCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -71,13 +71,13 @@
 block discarded – undo
71 71
      */
72 72
     private function groupManufacturersByFirstLetter(ManufacturerDTOArray $manufacturerDTOArray): array
73 73
     {
74
-        $manufacturersNames = [];
74
+        $manufacturersNames = [ ];
75 75
         foreach ($manufacturerDTOArray as $manufacturerDTO) {
76 76
             $firstLetter = substr($manufacturerDTO->getName(), 0, 1);
77
-            if (!isset($manufacturersNames[$firstLetter])) {
78
-                $manufacturersNames[$firstLetter] = "{$firstLetter}: {$manufacturerDTO->getName()}";
77
+            if (!isset($manufacturersNames[ $firstLetter ])) {
78
+                $manufacturersNames[ $firstLetter ] = "{$firstLetter}: {$manufacturerDTO->getName()}";
79 79
             } else {
80
-                $manufacturersNames[$firstLetter] .= ", {$manufacturerDTO->getName()}";
80
+                $manufacturersNames[ $firstLetter ] .= ", {$manufacturerDTO->getName()}";
81 81
             }
82 82
         }
83 83
 
Please login to merge, or discard this patch.
src/Cli/Command/ListModelsCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -82,13 +82,13 @@
 block discarded – undo
82 82
      */
83 83
     private function groupModelsByFirstLetter(ModelDTOArray $modelDTOArray): array
84 84
     {
85
-        $modelsNames = [];
85
+        $modelsNames = [ ];
86 86
         foreach ($modelDTOArray as $modelDTO) {
87 87
             $firstLetter = substr($modelDTO->getName(), 0, 1);
88
-            if (!isset($modelsNames[$firstLetter])) {
89
-                $modelsNames[$firstLetter] = "{$firstLetter}: {$modelDTO->getName()}";
88
+            if (!isset($modelsNames[ $firstLetter ])) {
89
+                $modelsNames[ $firstLetter ] = "{$firstLetter}: {$modelDTO->getName()}";
90 90
             } else {
91
-                $modelsNames[$firstLetter] .= ", {$modelDTO->getName()}";
91
+                $modelsNames[ $firstLetter ] .= ", {$modelDTO->getName()}";
92 92
             }
93 93
         }
94 94
 
Please login to merge, or discard this patch.
src/Cli/Test/Unit/Command/ListModelsCommandTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
         $method = $reflection->getMethod('execute');
139 139
         $method->setAccessible(true);
140 140
 
141
-        $method->invokeArgs($this->command, [$this->input, $this->output]);
141
+        $method->invokeArgs($this->command, [ $this->input, $this->output ]);
142 142
     }
143 143
 
144 144
     /**
@@ -158,13 +158,13 @@  discard block
 block discarded – undo
158 158
         $method = $reflection->getMethod('groupModelsByFirstLetter');
159 159
         $method->setAccessible(true);
160 160
 
161
-        $result = $method->invokeArgs($this->command, [$models]);
161
+        $result = $method->invokeArgs($this->command, [ $models ]);
162 162
 
163 163
         $this->assertNotEmpty($result);
164 164
         $this->assertEquals(4, count($result));
165
-        $this->assertEquals('G: Gallardo', $result['G']);
166
-        $this->assertEquals('H: Huracan', $result['H']);
167
-        $this->assertEquals('M: Murcielargo, Miura', $result['M']);
168
-        $this->assertEquals('R: Reventon', $result['R']);
165
+        $this->assertEquals('G: Gallardo', $result[ 'G' ]);
166
+        $this->assertEquals('H: Huracan', $result[ 'H' ]);
167
+        $this->assertEquals('M: Murcielargo, Miura', $result[ 'M' ]);
168
+        $this->assertEquals('R: Reventon', $result[ 'R' ]);
169 169
     }
170 170
 }
Please login to merge, or discard this patch.
src/Cli/Test/Unit/Command/ListManufacturersCommandTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
         $method = $reflection->getMethod('execute');
137 137
         $method->setAccessible(true);
138 138
 
139
-        $method->invokeArgs($this->command, [$this->input, $this->output]);
139
+        $method->invokeArgs($this->command, [ $this->input, $this->output ]);
140 140
     }
141 141
 
142 142
     /**
@@ -156,13 +156,13 @@  discard block
 block discarded – undo
156 156
         $method = $reflection->getMethod('groupManufacturersByFirstLetter');
157 157
         $method->setAccessible(true);
158 158
 
159
-        $result = $method->invokeArgs($this->command, [$manufacturers]);
159
+        $result = $method->invokeArgs($this->command, [ $manufacturers ]);
160 160
 
161 161
         $this->assertNotEmpty($result);
162 162
         $this->assertEquals(4, count($result));
163
-        $this->assertEquals('A: Audi', $result['A']);
164
-        $this->assertEquals('B: Bugatti, BMW', $result['B']);
165
-        $this->assertEquals('R: Renault', $result['R']);
166
-        $this->assertEquals('V: Volkswagen', $result['V']);
163
+        $this->assertEquals('A: Audi', $result[ 'A' ]);
164
+        $this->assertEquals('B: Bugatti, BMW', $result[ 'B' ]);
165
+        $this->assertEquals('R: Renault', $result[ 'R' ]);
166
+        $this->assertEquals('V: Volkswagen', $result[ 'V' ]);
167 167
     }
168 168
 }
Please login to merge, or discard this patch.
src/Middleware/Webpage/Adapter/ReactPHP/ReactPHPRequestAdapter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,16 +50,16 @@
 block discarded – undo
50 50
         foreach ($urlDTOArray as $urlDTO) {
51 51
             $client = new Client($this->loop);
52 52
             $request = $client->request('GET', $urlDTO->getUrl());
53
-            $request->on('response', function (Response $response) use (&$webpageDTOArray) {
53
+            $request->on('response', function(Response $response) use (&$webpageDTOArray) {
54 54
                 $data = '';
55 55
                 $response->on(
56 56
                     'data',
57
-                    function ($chunk) use (&$webpageDTOArray, &$data) {
57
+                    function($chunk) use (&$webpageDTOArray, &$data) {
58 58
                         $data .= $chunk;
59 59
                     }
60 60
                 )->on(
61 61
                     'end',
62
-                    function () use (&$webpageDTOArray, &$data) {
62
+                    function() use (&$webpageDTOArray, &$data) {
63 63
                         $webpageDTOArray->add(new WebpageDTO($data));
64 64
                     }
65 65
                 );
Please login to merge, or discard this patch.
src/Middleware/App/Model/ModelSerializer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,9 +23,9 @@  discard block
 block discarded – undo
23 23
      */
24 24
     public function serialize(ModelDTOArray $modelDTOArray): string
25 25
     {
26
-        $modelArray = [];
26
+        $modelArray = [ ];
27 27
         foreach ($modelDTOArray as $modelDTO) {
28
-            $modelArray[] = [
28
+            $modelArray[ ] = [
29 29
                 'name' => $modelDTO->getName()
30 30
             ];
31 31
         }
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
         $modelDTOArray = new ModelDTOArray();
43 43
 
44 44
         foreach ($modelArray as $modelData) {
45
-            $modelDTO = new ModelDTO($modelData['name']);
45
+            $modelDTO = new ModelDTO($modelData[ 'name' ]);
46 46
             $modelDTOArray->add($modelDTO);
47 47
         }
48 48
 
Please login to merge, or discard this patch.
src/Middleware/App/Manufacturer/ManufacturerSerializer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,9 +23,9 @@  discard block
 block discarded – undo
23 23
      */
24 24
     public function serialize(ManufacturerDTOArray $manufacturerDTOArray): string
25 25
     {
26
-        $manufacturerArray = [];
26
+        $manufacturerArray = [ ];
27 27
         foreach ($manufacturerDTOArray as $manufacturerDTO) {
28
-            $manufacturerArray[] = [
28
+            $manufacturerArray[ ] = [
29 29
                 'name' => $manufacturerDTO->getName()
30 30
             ];
31 31
         }
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
         $manufacturerDTOArray = new ManufacturerDTOArray();
43 43
 
44 44
         foreach ($manufacturerArray as $manufacturerData) {
45
-            $manufacturerDTO = new ManufacturerDTO($manufacturerData['name']);
45
+            $manufacturerDTO = new ManufacturerDTO($manufacturerData[ 'name' ]);
46 46
             $manufacturerDTOArray->add($manufacturerDTO);
47 47
         }
48 48
 
Please login to merge, or discard this patch.
src/Middleware/Test/Unit/Cache/Factory/File/FileCacheAdapterFactoryTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
     {
27 27
         /** @var FileDriverOptionsProviderInterface $optionsProvider */
28 28
         $optionsProvider = $this->getMockBuilder(FileDriverOptionsProviderInterface::class)
29
-            ->setMethods(['getOptions'])
29
+            ->setMethods([ 'getOptions' ])
30 30
             ->getMock();
31 31
         $factory = new FileCacheAdapterFactory($optionsProvider);
32 32
         $this->assertInstanceOf(CacheAdapterInterface::class, $factory->createAdapter());
Please login to merge, or discard this patch.
src/App/Model/Scrapper/ModelHtmlScrapper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
 
33 33
         $modelOptions = $this->getModelsElements($html);
34 34
 
35
-        $modelOptions->each(function (Crawler $crawler) use (&$modelDTOArray) {
35
+        $modelOptions->each(function(Crawler $crawler) use (&$modelDTOArray) {
36 36
             $optionNode = $crawler->getNode(0);
37 37
             if ($optionNode->getAttribute('title')) {
38 38
                 $modelDTO = new ModelDTO($optionNode->getAttribute('title'));
Please login to merge, or discard this patch.