Passed
Push — master ( 48358c...5b4064 )
by Valentin
13:24 queued 08:47
created
src/Boot/src/AbstractKernel.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -97,8 +97,8 @@  discard block
 block discarded – undo
97 97
      */
98 98
     public function serve()
99 99
     {
100
-        foreach ($this->dispatchers as $dispatcher) {
101
-            if ($dispatcher->canServe()) {
100
+        foreach ($this->dispatchers as $dispatcher){
101
+            if ($dispatcher->canServe()){
102 102
                 return $this->container->runScope(
103 103
                     [DispatcherInterface::class => $dispatcher],
104 104
                     [$dispatcher, 'serve']
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
         EnvironmentInterface $environment = null,
125 125
         bool $handleErrors = true
126 126
     ): ?self {
127
-        if ($handleErrors) {
127
+        if ($handleErrors){
128 128
             ExceptionHandler::register();
129 129
         }
130 130
 
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
         $core = new static(new Container(), $directories);
134 134
         $core->container->bindSingleton(EnvironmentInterface::class, $environment);
135 135
 
136
-        try {
136
+        try{
137 137
             // will protect any against env overwrite action
138 138
             $core->container->runScope(
139 139
                 [EnvironmentInterface::class => $environment],
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
                     $core->bootstrap();
143 143
                 }
144 144
             );
145
-        } catch (\Throwable $e) {
145
+        }catch (\Throwable $e){
146 146
             ExceptionHandler::handleException($e);
147 147
 
148 148
             return null;
Please login to merge, or discard this patch.
Braces   +11 added lines, -5 removed lines patch added patch discarded remove patch
@@ -97,8 +97,10 @@  discard block
 block discarded – undo
97 97
      */
98 98
     public function serve()
99 99
     {
100
-        foreach ($this->dispatchers as $dispatcher) {
101
-            if ($dispatcher->canServe()) {
100
+        foreach ($this->dispatchers as $dispatcher)
101
+        {
102
+            if ($dispatcher->canServe())
103
+            {
102 104
                 return $this->container->runScope(
103 105
                     [DispatcherInterface::class => $dispatcher],
104 106
                     [$dispatcher, 'serve']
@@ -124,7 +126,8 @@  discard block
 block discarded – undo
124 126
         EnvironmentInterface $environment = null,
125 127
         bool $handleErrors = true
126 128
     ): ?self {
127
-        if ($handleErrors) {
129
+        if ($handleErrors)
130
+        {
128 131
             ExceptionHandler::register();
129 132
         }
130 133
 
@@ -133,7 +136,8 @@  discard block
 block discarded – undo
133 136
         $core = new static(new Container(), $directories);
134 137
         $core->container->bindSingleton(EnvironmentInterface::class, $environment);
135 138
 
136
-        try {
139
+        try
140
+        {
137 141
             // will protect any against env overwrite action
138 142
             $core->container->runScope(
139 143
                 [EnvironmentInterface::class => $environment],
@@ -142,7 +146,9 @@  discard block
 block discarded – undo
142 146
                     $core->bootstrap();
143 147
                 }
144 148
             );
145
-        } catch (\Throwable $e) {
149
+        }
150
+        catch (\Throwable $e)
151
+        {
146 152
             ExceptionHandler::handleException($e);
147 153
 
148 154
             return null;
Please login to merge, or discard this patch.
src/Exceptions/tests/HighlighterTest.php 1 patch
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 
29 29
     public function testHtmlHighlighter(): void
30 30
     {
31
-        $highlighter = new Highlighter(new HtmlStyle(HtmlStyle::DEFAULT));
31
+        $highlighter = new Highlighter(new HtmlStyle(HtmlStyle::default));
32 32
 
33 33
         $this->assertStringContainsString('HighlighterTest', $highlighter->highlight(file_get_contents(__FILE__)));
34 34
     }
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
     public function testHtmlHighlighterLines(): void
61 61
     {
62
-        $highlighter = new Highlighter(new HtmlStyle(HtmlStyle::DEFAULT));
62
+        $highlighter = new Highlighter(new HtmlStyle(HtmlStyle::default));
63 63
 
64 64
         $this->assertStringContainsString(
65 65
             'HighlighterTest',
Please login to merge, or discard this patch.
src/Exceptions/views/exception.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
         </div>
48 48
     </div>
49 49
     <?php
50
-    foreach ($valueWrapper->getValues() as $id => $content) {
50
+    foreach ($valueWrapper->getValues() as $id => $content){
51 51
         echo "<div id=\"argument-{$id}\" style=\"display: none\">{$content}</div>";
52 52
     }
53 53
     ?>
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,8 @@
 block discarded – undo
47 47
         </div>
48 48
     </div>
49 49
     <?php
50
-    foreach ($valueWrapper->getValues() as $id => $content) {
50
+    foreach ($valueWrapper->getValues() as $id => $content)
51
+    {
51 52
         echo "<div id=\"argument-{$id}\" style=\"display: none\">{$content}</div>";
52 53
     }
53 54
     ?>
Please login to merge, or discard this patch.
src/Exceptions/views/partials/tags.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <div class="tags">
2 2
     <div class="container">
3 3
         <?php
4
-        foreach ($tags as $tag => $value) {
4
+        foreach ($tags as $tag => $value){
5 5
             echo sprintf(
6 6
                 '<div class="tag"><div class="name">%s</div><div class="value">%s</div></div>',
7 7
                 $tag,
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,8 @@
 block discarded – undo
1 1
 <div class="tags">
2 2
     <div class="container">
3 3
         <?php
4
-        foreach ($tags as $tag => $value) {
4
+        foreach ($tags as $tag => $value)
5
+        {
5 6
             echo sprintf(
6 7
                 '<div class="tag"><div class="name">%s</div><div class="value">%s</div></div>',
7 8
                 $tag,
Please login to merge, or discard this patch.
src/Exceptions/views/partials/logs.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
             <table>
6 6
                 <?php
7 7
                 /** @var \Spiral\Logger\Event\LogEvent $log */
8
-                foreach ($logEvents as $log) {
8
+                foreach ($logEvents as $log){
9 9
                     echo sprintf(
10 10
                         '<tr><td class="channel">%s</td><td class="message">%s</td></tr>',
11 11
                         $log->getChannel(),
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,8 @@
 block discarded – undo
5 5
             <table>
6 6
                 <?php
7 7
                 /** @var \Spiral\Logger\Event\LogEvent $log */
8
-                foreach ($logEvents as $log) {
8
+                foreach ($logEvents as $log)
9
+                {
9 10
                     echo sprintf(
10 11
                         '<tr><td class="channel">%s</td><td class="message">%s</td></tr>',
11 12
                         $log->getChannel(),
Please login to merge, or discard this patch.
src/Exceptions/views/partials/variables.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,12 +6,12 @@
 block discarded – undo
6 6
             </div>
7 7
             <div class="dump" id="<?= md5($name) ?>-variables" style="display: none;">
8 8
                 <?php
9
-                if (!is_array($content)) {
9
+                if (!is_array($content)){
10 10
                     echo is_scalar($value) ? htmlspecialchars($value) : json_encode($value, JSON_PRETTY_PRINT);
11
-                } else { ?>
11
+                }else{ ?>
12 12
                     <table>
13 13
                         <?php
14
-                        foreach ($content as $key => $value) {
14
+                        foreach ($content as $key => $value){
15 15
                             // todo: values
16 16
                             echo sprintf(
17 17
                                 '<tr><td class="name">%s</td><td>%s</td></tr>',
Please login to merge, or discard this patch.
Braces   +8 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,12 +6,17 @@
 block discarded – undo
6 6
             </div>
7 7
             <div class="dump" id="<?= md5($name) ?>-variables" style="display: none;">
8 8
                 <?php
9
-                if (!is_array($content)) {
9
+                if (!is_array($content))
10
+                {
10 11
                     echo is_scalar($value) ? htmlspecialchars($value) : json_encode($value, JSON_PRETTY_PRINT);
11
-                } else { ?>
12
+                }
13
+                else
14
+                {
15
+?>
12 16
                     <table>
13 17
                         <?php
14
-                        foreach ($content as $key => $value) {
18
+                        foreach ($content as $key => $value)
19
+                        {
15 20
                             // todo: values
16 21
                             echo sprintf(
17 22
                                 '<tr><td class="name">%s</td><td>%s</td></tr>',
Please login to merge, or discard this patch.
src/Exceptions/views/partials/chain.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -4,23 +4,23 @@  discard block
 block discarded – undo
4 4
  * @var Throwable                       $exception
5 5
  * @var \Spiral\Exceptions\ValueWrapper $valueWrapper
6 6
  */
7
-foreach ($stacktrace as $index => $trace) {
8
-    if (empty($trace['file']) && isset($stacktrace[$index - 1]['file'])) {
7
+foreach ($stacktrace as $index => $trace){
8
+    if (empty($trace['file']) && isset($stacktrace[$index - 1]['file'])){
9 9
         $trace['file'] = $stacktrace[$index - 1]['file'];
10 10
         $trace['line'] = $stacktrace[$index - 1]['line'];
11 11
     }
12 12
 
13
-    if (!isset($stacktrace[$index + 1])) {
13
+    if (!isset($stacktrace[$index + 1])){
14 14
         $trace['file'] = $exception->getFile();
15 15
         $trace['line'] = $exception->getLine();
16 16
     }
17 17
 
18
-    if (!isset($trace['function']) || !isset($trace['file'])) {
18
+    if (!isset($trace['function']) || !isset($trace['file'])){
19 19
         continue;
20 20
     }
21 21
 
22
-    $function = '<strong>' . $trace['function'] . '</strong>';
23
-    if (isset($trace['type']) && isset($trace['class'])) {
22
+    $function = '<strong>'.$trace['function'].'</strong>';
23
+    if (isset($trace['type']) && isset($trace['class'])){
24 24
         $reflection = new ReflectionClass($trace['class']);
25 25
         $function = sprintf(
26 26
             '<span title="%s">%s</span>%s%s',
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     }
33 33
 
34 34
     $args = [];
35
-    if (isset($trace['args'])) {
35
+    if (isset($trace['args'])){
36 36
         $args = $valueWrapper->wrap($trace['args']);
37 37
     } ?>
38 38
     <div class="call">
Please login to merge, or discard this patch.
Braces   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -4,23 +4,28 @@  discard block
 block discarded – undo
4 4
  * @var Throwable                       $exception
5 5
  * @var \Spiral\Exceptions\ValueWrapper $valueWrapper
6 6
  */
7
-foreach ($stacktrace as $index => $trace) {
8
-    if (empty($trace['file']) && isset($stacktrace[$index - 1]['file'])) {
7
+foreach ($stacktrace as $index => $trace)
8
+{
9
+    if (empty($trace['file']) && isset($stacktrace[$index - 1]['file']))
10
+    {
9 11
         $trace['file'] = $stacktrace[$index - 1]['file'];
10 12
         $trace['line'] = $stacktrace[$index - 1]['line'];
11 13
     }
12 14
 
13
-    if (!isset($stacktrace[$index + 1])) {
15
+    if (!isset($stacktrace[$index + 1]))
16
+    {
14 17
         $trace['file'] = $exception->getFile();
15 18
         $trace['line'] = $exception->getLine();
16 19
     }
17 20
 
18
-    if (!isset($trace['function']) || !isset($trace['file'])) {
21
+    if (!isset($trace['function']) || !isset($trace['file']))
22
+    {
19 23
         continue;
20 24
     }
21 25
 
22 26
     $function = '<strong>' . $trace['function'] . '</strong>';
23
-    if (isset($trace['type']) && isset($trace['class'])) {
27
+    if (isset($trace['type']) && isset($trace['class']))
28
+    {
24 29
         $reflection = new ReflectionClass($trace['class']);
25 30
         $function = sprintf(
26 31
             '<span title="%s">%s</span>%s%s',
@@ -32,7 +37,8 @@  discard block
 block discarded – undo
32 37
     }
33 38
 
34 39
     $args = [];
35
-    if (isset($trace['args'])) {
40
+    if (isset($trace['args']))
41
+    {
36 42
         $args = $valueWrapper->wrap($trace['args']);
37 43
     } ?>
38 44
     <div class="call">
Please login to merge, or discard this patch.
src/Exceptions/src/PlainHandler.php 2 patches
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -25,17 +25,17 @@  discard block
 block discarded – undo
25 25
     {
26 26
         $result = '';
27 27
 
28
-        if ($e instanceof \Error) {
29
-            $result .= '[' . get_class($e) . "]\n" . $e->getMessage();
30
-        } else {
31
-            $result .= '[' . get_class($e) . "]\n" . $e->getMessage();
28
+        if ($e instanceof \Error){
29
+            $result .= '['.get_class($e)."]\n".$e->getMessage();
30
+        }else{
31
+            $result .= '['.get_class($e)."]\n".$e->getMessage();
32 32
         }
33 33
 
34 34
         $result .= sprintf("in %s:%s\n", $e->getFile(), $e->getLine());
35 35
 
36
-        if ($verbosity >= self::VERBOSITY_DEBUG) {
36
+        if ($verbosity >= self::VERBOSITY_DEBUG){
37 37
             $result .= $this->renderTrace($e, new Highlighter(new PlainStyle()));
38
-        } elseif ($verbosity >= self::VERBOSITY_VERBOSE) {
38
+        } elseif ($verbosity >= self::VERBOSITY_VERBOSE){
39 39
             $result .= $this->renderTrace($e);
40 40
         }
41 41
 
@@ -52,38 +52,38 @@  discard block
 block discarded – undo
52 52
     private function renderTrace(\Throwable $e, Highlighter $h = null): string
53 53
     {
54 54
         $stacktrace = $this->getStacktrace($e);
55
-        if (empty($stacktrace)) {
55
+        if (empty($stacktrace)){
56 56
             return '';
57 57
         }
58 58
 
59 59
         $result = "\nException Trace:\n";
60 60
 
61
-        foreach ($stacktrace as $trace) {
62
-            if (isset($trace['type']) && isset($trace['class'])) {
61
+        foreach ($stacktrace as $trace){
62
+            if (isset($trace['type']) && isset($trace['class'])){
63 63
                 $line = sprintf(
64 64
                     ' %s%s%s()',
65 65
                     $trace['class'],
66 66
                     $trace['type'],
67 67
                     $trace['function']
68 68
                 );
69
-            } else {
69
+            }else{
70 70
                 $line = $trace['function'];
71 71
             }
72 72
 
73
-            if (isset($trace['file'])) {
73
+            if (isset($trace['file'])){
74 74
                 $line .= sprintf(' at %s:%s', $trace['file'], $trace['line']);
75
-            } else {
75
+            }else{
76 76
                 $line .= sprintf(' at %s:%s', 'n/a', 'n/a');
77 77
             }
78 78
 
79
-            $result .= $line . "\n";
79
+            $result .= $line."\n";
80 80
 
81
-            if (!empty($h) && !empty($trace['file'])) {
81
+            if (!empty($h) && !empty($trace['file'])){
82 82
                 $result .= $h->highlightLines(
83 83
                     file_get_contents($trace['file']),
84 84
                     $trace['line'],
85 85
                     static::SHOW_LINES
86
-                ) . "\n";
86
+                )."\n";
87 87
             }
88 88
         }
89 89
 
Please login to merge, or discard this patch.
Braces   +26 added lines, -11 removed lines patch added patch discarded remove patch
@@ -25,17 +25,23 @@  discard block
 block discarded – undo
25 25
     {
26 26
         $result = '';
27 27
 
28
-        if ($e instanceof \Error) {
28
+        if ($e instanceof \Error)
29
+        {
29 30
             $result .= '[' . get_class($e) . "]\n" . $e->getMessage();
30
-        } else {
31
+        }
32
+        else
33
+        {
31 34
             $result .= '[' . get_class($e) . "]\n" . $e->getMessage();
32 35
         }
33 36
 
34 37
         $result .= sprintf("in %s:%s\n", $e->getFile(), $e->getLine());
35 38
 
36
-        if ($verbosity >= self::VERBOSITY_DEBUG) {
39
+        if ($verbosity >= self::VERBOSITY_DEBUG)
40
+        {
37 41
             $result .= $this->renderTrace($e, new Highlighter(new PlainStyle()));
38
-        } elseif ($verbosity >= self::VERBOSITY_VERBOSE) {
42
+        }
43
+        elseif ($verbosity >= self::VERBOSITY_VERBOSE)
44
+        {
39 45
             $result .= $this->renderTrace($e);
40 46
         }
41 47
 
@@ -52,33 +58,42 @@  discard block
 block discarded – undo
52 58
     private function renderTrace(\Throwable $e, Highlighter $h = null): string
53 59
     {
54 60
         $stacktrace = $this->getStacktrace($e);
55
-        if (empty($stacktrace)) {
61
+        if (empty($stacktrace))
62
+        {
56 63
             return '';
57 64
         }
58 65
 
59 66
         $result = "\nException Trace:\n";
60 67
 
61
-        foreach ($stacktrace as $trace) {
62
-            if (isset($trace['type']) && isset($trace['class'])) {
68
+        foreach ($stacktrace as $trace)
69
+        {
70
+            if (isset($trace['type']) && isset($trace['class']))
71
+            {
63 72
                 $line = sprintf(
64 73
                     ' %s%s%s()',
65 74
                     $trace['class'],
66 75
                     $trace['type'],
67 76
                     $trace['function']
68 77
                 );
69
-            } else {
78
+            }
79
+            else
80
+            {
70 81
                 $line = $trace['function'];
71 82
             }
72 83
 
73
-            if (isset($trace['file'])) {
84
+            if (isset($trace['file']))
85
+            {
74 86
                 $line .= sprintf(' at %s:%s', $trace['file'], $trace['line']);
75
-            } else {
87
+            }
88
+            else
89
+            {
76 90
                 $line .= sprintf(' at %s:%s', 'n/a', 'n/a');
77 91
             }
78 92
 
79 93
             $result .= $line . "\n";
80 94
 
81
-            if (!empty($h) && !empty($trace['file'])) {
95
+            if (!empty($h) && !empty($trace['file']))
96
+            {
82 97
                 $result .= $h->highlightLines(
83 98
                     file_get_contents($trace['file']),
84 99
                     $trace['line'],
Please login to merge, or discard this patch.
src/Exceptions/src/HtmlHandler.php 3 patches
Upper-Lower-Casing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     /**
25 25
      * Visual styles.
26 26
      */
27
-    public const DEFAULT  = 'default';
27
+    public const default  = 'default';
28 28
     public const INVERTED = 'inverted';
29 29
 
30 30
     /** @var HtmlRenderer */
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     protected $highlighter = null;
35 35
 
36 36
     /** @var string */
37
-    protected $style = self::DEFAULT;
37
+    protected $style = self::default;
38 38
 
39 39
     /** @var Dumper */
40 40
     protected $dumper = null;
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     /**
46 46
      * @param string $style
47 47
      */
48
-    public function __construct(string $style = self::DEFAULT)
48
+    public function __construct(string $style = self::default)
49 49
     {
50 50
         $this->style = $style;
51 51
         $this->dumper = new Dumper();
@@ -54,11 +54,11 @@  discard block
 block discarded – undo
54 54
             $this->renderer = new HtmlRenderer(HtmlRenderer::INVERTED);
55 55
             $this->highlighter = new Highlighter(new HtmlStyle(HtmlStyle::INVERTED));
56 56
         } else {
57
-            $this->renderer = new HtmlRenderer(HtmlRenderer::DEFAULT);
58
-            $this->highlighter = new Highlighter(new HtmlStyle(HtmlStyle::DEFAULT));
57
+            $this->renderer = new HtmlRenderer(HtmlRenderer::default);
58
+            $this->highlighter = new Highlighter(new HtmlStyle(HtmlStyle::default));
59 59
         }
60 60
 
61
-        $this->dumper->setRenderer(Dumper::RETURN, $this->renderer);
61
+        $this->dumper->setRenderer(Dumper::return, $this->renderer);
62 62
     }
63 63
 
64 64
     /**
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -50,10 +50,10 @@  discard block
 block discarded – undo
50 50
         $this->style = $style;
51 51
         $this->dumper = new Dumper();
52 52
 
53
-        if ($style == self::INVERTED) {
53
+        if ($style == self::INVERTED){
54 54
             $this->renderer = new HtmlRenderer(HtmlRenderer::INVERTED);
55 55
             $this->highlighter = new Highlighter(new HtmlStyle(HtmlStyle::INVERTED));
56
-        } else {
56
+        }else{
57 57
             $this->renderer = new HtmlRenderer(HtmlRenderer::DEFAULT);
58 58
             $this->highlighter = new Highlighter(new HtmlStyle(HtmlStyle::DEFAULT));
59 59
         }
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
             'message'      => $this->getMessage($e),
83 83
             'exception'    => $e,
84 84
             'valueWrapper' => new ValueWrapper($this->dumper, $this->renderer, $verbosity),
85
-            'style'        => $this->render('styles/' . $this->style),
85
+            'style'        => $this->render('styles/'.$this->style),
86 86
             'footer'       => $this->render('partials/footer'),
87 87
             'variables'    => '',
88 88
             'logs'         => '',
@@ -105,20 +105,20 @@  discard block
 block discarded – undo
105 105
             'valueWrapper' => $options['valueWrapper'],
106 106
         ]);
107 107
 
108
-        if ($this->state !== null) {
109
-            if ($this->state->getTags() !== []) {
108
+        if ($this->state !== null){
109
+            if ($this->state->getTags() !== []){
110 110
                 $options['tags'] = $this->render('partials/tags', [
111 111
                     'tags' => $this->state->getTags(),
112 112
                 ]);
113 113
             }
114 114
 
115
-            if ($this->state->getLogEvents() !== []) {
115
+            if ($this->state->getLogEvents() !== []){
116 116
                 $options['logs'] = $this->render('partials/logs', [
117 117
                     'logEvents' => $this->state->getLogEvents(),
118 118
                 ]);
119 119
             }
120 120
 
121
-            if ($this->state->getVariables() !== []) {
121
+            if ($this->state->getVariables() !== []){
122 122
                 $options['variables'] = $this->render('partials/variables', [
123 123
                     'variables' => $this->state->getVariables(),
124 124
                 ]);
Please login to merge, or discard this patch.
Braces   +13 added lines, -6 removed lines patch added patch discarded remove patch
@@ -50,10 +50,13 @@  discard block
 block discarded – undo
50 50
         $this->style = $style;
51 51
         $this->dumper = new Dumper();
52 52
 
53
-        if ($style == self::INVERTED) {
53
+        if ($style == self::INVERTED)
54
+        {
54 55
             $this->renderer = new HtmlRenderer(HtmlRenderer::INVERTED);
55 56
             $this->highlighter = new Highlighter(new HtmlStyle(HtmlStyle::INVERTED));
56
-        } else {
57
+        }
58
+        else
59
+        {
57 60
             $this->renderer = new HtmlRenderer(HtmlRenderer::DEFAULT);
58 61
             $this->highlighter = new Highlighter(new HtmlStyle(HtmlStyle::DEFAULT));
59 62
         }
@@ -105,20 +108,24 @@  discard block
 block discarded – undo
105 108
             'valueWrapper' => $options['valueWrapper'],
106 109
         ]);
107 110
 
108
-        if ($this->state !== null) {
109
-            if ($this->state->getTags() !== []) {
111
+        if ($this->state !== null)
112
+        {
113
+            if ($this->state->getTags() !== [])
114
+            {
110 115
                 $options['tags'] = $this->render('partials/tags', [
111 116
                     'tags' => $this->state->getTags(),
112 117
                 ]);
113 118
             }
114 119
 
115
-            if ($this->state->getLogEvents() !== []) {
120
+            if ($this->state->getLogEvents() !== [])
121
+            {
116 122
                 $options['logs'] = $this->render('partials/logs', [
117 123
                     'logEvents' => $this->state->getLogEvents(),
118 124
                 ]);
119 125
             }
120 126
 
121
-            if ($this->state->getVariables() !== []) {
127
+            if ($this->state->getVariables() !== [])
128
+            {
122 129
                 $options['variables'] = $this->render('partials/variables', [
123 130
                     'variables' => $this->state->getVariables(),
124 131
                 ]);
Please login to merge, or discard this patch.