-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtable.phtml
171 lines (150 loc) · 4.82 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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<?php
declare(strict_types=1);
namespace noximo\EasyCodingStandardFileoutput;
?>
<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
}
#thanks {
margin-top: 50px;
font-size: 0.65em;
text-align: center;
}
.deletion {
color: red;
}
.addition {
color: lightgreen;
}
.gitinfo {
color: cyan;
}
.nonimportant {
color: lightgrey;
font-size: small;
}
</style>
<title>PHPStan analysis result</title>
</head>
<h1>EasyCodingStandard analysis result</h1>
<div class="time"><?= date('Y-m-d H:i:s') ?>
<div class="nonimportant">File may be outdated, don't forget to run ecs again</div>
</div>
<div>
<table>
<?php if (count($data[FileOutputFormatter::FILES]) > 0): ?>
<thead>
<tr>
<th colspan="3" class="section">Files with errors: <?= count($data[FileOutputFormatter::FILES]) ?></th>
</tr>
</thead>
<?php foreach ($data[FileOutputFormatter::FILES] as $filename => $errors): ?>
<thead>
<tr>
<th colspan="3"><?= $filename . ' (' . count($errors) . "\xC3\x97)" ?></th>
</tr>
</thead>
<?php foreach ($errors as $error): ?>
<tr class="error">
<td class="line">
<a href='<?= $error[FileOutputFormatter::LINK] ?>'><?= $error[FileOutputFormatter::LINE] ?></a>
</td>
<td>
<?= $error[FileOutputFormatter::ERROR] ?>
<small class="nonimportant">(<?= $error[FileOutputFormatter::SOURCE_CLASS] ?>)</small>
</td>
</tr>
<?php endforeach ?>
<?php endforeach ?>
<?php endif ?>
<?php if (count($data[FileOutputFormatter::DIFFS]) > 0): ?>
<thead>
<tr>
<th colspan="3" class="section">
Files that can be fixed automatically: <?= count($data[FileOutputFormatter::DIFFS]) ?>
<strong><i>Use parameter --fix</i></strong>
</th>
</tr>
</thead>
<?php foreach ($data[FileOutputFormatter::DIFFS] as $filename => $file): ?>
<tr>
<td colspan="3">
<a href='<?= $file[FileOutputFormatter::LINK] ?>'><?= $file[FileOutputFormatter::FILE] ?></a>
</td>
</tr>
<?php foreach ($file[FileOutputFormatter::DIFFS] as $diff): ?>
<tr>
<td></td>
<td colspan="2">
<pre><?= $diff[FileOutputFormatter::DIFF] ?></pre>
</td>
</tr>
<tr>
<td></td>
<td colspan="2">
<strong>Applied checkers:</strong>
</td>
</tr>
<?php foreach ($diff[FileOutputFormatter::SOURCE_CLASS] as $source): ?>
<tr>
<td></td>
<td colspan="2">
<?= $source[FileOutputFormatter::SOURCE_CLASS] ?>
</td>
</tr>
<?php endforeach ?>
<?php endforeach ?>
<?php endforeach ?>
<?php endif ?>
</table>
<div id="thanks">
This file was made thanks to
<a href="https://github.com/phpstan/phpstan">Easy Coding Standard</a> and was outputted by
<a href="https://github.com/noximo/EasyCodingStandard-FileOutput">ECS FileOutput</a>
</div>
</div>
</html>