@@ -75,10 +75,10 @@ |
||
75 | 75 | public function getCellId($cellNumber, $rowNumber = null) |
76 | 76 | { |
77 | 77 | if ($cellNumber / 26 < 1) { |
78 | - return chr(65 + $cellNumber) . $rowNumber; |
|
78 | + return chr(65+$cellNumber) . $rowNumber; |
|
79 | 79 | } |
80 | 80 | |
81 | - return $this->getCellId(floor($cellNumber / 26) - 1) . chr(65 + $cellNumber % 26) . $rowNumber; |
|
81 | + return $this->getCellId(floor($cellNumber / 26)-1) . chr(65+$cellNumber % 26) . $rowNumber; |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | /** |
@@ -86,7 +86,7 @@ |
||
86 | 86 | $this->sheetFile->fwrite('<cols>'); |
87 | 87 | foreach ($this->sheet->getColumnWidths() as $columnNumber => $columnWidth) { |
88 | 88 | $this->sheetFile->fwrite( |
89 | - sprintf(SheetXml::COLUMN_XML, ($columnNumber + 1), ($columnNumber + 1), |
|
89 | + sprintf(SheetXml::COLUMN_XML, ($columnNumber+1), ($columnNumber+1), |
|
90 | 90 | $columnWidth) |
91 | 91 | ); |
92 | 92 | } |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | */ |
98 | 98 | public function getDimensionUpperBound() |
99 | 99 | { |
100 | - return $this->cellBuilder->getCellId($this->maxRowWidth, $this->rowIndex - 1); |
|
100 | + return $this->cellBuilder->getCellId($this->maxRowWidth, $this->rowIndex-1); |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | /** |
@@ -198,6 +198,6 @@ discard block |
||
198 | 198 | ) { |
199 | 199 | return ''; |
200 | 200 | } |
201 | - return sprintf(SheetXml::FREEZE_PANE_XML, array_pop($m) - 1, $this->freezePaneId); |
|
201 | + return sprintf(SheetXml::FREEZE_PANE_XML, array_pop($m)-1, $this->freezePaneId); |
|
202 | 202 | } |
203 | 203 | } |
@@ -36,7 +36,7 @@ |
||
36 | 36 | foreach (file($csvPath) as $line) { |
37 | 37 | if ($line[0] == 'f') continue; |
38 | 38 | $widths = explode(',', trim($line)); |
39 | - if (count(range(33, 126)) + 3 == count($widths)) { |
|
39 | + if (count(range(33, 126))+3 == count($widths)) { |
|
40 | 40 | $fontName = array_shift($widths); |
41 | 41 | $fontSize = array_shift($widths); |
42 | 42 | $boldMulti = array_shift($widths); |
@@ -34,7 +34,9 @@ |
||
34 | 34 | public static function loadWidthsFromCsv($csvPath) |
35 | 35 | { |
36 | 36 | foreach (file($csvPath) as $line) { |
37 | - if ($line[0] == 'f') continue; |
|
37 | + if ($line[0] == 'f') { |
|
38 | + continue; |
|
39 | + } |
|
38 | 40 | $widths = explode(',', trim($line)); |
39 | 41 | if (count(range(33, 126)) + 3 == count($widths)) { |
40 | 42 | $fontName = array_shift($widths); |
@@ -58,7 +58,9 @@ |
||
58 | 58 | */ |
59 | 59 | public function asXml() |
60 | 60 | { |
61 | - if (!count($this->styles)) return '<border/>'; |
|
61 | + if (!count($this->styles)) { |
|
62 | + return '<border/>'; |
|
63 | + } |
|
62 | 64 | |
63 | 65 | $borderXml = ''; |
64 | 66 | foreach (array('left', 'right', 'top', 'bottom', 'diagonal') as $type) { |