Passed
Pull Request — master (#464)
by
unknown
05:07
created
src/Spout/Common/Escaper/XLSX.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
             $character = chr($charValue);
102 102
             if (preg_match("/{$this->escapableControlCharactersPattern}/", $character)) {
103 103
                 $charHexValue = dechex($charValue);
104
-                $escapedChar = '_x' . sprintf('%04s' , strtoupper($charHexValue)) . '_';
104
+                $escapedChar = '_x' . sprintf('%04s', strtoupper($charHexValue)) . '_';
105 105
                 $controlCharactersEscapingMap[$escapedChar] = $character;
106 106
             }
107 107
         }
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
             return $escapedString;
132 132
         }
133 133
 
134
-        return preg_replace_callback("/({$this->escapableControlCharactersPattern})/", function($matches) {
134
+        return preg_replace_callback("/({$this->escapableControlCharactersPattern})/", function ($matches) {
135 135
             return $this->controlCharactersEscapingReverseMap[$matches[0]];
136 136
         }, $escapedString);
137 137
     }
Please login to merge, or discard this patch.
src/Spout/Common/Escaper/ODS.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
             //
33 33
             // @NOTE: Using ENT_NOQUOTES as only XML entities ('<', '>', '&') need to be encoded.
34 34
             //        Single and double quotes can be left as is.
35
-            $escapedString =  htmlspecialchars($string, ENT_NOQUOTES);
35
+            $escapedString = htmlspecialchars($string, ENT_NOQUOTES);
36 36
 
37 37
             // control characters values are from 0 to 1F (hex values) in the ASCII table
38 38
             // some characters should not be escaped though: "\t", "\r" and "\n".
Please login to merge, or discard this patch.
src/Spout/Writer/ODS/Writer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
      */
49 49
     protected function openWriter()
50 50
     {
51
-        $tempFolder = ($this->tempFolder) ? : sys_get_temp_dir();
51
+        $tempFolder = ($this->tempFolder) ?: sys_get_temp_dir();
52 52
         $this->book = new Workbook($tempFolder, $this->shouldCreateNewSheetsAutomatically, $this->defaultRowStyle);
53 53
         $this->book->addNewSheetAndMakeItCurrent();
54 54
     }
Please login to merge, or discard this patch.
src/Spout/Writer/ODS/Helper/FileSystemHelper.php 1 patch
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
     <manifest:file-entry manifest:full-path="content.xml" manifest:media-type="text/xml"/>
111 111
     <manifest:file-entry manifest:full-path="meta.xml" manifest:media-type="text/xml"/>
112 112
 </manifest:manifest>
113
-EOD;
113
+eod;
114 114
 
115 115
         $this->createFileWithContents($this->metaInfFolder, self::MANIFEST_XML_FILE_NAME, $manifestXmlFileContents);
116 116
 
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
         <dc:date>$createdDate</dc:date>
151 151
     </office:meta>
152 152
 </office:document-meta>
153
-EOD;
153
+eod;
154 154
 
155 155
         $this->createFileWithContents($this->rootFolder, self::META_XML_FILE_NAME, $metaXmlFileContents);
156 156
 
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
         $contentXmlFileContents = <<<EOD
182 182
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
183 183
 <office:document-content office:version="1.2" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" 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">
184
-EOD;
184
+eod;
185 185
 
186 186
         $contentXmlFileContents .= $styleHelper->getContentXmlFontFaceSectionContent();
187 187
         $contentXmlFileContents .= $styleHelper->getContentXmlAutomaticStylesSectionContent(count($worksheets));
Please login to merge, or discard this patch.
src/Spout/Writer/Common/Helper/ZipHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
             $this->zip = new \ZipArchive();
43 43
             $zipFilePath = $this->getZipFilePath();
44 44
 
45
-            $this->zip->open($zipFilePath, \ZipArchive::CREATE|\ZipArchive::OVERWRITE);
45
+            $this->zip->open($zipFilePath, \ZipArchive::CREATE | \ZipArchive::OVERWRITE);
46 46
         }
47 47
 
48 48
         return $this->zip;
Please login to merge, or discard this patch.
src/Spout/Writer/XLSX/Writer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
     protected function openWriter()
