Passed
Push — 1.10.x ( f64eef...04397c )
by Angel Fernando Quiroz
132:38 queued 79:40
created
main/inc/lib/phpdocx/classes/CreateExcelTable.inc 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -110,8 +110,9 @@  discard block
 block discarded – undo
110 110
             if (strpos($type, 'pie') !== false) {
111 111
                 $this->generateTABLECOLUMN($i + 2, '0');
112 112
                 break;
113
-            }else
114
-                $this->generateTABLECOLUMN($i + 2, $dats[0][$i]);
113
+            } else {
114
+                            $this->generateTABLECOLUMN($i + 2, $dats[0][$i]);
115
+            }
115 116
         }
116 117
         $this->generateTABLESTYLEINFO();
117 118
         $this->cleanTemplate();
@@ -128,8 +129,9 @@  discard block
 block discarded – undo
128 129
     protected function generateTABLE($rows, $cols)
129 130
     {
130 131
         $chart = 'A';
131
-        for ($i = 0; $i < $cols; $i++)
132
-            $chart++;
132
+        for ($i = 0; $i < $cols; $i++) {
133
+                    $chart++;
134
+        }
133 135
         $rows++;
134 136
         $this->_xml = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'.
135 137
                       '<table xmlns="http://schemas.openxmlformats.org/spreads'.
Please login to merge, or discard this patch.
main/inc/lib/phpdocx/classes/CreateExcelSharedStrings.inc 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -111,14 +111,16 @@  discard block
 block discarded – undo
111 111
                 $this->generateSI();
112 112
                 $this->generateT('0');
113 113
                 break;
114
-            }else
115
-                $this->generateSI();
114
+            } else {
115
+                            $this->generateSI();
116
+            }
116 117
             $this->generateT($dats[0][$i]);
117 118
         }
118 119
 
119 120
         foreach ($dats as $ind => $val) {
120
-            if ($ind == '0')
121
-                continue;
121
+            if ($ind == '0') {
122
+                            continue;
123
+            }
122 124
             $this->generateSI();
123 125
             $this->generateT($ind);
124 126
         }
@@ -168,8 +170,9 @@  discard block
 block discarded – undo
168 170
     protected function generateT($name, $space = '')
169 171
     {
170 172
         $xmlAux = '<t';
171
-        if ($space != '')
172
-            $xmlAux .= ' xml:space="' . $space . '"';
173
+        if ($space != '') {
174
+                    $xmlAux .= ' xml:space="' . $space . '"';
175
+        }
173 176
         $xmlAux .= '>' . $name . '</t>';
174 177
         $this->_xml = str_replace('__GENERATESI__', $xmlAux, $this->_xml);
175 178
     }
Please login to merge, or discard this patch.
main/inc/lib/phpdocx/classes/CreateElement.inc 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -529,8 +529,9 @@
 block discarded – undo
529 529
                     ':graphicFrameLocks xmlns:a="' .
530 530
                     'http://schemas.openxmlformats.org/drawingml/2006/main"';
531 531
 
532
-        if ($noChangeAspect != '')
533
-            $xmlAux .= ' noChangeAspect="' . $noChangeAspect . '"';
532
+        if ($noChangeAspect != '') {
533
+                    $xmlAux .= ' noChangeAspect="' . $noChangeAspect . '"';
534
+        }
534 535
         $xmlAux .= '></' . CreateImage::NAMESPACEWORD1 . ':graphicFrameLocks>';
535 536
 
