@@ -33,13 +33,13 @@ discard block |
||
33 | 33 | $generator = new ContextGenerator($views->getContext()); |
34 | 34 | |
35 | 35 | $contexts = $generator->generate(); |
36 | - if (empty($contexts)) { |
|
36 | + if (empty($contexts)){ |
|
37 | 37 | $contexts[] = $views->getContext(); |
38 | 38 | } |
39 | 39 | |
40 | - foreach ($contexts as $context) { |
|
41 | - foreach ($views->getEngines() as $engine) { |
|
42 | - if ($engine instanceof NativeEngine) { |
|
40 | + foreach ($contexts as $context){ |
|
41 | + foreach ($views->getEngines() as $engine){ |
|
42 | + if ($engine instanceof NativeEngine){ |
|
43 | 43 | // no need to compile |
44 | 44 | continue; |
45 | 45 | } |
@@ -63,19 +63,19 @@ discard block |
||
63 | 63 | $this->describeContext($context) ?? "default" |
64 | 64 | ); |
65 | 65 | |
66 | - foreach ($engine->getLoader()->list() as $path) { |
|
66 | + foreach ($engine->getLoader()->list() as $path){ |
|
67 | 67 | $start = microtime(true); |
68 | - try { |
|
68 | + try{ |
|
69 | 69 | $engine->reset($path, $context); |
70 | 70 | $engine->compile($path, $context); |
71 | 71 | |
72 | - if ($this->isVerbose()) { |
|
72 | + if ($this->isVerbose()){ |
|
73 | 73 | $this->sprintf("<info>•</info> %s", $path); |
74 | 74 | } |
75 | - } catch (\Throwable $e) { |
|
75 | + }catch (\Throwable $e){ |
|
76 | 76 | $this->renderError($path, $e); |
77 | 77 | continue; |
78 | - } finally { |
|
78 | + }finally{ |
|
79 | 79 | $this->renderElapsed($start); |
80 | 80 | } |
81 | 81 | } |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | { |
92 | 92 | $values = []; |
93 | 93 | |
94 | - foreach ($context->getDependencies() as $dependency) { |
|
94 | + foreach ($context->getDependencies() as $dependency){ |
|
95 | 95 | $values[] = sprintf( |
96 | 96 | "%s%s%s:%s%s%s", |
97 | 97 | Color::LIGHT_WHITE, |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | */ |
124 | 124 | protected function renderError(string $path, \Throwable $e): void |
125 | 125 | { |
126 | - if (!$this->isVerbose()) { |
|
126 | + if (!$this->isVerbose()){ |
|
127 | 127 | return; |
128 | 128 | } |
129 | 129 | |
@@ -140,11 +140,11 @@ discard block |
||
140 | 140 | */ |
141 | 141 | private function renderSuccess(string $lastPath = null): void |
142 | 142 | { |
143 | - if (!$this->isVerbose()) { |
|
143 | + if (!$this->isVerbose()){ |
|
144 | 144 | return; |
145 | 145 | } |
146 | 146 | |
147 | - if ($lastPath === null) { |
|
147 | + if ($lastPath === null){ |
|
148 | 148 | $this->writeln("• no views found"); |
149 | 149 | } |
150 | 150 | |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | */ |
157 | 157 | private function renderElapsed(float $start): void |
158 | 158 | { |
159 | - if (!$this->isVerbose()) { |
|
159 | + if (!$this->isVerbose()){ |
|
160 | 160 | return; |
161 | 161 | } |
162 | 162 |