Test Failed
Pull Request — master (#853)
by butschster
07:53 queued 01:12
created
src/Exceptions/src/Renderer/PlainRenderer.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     ): string {
23 23
         $verbosity ??= $this->defaultVerbosity;
24 24
         $exceptions = [$exception];
25
-        while ($exception = $exception->getPrevious()) {
25
+        while ($exception = $exception->getPrevious()){
26 26
             $exceptions[] = $exception;
27 27
         }
28 28
 
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         $result = [];
32 32
         $rootDir = \getcwd();
33 33
 
34
-        foreach ($exceptions as $exception) {
34
+        foreach ($exceptions as $exception){
35 35
             $file = \str_starts_with($exception->getFile(), $rootDir)
36 36
                 ? \substr($exception->getFile(), \strlen($rootDir) + 1)
37 37
                 : $exception->getFile();
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
                 $exception->getLine(),
45 45
             );
46 46
 
47
-            if ($verbosity->value >= Verbosity::DEBUG->value) {
47
+            if ($verbosity->value >= Verbosity::DEBUG->value){
48 48
                 $row .= $this->renderTrace($exception, new Highlighter(new PlainStyle()));
49
-            } elseif ($verbosity->value >= Verbosity::VERBOSE->value) {
49
+            } elseif ($verbosity->value >= Verbosity::VERBOSE->value){
50 50
                 $row .= $this->renderTrace($exception);
51 51
             }
52 52
 
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     private function renderTrace(\Throwable $e, Highlighter $h = null): string
65 65
     {
66 66
         $stacktrace = $this->getStacktrace($e);
67
-        if ($stacktrace === []) {
67
+        if ($stacktrace === []){
68 68
             return '';
69 69
         }
70 70
 
@@ -73,20 +73,20 @@  discard block
 block discarded – undo
73 73
 
74 74
         $pad = \strlen((string)\count($stacktrace));
75 75
 
76
-        foreach ($stacktrace as $i => $trace) {
77
-            if (isset($trace['type'], $trace['class'])) {
76
+        foreach ($stacktrace as $i => $trace){
77
+            if (isset($trace['type'], $trace['class'])){
78 78
                 $line = \sprintf(
79 79
                     '%s. %s%s%s()',
80
-                    \str_pad((string)((int) $i + 1), $pad, ' ', \STR_PAD_LEFT),
80
+                    \str_pad((string)((int)$i + 1), $pad, ' ', \STR_PAD_LEFT),
81 81
                     $trace['class'],
82 82
                     $trace['type'],
83 83
                     $trace['function']
84 84
                 );
85
-            } else {
85
+            }else{
86 86
                 $line = $trace['function'];
87 87
             }
88 88
 
89
-            if (isset($trace['file'])) {
89
+            if (isset($trace['file'])){
90 90
                 $file = \str_starts_with($trace['file'], $rootDir)
91 91
                     ? \substr($trace['file'], \strlen($rootDir) + 1)
92 92
                     : $trace['file'];
@@ -94,23 +94,23 @@  discard block
 block discarded – undo
94 94
                 $line .= \sprintf(' at %s:%s', $file, $trace['line']);
95 95
             }
96 96
 
97
-            if (\in_array($line, $this->lines, true)) {
97
+            if (\in_array($line, $this->lines, true)){
98 98
                 continue;
99 99
             }
100 100
 
101 101
             $this->lines[] = $line;
102 102
 
103
-            $result .= $line . "\n";
103
+            $result .= $line."\n";
104 104
 
105
-            if ($h !== null && !empty($trace['file'])) {
105
+            if ($h !== null && !empty($trace['file'])){
106 106
                 $result .= $h->highlightLines(
107 107
                     \file_get_contents($trace['file']),
108 108
                     $trace['line'],
109 109
                     self::SHOW_LINES
110
-                ) . "\n";
110
+                )."\n";
111 111
             }
112 112
         }
113 113
 
114
-        return $result . "\n";
114
+        return $result."\n";
115 115
     }
116 116
 }
Please login to merge, or discard this patch.