Completed
Push — master ( 634f14...5521c0 )
by Sebastian
02:54
created
src/Console/Commands/SelfUpdateCommand.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,19 +1,19 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * SelfUpdateCommand.php
4
- *
5
- * MIT LICENSE
6
- *
7
- * LICENSE: This source file is subject to the MIT license.
8
- * A copy of the licenses text was distributed alongside this
9
- * file (usually the repository or package root). The text can also
10
- * be obtained through one of the following sources:
11
- * * http://opensource.org/licenses/MIT
12
- * * https://github.com/suralc/pvra/blob/master/LICENSE
13
- *
14
- * @author     suralc <[email protected]>
15
- * @license    http://opensource.org/licenses/MIT  MIT
16
- */
3
+     * SelfUpdateCommand.php
4
+     *
5
+     * MIT LICENSE
6
+     *
7
+     * LICENSE: This source file is subject to the MIT license.
8
+     * A copy of the licenses text was distributed alongside this
9
+     * file (usually the repository or package root). The text can also
10
+     * be obtained through one of the following sources:
11
+     * * http://opensource.org/licenses/MIT
12
+     * * https://github.com/suralc/pvra/blob/master/LICENSE
13
+     *
14
+     * @author     suralc <[email protected]>
15
+     * @license    http://opensource.org/licenses/MIT  MIT
16
+     */
17 17
 namespace Pvra\Console\Commands;
18 18
 
19 19
 
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
     protected function configure()
