Passed
Push — master ( 025a78...0027ff )
by Sebastian
03:09
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/Serializer.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -39,13 +39,13 @@  discard block
 block discarded – undo
39 39
             self::SERIALIZED_PREVIOUS => null,
40 40
         );
41 41
 
42
-        if($info->hasPrevious())
42
+        if ($info->hasPrevious())
43 43
         {
44 44
             $result[self::SERIALIZED_PREVIOUS] = $info->getPrevious()->serialize();
45 45
         }
46 46
 
47 47
         $calls = $info->getCalls();
48
-        foreach($calls as $call)
48
+        foreach ($calls as $call)
49 49
         {
50 50
             $result[self::SERIALIZED_CALLS][] = $call->serialize();
51 51
         }
@@ -63,12 +63,12 @@  discard block
 block discarded – undo
63 63
         $data = self::validateSerializedData($serialized);
64 64
         $data[self::SERIALIZED_PREVIOUS] = self::unserializePrevious($data[self::SERIALIZED_PREVIOUS]);
65 65
 
66
-        if(!isset($data[self::SERIALIZED_CLASS]))
66
+        if (!isset($data[self::SERIALIZED_CLASS]))
67 67
         {
68 68
             $data[self::SERIALIZED_CLASS] = '';
69 69
         }
70 70
 
71
-        if(!isset($data[self::SERIALIZED_DETAILS]))
71
+        if (!isset($data[self::SERIALIZED_DETAILS]))
72 72
         {
73 73
             $data[self::SERIALIZED_DETAILS] = '';
74 74
         }
@@ -94,9 +94,9 @@  discard block
 block discarded – undo
94 94
             self::SERIALIZED_CALLS => 'array'
95 95
         );
96 96
 
97
-        foreach($keys as $key => $type)
97
+        foreach ($keys as $key => $type)
98 98
         {
99
-            if(!isset($serialized[$key]) || gettype($serialized[$key]) !== $type)
99
+            if (!isset($serialized[$key]) || gettype($serialized[$key]) !== $type)
100 100
             {
101 101
                 throw self::createTypeException($key, $type);
102 102
             }
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 
121 121
     private static function unserializePrevious(?array $previous) : ?ConvertHelper_ThrowableInfo
122 122
     {
123
-        if(!empty($previous))
123
+        if (!empty($previous))
124 124
         {
125 125
             return ConvertHelper_ThrowableInfo::fromSerialized($previous);
126 126
         }
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.