Passed
Push — 1.10.x ( aa45ad...6deddd )
by Yannick
44:37
created
main/inc/lib/phpdocx/classes/CreateStyle.inc 1 patch
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -143,8 +143,9 @@  discard block
 block discarded – undo
143 143
             isset($args[0][0]['ilvl']) ||
144 144
             isset($args[0][0]['ind_left'])) {
145 145
             $this->generatePPR();
146
-            if ($args[0][0]['keepNext'] == 1)
147
-                $this->generateKEEPNEXT();
146
+            if ($args[0][0]['keepNext'] == 1) {
147
+                            $this->generateKEEPNEXT();
148
+            }
148 149
 
149 150
             if (!empty($args[0][0]['keepLines'])) {
150 151
                 $this->generateKEEPLINES($args[0][0]['keepLines']);
@@ -220,13 +221,14 @@  discard block
 block discarded – undo
220 221
             if (!empty($args[0][0]['rFonts_asciiTheme']) &&
221 222
                 !empty($args[0][0]['rFonts_eastAsiaTheme']) &&
222 223
                 !empty($args[0][0]['rFonts_hAnsiTheme']) &&
223
-                !empty($args[0][0]['rFonts_cstheme']))
224
-                $this->generateRFONTS(
224
+                !empty($args[0][0]['rFonts_cstheme'])) {
225
+                            $this->generateRFONTS(
225 226
                     $args[0][0]['rFonts_asciiTheme'],
226 227
                     $args[0][0]['rFonts_eastAsiaTheme'],
227 228
                     $args[0][0]['rFonts_hAnsiTheme'],
228 229
                     $args[0][0]['rFonts_cstheme']
229 230
                 );
231
+            }
230 232
 
231 233
             if (!empty($args[0][0]['rFonts_ascii']) &&
232 234
                 !empty($args[0][0]['rFonts_hAnsi']) &&
@@ -1547,14 +1549,16 @@  discard block
 block discarded – undo
1547 1549
         $this->_xml .= '<' . CreateElement::NAMESPACEWORD .
1548 1550
             ':style ' . CreateElement::NAMESPACEWORD .
1549 1551
             ':type="' . $type . '"';
1550
-        if ($default != '')
1551
-            $this->_xml .= ' ' . CreateElement::NAMESPACEWORD .
1552
+        if ($default != '') {
1553
+                    $this->_xml .= ' ' . CreateElement::NAMESPACEWORD .
1552 1554
                 ':default="' . $default . '"';
1555
+        }
1553 1556
         $this->_xml .= ' ' . CreateElement::NAMESPACEWORD .
1554 1557
             ':styleId="' . $styleId . '"';
1555
-        if ($customStyle != '')
1556
-            $this->_xml .= ' ' . CreateElement::NAMESPACEWORD .
1558
+        if ($customStyle != '') {
1559
+                    $this->_xml .= ' ' . CreateElement::NAMESPACEWORD .
1557 1560
                 ':customStyle="' . $customStyle . '"';
1561
+        }
1558 1562
         $this->_xml .= '>__GENERATESTYLE__</' .
1559 1563
             CreateElement::NAMESPACEWORD . ':style>';
1560 1564
     }
Please login to merge, or discard this patch.
main/inc/lib/phpdocx/classes/TransformDoc.inc 1 patch
Braces   +5 added lines, -6 removed lines patch added patch discarded remove patch
@@ -137,8 +137,9 @@  discard block
 block discarded – undo
137 137
         );
138 138
         $arrAbsolutes = array();
139 139
         foreach ($parts as $datParts) {
140
-            if ('.' == $datParts)
141
-                continue;
140
+            if ('.' == $datParts) {
141
+                            continue;
142
+            }
142 143
             if ('..' == $datParts) {
143 144
                 array_pop($arrAbsolutes);
144 145
             } else {
@@ -179,8 +180,7 @@  discard block
 block discarded – undo
179 180
             $partsFile = explode('/', $this->strFile);
180 181
             $divideFile = explode('.', array_pop($partsFile));
181 182
             $fileName = array_shift($divideFile);
182
-        }
183
-        catch (Exception $e) {
183
+        } catch (Exception $e) {
184 184
             $fileName = 'file';
185 185
         }
186 186
         return $fileName;
@@ -282,8 +282,7 @@  discard block
 block discarded – undo
282 282
             $domPDF->render();
283 283
             $fileName = $this->getFileName() . '.pdf';
284 284
             $domPDF->stream($fileName);
285
-        }
286
-        catch (Exception $err) {
285
+        } catch (Exception $err) {
287 286
             echo 'Unable to generate PDF file. ';
288 287
             echo $err;
289 288
         }
Please login to merge, or discard this patch.
main/inc/lib/phpdocx/lib/log4php/Logger.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,9 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
main/inc/lib/phpdocx/lib/log4php/helpers/LoggerPatternParser.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -252,8 +252,9 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
main/inc/lib/phpdocx/lib/log4php/configurators/LoggerConfiguratorXml.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -138,8 +138,9 @@
 block discarded – undo
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
     
Please login to merge, or discard this patch.
main/inc/lib/phpdocx/lib/log4php/appenders/LoggerAppenderRollingFile.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -121,8 +121,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
main/inc/lib/phpdocx/lib/log4php/appenders/LoggerAppenderAdodb.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -155,8 +155,9 @@
 block discarded – undo
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
     
Please login to merge, or discard this patch.
main/inc/lib/phpdocx/lib/log4php/appenders/LoggerAppenderPDO.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -176,7 +176,9 @@
 block discarded – undo
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)) {
Please login to merge, or discard this patch.
main/inc/lib/phpdocx/lib/log4php/layouts/LoggerLayoutHtml.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -207,8 +207,9 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.