@@ -1,19 +1,19 @@ |
||
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 |
@@ -48,7 +48,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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)); |
@@ -1,19 +1,19 @@ |
||
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 |
@@ -75,15 +75,15 @@ |
||
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 |
@@ -1,19 +1,19 @@ |
||
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 |
@@ -1,19 +1,19 @@ |
||
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 |
@@ -57,7 +57,7 @@ |
||
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 | } |
@@ -1,19 +1,19 @@ |
||
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 |
@@ -142,21 +142,21 @@ |
||
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 | } |
@@ -30,15 +30,15 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
249 | 249 | */ |
250 | 250 | public function clearInstanceCache() |
251 | 251 | { |
252 | - $this->fetchedMessages = []; |
|
252 | + $this->fetchedMessages = [ ]; |
|
253 | 253 | } |
254 | 254 | |
255 | 255 |
@@ -1,19 +1,19 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Reasoning.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 | + * Reasoning.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 |
@@ -78,7 +78,7 @@ discard block |
||
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 |
||
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 | /** |
@@ -1,19 +1,19 @@ |
||
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 | /** |
@@ -1,19 +1,19 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Json.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 | + * Json.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\ResultFormatter; |
19 | 19 |
@@ -44,10 +44,10 @@ |
||
44 | 44 | * |
45 | 45 | * @param array $options |
46 | 46 | */ |
47 | - public function __construct(array $options = []) |
|
47 | + public function __construct(array $options = [ ]) |
|
48 | 48 | { |
49 | - $this->options = isset($options['options']) ? $options['options'] : 0; |
|
50 | - $this->depth = isset($options['depth']) ? $options['depth'] : 512; |
|
49 | + $this->options = isset($options[ 'options' ]) ? $options[ 'options' ] : 0; |
|
50 | + $this->depth = isset($options[ 'depth' ]) ? $options[ 'depth' ] : 512; |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | /** |