Skip to content
This repository was archived by the owner on Jan 1, 2020. It is now read-only.

Commit b9c2813

Browse files
committed
Updated markup indentation
HTML markup should be at the same semantic level in the DOM, not the PHP indentation.
1 parent 74cb82f commit b9c2813

File tree

2 files changed

+90
-90
lines changed

2 files changed

+90
-90
lines changed

module/Application/view/error/404.phtml

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -24,82 +24,82 @@
2424
break;
2525
}
2626
?>
27-
<p><?= $reasonMessage ?></p>
27+
<p><?= $reasonMessage ?></p>
2828
<?php endif ?>
2929

3030
<?php if (isset($this->controller) && $this->controller) : ?>
31-
<dl>
32-
<dt>Controller:</dt>
33-
<dd>
34-
<?= $this->escapeHtml($this->controller) ?>
35-
<?php
36-
if (isset($this->controller_class)
37-
&& $this->controller_class
38-
&& $this->controller_class != $this->controller
39-
) {
40-
echo '(' . sprintf('resolves to %s', $this->escapeHtml($this->controller_class)) . ')';
41-
}
42-
?>
43-
</dd>
44-
</dl>
31+
<dl>
32+
<dt>Controller:</dt>
33+
<dd>
34+
<?= $this->escapeHtml($this->controller) ?>
35+
<?php
36+
if (isset($this->controller_class)
37+
&& $this->controller_class
38+
&& $this->controller_class != $this->controller
39+
) {
40+
echo '(' . sprintf('resolves to %s', $this->escapeHtml($this->controller_class)) . ')';
41+
}
42+
?>
43+
</dd>
44+
</dl>
4545
<?php endif ?>
4646

4747
<?php if (isset($this->display_exceptions) && $this->display_exceptions) : ?>
4848
<?php if (isset($this->exception) && ($this->exception instanceof \Exception || $this->exception instanceof \Error)) : ?>
49-
<hr/>
49+
<hr/>
5050

51-
<h2>Additional information:</h2>
52-
<h3><?= get_class($this->exception) ?></h3>
51+
<h2>Additional information:</h2>
52+
<h3><?= get_class($this->exception) ?></h3>
53+
<dl>
54+
<dt>File:</dt>
55+
<dd>
56+
<pre><?= $this->exception->getFile() ?>:<?= $this->exception->getLine() ?></pre>
57+
</dd>
58+
<dt>Message:</dt>
59+
<dd>
60+
<pre><?= $this->escapeHtml($this->exception->getMessage()) ?></pre>
61+
</dd>
62+
<dt>Stack trace:</dt>
63+
<dd>
64+
<pre><?= $this->escapeHtml($this->exception->getTraceAsString()) ?></pre>
65+
</dd>
66+
</dl>
67+
68+
<?php if ($ex = $this->exception->getPrevious()) : ?>
69+
<hr/>
70+
71+
<h2>Previous exceptions:</h2>
72+
<ul class="list-unstyled">
73+
<?php $icount = 0 ?>
74+
<?php while ($ex) : ?>
75+
<li>
76+
<h3><?= get_class($ex) ?></h3>
5377
<dl>
5478
<dt>File:</dt>
5579
<dd>
56-
<pre><?= $this->exception->getFile() ?>:<?= $this->exception->getLine() ?></pre>
80+
<pre><?= $ex->getFile() ?>:<?= $ex->getLine() ?></pre>
5781
</dd>
5882
<dt>Message:</dt>
5983
<dd>
60-
<pre><?= $this->escapeHtml($this->exception->getMessage()) ?></pre>
84+
<pre><?= $this->escapeHtml($ex->getMessage()) ?></pre>
6185
</dd>
6286
<dt>Stack trace:</dt>
6387
<dd>
64-
<pre><?= $this->escapeHtml($this->exception->getTraceAsString()) ?></pre>
88+
<pre><?= $this->escapeHtml($ex->getTraceAsString()) ?></pre>
6589
</dd>
6690
</dl>
67-
68-
<?php if ($ex = $this->exception->getPrevious()) : ?>
69-
<hr/>
70-
71-
<h2>Previous exceptions:</h2>
72-
<ul class="list-unstyled">
73-
<?php $icount = 0; ?>
74-
<?php while ($ex) : ?>
75-
<li>
76-
<h3><?= get_class($ex) ?></h3>
77-
<dl>
78-
<dt>File:</dt>
79-
<dd>
80-
<pre><?= $ex->getFile() ?>:<?= $ex->getLine() ?></pre>
81-
</dd>
82-
<dt>Message:</dt>
83-
<dd>
84-
<pre><?= $this->escapeHtml($ex->getMessage()) ?></pre>
85-
</dd>
86-
<dt>Stack trace:</dt>
87-
<dd>
88-
<pre><?= $this->escapeHtml($ex->getTraceAsString()) ?></pre>
89-
</dd>
90-
</dl>
91-
</li>
92-
<?php
93-
$ex = $ex->getPrevious();
94-
if (++$icount >= 50) {
95-
echo '<li>There may be more exceptions, but we have no enough memory to proccess it.</li>';
96-
break;
97-
}
98-
?>
99-
<?php endwhile ?>
100-
</ul>
91+
</li>
92+
<?php
93+
$ex = $ex->getPrevious();
94+
if (++$icount >= 50) {
95+
echo '<li>There may be more exceptions, but we have no enough memory to proccess it.</li>';
96+
break;
97+
}
98+
?>
99+
<?php endwhile ?>
100+
</ul>
101101
<?php endif ?>
102-
<?php else: ?>
103-
<h3>No Exception available</h3>
102+
<?php else : ?>
103+
<h3>No Exception available</h3>
104104
<?php endif ?>
105105
<?php endif ?>

