Completed
Push — master ( 8661dd...c673c5 )
by Sebastian
02:34
created
src/Result/Collection.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
- * Collection.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
+     * Collection.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   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
      *
33 33
      * @var \Pvra\AnalysisResult[]
34 34
      */
35
-    private $results = [];
35
+    private $results = [ ];
36 36
     /**
37 37
      * The targetId of the currently highest demanding result
38 38
      *
@@ -190,11 +190,11 @@  discard block
 block discarded – undo
190 190
      */
191 191
     public function jsonSerialize()
192 192
     {
193
-        $results = [];
193
+        $results = [ ];
194 194
         foreach ($this->getIterator() as $result) {
195
-            $reasonings = [];
195
+            $reasonings = [ ];
196 196
             foreach ($result->getIterator() as $reason) {
197
-                $reasonings[] = $reason->toArray();
197
+                $reasonings[ ] = $reason->toArray();
198 198
             }
199 199
             $results[ $result->getAnalysisTargetId() ] = $reasonings;
200 200
         }
Please login to merge, or discard this patch.
src/Result/MessageFormatter.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
- * MessageFormatter.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
+     * MessageFormatter.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   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     /**
47 47
      * @var array
48 48
      */
49
-    private $messageFormatters = [];
49
+    private $messageFormatters = [ ];
50 50
 
51 51
     /**
52 52
      * @param array|MessageLocator $locator
@@ -72,14 +72,14 @@  discard block
 block discarded – undo
72 72
         }
73 73
 
74 74
         if ($addDefaultFormatter) {
75
-            $this->addMessageFormatter(function ($id, $format) {
75
+            $this->addMessageFormatter(function($id, $format) {
76 76
                 return sprintf('%s in :%s:::%s:', $format, MessageFormatter::FORMAT_KEY_TARGET_ID,
77 77
                     MessageFormatter::FORMAT_KEY_LINE);
78 78
             });
79 79
         }
80 80
 
81 81
         if ($addDefaultExclusiveMissingMessageLocatorHandler) {
82
-            $this->getLocator()->addMissingMessageHandler(function ($id, MessageLocator $locator) {
82
+            $this->getLocator()->addMissingMessageHandler(function($id, MessageLocator $locator) {
83 83
                 $locator->terminateCallbackChain();
84 84
                 $msg = 'Message for id "%s" %s could not be found.';
85 85
                 $desc = '';
@@ -116,9 +116,9 @@  discard block
 block discarded – undo
116 116
      * @return mixed
117 117
      * @throws \Exception
118 118
      */
119
-    public function getFormattedMessageFromId($msgId, array $data = [])
119
+    public function getFormattedMessageFromId($msgId, array $data = [ ])
120 120
     {
121
-        return $this->format(['id' => $msgId, 'template' => $this->getMessageTemplate($msgId)], $data);
121
+        return $this->format([ 'id' => $msgId, 'template' => $this->getMessageTemplate($msgId) ], $data);
122 122
     }
123 123
 
124 124
     /**
@@ -127,12 +127,12 @@  discard block
 block discarded – undo
127 127
      * @param bool $runUserFormatters
128 128
      * @return mixed
129 129
      */
130
-    public function format($messageInfo, array $data = [], $runUserFormatters = true)
130
+    public function format($messageInfo, array $data = [ ], $runUserFormatters = true)
131 131
     {
132 132
         if (is_string($messageInfo)) {
133
-            $messageInfo = ['template' => $messageInfo, 'id' => 'unknown_message_id'];
133
+            $messageInfo = [ 'template' => $messageInfo, 'id' => 'unknown_message_id' ];
134 134
         }
135
-        $data += ['id' => $messageInfo['id']];
135
+        $data += [ 'id' => $messageInfo[ 'id' ] ];
136 136
         if ($runUserFormatters) {
137 137
             $this->inCallbackChain(true);
138 138
             /** @var callable $formatter */
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
                 if ($this->isCallbackChainToBeTerminated()) {
141 141
                     break;
142 142
                 }
143
-                $messageInfo['template'] = $formatter($messageInfo['id'], $messageInfo['template'], $this, $data);
143
+                $messageInfo[ 'template' ] = $formatter($messageInfo[ 'id' ], $messageInfo[ 'template' ], $this, $data);
144 144
             }
145 145
             $this->markCallbackChainTerminated();
146 146
         }
@@ -148,10 +148,10 @@  discard block
 block discarded – undo
148 148
         foreach ($data as $name => $value) {
149 149
             // str_replace(array, array) would be better
150 150
             // but this appears to be faster than iterating over the $data array and manipulating the keys
151
-            $messageInfo['template'] = str_replace(':' . $name . ':', $value, $messageInfo['template']);
151
+            $messageInfo[ 'template' ] = str_replace(':' . $name . ':', $value, $messageInfo[ 'template' ]);
152 152
         }
153 153
 
154
-        return $messageInfo['template'];
154
+        return $messageInfo[ 'template' ];
155 155
     }
156 156
 
157 157
     /**
Please login to merge, or discard this patch.
src/Result/Exceptions/ResultFileWriterException.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
- * ResultFileWriterException.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
+     * ResultFileWriterException.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\Result\Exceptions;
19 19
 
Please login to merge, or discard this patch.
src/StringAnalyser.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
- * StringAnalyser.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
+     * StringAnalyser.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;
18 18
 
19 19
 /**
Please login to merge, or discard this patch.
src/Result/CollectionWriter.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
- * CollectionWriter.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
+     * CollectionWriter.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\Result;
19 19
 
Please login to merge, or discard this patch.