Passed
Pull Request — master (#464)
by
unknown
05:07
created
Spout/Reader/XLSX/Helper/SharedStringsCaching/CachingStrategyFactory.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@
 block discarded – undo
114 114
     /**
115 115
      * Returns the PHP "memory_limit" in Kilobytes
116 116
      *
117
-     * @return float
117
+     * @return integer
118 118
      */
119 119
     protected function getMemoryLimitInKB()
120 120
     {
Please login to merge, or discard this patch.
src/Spout/Writer/ODS/Helper/StyleHelper.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
     }
30 30
 
31 31
     /**
32
-     * @return string[] List of used fonts name
32
+     * @return integer[] List of used fonts name
33 33
      */
34 34
     protected function getUsedFonts()
35 35
     {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         $content = <<<EOD
49 49
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
50 50
 <office:document-styles office:version="1.2" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:msoxl="http://schemas.microsoft.com/office/excel/formula" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:xlink="http://www.w3.org/1999/xlink">
51
-EOD;
51
+eod;
52 52
 
53 53
         $content .= $this->getFontFaceSectionContent();
54 54
         $content .= $this->getStylesSectionContent();
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
         $content .= <<<EOD
59 59
 </office:document-styles>
60
-EOD;
60
+eod;
61 61
 
62 62
         return $content;
63 63
     }
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
                                style:font-name="{$defaultStyle->getFontName()}" style:font-name-asian="{$defaultStyle->getFontName()}" style:font-name-complex="{$defaultStyle->getFontName()}"/>
100 100
     </style:style>
101 101
 </office:styles>
102
-EOD;
102
+eod;
103 103
     }
104 104
 