74 74
     {
75 75
         if (!$this->book) {
76
-            $tempFolder = ($this->tempFolder) ? : sys_get_temp_dir();
76
+            $tempFolder = ($this->tempFolder) ?: sys_get_temp_dir();
77 77
             $this->book = new Workbook($tempFolder, $this->shouldUseInlineStrings, $this->shouldCreateNewSheetsAutomatically, $this->defaultRowStyle);
78 78
             $this->book->addNewSheetAndMakeItCurrent();
79 79
         }
Please login to merge, or discard this patch.
src/Spout/Writer/XLSX/Internal/Worksheet.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -184,7 +184,7 @@
 block discarded – undo
184 184
 
185 185
         $rowXML = '<row r="' . $rowIndex . '" spans="1:' . $numCells . '">';
186 186
 
187
-        foreach($dataRow as $cellValue) {
187
+        foreach ($dataRow as $cellValue) {
188 188
             $rowXML .= $this->getCellXML($rowIndex, $cellNumber, $cellValue, $style->getId());
189 189
             $cellNumber++;
190 190
         }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
     const SHEET_XML_FILE_HEADER = <<<EOD
29 29
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
30 30
 <worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">
31
-EOD;
31
+eod;
32 32
 
33 33
     /** @var \Box\Spout\Writer\Common\Sheet The "external" sheet */
34 34
     protected $externalSheet;
Please login to merge, or discard this patch.
src/Spout/Writer/XLSX/Helper/FileSystemHelper.php 1 patch
Upper-Lower-Casing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
     <Relationship Id="rIdCore" Type="http://schemas.openxmlformats.org/officedocument/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/>
129 129
     <Relationship Id="rIdApp" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/>
130 130
 </Relationships>
131
-EOD;
131
+eod;
132 132
 
133 133
         $this->createFileWithContents($this->relsFolder, self::RELS_FILE_NAME, $relsFileContents);
134 134
 
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
     <Application>$appName</Application>
167 167
     <TotalTime>0</TotalTime>
168 168
 </Properties>
169
-EOD;
169
+eod;
170 170
 
171 171
         $this->createFileWithContents($this->docPropsFolder, self::APP_XML_FILE_NAME, $appXmlFileContents);
172 172
 
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
     <dcterms:modified xsi:type="dcterms:W3CDTF">$createdDate</dcterms:modified>
190 190
     <cp:revision>0</cp:revision>
191 191
 </cp:coreProperties>
192
-EOD;
192
+eod;
193 193
 
194 194
         $this->createFileWithContents($this->docPropsFolder, self::CORE_XML_FILE_NAME, $coreXmlFileContents);
195 195
 
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
     <Default ContentType="application/xml" Extension="xml"/>
250 250
     <Default ContentType="application/vnd.openxmlformats-package.relationships+xml" Extension="rels"/>
251 251
     <Override ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml" PartName="/xl/workbook.xml"/>
252
-EOD;
252
+eod;
253 253
 
254 254
     /** @var Worksheet $worksheet */
255 255
     foreach ($worksheets as $worksheet) {
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
     <Override ContentType="application/vnd.openxmlformats-package.core-properties+xml" PartName="/docProps/core.xml"/>
263 263
     <Override ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml" PartName="/docProps/app.xml"/>
264 264
 </Types>
265
-EOD;
265
+eod;
266 266
 
267 267
         $this->createFileWithContents($this->rootFolder, self::CONTENT_TYPES_XML_FILE_NAME, $contentTypesXmlFileContents);
268 268
 
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
282 282
 <workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">
283 283
     <sheets>
284
-EOD;
284
+eod;
285 285
 
286 286
         /** @noinspection PhpUnnecessaryFullyQualifiedNameInspection */
287 287
         $escaper = \Box\Spout\Common\Escaper\XLSX::getInstance();
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
         $workbookXmlFileContents .= <<<EOD
297 297
     </sheets>
298 298
 </workbook>
299
-EOD;
299
+eod;
300 300
 
301 301
         $this->createFileWithContents($this->xlFolder, self::WORKBOOK_XML_FILE_NAME, $workbookXmlFileContents);
302 302
 
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
 <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
317 317
     <Relationship Id="rIdStyles" Target="styles.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles"/>
318 318
     <Relationship Id="rIdSharedStrings" Target="sharedStrings.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings"/>
319
-EOD;
319
+eod;
320 320
 
321 321
         /** @var Worksheet $worksheet */
322 322
         foreach ($worksheets as $worksheet) {
Please login to merge, or discard this patch.
src/Spout/Writer/XLSX/Helper/SharedStringsHelper.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     const SHARED_STRINGS_XML_FILE_FIRST_PART_HEADER = <<<EOD
18 18
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
19 19
 <sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"
20
-EOD;
20
+eod;
21 21
 
22 22
     /**
23 23
      * This number must be really big so that the no generated file will have more strings than that.
Please login to merge, or discard this patch.