@@ -54,10 +54,10 @@ |
||
54 | 54 | public function getServerName() |
55 | 55 | { |
56 | 56 | $serverName = $this->getServer('SERVER_NAME'); |
57 | - if(empty($serverName)) { |
|
57 | + if (empty($serverName)) { |
|
58 | 58 | $serverName = $this->getServer('HTTP_HOST'); |
59 | 59 | } |
60 | - if(str_contains($serverName ?? '', ':')) { |
|
60 | + if (str_contains($serverName ?? '', ':')) { |
|
61 | 61 | $pieces = explode(':', $serverName); |
62 | 62 | $serverName = $pieces[0]; |
63 | 63 | } |
@@ -33,10 +33,10 @@ |
||
33 | 33 | private function parseData($data) { |
34 | 34 | if ($data instanceof \Generator) { |
35 | 35 | $generatedData = []; |
36 | - foreach($data as $datum) { |
|
36 | + foreach ($data as $datum) { |
|
37 | 37 | $generatedData[] = $datum; |
38 | 38 | } |
39 | - } else { |
|
39 | + }else { |
|
40 | 40 | $generatedData = $data; |
41 | 41 | } |
42 | 42 | return $generatedData; |
@@ -21,12 +21,12 @@ |
||
21 | 21 | // transform the namespace in path |
22 | 22 | $path = str_replace("\\", DIRECTORY_SEPARATOR, $class); |
23 | 23 | // filepath |
24 | - $abs_path = SOURCE_DIR . DIRECTORY_SEPARATOR . $path . ".php"; |
|
24 | + $abs_path = SOURCE_DIR.DIRECTORY_SEPARATOR.$path.".php"; |
|
25 | 25 | // require the file |
26 | 26 | if (file_exists($abs_path)) { |
27 | 27 | require_once $abs_path; |
28 | - } else { |
|
29 | - Logger::log("{$class} not loaded with " . __FILE__); |
|
28 | + }else { |
|
29 | + Logger::log("{$class} not loaded with ".__FILE__); |
|
30 | 30 | } |
31 | 31 | } |
32 | 32 | return false; |