105 105
     /**
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
     <style:header-style/>
120 120
     <style:footer-style/>
121 121
 </style:page-layout>
122
-EOD;
122
+eod;
123 123
         }
124 124
 
125 125
         $content .= '</office:automatic-styles>';
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
     <style:footer/>
146 146
     <style:footer-left style:display="false"/>
147 147
 </style:master-page>
148
-EOD;
148
+eod;
149 149
         }
150 150
 
151 151
         $content .= '</office:master-styles>';
@@ -191,14 +191,14 @@  discard block
 block discarded – undo
191 191
 <style:style style:family="table-row" style:name="ro1">
192 192
     <style:table-row-properties fo:break-before="auto" style:row-height="15pt" style:use-optimal-row-height="true"/>
193 193
 </style:style>
194
-EOD;
194
+eod;
195 195
 
196 196
         for ($i = 1; $i <= $numWorksheets; $i++) {
197 197
             $content .= <<<EOD
198 198
 <style:style style:family="table" style:master-page-name="mp$i" style:name="ta$i">
199 199
     <style:table-properties style:writing-mode="lr-tb" table:display="true"/>
200 200
 </style:style>
201
-EOD;
201
+eod;
202 202
         }
203 203
 
204 204
         $content .= '</office:automatic-styles>';
Please login to merge, or discard this patch.
src/Spout/Reader/CSV/RowIterator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -182,7 +182,7 @@
 block discarded – undo
182 182
         }
183 183
 
184 184
         foreach ($encodedRowData as $cellIndex => $cellValue) {
185
-            switch($this->encoding) {
185
+            switch ($this->encoding) {
186 186
                 case EncodingHelper::ENCODING_UTF16_LE:
187 187
                 case EncodingHelper::ENCODING_UTF32_LE:
188 188
                     // remove whitespace from the beginning of a string as fgetcsv() add extra whitespace when it try to explode non UTF-8 data
Please login to merge, or discard this patch.
src/Spout/Reader/ODS/SheetIterator.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -80,8 +80,8 @@
 block discarded – undo
80 80
         try {
81 81
             $this->hasFoundSheet = $this->xmlReader->readUntilNodeFound(self::XML_NODE_TABLE);
82 82
         } catch (XMLProcessingException $exception) {
83
-           throw new IOException("The content.xml file is invalid and cannot be read. [{$exception->getMessage()}]");
84
-       }
83
+            throw new IOException("The content.xml file is invalid and cannot be read. [{$exception->getMessage()}]");
84
+        }
85 85
 
86 86
         $this->currentSheetIndex = 0;
87 87
     }
Please login to merge, or discard this patch.
src/Spout/Reader/AbstractReader.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -184,8 +184,7 @@
 block discarded – undo
184 184
     {
185 185
         $streamScheme = $this->getStreamWrapperScheme($filePath);
186 186
         return ($streamScheme !== null) ?
187
-            in_array($streamScheme, $this->globalFunctionsHelper->stream_get_wrappers()) :
188
-            true;
187
+            in_array($streamScheme, $this->globalFunctionsHelper->stream_get_wrappers()) : true;
189 188
     }
190 189
 
191 190
     /**
Please login to merge, or discard this patch.
src/Spout/Reader/XLSX/RowIterator.php 2 patches
Spacing   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -312,8 +312,7 @@  discard block
 block discarded – undo
312 312
         $currentRowIndex = $xmlReader->getAttribute(self::XML_ATTRIBUTE_ROW_INDEX);
313 313
 
314 314
         return ($currentRowIndex !== null) ?
315
-                intval($currentRowIndex) :
316
-                $this->lastRowIndexProcessed + 1;
315
+                intval($currentRowIndex) : $this->lastRowIndexProcessed + 1;
317 316
     }
318 317
 
319 318
     /**
@@ -327,8 +326,7 @@  discard block
 block discarded – undo
327 326
         $currentCellIndex = $xmlReader->getAttribute(self::XML_ATTRIBUTE_CELL_INDEX);
328 327
 
329 328
         return ($currentCellIndex !== null) ?
330
-                CellHelper::getColumnIndexFromCellIndex($currentCellIndex) :
331
-                $this->lastColumnIndexProcessed + 1;
329
+                CellHelper::getColumnIndexFromCellIndex($currentCellIndex) : $this->lastColumnIndexProcessed + 1;
332 330
     }
333 331
 
334 332
     /**
@@ -388,8 +386,7 @@  discard block
 block discarded – undo
388 386
         //       but to avoid a breaking change, the return value for
389 387
         //       this function has been kept as the number of rows read.
390 388
         return $this->shouldPreserveEmptyRows ?
391
-                $this->nextRowIndexToBeProcessed :
392
-                $this->numReadRows;
389
+                $this->nextRowIndexToBeProcessed : $this->numReadRows;
393 390
     }
394 391
 
395 392
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -205,7 +205,7 @@
 block discarded – undo
205 205
         try {
206 206
             $this->xmlProcessor->readUntilStopped();
207 207
         } catch (XMLProcessingException $exception) {
208
-            throw new IOException("The {$this->sheetDataXMLFilePath} file cannot be read. [{$exception->getMessage()}]");
208
+            throw new IOException("the {$this->sheetDataXMLFilePath} file cannot be read. [{$exception->getMessage()}]");
209 209
         }
210 210
 
211 211
         $this->rowDataBuffer = $this->currentlyProcessedRowData;
Please login to merge, or discard this patch.
src/Spout/Reader/XLSX/Helper/DateFormatHelper.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -23,33 +23,33 @@  discard block
 block discarded – undo
23 23
     private static $excelDateFormatToPHPDateFormatMapping = [
24 24
         self::KEY_GENERAL => [
25 25
             // Time
26
-            'am/pm' => 'A',  // Uppercase Ante meridiem and Post meridiem
26
+            'am/pm' => 'A', // Uppercase Ante meridiem and Post meridiem
27 27
             ':mm'   => ':i', // Minutes with leading zeros - if preceded by a ":" (otherwise month)
28 28
             'mm:'   => 'i:', // Minutes with leading zeros - if followed by a ":" (otherwise month)
29
-            'ss'    => 's',  // Seconds, with leading zeros
30
-            '.s'    => '',   // Ignore (fractional seconds format does not exist in PHP)
29
+            'ss'    => 's', // Seconds, with leading zeros
30
+            '.s'    => '', // Ignore (fractional seconds format does not exist in PHP)
31 31
 
32 32
             // Date
33
-            'e'     => 'Y',  // Full numeric representation of a year, 4 digits
34
-            'yyyy'  => 'Y',  // Full numeric representation of a year, 4 digits
35
-            'yy'    => 'y',  // Two digit representation of a year
36
-            'mmmmm' => 'M',  // Short textual representation of a month, three letters ("mmmmm" should only contain the 1st letter...)
37
-            'mmmm'  => 'F',  // Full textual representation of a month
38
-            'mmm'   => 'M',  // Short textual representation of a month, three letters
39
-            'mm'    => 'm',  // Numeric representation of a month, with leading zeros
40
-            'm'     => 'n',  // Numeric representation of a month, without leading zeros
41
-            'dddd'  => 'l',  // Full textual representation of the day of the week
42
-            'ddd'   => 'D',  // Textual representation of a day, three letters
43
-            'dd'    => 'd',  // Day of the month, 2 digits with leading zeros
44
-            'd'     => 'j',  // Day of the month without leading zeros
33
+            'e'     => 'Y', // Full numeric representation of a year, 4 digits
34
+            'yyyy'  => 'Y', // Full numeric representation of a year, 4 digits
35
+            'yy'    => 'y', // Two digit representation of a year
36
+            'mmmmm' => 'M', // Short textual representation of a month, three letters ("mmmmm" should only contain the 1st letter...)
37
+            'mmmm'  => 'F', // Full textual representation of a month
38
+            'mmm'   => 'M', // Short textual representation of a month, three letters
39
+            'mm'    => 'm', // Numeric representation of a month, with leading zeros
40
+            'm'     => 'n', // Numeric representation of a month, without leading zeros
41
+            'dddd'  => 'l', // Full textual representation of the day of the week
42
+            'ddd'   => 'D', // Textual representation of a day, three letters
43
+            'dd'    => 'd', // Day of the month, 2 digits with leading zeros
44
+            'd'     => 'j', // Day of the month without leading zeros
45 45
         ],
46 46
         self::KEY_HOUR_12 => [
47
-            'hh'    => 'h',  // 12-hour format of an hour without leading zeros
48
-            'h'     => 'g',  // 12-hour format of an hour without leading zeros
47
+            'hh'    => 'h', // 12-hour format of an hour without leading zeros
48
+            'h'     => 'g', // 12-hour format of an hour without leading zeros
49 49
         ],
50 50
         self::KEY_HOUR_24 => [
51
-            'hh'    => 'H',  // 24-hour hours with leading zero
52
-            'h'     => 'G',  // 24-hour format of an hour without leading zeros
51
+            'hh'    => 'H', // 24-hour hours with leading zero
52
+            'h'     => 'G', // 24-hour format of an hour without leading zeros
53 53
         ],
54 54
     ];
55 55
 
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
         // Finally, to have the date format compatible with the DateTime::format() function, we need to escape
105 105
         // all characters that are inside double quotes (and double quotes must be removed).
106 106
         // For instance, ["Day " dd] should become [\D\a\y\ dd]
107
-        $phpDateFormat = preg_replace_callback('/"(.+?)"/', function($matches) {
107
+        $phpDateFormat = preg_replace_callback('/"(.+?)"/', function ($matches) {
108 108
             $stringToEscape = $matches[1];
109 109
             $letters = preg_split('//u', $stringToEscape, -1, PREG_SPLIT_NO_EMPTY);
110 110
             return '\\' . implode('\\', $letters);
Please login to merge, or discard this patch.
src/Spout/Reader/XLSX/Helper/StyleHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
         22 => 'm/d/yyyy h:mm', // @NOTE: ECMA spec is 'm/d/yy h:mm',
48 48
         45 => 'mm:ss',
49 49
         46 => '[h]:mm:ss',
50
-        47 => 'mm:ss.0',  // @NOTE: ECMA spec is 'mmss.0',
50
+        47 => 'mm:ss.0', // @NOTE: ECMA spec is 'mmss.0',
51 51
     ];
52 52
 
53 53
     /** @var string Path of the XLSX file being read */
Please login to merge, or discard this patch.
src/Spout/Autoloader/Psr4Autoloader.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -119,8 +119,8 @@
 block discarded – undo
119 119
             // replace namespace separators with directory separators
120 120
             // in the relative class name, append with .php
121 121
             $file = $baseDir
122
-                  . str_replace('\\', '/', $relativeClass)
123
-                  . '.php';
122
+                    . str_replace('\\', '/', $relativeClass)
123
+                    . '.php';
124 124
 
125 125
             // if the mapped file exists, require it
126 126
             if ($this->requireFile($file)) {
Please login to merge, or discard this patch.