@@ -26,7 +26,9 @@ |
||
26 | 26 | * |
27 | 27 | * @var string |
28 | 28 | */ |
29 | -if (!defined('LOG4PHP_DIR')) define('LOG4PHP_DIR', dirname(__FILE__)); |
|
29 | +if (!defined('LOG4PHP_DIR')) { |
|
30 | + define('LOG4PHP_DIR', dirname(__FILE__)); |
|
31 | +} |
|
30 | 32 | |
31 | 33 | spl_autoload_register(array('Logger', 'autoload')); |
32 | 34 |
@@ -252,8 +252,9 @@ |
||
252 | 252 | $dateFormatStr = self::DATE_FORMAT_ISO8601; // ISO8601_DATE_FORMAT; |
253 | 253 | $dOpt = $this->extractOption(); |
254 | 254 | |
255 | - if($dOpt !== null) |
|
256 | - $dateFormatStr = $dOpt; |
|
255 | + if($dOpt !== null) { |
|
256 | + $dateFormatStr = $dOpt; |
|
257 | + } |
|
257 | 258 | |
258 | 259 | if($dateFormatStr == 'ISO8601') { |
259 | 260 | $df = self::DATE_FORMAT_ISO8601; |
@@ -138,8 +138,9 @@ |
||
138 | 138 | private function doConfigure($url = '', LoggerHierarchy $repository) |
139 | 139 | { |
140 | 140 | $xmlData = ''; |
141 | - if (!empty($url)) |
|
142 | - $xmlData = implode('', file($url, 1)); |
|
141 | + if (!empty($url)) { |
|
142 | + $xmlData = implode('', file($url, 1)); |
|
143 | + } |
|
143 | 144 | return $this->doConfigureByString($xmlData, $repository); |
144 | 145 | } |
145 | 146 |
@@ -121,8 +121,9 @@ discard block |
||
121 | 121 | $fileName = $this->getExpandedFileName(); |
122 | 122 | // Delete the oldest file, to keep Windows happy. |
123 | 123 | $file = $fileName . '.' . $this->maxBackupIndex; |
124 | - if(is_writable($file)) |
|
125 | - unlink($file); |
|
124 | + if(is_writable($file)) { |
|
125 | + unlink($file); |
|
126 | + } |
|
126 | 127 | // Map {(maxBackupIndex - 1), ..., 2, 1} to {maxBackupIndex, ..., 3, 2} |
127 | 128 | for($i = $this->maxBackupIndex - 1; $i >= 1; $i--) { |
128 | 129 | $file = $fileName . "." . $i; |
@@ -150,7 +151,9 @@ discard block |
||
150 | 151 | // As LoggerAppenderFile does not create the directory, it has to exist. |
151 | 152 | // realpath() fails if the argument does not exist so the filename is separated. |
152 | 153 | $this->expandedFileName = realpath(dirname($fileName)); |
153 | - if ($this->expandedFileName === false) throw new Exception("Directory of $fileName does not exist!"); |
|
154 | + if ($this->expandedFileName === false) { |
|
155 | + throw new Exception("Directory of $fileName does not exist!"); |
|
156 | + } |
|
154 | 157 | $this->expandedFileName .= '/'.basename($fileName); |
155 | 158 | } |
156 | 159 |
@@ -155,8 +155,9 @@ |
||
155 | 155 | |
156 | 156 | function close() |
157 | 157 | { |
158 | - if ($this->db !== null) |
|
159 | - $this->db->Close(); |
|
158 | + if ($this->db !== null) { |
|
159 | + $this->db->Close(); |
|
160 | + } |
|
160 | 161 | $this->closed = true; |
161 | 162 | } |
162 | 163 |
@@ -176,7 +176,9 @@ |
||
176 | 176 | */ |
177 | 177 | public function append(LoggerLoggingEvent $event) { |
178 | 178 | // TODO: Can't activateOptions() simply throw an Exception if it encounters problems? |
179 | - if ( ! $this->canAppend) return; |
|
179 | + if ( ! $this->canAppend) { |
|
180 | + return; |
|
181 | + } |
|
180 | 182 | |
181 | 183 | try { |
182 | 184 | if (empty($this->sql)) { |
@@ -207,8 +207,9 @@ |
||
207 | 207 | $sbuf .= "<th>Thread</th>" . PHP_EOL; |
208 | 208 | $sbuf .= "<th>Level</th>" . PHP_EOL; |
209 | 209 | $sbuf .= "<th>Category</th>" . PHP_EOL; |
210 | - if ($this->locationInfo) |
|
211 | - $sbuf .= "<th>File:Line</th>" . PHP_EOL; |
|
210 | + if ($this->locationInfo) { |
|
211 | + $sbuf .= "<th>File:Line</th>" . PHP_EOL; |
|
212 | + } |
|
212 | 213 | $sbuf .= "<th>Message</th>" . PHP_EOL; |
213 | 214 | $sbuf .= "</tr>" . PHP_EOL; |
214 | 215 |
@@ -1200,9 +1200,9 @@ |
||
1200 | 1200 | $navigation_items = self::get_navigation_items(false); |
1201 | 1201 | $html = ''; |
1202 | 1202 | if (!empty($navigation_items)) { |
1203 | - if ($orientation == SHORTCUTS_HORIZONTAL) |
|
1204 | - $style_id = "toolshortcuts_horizontal"; |
|
1205 | - else { |
|
1203 | + if ($orientation == SHORTCUTS_HORIZONTAL) { |
|
1204 | + $style_id = "toolshortcuts_horizontal"; |
|
1205 | + } else { |
|
1206 | 1206 | $style_id = "toolshortcuts_vertical"; |
1207 | 1207 | } |
1208 | 1208 | $html .= '<div id="'.$style_id.'">'; |
@@ -173,8 +173,9 @@ discard block |
||
173 | 173 | } |
174 | 174 | if ($this->endpointType == 'wsdl' && is_null($this->wsdl)) { |
175 | 175 | $this->loadWSDL(); |
176 | - if ($this->getError()) |
|
177 | - return false; |
|
176 | + if ($this->getError()) { |
|
177 | + return false; |
|
178 | + } |
|
178 | 179 | } |
179 | 180 | // serialize parameters |
180 | 181 | if($this->endpointType == 'wsdl' && $opData = $this->getOperationData($operation)){ |
@@ -388,8 +389,9 @@ discard block |
||
388 | 389 | function getOperationData($operation){ |
389 | 390 | if ($this->endpointType == 'wsdl' && is_null($this->wsdl)) { |
390 | 391 | $this->loadWSDL(); |
391 | - if ($this->getError()) |
|
392 | - return false; |
|
392 | + if ($this->getError()) { |
|
393 | + return false; |
|
394 | + } |
|
393 | 395 | } |
394 | 396 | if(isset($this->operations[$operation])){ |
395 | 397 | return $this->operations[$operation]; |