-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtable.phtml
133 lines (116 loc) · 3.32 KB
/
table.phtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<?php
declare(strict_types=1);
namespace noximo;
?>
<html lang="">
<head>
<style>
body {
background-color: #34495e;
color: white;
font-family: monospace;
font-size: 16px;
}
b {
color: lightskyblue;
}
h1 {
color: white;
text-align: center;
margin: 5px;
}
.time {
font-style: italic;
color: white;
text-align: center;
margin-bottom: 15px;
}
a {
color: yellow;
}
table {
width: 100%;
font-size: 12px;
}
th {
text-align: left;
padding: 25px 0 10px 0;
}
td {
padding: 5px;
}
.section {
font-size: 1.4em;
}
.line {
text-align: right;
vertical-align: middle;
}
.error:nth-child(odd) {
background: #374d63
}
.regex {
color: #00000085;
}
#thanks {
margin-top: 50px;
font-size: 0.65em;
text-align: center;
}
</style>
<title>PHPStan analysis result</title>
</head>
<h1>PHPStan analysis result</h1>
<div class="time"><?= date('Y-m-d H:i:s') ?></div>
<div>
<table>
<?php if (count($data[FileOutput::UNKNOWN]) > 0): ?>
<thead>
<tr>
<th colspan="2" class="section">
Errors without specific file: <?= count($data[FileOutput::UNKNOWN]) ?>
</th>
</tr>
</thead>
<?php foreach ($data[FileOutput::UNKNOWN] as $error): ?>
<tr class="error">
<td colspan="2">
<?= $error ?>
</td>
</tr>
<?php endforeach ?>
<?php endif ?>
<?php if (count($data[FileOutput::FILES]) > 0): ?>
<thead>
<tr>
<th colspan="2" class="section">Files with errors: <?= count($data[FileOutput::FILES]) ?></th>
</tr>
</thead>
<?php foreach ($data[FileOutput::FILES] as $filename => $errors): ?>
<thead>
<tr>
<th colspan="2"><?= $filename . ' (' . count($errors) . "\xC3\x97)" ?></th>
</tr>
</thead>
<?php foreach ($errors as $error): ?>
<tr class="error">
<td class="line">
<a href='<?= $error[FileOutput::LINK] ?>'><?= $error[FileOutput::LINE] ?></a>
</td>
<td>
<?= $error[FileOutput::ERROR] ?>
<br>
<small class="regex"><?= $error[FileOutput::IGNORE] ?></small>
</td>
</tr>
<?php endforeach ?>
<?php endforeach ?>
<?php endif ?>
</table>
<div id="thanks">
This file was made thanks to
<a href="https://github.com/phpstan/phpstan">PHPStan</a> and was outputted by
<a href="https://github.com/noximo/PHPStan-FileOutput">PHPStan FileOutput</a>
</div>
</div>
</html>