Passed
Push — master ( ba00c7...bfa3fc )
by Sebastian
08:42
created
src/ConvertHelper/ThrowableInfo.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
      */
81 81
     protected function __construct($subject)
82 82
     {
83
-        if(is_array($subject))
83
+        if (is_array($subject))
84 84
         {
85 85
             $this->parseSerialized($subject);
86 86
         }
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
     */
140 140
     public function getPrevious() : ConvertHelper_ThrowableInfo
141 141
     {
142
-        if(isset($this->previous)) {
142
+        if (isset($this->previous)) {
143 143
             return $this->previous;
144 144
         }
145 145
         
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
     public function getFolderDepth() : int
259 259
     {
260 260
         $depth = $this->getOption('folder-depth');
261
-        if(!empty($depth)) {
261
+        if (!empty($depth)) {
262 262
             return $depth;
263 263
         }
264 264
         
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
 
316 316
         $this->setOptions($serialized[ConvertHelper_ThrowableInfo_Serializer::SERIALIZED_OPTIONS]);
317 317
         
318
-        foreach($serialized[ConvertHelper_ThrowableInfo_Serializer::SERIALIZED_CALLS] as $def)
318
+        foreach ($serialized[ConvertHelper_ThrowableInfo_Serializer::SERIALIZED_CALLS] as $def)
319 319
         {
320 320
             $this->calls[] = ConvertHelper_ThrowableInfo_Call::fromSerialized($this, $def);
321 321
         }
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
         $this->date = new Microtime();
327 327
         $this->class = get_class($e);
328 328
 
329
-        if($e instanceof BaseException)
329
+        if ($e instanceof BaseException)
330 330
         {
331 331
             $this->details = $e->getDetails();
332 332
         }
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
      * @return string
360 360
      * @throws ConvertHelper_Exception
361 361
      */
362
-    public function renderErrorMessage(bool $withDeveloperInfo=false) : string
362
+    public function renderErrorMessage(bool $withDeveloperInfo = false) : string
363 363
     {
364 364
         return (new ConvertHelper_ThrowableInfo_MessageRenderer($this, $withDeveloperInfo))
365 365
             ->render();
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
         }
436 436
         else
437 437
         {
438
-            $this->message = 'Original error code: [' . $code . ']. ' . $this->message;
438
+            $this->message = 'Original error code: ['.$code.']. '.$this->message;
439 439
         }
440 440
     }
441 441
 
Please login to merge, or discard this patch.
src/ConvertHelper/ThrowableInfo/MessageRenderer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
             ->t('Message:')
39 39
             ->add($this->info->getMessage());
40 40
 
41
-        if($this->developerInfo)
41
+        if ($this->developerInfo)
42 42
         {
43 43
             $message
44 44
                 ->eol()
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
                 ->add($finalCall->toString());
47 47
         }
48 48
 
49
-        if($this->developerInfo && $this->info->hasDetails())
49
+        if ($this->developerInfo && $this->info->hasDetails())
50 50
         {
51 51
             $message
52 52
                 ->t('Developer details:')
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
                 ->add($this->info->getDetails());
55 55
         }
56 56
 
57
-        if($this->info->hasPrevious())
57
+        if ($this->info->hasPrevious())
58 58
         {
59 59
             $message
60 60
                 ->eol()
Please login to merge, or discard this patch.
src/ConvertHelper/ThrowableInfo/StringConverter.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
     public function toString() : string
20 20
     {
21 21
         return
22
-            $this->renderMessage() .
23
-            $this->renderCalls() .
22
+            $this->renderMessage().
23
+            $this->renderCalls().
24 24
             $this->renderPrevious();
25 25
     }
26 26
 
@@ -33,12 +33,12 @@  discard block
 block discarded – undo
33 33
 
34 34
         if ($this->info->hasCode())
35 35
         {
36
-            $string .= ' #' . $this->info->getCode();
36
+            $string .= ' #'.$this->info->getCode();
37 37
         }
38 38
 
39 39
         $string .=
40
-            ': ' .
41
-            $this->info->getMessage() .
40
+            ': '.
41
+            $this->info->getMessage().
42 42
             PHP_EOL;
43 43
 
44 44
         return $string;
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
         foreach ($calls as $call)
57 57
         {
58
-            $string .= $call->toString() . PHP_EOL;
58
+            $string .= $call->toString().PHP_EOL;
59 59
         }
60 60
 
61 61
         return $string;
@@ -73,11 +73,11 @@  discard block
 block discarded – undo
73 73
         }
74 74
 
75 75
         return
76
-            PHP_EOL .
77
-            PHP_EOL .
78
-            'Previous error:' .
79
-            PHP_EOL .
80
-            PHP_EOL .
76
+            PHP_EOL.
77
+            PHP_EOL.
78
+            'Previous error:'.
79
+            PHP_EOL.
80
+            PHP_EOL.
81 81
             $this->info->getPrevious()->toString();
82 82
     }
83 83
 }
Please login to merge, or discard this patch.
src/Transliteration.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      * @param bool $lowercase
62 62
      * @return Transliteration
63 63
      */
64
-    public function setLowercase(bool $lowercase=true) : Transliteration
64
+    public function setLowercase(bool $lowercase = true) : Transliteration
65 65
     {
66 66
         $this->setOption(self::OPTION_LOWER_CASE, $lowercase);
67 67
 
@@ -99,8 +99,8 @@  discard block
 block discarded – undo
99 99
 
100 100
         $result = implode('', $keep);
101 101
 
102
-        while (strpos($result, $space . $space) !== false) {
103
-            $result = str_replace($space . $space, $space, $result);
102
+        while (strpos($result, $space.$space) !== false) {
103
+            $result = str_replace($space.$space, $space, $result);
104 104
         }
105 105
 
106 106
         $result = trim($result, $space);
Please login to merge, or discard this patch.
src/HTMLTag/CannedTags.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      * @param string|number|StringBuilder_Interface|NULL $content
30 30
      * @return HTMLTag
31 31
      */
32
-    public static function anchor(string $url, $content=null) : HTMLTag
32
+    public static function anchor(string $url, $content = null) : HTMLTag
33 33
     {
34 34
         return HTMLTag::create('a')
35 35
             ->href($url)
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      * @param string|number|StringBuilder_Interface|NULL $content
47 47
      * @return HTMLTag
48 48
      */
49
-    public static function div($content=null) : HTMLTag
49
+    public static function div($content = null) : HTMLTag
50 50
     {
51 51
         return HTMLTag::create('div')->setContent($content);
52 52
     }
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      * @param string|number|StringBuilder_Interface|NULL $content
56 56
      * @return HTMLTag
57 57
      */
58
-    public static function p($content=null) : HTMLTag
58
+    public static function p($content = null) : HTMLTag
59 59
     {
60 60
         return HTMLTag::create('p')->setContent($content);
61 61
     }
Please login to merge, or discard this patch.
src/ConvertHelper/IntervalConverter.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     
37 37
     public function __construct()
38 38
     {
39
-        if(class_exists('\AppLocalize\Localization')) {
39
+        if (class_exists('\AppLocalize\Localization')) {
40 40
             \AppLocalize\Localization::onLocaleChanged(array($this, 'handle_localeChanged'));
41 41
         }
42 42
     }
@@ -69,17 +69,17 @@  discard block
 block discarded – undo
69 69
         $keep = $this->resolveTokens($interval);
70 70
 
71 71
         $parts = array();
72
-        foreach($keep as $token)
72
+        foreach ($keep as $token)
73 73
         {
74 74
             $value = $interval->getToken($token);
75
-            if($value <= 0) {
75
+            if ($value <= 0) {
76 76
                 continue;
77 77
             }
78 78
             
79 79
             $parts[] = $this->translateToken($token, $interval);
80 80
         }
81 81
         
82
-        if(count($parts) == 1) {
82
+        if (count($parts) == 1) {
83 83
             return $parts[0];
84 84
         }
85 85
         
@@ -101,10 +101,10 @@  discard block
 block discarded – undo
101 101
         $value = $interval->getToken($token);
102 102
         
103 103
         $suffix = 'p';
104
-        if($value == 1) { $suffix = 's'; }
104
+        if ($value == 1) { $suffix = 's'; }
105 105
         $token .= $suffix;
106 106
         
107
-        if(!isset(self::$texts[$token]))
107
+        if (!isset(self::$texts[$token]))
108 108
         {
109 109
             throw new ConvertHelper_Exception(
110 110
                 'Missing interval translation',
@@ -134,9 +134,9 @@  discard block
 block discarded – undo
134 134
     {
135 135
         $offset = 0;
136 136
         
137
-        foreach($this->tokens as $token) 
137
+        foreach ($this->tokens as $token) 
138 138
         {
139
-            if($interval->getToken($token) > 0) 
139
+            if ($interval->getToken($token) > 0) 
140 140
             {
141 141
                 return array_slice($this->tokens, $offset);
142 142
             }
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
     */
153 153
     protected function initTexts() : void
154 154
     {
155
-        if(isset(self::$texts)) {
155
+        if (isset(self::$texts)) {
156 156
             return;
157 157
         }
158 158
         
Please login to merge, or discard this patch.
src/FileHelper/PHPClassInfo/Class.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
     {
112 112
         $name = $this->getName();
113 113
         
114
-        if($this->info->hasNamespace()) {
114
+        if ($this->info->hasNamespace()) {
115 115
             $name = $this->info->getNamespace().'\\'.$this->name;
116 116
         }
117 117
         
@@ -166,12 +166,12 @@  discard block
 block discarded – undo
166 166
         $parts[] = $this->type;
167 167
         $parts[] = $this->getName();
168 168
         
169
-        if(!empty($this->extends)) {
169
+        if (!empty($this->extends)) {
170 170
             $parts[] = 'extends';
171 171
             $parts[] = $this->extends;
172 172
         }
173 173
         
174
-        if(!empty($this->implements)) {
174
+        if (!empty($this->implements)) {
175 175
             $parts[] = 'implements';
176 176
             $parts[] = implode(', ', $this->implements);
177 177
         }
@@ -195,9 +195,9 @@  discard block
 block discarded – undo
195 195
 
196 196
     protected function analyzeCode() : void
197 197
     {
198
-        if($this->keyword === 'abstract') {
198
+        if ($this->keyword === 'abstract') {
199 199
             $this->abstract = true;
200
-        } else if($this->keyword === 'final') {
200
+        } else if ($this->keyword === 'final') {
201 201
             $this->final = true;
202 202
         }
203 203
         
@@ -214,16 +214,16 @@  discard block
 block discarded – undo
214 214
         
215 215
         $tokenName = 'none';
216 216
         
217
-        foreach($parts as $part)
217
+        foreach ($parts as $part)
218 218
         {
219 219
             $part = str_replace(',', '', $part);
220 220
             $part = trim($part);
221
-            if(empty($part)) {
221
+            if (empty($part)) {
222 222
                 continue;
223 223
             }
224 224
             
225 225
             $name = strtolower($part);
226
-            if($name === 'extends' || $name === 'implements') {
226
+            if ($name === 'extends' || $name === 'implements') {
227 227
                 $tokenName = $name;
228 228
                 continue;
229 229
             }
@@ -233,13 +233,13 @@  discard block
 block discarded – undo
233 233
         
234 234
         $this->implements = $tokens['implements'];
235 235
         
236
-        if(!empty($this->implements)) {
236
+        if (!empty($this->implements)) {
237 237
             usort($this->implements, function(string $a, string $b) {
238 238
                 return strnatcasecmp($a, $b);
239 239
             });
240 240
         }
241 241
         
242
-        if(!empty($tokens['extends'])) {
242
+        if (!empty($tokens['extends'])) {
243 243
             $this->extends = $tokens['extends'][0];
244 244
         }
245 245
     }
Please login to merge, or discard this patch.
src/StyleCollection/StylesRenderer.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 
27 27
     public function render() : string
28 28
     {
29
-        if($this->collection->hasStyles())
29
+        if ($this->collection->hasStyles())
30 30
         {
31 31
             return implode(
32 32
                 $this->resolveSeparator(),
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 
40 40
     private function resolveSuffix() : string
41 41
     {
42
-        if($this->options->isTrailingSemicolonEnabled())
42
+        if ($this->options->isTrailingSemicolonEnabled())
43 43
         {
44 44
             return ';';
45 45
         }
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
     private function resolveSeparator() : string
51 51
     {
52
-        if($this->options->isNewlineEnabled())
52
+        if ($this->options->isNewlineEnabled())
53 53
         {
54 54
             return ';'.PHP_EOL;
55 55
         }
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     {
62 62
         $indentLevel = $this->options->getIndentLevel();
63 63
 
64
-        if($indentLevel > 0)
64
+        if ($indentLevel > 0)
65 65
         {
66 66
             return str_repeat($this->options->getIndentChar(), $indentLevel);
67 67
         }
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
     private function resolveValueSpace() : string
73 73
     {
74
-        if($this->options->isSpaceBeforeValueEnabled())
74
+        if ($this->options->isSpaceBeforeValueEnabled())
75 75
         {
76 76
             return ' ';
77 77
         }
@@ -86,12 +86,12 @@  discard block
 block discarded – undo
86 86
         $indent = $this->resolveIndent();
87 87
         $valueSpace = $this->resolveValueSpace();
88 88
 
89
-        if($this->options->isSortingEnabled())
89
+        if ($this->options->isSortingEnabled())
90 90
         {
91 91
             ksort($styles);
92 92
         }
93 93
 
94
-        foreach($styles as $name => $value)
94
+        foreach ($styles as $name => $value)
95 95
         {
96 96
             $lines[] = sprintf(
97 97
                 '%s%s:%s%s',
Please login to merge, or discard this patch.
src/StyleCollection/StyleOptions.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,12 +31,12 @@  discard block
 block discarded – undo
31 31
         );
32 32
     }
33 33
 
34
-    public function enableSorting(bool $enabled=true) : StyleOptions
34
+    public function enableSorting(bool $enabled = true) : StyleOptions
35 35
     {
36 36
         return $this->setOption(self::OPTION_SORTING, $enabled);
37 37
     }
38 38
 
39
-    public function enableSpaceBeforeValue(bool $enabled=true) : StyleOptions
39
+    public function enableSpaceBeforeValue(bool $enabled = true) : StyleOptions
40 40
     {
41 41
         return $this->setOption(self::OPTION_SPACE_BEFORE_VALUE, $enabled);
42 42
     }
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      * @param bool $enabled
46 46
      * @return $this
47 47
      */
48
-    public function enableNewline(bool $enabled=true) : StyleOptions
48
+    public function enableNewline(bool $enabled = true) : StyleOptions
49 49
     {
50 50
         return $this->setOption(self::OPTION_NEWLINES, $enabled);
51 51
     }
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
         return $this->getStringOption(self::OPTION_INDENT_CHAR);
119 119
     }
120 120
 
121
-    public function enableTrailingSemicolon(bool $enabled=true) : StyleOptions
121
+    public function enableTrailingSemicolon(bool $enabled = true) : StyleOptions
122 122
     {
123 123
         return $this->setOption(self::OPTION_TRAILING_SEMICOLON, $enabled);
124 124
     }
Please login to merge, or discard this patch.