module/Application/view/error/index.phtml

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,49 +3,49 @@
33

44
<?php if (isset($this->display_exceptions) && $this->display_exceptions) : ?>
55
<?php if (isset($this->exception) && ($this->exception instanceof \Exception || $this->exception instanceof \Error)) : ?>
6-
<hr/>
6+
<hr/>
77

8-
<h2>Additional information:</h2>
9-
<h3><?= get_class($this->exception) ?></h3>
8+
<h2>Additional information:</h2>
9+
<h3><?= get_class($this->exception) ?></h3>
10+
<dl>
11+
<dt>File:</dt>
12+
<dd>
13+
<pre><?= $this->exception->getFile() ?>:<?= $this->exception->getLine() ?></pre>
14+
</dd>
15+
<dt>Message:</dt>
16+
<dd>
17+
<pre><?= $this->escapeHtml($this->exception->getMessage()) ?></pre>
18+
</dd>
19+
<dt>Stack trace:</dt>
20+
<dd>
21+
<pre><?= $this->escapeHtml($this->exception->getTraceAsString()) ?></pre>
22+
</dd>
23+
</dl>
24+
25+
<?php if ($ex = $this->exception->getPrevious()) : ?>
26+
<hr/>
27+
28+
<h2>Previous exceptions:</h2>
29+
<ul class="list-unstyled">
30+
<?php $icount = 0 ?>
31+
<?php while ($ex) : ?>
32+
<li>
33+
<h3><?= get_class($ex) ?></h3>
1034
<dl>
1135
<dt>File:</dt>
1236
<dd>
13-
<pre><?= $this->exception->getFile() ?>:<?= $this->exception->getLine() ?></pre>
37+
<pre><?= $ex->getFile() ?>:<?= $ex->getLine() ?></pre>
1438
</dd>
1539
<dt>Message:</dt>
1640
<dd>
17-
<pre><?= $this->escapeHtml($this->exception->getMessage()) ?></pre>
41+
<pre><?= $this->escapeHtml($ex->getMessage()) ?></pre>
1842
</dd>
1943
<dt>Stack trace:</dt>
2044
<dd>
21-
<pre><?= $this->escapeHtml($this->exception->getTraceAsString()) ?></pre>
45+
<pre><?= $this->escapeHtml($ex->getTraceAsString()) ?></pre>
2246
</dd>
2347
</dl>
24-
25-
<?php if ($ex = $this->exception->getPrevious()) : ?>
26-
<hr/>
27-
28-
<h2>Previous exceptions:</h2>
29-
<ul class="list-unstyled">
30-
<?php $icount = 0; ?>
31-
<?php while ($ex) : ?>
32-
<li>
33-
<h3><?= get_class($ex) ?></h3>
34-
<dl>
35-
<dt>File:</dt>
36-
<dd>
37-
<pre><?= $ex->getFile() ?>:<?= $ex->getLine() ?></pre>
38-
</dd>
39-
<dt>Message:</dt>
40-
<dd>
41-
<pre><?= $this->escapeHtml($ex->getMessage()) ?></pre>
42-
</dd>
43-
<dt>Stack trace:</dt>
44-
<dd>
45-
<pre><?= $this->escapeHtml($ex->getTraceAsString()) ?></pre>
46-
</dd>
47-
</dl>
48-
</li>
48+
</li>
4949
<?php
5050
$ex = $ex->getPrevious();
5151
if (++$icount >= 50) {
@@ -54,9 +54,9 @@
5454
}
5555
?>
5656
<?php endwhile ?>
57-
</ul>
57+
</ul>
5858
<?php endif ?>
59-
<?php else: ?>
59+
<?php else : ?>
6060
<h3>No Exception available</h3>
6161
<?php endif ?>
6262
<?php endif ?>

0 commit comments

Comments
 (0)