536 537
         $this->_xml = str_replace(
Please login to merge, or discard this patch.
main/inc/lib/phpdocx/classes/CreateGraphic.inc 1 patch
Braces   +15 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1523,8 +1523,9 @@  discard block
 block discarded – undo
1523 1523
         } elseif (strpos($type, 'line') !== false) {
1524 1524
             $this->generateLINECHART();
1525 1525
             $this->generateGROUPING('standard');
1526
-            if (isset($dats[0])) $legends = $dats[0];
1527
-            else {
1526
+            if (isset($dats[0])) {
1527
+                $legends = $dats[0];
1528
+            } else {
1528 1529
                 echo('You must write a legend');
1529 1530
                 return false;
1530 1531
             }
@@ -1563,7 +1564,9 @@  discard block
 block discarded – undo
1563 1564
 
1564 1565
             $num = 0;
1565 1566
             foreach ($dats as $legend => $dat) {
1566
-                if ($legend == '0') continue;
1567
+                if ($legend == '0') {
1568
+                    continue;
1569
+                }
1567 1570
                 $this->generatePT($num);
1568 1571
                 $this->generateV($legend);
1569 1572
                 $num++;
@@ -1577,7 +1580,9 @@  discard block
 block discarded – undo
1577 1580
             $this->generatePTCOUNT($sizeDats);
1578 1581
             $num = 0;
1579 1582
             foreach ($dats as $legend => $dat) {
1580
-                if ($legend == '0') continue;
1583
+                if ($legend == '0') {
1584
+                    continue;
1585
+                }
1581 1586
                 $this->generatePT($num);
1582 1587
                 $this->generateV($dat[$i]);
1583 1588
                 $num++;
@@ -1647,14 +1652,14 @@  discard block
 block discarded – undo
1647 1652
     {
1648 1653
         $args = func_get_args();
1649 1654
         $ajusteTexto = 0;
1650
-        if (isset($args[0][1]['sizeX']))
1651
-            $sizeX = $args[0][1]['sizeX'] * CreateImage::CONSTWORD;
1652
-        else {
1655
+        if (isset($args[0][1]['sizeX'])) {
1656
+                    $sizeX = $args[0][1]['sizeX'] * CreateImage::CONSTWORD;
1657
+        } else {
1653 1658
             $sizeX = 2993296;
1654 1659
         }
1655
-        if (isset($args[0][1]['sizeY']))
1656
-            $sizeY = $args[0][1]['sizeY'] * CreateImage::CONSTWORD;
1657
-        else {
1660
+        if (isset($args[0][1]['sizeY'])) {
1661
+                    $sizeY = $args[0][1]['sizeY'] * CreateImage::CONSTWORD;
1662
+        } else {
1658 1663
             $sizeY = 2238233;
1659 1664
         }
1660 1665
 
Please login to merge, or discard this patch.
main/inc/lib/phpdocx/classes/CreatePage.inc 1 patch
Braces   +15 added lines, -5 removed lines patch added patch discarded remove patch
@@ -112,7 +112,9 @@  discard block
 block discarded – undo
112 112
         }
113 113
         $this->generatePGMAR($args);
114 114
         $this->generateCOLS();
115
-        if (!empty($args[0]['titlePage'])) $this->generateTITLEPG();
115
+        if (!empty($args[0]['titlePage'])) {
116
+            $this->generateTITLEPG();
117
+        }
116 118
         $this->generateDOCGRID();
117 119
     }
118 120
 
@@ -190,10 +192,18 @@  discard block
 block discarded – undo
190 192
         $footer = '0';
191 193
         $gutter = '0';
192 194
         $args = func_get_args();
193
-        if (isset($args[0][0]['top'])) $top = $args[0][0]['top'];
194
-        if (isset($args[0][0]['bottom'])) $bottom = $args[0][0]['bottom'];
195
-        if (isset($args[0][0]['right'])) $right = $args[0][0]['right'];
196
-        if (isset($args[0][0]['left'])) $left = $args[0][0]['left'];
195
+        if (isset($args[0][0]['top'])) {
196
+            $top = $args[0][0]['top'];
197
+        }
198
+        if (isset($args[0][0]['bottom'])) {
199
+            $bottom = $args[0][0]['bottom'];
200
+        }
201
+        if (isset($args[0][0]['right'])) {
202
+            $right = $args[0][0]['right'];
203
+        }
204
+        if (isset($args[0][0]['left'])) {
205
+            $left = $args[0][0]['left'];
206
+        }
197 207
 
198 208
         $xml = '<' . CreateElement::NAMESPACEWORD . ':pgMar ' .
199 209
             CreateElement::NAMESPACEWORD . ':top="' . $top . '" ' .
Please login to merge, or discard this patch.
main/inc/lib/phpdocx/classes/CreateFootnote.inc 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -189,9 +189,10 @@
 block discarded – undo
189 189
 
190 190
         $xmlAux = '<' . CreateElement::NAMESPACEWORD . ':footnote';
191 191
 
192
-        if ($type != '')
193
-            $xmlAux .= ' ' . CreateElement::NAMESPACEWORD . 
192
+        if ($type != '') {
193
+                    $xmlAux .= ' ' . CreateElement::NAMESPACEWORD . 
194 194
                        ':type="' . $type . '"';
195
+        }
195 196
 
196 197
         $this->_xml = $xmlAux . ' ' . CreateElement::NAMESPACEWORD .
197 198
                     ':id="' . (self::$_id - 2) .
Please login to merge, or discard this patch.
main/inc/lib/phpdocx/classes/CreateStyleTable.inc 1 patch
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -520,18 +520,22 @@
 block discarded – undo
520 520
     {
521 521
         $xmlAux = '<' . CreateElement::NAMESPACEWORD . ':shd ' .
522 522
             CreateElement::NAMESPACEWORD . ':val="' . $val . '"';
523
-        if ($color != '')
524
-            $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
523
+        if ($color != '') {
524
+                    $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
525 525
                 ':color="' . $color . '"';
526
-        if ($fill != '')
527
-            $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
526
+        }
527
+        if ($fill != '') {
528
+                    $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
528 529
                 ':fill="' . $fill . '"';
529
-        if ($themeFill != '')
530
-            $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
530
+        }
531
+        if ($themeFill != '') {
532
+                    $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
531 533
                 ':themeFill="' . $themeFill . '"';
532
-        if ($themeFillTint != '')
533
-            $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
534
+        }
535
+        if ($themeFillTint != '') {
536
+                    $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
534 537
                 ':themeFillTint="' . $themeFillTint . '"';
538
+        }
535 539
         $xmlAux .= '></' . CreateElement::NAMESPACEWORD .
536 540
             ':shd>__GENERATETBLPR__';
537 541
         $this->_xml = str_replace('__GENERATETBLPR__', $xmlAux, $this->_xml);
Please login to merge, or discard this patch.
main/inc/lib/phpdocx/classes/CreateTable.inc 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -206,10 +206,18 @@
 block discarded – undo
206 206
     {
207 207
         $xmlAux = '<' . CreateElement::NAMESPACEWORD . ':shd w:val="' .
208 208
             $val . '"';
209
-        if ($color != '') $xmlAux .= ' w:color="' . $color . '"';
210
-        if ($fill != '') $xmlAux .= ' w:fill="' . $fill . '"';
211
-        if ($bgcolor != '') $xmlAux .= ' wx:bgcolor="' . $bgcolor . '"';
212
-        if ($themeFill != '') $xmlAux .= ' w:themeFill="' . $themeFill . '"';
209
+        if ($color != '') {
210
+            $xmlAux .= ' w:color="' . $color . '"';
211
+        }
212
+        if ($fill != '') {
213
+            $xmlAux .= ' w:fill="' . $fill . '"';
214
+        }
215
+        if ($bgcolor != '') {
216
+            $xmlAux .= ' wx:bgcolor="' . $bgcolor . '"';
217
+        }
218
+        if ($themeFill != '') {
219
+            $xmlAux .= ' w:themeFill="' . $themeFill . '"';
220
+        }
213 221
         $xmlAux .= '></' . CreateElement::NAMESPACEWORD . ':shd>';
214 222
         $this->_xml = str_replace('__GENERATETCPR__', $xmlAux, $this->_xml);
215 223
     }
Please login to merge, or discard this patch.
main/inc/lib/phpdocx/classes/CreateText.inc 1 patch
Braces   +26 added lines, -18 removed lines patch added patch discarded remove patch
@@ -109,14 +109,18 @@  discard block
 block discarded – undo
109 109
                 !empty($args[1]['wordWrap'])
110 110
             ) {
111 111
                 $this->generatePPR();
112
-                if (!empty($args[1]['jc']))
113
-                    $this->generateJC($args[1]['jc']);
114
-                if (!empty($args[1]['pageBreakBefore']))
115
-                    $this->generatePAGEBREAKBEFORE($args[1]['pageBreakBefore']);
116
-                if (!empty($args[1]['widowControl']))
117
-                    $this->generateWIDOWCONTROL($args[1]['widowControl']);
118
-                if (!empty($args[1]['wordWrap']))
119
-                    $this->generateWORDWRAP($args[1]['wordWrap']);
112
+                if (!empty($args[1]['jc'])) {
113
+                                    $this->generateJC($args[1]['jc']);
114
+                }
115
+                if (!empty($args[1]['pageBreakBefore'])) {
116
+                                    $this->generatePAGEBREAKBEFORE($args[1]['pageBreakBefore']);
117
+                }
118
+                if (!empty($args[1]['widowControl'])) {
119
+                                    $this->generateWIDOWCONTROL($args[1]['widowControl']);
120
+                }
121
+                if (!empty($args[1]['wordWrap'])) {
122
+                                    $this->generateWORDWRAP($args[1]['wordWrap']);
123
+                }
120 124
             }
121 125
             $this->generateR();
122 126
             if (
@@ -166,16 +170,20 @@  discard block
 block discarded – undo
166 170
         if (!empty($args[1]['val']) && !empty($args[0])) {
167 171
             $this->generateP();
168 172
             $this->generatePPR();
169
-            if ($args[1]['type'] == 'subtitle')
170
-                $this->generatePSTYLE('Subttulo' . $args[1]['val']);
171
-            else
172
-                $this->generatePSTYLE('Ttulo' . $args[1]['val']);
173
-            if (!empty($args[1]['pageBreakBefore']))
174
-                $this->generatePAGEBREAKBEFORE($args[1]['pageBreakBefore']);
175
-            if (!empty($args[1]['widowControl']))
176
-                $this->generateWIDOWCONTROL($args[1]['widowControl']);
177
-            if (!empty($args[1]['wordWrap']))
178
-                $this->generateWORDWRAP($args[1]['wordWrap']);
173
+            if ($args[1]['type'] == 'subtitle') {
174
+                            $this->generatePSTYLE('Subttulo' . $args[1]['val']);
175
+            } else {
176
+                            $this->generatePSTYLE('Ttulo' . $args[1]['val']);
177
+            }
178
+            if (!empty($args[1]['pageBreakBefore'])) {
179
+                            $this->generatePAGEBREAKBEFORE($args[1]['pageBreakBefore']);
180
+            }
181
+            if (!empty($args[1]['widowControl'])) {
182
+                            $this->generateWIDOWCONTROL($args[1]['widowControl']);
183
+            }
184
+            if (!empty($args[1]['wordWrap'])) {
185
+                            $this->generateWORDWRAP($args[1]['wordWrap']);
186
+            }
179 187
             self::$_idTitle++;
180 188
             $this->generateBOOKMARKSTART(
181 189
                 self::$_idTitle, '_Toc' . (self::$_idTitle + self::IDTITLE)
Please login to merge, or discard this patch.