@@ -74,9 +74,9 @@ discard block |
||
74 | 74 | } |
75 | 75 | |
76 | 76 | // timestamp |
77 | - $strLine = date('Y-m-d H:i:s'); |
|
77 | + $strLine = date('Y-m-d H:i:s'); |
|
78 | 78 | // IP adress |
79 | - if (($this->iOptions & self::LOG_IP) != 0 ) { |
|
79 | + if (($this->iOptions & self::LOG_IP) != 0) { |
|
80 | 80 | $strIP = $_SERVER['REMOTE_ADDR']; |
81 | 81 | if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { |
82 | 82 | $strIP = $_SERVER['HTTP_X_FORWARDED_FOR']; |
@@ -84,18 +84,18 @@ discard block |
||
84 | 84 | $strLine .= $this->strSep . $strIP; |
85 | 85 | } |
86 | 86 | // user |
87 | - if (($this->iOptions & self::LOG_USER) != 0 ) { |
|
87 | + if (($this->iOptions & self::LOG_USER) != 0) { |
|
88 | 88 | $strLine .= $this->strSep . $this->prepareText($this->strUser); |
89 | 89 | } |
90 | 90 | // backtrace - caller |
91 | - if (($this->iOptions & self::LOG_BT) != 0 ) { |
|
91 | + if (($this->iOptions & self::LOG_BT) != 0) { |
|
92 | 92 | $strLine .= $this->strSep . $this->getCaller(); |
93 | 93 | } |
94 | 94 | // the message |
95 | 95 | $strMessage = $this->replaceContext($message, $context); |
96 | 96 | $strLine .= $this->strSep . $this->prepareText(strtoupper($level) . ': ' . $strMessage); |
97 | 97 | // user agent |
98 | - if (($this->iOptions & self::LOG_BT) != 0 ) { |
|
98 | + if (($this->iOptions & self::LOG_BT) != 0) { |
|
99 | 99 | $strLine .= $this->strSep . $this->prepareText($_SERVER["HTTP_USER_AGENT"]); |
100 | 100 | } |
101 | 101 | |
@@ -120,12 +120,12 @@ discard block |
||
120 | 120 | case 'csv': |
121 | 121 | case 'txt': |
122 | 122 | $this->strSep = ";"; |
123 | - $this->strReplace =","; |
|
123 | + $this->strReplace = ","; |
|
124 | 124 | break; |
125 | 125 | case 'log': |
126 | 126 | default: |
127 | 127 | $this->strSep = "\t"; |
128 | - $this->strReplace =" "; |
|
128 | + $this->strReplace = " "; |
|
129 | 129 | break; |
130 | 130 | } |
131 | 131 | $this->logfile = fopen($strFullPath, 'a'); |
@@ -204,7 +204,7 @@ |
||
204 | 204 | if ($aCaller) { |
205 | 205 | // the base path on server isn't from interest.. |
206 | 206 | $strFile = str_replace($_SERVER['DOCUMENT_ROOT'], '', $aCaller['file']); |
207 | - $strCaller = $strFile . ' ('.$aCaller['line'].')'; |
|
207 | + $strCaller = $strFile . ' (' . $aCaller['line'] . ')'; |
|
208 | 208 | } |
209 | 209 | return $strCaller; |
210 | 210 | } |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | */ |
143 | 143 | protected function openLogfile() : void |
144 | 144 | { |
145 | - if (!$this->xmlDoc || !$this->xmlRoot) { |
|
145 | + if (!$this->xmlDoc || !$this->xmlRoot) { |
|
146 | 146 | $strFullPath = $this->getFullpath(); |
147 | 147 | if (!file_exists($strFullPath)) { |
148 | 148 | $this->createLogfile(); |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | * @param \DOMElement $oParent |
198 | 198 | * @return \DOMElement |
199 | 199 | */ |
200 | - public function addChildToDoc(string $strName, string $strValue='', \DOMElement $oParent=null) : ?\DOMElement |
|
200 | + public function addChildToDoc(string $strName, string $strValue = '', \DOMElement $oParent = null) : ?\DOMElement |
|
201 | 201 | { |
202 | 202 | $oChild = null; |
203 | 203 | if ($this->xmlDoc) { |