44 44
     {
45 45
         $this->setName('self-update')
46
-            ->setAliases(['selfupdate', 'update'])
46
+            ->setAliases([ 'selfupdate', 'update' ])
47 47
             ->setDescription('Checks for a newer tagged version in the github repository.');
48 48
         $this->addOption('repo-slug', 'r', InputOption::VALUE_REQUIRED, 'Source repository', self::DEFAULT_REPO_SLUG)
49 49
             ->addOption('api-root', 'a', InputOption::VALUE_REQUIRED, 'Api root url', self::DEFAULT_API_ROOT);
@@ -69,13 +69,13 @@  discard block
 block discarded – undo
69 69
         list($ghReleases, $header) = $this->getReleases();
70 70
         if ($in->getOption('verbose')) {
71 71
             $headers = $this->parseHeader($header);
72
-            $out->writeln('Github api limit: ' . $headers['X-RateLimit-Limit']);
73
-            $out->writeln('Github api limit remaining: ' . $headers['X-RateLimit-Remaining']);
72
+            $out->writeln('Github api limit: ' . $headers[ 'X-RateLimit-Limit' ]);
73
+            $out->writeln('Github api limit remaining: ' . $headers[ 'X-RateLimit-Remaining' ]);
74 74
         }
75 75
         $ghReleasesContent = json_decode($ghReleases, true);
76 76
         unset($ghReleases);
77 77
         if (!empty($ghReleasesContent)) {
78
-            $remoteVersion = substr($ghReleasesContent[0]['tag_name'], 1);
78
+            $remoteVersion = substr($ghReleasesContent[ 0 ][ 'tag_name' ], 1);
79 79
             $out->writeln('Your version: ' . $this->getApplication()->getVersion() . '(' . $this->getComparableVersion() . ')');
80 80
             $out->writeln('Current remote version is: ' . $remoteVersion);
81 81
             $compared = version_compare($this->getComparableVersion(), $remoteVersion);
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
                 if ($this->getHelper('question')->ask($in, $out, $question)) {
86 86
                     $out->writeln('Upgrading...');
87 87
                     $temp = tmpfile();
88
-                    stream_copy_to_stream(fopen($this->getPharUrlFromAssetArray($ghReleasesContent[0]['assets']), 'rb'),
88
+                    stream_copy_to_stream(fopen($this->getPharUrlFromAssetArray($ghReleasesContent[ 0 ][ 'assets' ]), 'rb'),
89 89
                         $temp);
90 90
                     rewind($temp);
91 91
                     $running = Phar::running(false);
@@ -126,12 +126,12 @@  discard block
 block discarded – undo
126 126
     {
127 127
         $response = file_get_contents(sprintf('%srepos/%s/releases%s', $this->apiRoot, $this->slug, $target), 0,
128 128
             $this->getNewDefaultStreamContext());
129
-        return [$response, $http_response_header];
129
+        return [ $response, $http_response_header ];
130 130
     }
131 131
 
132 132
     private function parseHeader(array $headerArray)
133 133
     {
134
-        $headers = [];
134
+        $headers = [ ];
135 135
         foreach ($headerArray as $num => $headerLine) {
136 136
             if ($num === 0) {
137 137
                 // status code
@@ -151,9 +151,9 @@  discard block
 block discarded – undo
151 151
             $localVersion = ltrim($this->getApplication()->getVersion(), 'v');
152 152
             preg_match('/(?P<major>[\\d]+).(?P<minor>[\\d]+).(?P<patch>[\\d]+)-(?P<commitCount>[\\d]+)-(g)?(?P<hash>[0-9a-f]{5,40})/i',
153 153
                 $localVersion, $matches);
154
-            $comparableVersion = sprintf('%d.%d.%d', $matches['major'], $matches['minor'], $matches['patch']);
155
-            if (isset($matches['commitCount'])) {
156
-                $comparableVersion .= '.' . $matches['commitCount'];
154
+            $comparableVersion = sprintf('%d.%d.%d', $matches[ 'major' ], $matches[ 'minor' ], $matches[ 'patch' ]);
155
+            if (isset($matches[ 'commitCount' ])) {
156
+                $comparableVersion .= '.' . $matches[ 'commitCount' ];
157 157
             }
158 158
         }
159 159
         return $comparableVersion;
@@ -168,8 +168,8 @@  discard block
 block discarded – undo
168 168
     {
169 169
         if (!empty($assets)) {
170 170
             foreach ($assets as $asset) {
171
-                if ($asset['name'] === 'pvra.phar') {
172
-                    return $asset['browser_download_url'];
171
+                if ($asset[ 'name' ] === 'pvra.phar') {
172
+                    return $asset[ 'browser_download_url' ];
173 173
                 }
174 174
             }
175 175
         }
Please login to merge, or discard this patch.
src/Console/Commands/PvraBaseCommand.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,19 +1,19 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * PvraBaseCommand.php
4
- *
5
- * MIT LICENSE
6
- *
7
- * LICENSE: This source file is subject to the MIT license.
8
- * A copy of the licenses text was distributed alongside this
9
- * file (usually the repository or package root). The text can also
10
- * be obtained through one of the following sources:
11
- * * http://opensource.org/licenses/MIT
12
- * * https://github.com/suralc/pvra/blob/master/LICENSE
13
- *
14
- * @author     suralc <[email protected]>
15
- * @license    http://opensource.org/licenses/MIT  MIT
16
- */
3
+     * PvraBaseCommand.php
4
+     *
5
+     * MIT LICENSE
6
+     *
7
+     * LICENSE: This source file is subject to the MIT license.
8
+     * A copy of the licenses text was distributed alongside this
9
+     * file (usually the repository or package root). The text can also
10
+     * be obtained through one of the following sources:
11
+     * * http://opensource.org/licenses/MIT
12
+     * * https://github.com/suralc/pvra/blob/master/LICENSE
13
+     *
14
+     * @author     suralc <[email protected]>
15
+     * @license    http://opensource.org/licenses/MIT  MIT
16
+     */
17 17
 namespace Pvra\Console\Commands;
18 18
 
19 19
 
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      *
49 49
      * @var array|string[]
50 50
      */
51
-    protected $expectedWalkers = [];
51
+    protected $expectedWalkers = [ ];
52 52
 
53 53
     /**
54 54
      * @var bool
@@ -100,10 +100,10 @@  discard block
 block discarded – undo
100 100
 
101 101
     private function getDefaultAnalysersAliases()
102 102
     {
103
-        $aliasNameMap = [];
103
+        $aliasNameMap = [ ];
104 104
         foreach (self::$defaultAnalysers as $analyser) {
105 105
             if (isset(self::$analyserAliasMap[ $analyser ])) {
106
-                $aliasNameMap[] = self::$analyserAliasMap[ $analyser ];
106
+                $aliasNameMap[ ] = self::$analyserAliasMap[ $analyser ];
107 107
             }
108 108
         }
109 109
 
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
         if ($input->getOption('preferRelativePaths')) {
132 132
             $this->preferRelativePaths = true;
133 133
         }
134
-        $style = new OutputFormatterStyle('red', 'yellow', ['bold', 'blink']);
134
+        $style = new OutputFormatterStyle('red', 'yellow', [ 'bold', 'blink' ]);
135 135
         $output->getFormatter()->setStyle('warn', $style);
136 136
         $analysers = $input->getOption('analyser');
137 137
         if (empty($analysers) || !is_array($analysers)) {
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
                 throw new \InvalidArgumentException(sprintf('"%s" does not implement "%s"', $analyserName,
150 150
                     'Pvra\\AnalyserAwareInterface'));
151 151
             }
152
-            $this->expectedWalkers[] = $analyserName;
152
+            $this->expectedWalkers[ ] = $analyserName;
153 153
         }
154 154
         $this->expectedWalkers = array_unique($this->expectedWalkers);
155 155
     }
@@ -173,12 +173,12 @@  discard block
 block discarded – undo
173 173
     {
174 174
         $file = $input->getOption('messageFormatSourceFile');
175 175
         if (is_string($file)) {
176
-            $locator = MessageLocator::fromArray($this->getArrayFromFile($file)[1]);
176
+            $locator = MessageLocator::fromArray($this->getArrayFromFile($file)[ 1 ]);
177 177
         } else {
178 178
             $locator = MessageLocator::fromPhpFile(__DIR__ . '/../../../data/default_messages.php');
179 179
         }
180 180
 
181
-        $locator->addMissingMessageHandler(function () {
181
+        $locator->addMissingMessageHandler(function() {
182 182
             return 'Message for reason :id: not found. Required version: :version:';
183 183
         });
184 184
 
@@ -194,17 +194,17 @@  discard block
 block discarded – undo
194 194
         $librarySourceOption = null,
195 195
         $mode = LanguageFeatureAnalyser::MODE_ADDITION
196 196
     ) {
197
-        $analysers = [];
197
+        $analysers = [ ];
198 198
         foreach ($this->expectedWalkers as $walker) {
199 199
             if (in_array('Pvra\InformationProvider\LibraryInformationAwareInterface', class_implements($walker))) {
200 200
                 if (is_string($librarySourceOption)) {
201
-                    $info = new LibraryInformation($this->getArrayFromFile($librarySourceOption)[1]);
201
+                    $info = new LibraryInformation($this->getArrayFromFile($librarySourceOption)[ 1 ]);
202 202
                 } else {
203 203
                     $info = LibraryInformation::createWithDefaults();
204 204
                 }
205
-                $analysers[] = (new $walker(['mode' => $mode]))->setLibraryInformation($info);
205
+                $analysers[ ] = (new $walker([ 'mode' => $mode ]))->setLibraryInformation($info);
206 206
             } else {
207
-                $analysers[] = new $walker(['mode' => $mode]);
207
+                $analysers[ ] = new $walker([ 'mode' => $mode ]);
208 208
             }
209 209
         }
210 210
 
@@ -221,14 +221,14 @@  discard block
 block discarded – undo
221 221
             $type = pathinfo($filePath, PATHINFO_EXTENSION);
222 222
             switch ($type) {
223 223
                 case 'php':
224
-                    return [$type, include $filePath];
224
+                    return [ $type, include $filePath ];
225 225
                 case 'json':
226 226
                     if (($data = json_decode(file_get_contents($filePath), true)) === null) {
227 227
                         throw new \RuntimeException(sprintf('Json decoding of file "%s" failed with notice: "%s"',
228 228
                             $filePath,
229 229
                             version_compare(PHP_VERSION, '5.5.0', '>=') ? json_last_error_msg() : json_last_error()));
230 230
                     }
231
-                    return [$type, $data];
231
+                    return [ $type, $data ];
232 232
                 default:
233 233
                     throw new \InvalidArgumentException(sprintf('The %s filetype is not supported. Only php and json files are supported for this operation.',
234 234
                         $type));
Please login to merge, or discard this patch.
src/Console/Commands/FileCommand.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,19 +1,19 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * FileCommand.php
4
- *
5
- * MIT LICENSE
6
- *
7
- * LICENSE: This source file is subject to the MIT license.
8
- * A copy of the licenses text was distributed alongside this
9
- * file (usually the repository or package root). The text can also
10
- * be obtained through one of the following sources:
11
- * * http://opensource.org/licenses/MIT
12
- * * https://github.com/suralc/pvra/blob/master/LICENSE
13
- *
14
- * @author     suralc <[email protected]>
15
- * @license    http://opensource.org/licenses/MIT  MIT
16
- */
3
+     * FileCommand.php
4
+     *
5
+     * MIT LICENSE
6
+     *
7
+     * LICENSE: This source file is subject to the MIT license.
8
+     * A copy of the licenses text was distributed alongside this
9
+     * file (usually the repository or package root). The text can also
10
+     * be obtained through one of the following sources:
11
+     * * http://opensource.org/licenses/MIT
12
+     * * https://github.com/suralc/pvra/blob/master/LICENSE
13
+     *
14
+     * @author     suralc <[email protected]>
15
+     * @license    http://opensource.org/licenses/MIT  MIT
16
+     */
17 17
 namespace Pvra\Console\Commands;
18 18
 
19 19
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -75,15 +75,15 @@
 block discarded – undo
75 75
 
76 76
         $output->writeln(sprintf('<info>Required version: %s</info>', $result->getRequiredVersion()));
77 77
 
78
-        $tableData = [];
78
+        $tableData = [ ];
79 79
         foreach (array_reverse($result->getRequirements()) as $version => $reasons) {
80 80
             foreach ($reasons as $reason) {
81
-                $tableData[] = [$reason['version'], $reason['msg'], $reason['line']];
81
+                $tableData[ ] = [ $reason[ 'version' ], $reason[ 'msg' ], $reason[ 'line' ] ];
82 82
             }
83 83
         }
84 84
 
85 85
         (new Table($output))
86
-            ->setHeaders(['Version', 'Message', 'Line'])
86
+            ->setHeaders([ 'Version', 'Message', 'Line' ])
87 87
             ->setRows($tableData)
88 88
             ->render();
89 89
 
Please login to merge, or discard this patch.
src/Console/Application.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,19 +1,19 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Application.php
4
- *
5
- * MIT LICENSE
6
- *
7
- * LICENSE: This source file is subject to the MIT license.
8
- * A copy of the licenses text was distributed alongside this
9
- * file (usually the repository or package root). The text can also
10
- * be obtained through one of the following sources:
11
- * * http://opensource.org/licenses/MIT
12
- * * https://github.com/suralc/pvra/blob/master/LICENSE
13
- *
14
- * @author     suralc <[email protected]>
15
- * @license    http://opensource.org/licenses/MIT  MIT
16
- */
3
+     * Application.php
4
+     *
5
+     * MIT LICENSE
6
+     *
7
+     * LICENSE: This source file is subject to the MIT license.
8
+     * A copy of the licenses text was distributed alongside this
9
+     * file (usually the repository or package root). The text can also
10
+     * be obtained through one of the following sources:
11
+     * * http://opensource.org/licenses/MIT
12
+     * * https://github.com/suralc/pvra/blob/master/LICENSE
13
+     *
14
+     * @author     suralc <[email protected]>
15
+     * @license    http://opensource.org/licenses/MIT  MIT
16
+     */
17 17
 namespace Pvra\Console;
18 18
 
19 19
 
Please login to merge, or discard this patch.
src/Console/helpers.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,19 +1,19 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * helpers.php
4
- *
5
- * MIT LICENSE
6
- *
7
- * LICENSE: This source file is subject to the MIT license.
8
- * A copy of the licenses text was distributed alongside this
9
- * file (usually the repository or package root). The text can also
10
- * be obtained on one of the following sources:
11
- * * http://opensource.org/licenses/MIT
12
- * * https://github.com/suralc/pvra/blob/master/LICENSE
13
- *
14
- * @author     suralc <[email protected]>
15
- * @license    http://opensource.org/licenses/MIT  MIT
16
- */
3
+     * helpers.php
4
+     *
5
+     * MIT LICENSE
6
+     *
7
+     * LICENSE: This source file is subject to the MIT license.
8
+     * A copy of the licenses text was distributed alongside this
9
+     * file (usually the repository or package root). The text can also
10
+     * be obtained on one of the following sources:
11
+     * * http://opensource.org/licenses/MIT
12
+     * * https://github.com/suralc/pvra/blob/master/LICENSE
13
+     *
14
+     * @author     suralc <[email protected]>
15
+     * @license    http://opensource.org/licenses/MIT  MIT
16
+     */
17 17
 
18 18
 namespace Pvra\Console;
19 19
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
                 $relPath = array_pad($relPath, $padLength, '..');
58 58
                 break;
59 59
             } else {
60
-                $relPath[0] = './' . $relPath[0];
60
+                $relPath[ 0 ] = './' . $relPath[ 0 ];
61 61
             }
62 62
         }
63 63
     }
@@ -81,11 +81,11 @@  discard block
 block discarded – undo
81 81
         return null;
82 82
     }
83 83
     $data = array_values($data);
84
-    $composedComparator = function ($a, $b) use ($mode, $comparator) {
84
+    $composedComparator = function($a, $b) use ($mode, $comparator) {
85 85
         $order = $comparator($a, $b);
86 86
         return $mode === EXTREME_MIN ? -$order : $order;
87 87
     };
88
-    $extreme = $data[0];
88
+    $extreme = $data[ 0 ];
89 89
     foreach ($data as $datum) {
90 90
         if ($composedComparator($extreme, $datum) < 0) {
91 91
             $extreme = $datum;
Please login to merge, or discard this patch.
src/Console/Services/FileFinderBuilder.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,19 +1,19 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * FileFinderBuilder.php
4
- *
5
- * MIT LICENSE
6
- *
7
- * LICENSE: This source file is subject to the MIT license.
8
- * A copy of the licenses text was distributed alongside this
9
- * file (usually the repository or package root). The text can also
10
- * be obtained on one of the following sources:
11
- * * http://opensource.org/licenses/MIT
12
- * * https://github.com/suralc/pvra/blob/master/LICENSE
13
- *
14
- * @author     suralc <[email protected]>
15
- * @license    http://opensource.org/licenses/MIT  MIT
16
- */
3
+     * FileFinderBuilder.php
4
+     *
5
+     * MIT LICENSE
6
+     *
7
+     * LICENSE: This source file is subject to the MIT license.
8
+     * A copy of the licenses text was distributed alongside this
9
+     * file (usually the repository or package root). The text can also
10
+     * be obtained on one of the following sources:
11
+     * * http://opensource.org/licenses/MIT
12
+     * * https://github.com/suralc/pvra/blob/master/LICENSE
13
+     *
14
+     * @author     suralc <[email protected]>
15
+     * @license    http://opensource.org/licenses/MIT  MIT
16
+     */
17 17
 
18 18
 namespace Pvra\Console\Services;
19 19
 
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -142,21 +142,21 @@
 block discarded – undo
142 142
 
143 143
                 $currentFilterElements = explode(':', $currentFilter, 2);
144 144
 
145
-                switch (trim($currentFilterElements[0])) {
145
+                switch (trim($currentFilterElements[ 0 ])) {
146 146
                     case 'exclude':
147
-                        $this->finder->exclude($currentFilterElements[1]);
147
+                        $this->finder->exclude($currentFilterElements[ 1 ]);
148 148
                         break;
149 149
                     case 'name':
150
-                        $this->finder->name($currentFilterElements[1]);
150
+                        $this->finder->name($currentFilterElements[ 1 ]);
151 151
                         break;
152 152
                     case 'notName':
153
-                        $this->finder->notName($currentFilterElements[1]);
153
+                        $this->finder->notName($currentFilterElements[ 1 ]);
154 154
                         break;
155 155
                     case 'path':
156
-                        $this->finder->path($currentFilterElements[1]);
156
+                        $this->finder->path($currentFilterElements[ 1 ]);
157 157
                         break;
158 158
                     case 'size':
159
-                        $this->finder->size($currentFilterElements[1]);
159
+                        $this->finder->size($currentFilterElements[ 1 ]);
160 160
                 }
161 161
             }
162 162
         }
Please login to merge, or discard this patch.
src/Result/MessageLocator.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,19 +1,19 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * MessageLocator.php
4
- *
5
- * MIT LICENSE
6
- *
7
- * LICENSE: This source file is subject to the MIT license.
8
- * A copy of the licenses text was distributed alongside this
9
- * file (usually the repository or package root). The text can also
10
- * be obtained through one of the following sources:
11
- * * http://opensource.org/licenses/MIT
12
- * * https://github.com/suralc/pvra/blob/master/LICENSE
13
- *
14
- * @author     suralc <[email protected]>
15
- * @license    http://opensource.org/licenses/MIT  MIT
16
- */
3
+     * MessageLocator.php
4
+     *
5
+     * MIT LICENSE
6
+     *
7
+     * LICENSE: This source file is subject to the MIT license.
8
+     * A copy of the licenses text was distributed alongside this
9
+     * file (usually the repository or package root). The text can also
10
+     * be obtained through one of the following sources:
11
+     * * http://opensource.org/licenses/MIT
12
+     * * https://github.com/suralc/pvra/blob/master/LICENSE
13
+     *
14
+     * @author     suralc <[email protected]>
15
+     * @license    http://opensource.org/licenses/MIT  MIT
16
+     */
17 17
 namespace Pvra\Result;
18 18
 
19 19
 /**
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -30,15 +30,15 @@  discard block
 block discarded – undo
30 30
     /**
31 31
      * @var callable[]
32 32
      */
33
-    private $messageSearchers = [];
33
+    private $messageSearchers = [ ];
34 34
     /**
35 35
      * @var callable[]
36 36
      */
37
-    private $missingMessageHandlers = [];
37
+    private $missingMessageHandlers = [ ];
38 38
     /**
39 39
      * @var array
40 40
      */
41
-    private $fetchedMessages = [];
41
+    private $fetchedMessages = [ ];
42 42
 
43 43
     /**
44 44
      * Append a function to handle missing messages.
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 
89 89
         $msgInfo = $this->fetchMessage($messageId, false);
90 90
 
91
-        return $msgInfo !== null && $msgInfo !== false && !empty($msgInfo['content']);
91
+        return $msgInfo !== null && $msgInfo !== false && !empty($msgInfo[ 'content' ]);
92 92
     }
93 93
 
94 94
     /**
@@ -122,14 +122,14 @@  discard block
 block discarded – undo
122 122
             }
123 123
             $value = $searchCallback($messageId, $this);
124 124
             if (!empty($value) && is_string($value)) {
125
-                $messageInfo['id'] = $messageId;
126
-                $messageInfo['content'] = $value;
125
+                $messageInfo[ 'id' ] = $messageId;
126
+                $messageInfo[ 'content' ] = $value;
127 127
                 break;
128 128
             }
129 129
         }
130 130
         $this->markCallbackChainTerminated();
131 131
 
132
-        if (empty($messageInfo['content'])) {
132
+        if (empty($messageInfo[ 'content' ])) {
133 133
             if ($runMissingMessageHandlers) {
134 134
                 $this->inCallbackChain(true);
135 135
                 /** @var callable $handler */
@@ -139,9 +139,9 @@  discard block
 block discarded – undo
139 139
                     }
140 140
                     $value = $handler($messageId, $this);
141 141
                     if (!empty($value) && is_string($value)) {
142
-                        $messageInfo['id'] = $messageId;
143
-                        $messageInfo['content'] = $value;
144
-                        $messageInfo['fallbackHandler'] = true;
142
+                        $messageInfo[ 'id' ] = $messageId;
143
+                        $messageInfo[ 'content' ] = $value;
144
+                        $messageInfo[ 'fallbackHandler' ] = true;
145 145
                         break;
146 146
                     }
147 147
                 }
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
     public function getMessage($messageId, $ignoreCachedEntries = false)
165 165
     {
166 166
         $info = $this->getMessageWithInfo($messageId, $ignoreCachedEntries);
167
-        return is_array($info) && array_key_exists('content', $info) ? $info['content'] : $info;
167
+        return is_array($info) && array_key_exists('content', $info) ? $info[ 'content' ] : $info;
168 168
     }
169 169
 
170 170
     /**
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
     public static function fromArray($array)
218 218
     {
219 219
         $locator = new static();
220
-        $locator->addMessageSearcher(function ($msgId) use ($array) {
220
+        $locator->addMessageSearcher(function($msgId) use ($array) {
221 221
             if (isset($array[ $msgId ])) {
222 222
                 return $array[ $msgId ];
223 223
             }
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
      */
250 250
     public function clearInstanceCache()
251 251
     {
252
-        $this->fetchedMessages = [];
252
+        $this->fetchedMessages = [ ];
253 253
     }
254 254
 
255 255
 
Please login to merge, or discard this patch.
src/Result/Reasoning.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
         AnalysisResult $result,
79 79
         $version = null,
80 80
         $msg = null,
81
-        $data = []
81
+        $data = [ ]
82 82
     ) {
83 83
         $this->reasonId = $reasonId;
84 84
         $this->line = $line;
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
      */
157 157
     public function offsetExists($offset)
158 158
     {
159
-        return in_array($offset, ['data', 'reason', 'reasonName', 'line', 'msg', 'raw_msg', 'version', 'targetId']);
159
+        return in_array($offset, [ 'data', 'reason', 'reasonName', 'line', 'msg', 'raw_msg', 'version', 'targetId' ]);
160 160
     }
161 161
 
162 162
     /**
Please login to merge, or discard this patch.
src/Result/CallbackChainHelperTrait.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,19 +1,19 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * CallbackChainHelperTrait.php
4
- *
5
- * MIT LICENSE
6
- *
7
- * LICENSE: This source file is subject to the MIT license.
8
- * A copy of the licenses text was distributed alongside this
9
- * file (usually the repository or package root). The text can also
10
- * be obtained through one of the following sources:
11
- * * http://opensource.org/licenses/MIT
12
- * * https://github.com/suralc/pvra/blob/master/LICENSE
13
- *
14
- * @author     suralc <[email protected]>
15
- * @license    http://opensource.org/licenses/MIT  MIT
16
- */
3
+     * CallbackChainHelperTrait.php
4
+     *
5
+     * MIT LICENSE
6
+     *
7
+     * LICENSE: This source file is subject to the MIT license.
8
+     * A copy of the licenses text was distributed alongside this
9
+     * file (usually the repository or package root). The text can also
10
+     * be obtained through one of the following sources:
11
+     * * http://opensource.org/licenses/MIT
12
+     * * https://github.com/suralc/pvra/blob/master/LICENSE
13
+     *
14
+     * @author     suralc <[email protected]>
15
+     * @license    http://opensource.org/licenses/MIT  MIT
16
+     */
17 17
 namespace Pvra\Result;
18 18
 
19 19
 /**
Please login to merge, or discard this patch.