1 | <?php |
||
2 | /** |
||
3 | * @package content |
||
4 | */ |
||
5 | /** |
||
6 | * Displays the contents of the Symphony `ACTIVITY_LOG` |
||
7 | * log to any user who is logged in. If a user is not logged |
||
8 | * in, or the log file is unreadable, they will be directed |
||
9 | * to a 404 page |
||
10 | */ |
||
11 | class contentSystemLog |
||
0 ignored issues
–
show
|
|||
12 | { |
||
13 | public function build() |
||
14 | { |
||
15 | if (!is_file(ACTIVITY_LOG) || !$log = @file_get_contents(ACTIVITY_LOG)) { |
||
0 ignored issues
–
show
|
|||
16 | Administration::instance()->errorPageNotFound(); |
||
17 | } |
||
18 | |||
19 | header('Content-Type: text/plain'); |
||
20 | |||
21 | print $log; |
||
0 ignored issues
–
show
Comprehensibility
Best Practice
introduced
by
|
|||
22 | exit; |
||
0 ignored issues
–
show
|
|||
23 | } |
||
24 | } |
||
25 |
Classes in PHP are usually named in CamelCase.
In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. The whole name starts with a capital letter as well.
Thus the name database provider becomes
DatabaseProvider
.