@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | */ |
32 | 32 | try { |
33 | 33 | $this->checkAllowedParents($node); |
34 | - } catch(\Twig_Error_Syntax $e) { |
|
34 | + } catch (\Twig_Error_Syntax $e) { |
|
35 | 35 | // reset path since throwing an error prevents doLeaveNode to be called |
36 | 36 | $this->path = []; |
37 | 37 | throw $e; |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | /** |
47 | 47 | * {@inheritdoc} |
48 | 48 | */ |
49 | - protected function doLeaveNode(\Twig_Node $node,\ Twig_Environment $env) |
|
49 | + protected function doLeaveNode(\Twig_Node $node, \ Twig_Environment $env) |
|
50 | 50 | { |
51 | 51 | array_pop($this->path); |
52 | 52 |
@@ -65,10 +65,10 @@ |
||
65 | 65 | |
66 | 66 | protected function initializeMappings() |
67 | 67 | { |
68 | - $this->mappings['scaleWithDocument'] = function ($value) { |
|
68 | + $this->mappings['scaleWithDocument'] = function($value) { |
|
69 | 69 | $this->object->setScaleWithDocument($value); |
70 | 70 | }; |
71 | - $this->mappings['alignWithMargins'] = function ($value) { |
|
71 | + $this->mappings['alignWithMargins'] = function($value) { |
|
72 | 72 | $this->object->setAlignWithMargins($value); |
73 | 73 | }; |
74 | 74 | } |
@@ -59,61 +59,61 @@ |
||
59 | 59 | |
60 | 60 | protected function initializeMappings() |
61 | 61 | { |
62 | - $this->mappings['break'] = function ($value) { |
|
62 | + $this->mappings['break'] = function($value) { |
|
63 | 63 | $this->sheetWrapper->getObject()->setBreak($this->object->getCoordinate(), $value); |
64 | 64 | }; |
65 | - $this->mappings['dataType'] = function ($value) { |
|
65 | + $this->mappings['dataType'] = function($value) { |
|
66 | 66 | $this->object->setDataType($value); |
67 | 67 | }; |
68 | - $this->mappings['dataValidation']['allowBlank'] = function ($value) { |
|
68 | + $this->mappings['dataValidation']['allowBlank'] = function($value) { |
|
69 | 69 | $this->object->getDataValidation()->setAllowBlank($value); |
70 | 70 | }; |
71 | - $this->mappings['dataValidation']['error'] = function ($value) { |
|
71 | + $this->mappings['dataValidation']['error'] = function($value) { |
|
72 | 72 | $this->object->getDataValidation()->setError($value); |
73 | 73 | }; |
74 | - $this->mappings['dataValidation']['errorStyle'] = function ($value) { |
|
74 | + $this->mappings['dataValidation']['errorStyle'] = function($value) { |
|
75 | 75 | $this->object->getDataValidation()->setErrorStyle($value); |
76 | 76 | }; |
77 | - $this->mappings['dataValidation']['errorTitle'] = function ($value) { |
|
77 | + $this->mappings['dataValidation']['errorTitle'] = function($value) { |
|
78 | 78 | $this->object->getDataValidation()->setErrorTitle($value); |
79 | 79 | }; |
80 | - $this->mappings['dataValidation']['formula1'] = function ($value) { |
|
80 | + $this->mappings['dataValidation']['formula1'] = function($value) { |
|
81 | 81 | $this->object->getDataValidation()->setFormula1($value); |
82 | 82 | }; |
83 | - $this->mappings['dataValidation']['formula2'] = function ($value) { |
|
83 | + $this->mappings['dataValidation']['formula2'] = function($value) { |
|
84 | 84 | $this->object->getDataValidation()->setFormula2($value); |
85 | 85 | }; |
86 | - $this->mappings['dataValidation']['operator'] = function ($value) { |
|
86 | + $this->mappings['dataValidation']['operator'] = function($value) { |
|
87 | 87 | $this->object->getDataValidation()->setOperator($value); |
88 | 88 | }; |
89 | - $this->mappings['dataValidation']['prompt'] = function ($value) { |
|
89 | + $this->mappings['dataValidation']['prompt'] = function($value) { |
|
90 | 90 | $this->object->getDataValidation()->setPrompt($value); |
91 | 91 | }; |
92 | - $this->mappings['dataValidation']['promptTitle'] = function ($value) { |
|
92 | + $this->mappings['dataValidation']['promptTitle'] = function($value) { |
|
93 | 93 | $this->object->getDataValidation()->setPromptTitle($value); |
94 | 94 | }; |
95 | - $this->mappings['dataValidation']['showDropDown'] = function ($value) { |
|
95 | + $this->mappings['dataValidation']['showDropDown'] = function($value) { |
|
96 | 96 | $this->object->getDataValidation()->setShowDropDown($value); |
97 | 97 | }; |
98 | - $this->mappings['dataValidation']['showErrorMessage'] = function ($value) { |
|
98 | + $this->mappings['dataValidation']['showErrorMessage'] = function($value) { |
|
99 | 99 | $this->object->getDataValidation()->setShowErrorMessage($value); |
100 | 100 | }; |
101 | - $this->mappings['dataValidation']['showInputMessage'] = function ($value) { |
|
101 | + $this->mappings['dataValidation']['showInputMessage'] = function($value) { |
|
102 | 102 | $this->object->getDataValidation()->setShowInputMessage($value); |
103 | 103 | }; |
104 | - $this->mappings['dataValidation']['type'] = function ($value) { |
|
104 | + $this->mappings['dataValidation']['type'] = function($value) { |
|
105 | 105 | $this->object->getDataValidation()->setType($value); |
106 | 106 | }; |
107 | - $this->mappings['merge'] = function ($value) { |
|
107 | + $this->mappings['merge'] = function($value) { |
|
108 | 108 | if (is_int($value)) { |
109 | 109 | $value = Cell::stringFromColumnIndex($value) . $this->sheetWrapper->getRow(); |
110 | 110 | } |
111 | 111 | $this->sheetWrapper->getObject()->mergeCells(sprintf('%s:%s', $this->object->getCoordinate(), $value)); |
112 | 112 | }; |
113 | - $this->mappings['style'] = function ($value) { |
|
113 | + $this->mappings['style'] = function($value) { |
|
114 | 114 | $this->sheetWrapper->getObject()->getStyle($this->object->getCoordinate())->applyFromArray($value); |
115 | 115 | }; |
116 | - $this->mappings['url'] = function ($value) { |
|
116 | + $this->mappings['url'] = function($value) { |
|
117 | 117 | $this->object->getHyperlink()->setUrl($value); |
118 | 118 | }; |
119 | 119 | } |
@@ -262,7 +262,7 @@ |
||
262 | 262 | $this->documentWrapper->getObject()->createSheet()->setTitle($index); |
263 | 263 | } |
264 | 264 | $this->object = $this->documentWrapper->getObject()->setActiveSheetIndexByName($index); |
265 | - } else { |
|
265 | + } else { |
|
266 | 266 | // create new sheet without a name |
267 | 267 | $this->documentWrapper->getObject()->createSheet(); |
268 | 268 | $this->object = $this->documentWrapper->getObject()->setActiveSheetIndex(0); |
@@ -82,173 +82,171 @@ discard block |
||
82 | 82 | |
83 | 83 | protected function initializeMappings() |
84 | 84 | { |
85 | - $this->mappings['autoFilter'] = function ($value) { |
|
85 | + $this->mappings['autoFilter'] = function($value) { |
|
86 | 86 | $this->object->setAutoFilter($value); |
87 | 87 | }; |
88 | - $this->mappings['columnDimension']['__multi'] = function ($column = 'default'): ColumnDimension { |
|
88 | + $this->mappings['columnDimension']['__multi'] = function($column = 'default'): ColumnDimension { |
|
89 | 89 | return $column === 'default' ? |
90 | - $this->object->getDefaultColumnDimension() : |
|
91 | - $this->object->getColumnDimension($column); |
|
90 | + $this->object->getDefaultColumnDimension() : $this->object->getColumnDimension($column); |
|
92 | 91 | }; |
93 | - $this->mappings['columnDimension']['autoSize'] = function ($value, ColumnDimension $object) { |
|
92 | + $this->mappings['columnDimension']['autoSize'] = function($value, ColumnDimension $object) { |
|
94 | 93 | $object->setAutoSize($value); |
95 | 94 | }; |
96 | - $this->mappings['columnDimension']['collapsed'] = function ($value, ColumnDimension $object) { |
|
95 | + $this->mappings['columnDimension']['collapsed'] = function($value, ColumnDimension $object) { |
|
97 | 96 | $object->setCollapsed($value); |
98 | 97 | }; |
99 | - $this->mappings['columnDimension']['columnIndex'] = function ($value, ColumnDimension $object) { |
|
98 | + $this->mappings['columnDimension']['columnIndex'] = function($value, ColumnDimension $object) { |
|
100 | 99 | $object->setColumnIndex($value); |
101 | 100 | }; |
102 | - $this->mappings['columnDimension']['outlineLevel'] = function ($value, ColumnDimension $object) { |
|
101 | + $this->mappings['columnDimension']['outlineLevel'] = function($value, ColumnDimension $object) { |
|
103 | 102 | $object->setOutlineLevel($value); |
104 | 103 | }; |
105 | - $this->mappings['columnDimension']['visible'] = function ($value, ColumnDimension $object) { |
|
104 | + $this->mappings['columnDimension']['visible'] = function($value, ColumnDimension $object) { |
|
106 | 105 | $object->setVisible($value); |
107 | 106 | }; |
108 | - $this->mappings['columnDimension']['width'] = function ($value, ColumnDimension $object) { |
|
107 | + $this->mappings['columnDimension']['width'] = function($value, ColumnDimension $object) { |
|
109 | 108 | $object->setWidth($value); |
110 | 109 | }; |
111 | - $this->mappings['columnDimension']['xfIndex'] = function ($value, ColumnDimension $object) { |
|
110 | + $this->mappings['columnDimension']['xfIndex'] = function($value, ColumnDimension $object) { |
|
112 | 111 | $object->setXfIndex($value); |
113 | 112 | }; |
114 | - $this->mappings['pageMargins']['top'] = function ($value) { |
|
113 | + $this->mappings['pageMargins']['top'] = function($value) { |
|
115 | 114 | $this->object->getPageMargins()->setTop($value); |
116 | 115 | }; |
117 | - $this->mappings['pageMargins']['bottom'] = function ($value) { |
|
116 | + $this->mappings['pageMargins']['bottom'] = function($value) { |
|
118 | 117 | $this->object->getPageMargins()->setBottom($value); |
119 | 118 | }; |
120 | - $this->mappings['pageMargins']['left'] = function ($value) { |
|
119 | + $this->mappings['pageMargins']['left'] = function($value) { |
|
121 | 120 | $this->object->getPageMargins()->setLeft($value); |
122 | 121 | }; |
123 | - $this->mappings['pageMargins']['right'] = function ($value) { |
|
122 | + $this->mappings['pageMargins']['right'] = function($value) { |
|
124 | 123 | $this->object->getPageMargins()->setRight($value); |
125 | 124 | }; |
126 | - $this->mappings['pageMargins']['header'] = function ($value) { |
|
125 | + $this->mappings['pageMargins']['header'] = function($value) { |
|
127 | 126 | $this->object->getPageMargins()->setHeader($value); |
128 | 127 | }; |
129 | - $this->mappings['pageMargins']['footer'] = function ($value) { |
|
128 | + $this->mappings['pageMargins']['footer'] = function($value) { |
|
130 | 129 | $this->object->getPageMargins()->setFooter($value); |
131 | 130 | }; |
132 | - $this->mappings['pageSetup']['fitToHeight'] = function ($value) { |
|
131 | + $this->mappings['pageSetup']['fitToHeight'] = function($value) { |
|
133 | 132 | $this->object->getPageSetup()->setFitToHeight($value); |
134 | 133 | }; |
135 | - $this->mappings['pageSetup']['fitToPage'] = function ($value) { |
|
134 | + $this->mappings['pageSetup']['fitToPage'] = function($value) { |
|
136 | 135 | $this->object->getPageSetup()->setFitToPage($value); |
137 | 136 | }; |
138 | - $this->mappings['pageSetup']['fitToWidth'] = function ($value) { |
|
137 | + $this->mappings['pageSetup']['fitToWidth'] = function($value) { |
|
139 | 138 | $this->object->getPageSetup()->setFitToWidth($value); |
140 | 139 | }; |
141 | - $this->mappings['pageSetup']['horizontalCentered'] = function ($value) { |
|
140 | + $this->mappings['pageSetup']['horizontalCentered'] = function($value) { |
|
142 | 141 | $this->object->getPageSetup()->setHorizontalCentered($value); |
143 | 142 | }; |
144 | - $this->mappings['pageSetup']['orientation'] = function ($value) { |
|
143 | + $this->mappings['pageSetup']['orientation'] = function($value) { |
|
145 | 144 | $this->object->getPageSetup()->setOrientation($value); |
146 | 145 | }; |
147 | - $this->mappings['pageSetup']['paperSize'] = function ($value) { |
|
146 | + $this->mappings['pageSetup']['paperSize'] = function($value) { |
|
148 | 147 | $this->object->getPageSetup()->setPaperSize($value); |
149 | 148 | }; |
150 | - $this->mappings['pageSetup']['printArea'] = function ($value) { |
|
149 | + $this->mappings['pageSetup']['printArea'] = function($value) { |
|
151 | 150 | $this->object->getPageSetup()->setPrintArea($value); |
152 | 151 | }; |
153 | - $this->mappings['pageSetup']['scale'] = function ($value) { |
|
152 | + $this->mappings['pageSetup']['scale'] = function($value) { |
|
154 | 153 | $this->object->getPageSetup()->setScale($value); |
155 | 154 | }; |
156 | - $this->mappings['pageSetup']['verticalCentered'] = function ($value) { |
|
155 | + $this->mappings['pageSetup']['verticalCentered'] = function($value) { |
|
157 | 156 | $this->object->getPageSetup()->setVerticalCentered($value); |
158 | 157 | }; |
159 | - $this->mappings['printGridlines'] = function ($value) { |
|
158 | + $this->mappings['printGridlines'] = function($value) { |
|
160 | 159 | $this->object->setPrintGridlines($value); |
161 | 160 | }; |
162 | - $this->mappings['protection']['autoFilter'] = function ($value) { |
|
161 | + $this->mappings['protection']['autoFilter'] = function($value) { |
|
163 | 162 | $this->object->getProtection()->setAutoFilter($value); |
164 | 163 | }; |
165 | - $this->mappings['protection']['deleteColumns'] = function ($value) { |
|
164 | + $this->mappings['protection']['deleteColumns'] = function($value) { |
|
166 | 165 | $this->object->getProtection()->setDeleteColumns($value); |
167 | 166 | }; |
168 | - $this->mappings['protection']['deleteRows'] = function ($value) { |
|
167 | + $this->mappings['protection']['deleteRows'] = function($value) { |
|
169 | 168 | $this->object->getProtection()->setDeleteRows($value); |
170 | 169 | }; |
171 | - $this->mappings['protection']['formatCells'] = function ($value) { |
|
170 | + $this->mappings['protection']['formatCells'] = function($value) { |
|
172 | 171 | $this->object->getProtection()->setFormatCells($value); |
173 | 172 | }; |
174 | - $this->mappings['protection']['formatColumns'] = function ($value) { |
|
173 | + $this->mappings['protection']['formatColumns'] = function($value) { |
|
175 | 174 | $this->object->getProtection()->setFormatColumns($value); |
176 | 175 | }; |
177 | - $this->mappings['protection']['formatRows'] = function ($value) { |
|
176 | + $this->mappings['protection']['formatRows'] = function($value) { |
|
178 | 177 | $this->object->getProtection()->setFormatRows($value); |
179 | 178 | }; |
180 | - $this->mappings['protection']['insertColumns'] = function ($value) { |
|
179 | + $this->mappings['protection']['insertColumns'] = function($value) { |
|
181 | 180 | $this->object->getProtection()->setInsertColumns($value); |
182 | 181 | }; |
183 | - $this->mappings['protection']['insertHyperlinks'] = function ($value) { |
|
182 | + $this->mappings['protection']['insertHyperlinks'] = function($value) { |
|
184 | 183 | $this->object->getProtection()->setInsertHyperlinks($value); |
185 | 184 | }; |
186 | - $this->mappings['protection']['insertRows'] = function ($value) { |
|
185 | + $this->mappings['protection']['insertRows'] = function($value) { |
|
187 | 186 | $this->object->getProtection()->setInsertRows($value); |
188 | 187 | }; |
189 | - $this->mappings['protection']['objects'] = function ($value) { |
|
188 | + $this->mappings['protection']['objects'] = function($value) { |
|
190 | 189 | $this->object->getProtection()->setObjects($value); |
191 | 190 | }; |
192 | - $this->mappings['protection']['password'] = function ($value) { |
|
191 | + $this->mappings['protection']['password'] = function($value) { |
|
193 | 192 | $this->object->getProtection()->setPassword($value); |
194 | 193 | }; |
195 | - $this->mappings['protection']['pivotTables'] = function ($value) { |
|
194 | + $this->mappings['protection']['pivotTables'] = function($value) { |
|
196 | 195 | $this->object->getProtection()->setPivotTables($value); |
197 | 196 | }; |
198 | - $this->mappings['protection']['scenarios'] = function ($value) { |
|
197 | + $this->mappings['protection']['scenarios'] = function($value) { |
|
199 | 198 | $this->object->getProtection()->setScenarios($value); |
200 | 199 | }; |
201 | - $this->mappings['protection']['selectLockedCells'] = function ($value) { |
|
200 | + $this->mappings['protection']['selectLockedCells'] = function($value) { |
|
202 | 201 | $this->object->getProtection()->setSelectLockedCells($value); |
203 | 202 | }; |
204 | - $this->mappings['protection']['selectUnlockedCells'] = function ($value) { |
|
203 | + $this->mappings['protection']['selectUnlockedCells'] = function($value) { |
|
205 | 204 | $this->object->getProtection()->setSelectUnlockedCells($value); |
206 | 205 | }; |
207 | - $this->mappings['protection']['sheet'] = function ($value) { |
|
206 | + $this->mappings['protection']['sheet'] = function($value) { |
|
208 | 207 | $this->object->getProtection()->setSheet($value); |
209 | 208 | }; |
210 | - $this->mappings['protection']['sort'] = function ($value) { |
|
209 | + $this->mappings['protection']['sort'] = function($value) { |
|
211 | 210 | $this->object->getProtection()->setSort($value); |
212 | 211 | }; |
213 | - $this->mappings['rightToLeft'] = function ($value) { |
|
212 | + $this->mappings['rightToLeft'] = function($value) { |
|
214 | 213 | $this->object->setRightToLeft($value); |
215 | 214 | }; |
216 | - $this->mappings['rowDimension']['__multi'] = function ($column = 'default'): RowDimension { |
|
215 | + $this->mappings['rowDimension']['__multi'] = function($column = 'default'): RowDimension { |
|
217 | 216 | return $column === 'default' ? |
218 | - $this->object->getDefaultRowDimension() : |
|
219 | - $this->object->getRowDimension($column); |
|
217 | + $this->object->getDefaultRowDimension() : $this->object->getRowDimension($column); |
|
220 | 218 | }; |
221 | - $this->mappings['rowDimension']['collapsed'] = function ($value, RowDimension $object) { |
|
219 | + $this->mappings['rowDimension']['collapsed'] = function($value, RowDimension $object) { |
|
222 | 220 | $object->setCollapsed($value); |
223 | 221 | }; |
224 | - $this->mappings['rowDimension']['outlineLevel'] = function ($value, RowDimension $object) { |
|
222 | + $this->mappings['rowDimension']['outlineLevel'] = function($value, RowDimension $object) { |
|
225 | 223 | $object->setOutlineLevel($value); |
226 | 224 | }; |
227 | - $this->mappings['rowDimension']['rowHeight'] = function ($value, RowDimension $object) { |
|
225 | + $this->mappings['rowDimension']['rowHeight'] = function($value, RowDimension $object) { |
|
228 | 226 | $object->setRowHeight($value); |
229 | 227 | }; |
230 | - $this->mappings['rowDimension']['rowIndex'] = function ($value, RowDimension $object) { |
|
228 | + $this->mappings['rowDimension']['rowIndex'] = function($value, RowDimension $object) { |
|
231 | 229 | $object->setRowIndex($value); |
232 | 230 | }; |
233 | - $this->mappings['rowDimension']['visible'] = function ($value, RowDimension $object) { |
|
231 | + $this->mappings['rowDimension']['visible'] = function($value, RowDimension $object) { |
|
234 | 232 | $object->setVisible($value); |
235 | 233 | }; |
236 | - $this->mappings['rowDimension']['xfIndex'] = function ($value, RowDimension $object) { |
|
234 | + $this->mappings['rowDimension']['xfIndex'] = function($value, RowDimension $object) { |
|
237 | 235 | $object->setXfIndex($value); |
238 | 236 | }; |
239 | - $this->mappings['rowDimension']['zeroHeight'] = function ($value, RowDimension $object) { |
|
237 | + $this->mappings['rowDimension']['zeroHeight'] = function($value, RowDimension $object) { |
|
240 | 238 | $object->setZeroHeight($value); |
241 | 239 | }; |
242 | - $this->mappings['sheetState'] = function ($value) { |
|
240 | + $this->mappings['sheetState'] = function($value) { |
|
243 | 241 | $this->object->setSheetState($value); |
244 | 242 | }; |
245 | - $this->mappings['showGridlines'] = function ($value) { |
|
243 | + $this->mappings['showGridlines'] = function($value) { |
|
246 | 244 | $this->object->setShowGridlines($value); |
247 | 245 | }; |
248 | - $this->mappings['tabColor'] = function ($value) { |
|
246 | + $this->mappings['tabColor'] = function($value) { |
|
249 | 247 | $this->object->getTabColor()->setRGB($value); |
250 | 248 | }; |
251 | - $this->mappings['zoomScale'] = function ($value) { |
|
249 | + $this->mappings['zoomScale'] = function($value) { |
|
252 | 250 | $this->object->getSheetView()->setZoomScale($value); |
253 | 251 | }; |
254 | 252 | } |
@@ -261,7 +259,7 @@ discard block |
||
261 | 259 | */ |
262 | 260 | public function start($index, array $properties = []) |
263 | 261 | { |
264 | - if (is_int($index) && $index <$this->documentWrapper->getObject()->getSheetCount()) { |
|
262 | + if (is_int($index) && $index < $this->documentWrapper->getObject()->getSheetCount()) { |
|
265 | 263 | $this->object = $this->documentWrapper->getObject()->setActiveSheetIndex($index); |
266 | 264 | } elseif (is_string($index)) { |
267 | 265 | if (!$this->documentWrapper->getObject()->sheetNameExists($index)) { |
@@ -269,7 +267,7 @@ discard block |
||
269 | 267 | $this->documentWrapper->getObject()->createSheet()->setTitle($index); |
270 | 268 | } |
271 | 269 | $this->object = $this->documentWrapper->getObject()->setActiveSheetIndexByName($index); |
272 | - } else { |
|
270 | + } else { |
|
273 | 271 | // create new sheet without a name |
274 | 272 | $this->documentWrapper->getObject()->createSheet(); |
275 | 273 | $this->object = $this->documentWrapper->getObject()->setActiveSheetIndex(0); |
@@ -296,7 +294,7 @@ discard block |
||
296 | 294 | */ |
297 | 295 | $columnDimension = $this->attributes['properties']['columnDimension']; |
298 | 296 | foreach ($columnDimension as $key => $value) { |
299 | - if(isset($value['autoSize'])) { |
|
297 | + if (isset($value['autoSize'])) { |
|
300 | 298 | if ('default' === $key) { |
301 | 299 | try { |
302 | 300 | $cellIterator = $this->object->getRowIterator()->current()->getCellIterator(); |
@@ -65,52 +65,52 @@ |
||
65 | 65 | |
66 | 66 | protected function initializeMappings() |
67 | 67 | { |
68 | - $this->mappings['coordinates'] = function ($value) { |
|
68 | + $this->mappings['coordinates'] = function($value) { |
|
69 | 69 | $this->object->setCoordinates($value); |
70 | 70 | }; |
71 | - $this->mappings['description'] = function ($value) { |
|
71 | + $this->mappings['description'] = function($value) { |
|
72 | 72 | $this->object->setDescription($value); |
73 | 73 | }; |
74 | - $this->mappings['height'] = function ($value) { |
|
74 | + $this->mappings['height'] = function($value) { |
|
75 | 75 | $this->object->setHeight($value); |
76 | 76 | }; |
77 | - $this->mappings['name'] = function ($value) { |
|
77 | + $this->mappings['name'] = function($value) { |
|
78 | 78 | $this->object->setName($value); |
79 | 79 | }; |
80 | - $this->mappings['offsetX'] = function ($value) { |
|
80 | + $this->mappings['offsetX'] = function($value) { |
|
81 | 81 | $this->object->setOffsetX($value); |
82 | 82 | }; |
83 | - $this->mappings['offsetY'] = function ($value) { |
|
83 | + $this->mappings['offsetY'] = function($value) { |
|
84 | 84 | $this->object->setOffsetY($value); |
85 | 85 | }; |
86 | - $this->mappings['resizeProportional'] = function ($value) { |
|
86 | + $this->mappings['resizeProportional'] = function($value) { |
|
87 | 87 | $this->object->setResizeProportional($value); |
88 | 88 | }; |
89 | - $this->mappings['rotation'] = function ($value) { |
|
89 | + $this->mappings['rotation'] = function($value) { |
|
90 | 90 | $this->object->setRotation($value); |
91 | 91 | }; |
92 | - $this->mappings['shadow']['alignment'] = function ($value) { |
|
92 | + $this->mappings['shadow']['alignment'] = function($value) { |
|
93 | 93 | $this->object->getShadow()->setAlignment($value); |
94 | 94 | }; |
95 | - $this->mappings['shadow']['alpha'] = function ($value) { |
|
95 | + $this->mappings['shadow']['alpha'] = function($value) { |
|
96 | 96 | $this->object->getShadow()->setAlpha($value); |
97 | 97 | }; |
98 | - $this->mappings['shadow']['blurRadius'] = function ($value) { |
|
98 | + $this->mappings['shadow']['blurRadius'] = function($value) { |
|
99 | 99 | $this->object->getShadow()->setBlurRadius($value); |
100 | 100 | }; |
101 | - $this->mappings['shadow']['color'] = function ($value) { |
|
101 | + $this->mappings['shadow']['color'] = function($value) { |
|
102 | 102 | $this->object->getShadow()->getColor()->setRGB($value); |
103 | 103 | }; |
104 | - $this->mappings['shadow']['direction'] = function ($value) { |
|
104 | + $this->mappings['shadow']['direction'] = function($value) { |
|
105 | 105 | $this->object->getShadow()->setDirection($value); |
106 | 106 | }; |
107 | - $this->mappings['shadow']['distance'] = function ($value) { |
|
107 | + $this->mappings['shadow']['distance'] = function($value) { |
|
108 | 108 | $this->object->getShadow()->setDistance($value); |
109 | 109 | }; |
110 | - $this->mappings['shadow']['visible'] = function ($value) { |
|
110 | + $this->mappings['shadow']['visible'] = function($value) { |
|
111 | 111 | $this->object->getShadow()->setVisible($value); |
112 | 112 | }; |
113 | - $this->mappings['width'] = function ($value) { |
|
113 | + $this->mappings['width'] = function($value) { |
|
114 | 114 | $this->object->setWidth($value); |
115 | 115 | }; |
116 | 116 | } |
@@ -57,61 +57,61 @@ |
||
57 | 57 | |
58 | 58 | protected function initializeMappings() |
59 | 59 | { |
60 | - $this->mappings['category'] = function ($value) { |
|
60 | + $this->mappings['category'] = function($value) { |
|
61 | 61 | $this->object->getProperties()->setCategory($value); |
62 | 62 | }; |
63 | - $this->mappings['company'] = function ($value) { |
|
63 | + $this->mappings['company'] = function($value) { |
|
64 | 64 | $this->object->getProperties()->setCompany($value); |
65 | 65 | }; |
66 | - $this->mappings['created'] = function ($value) { |
|
66 | + $this->mappings['created'] = function($value) { |
|
67 | 67 | $this->object->getProperties()->setCreated($value); |
68 | 68 | }; |
69 | - $this->mappings['creator'] = function ($value) { |
|
69 | + $this->mappings['creator'] = function($value) { |
|
70 | 70 | $this->object->getProperties()->setCreator($value); |
71 | 71 | }; |
72 | - $this->mappings['defaultStyle'] = function ($value) { |
|
72 | + $this->mappings['defaultStyle'] = function($value) { |
|
73 | 73 | $this->object->getDefaultStyle()->applyFromArray($value); |
74 | 74 | }; |
75 | - $this->mappings['description'] = function ($value) { |
|
75 | + $this->mappings['description'] = function($value) { |
|
76 | 76 | $this->object->getProperties()->setDescription($value); |
77 | 77 | }; |
78 | - $this->mappings['format'] = function ($value) { |
|
78 | + $this->mappings['format'] = function($value) { |
|
79 | 79 | $this->attributes['format'] = $value; |
80 | 80 | }; |
81 | - $this->mappings['keywords'] = function ($value) { |
|
81 | + $this->mappings['keywords'] = function($value) { |
|
82 | 82 | $this->object->getProperties()->setKeywords($value); |
83 | 83 | }; |
84 | - $this->mappings['lastModifiedBy'] = function ($value) { |
|
84 | + $this->mappings['lastModifiedBy'] = function($value) { |
|
85 | 85 | $this->object->getProperties()->setLastModifiedBy($value); |
86 | 86 | }; |
87 | - $this->mappings['manager'] = function ($value) { |
|
87 | + $this->mappings['manager'] = function($value) { |
|
88 | 88 | $this->object->getProperties()->setManager($value); |
89 | 89 | }; |
90 | - $this->mappings['modified'] = function ($value) { |
|
90 | + $this->mappings['modified'] = function($value) { |
|
91 | 91 | $this->object->getProperties()->setModified($value); |
92 | 92 | }; |
93 | - $this->mappings['security']['lockRevision'] = function ($value) { |
|
93 | + $this->mappings['security']['lockRevision'] = function($value) { |
|
94 | 94 | $this->object->getSecurity()->setLockRevision($value); |
95 | 95 | }; |
96 | - $this->mappings['security']['lockStructure'] = function ($value) { |
|
96 | + $this->mappings['security']['lockStructure'] = function($value) { |
|
97 | 97 | $this->object->getSecurity()->setLockStructure($value); |
98 | 98 | }; |
99 | - $this->mappings['security']['lockWindows'] = function ($value) { |
|
99 | + $this->mappings['security']['lockWindows'] = function($value) { |
|
100 | 100 | $this->object->getSecurity()->setLockWindows($value); |
101 | 101 | }; |
102 | - $this->mappings['security']['revisionsPassword'] = function ($value) { |
|
102 | + $this->mappings['security']['revisionsPassword'] = function($value) { |
|
103 | 103 | $this->object->getSecurity()->setRevisionsPassword($value); |
104 | 104 | }; |
105 | - $this->mappings['security']['workbookPassword'] = function ($value) { |
|
105 | + $this->mappings['security']['workbookPassword'] = function($value) { |
|
106 | 106 | $this->object->getSecurity()->setWorkbookPassword($value); |
107 | 107 | }; |
108 | - $this->mappings['subject'] = function ($value) { |
|
108 | + $this->mappings['subject'] = function($value) { |
|
109 | 109 | $this->object->getProperties()->setSubject($value); |
110 | 110 | }; |
111 | - $this->mappings['template'] = function ($value) { |
|
111 | + $this->mappings['template'] = function($value) { |
|
112 | 112 | $this->attributes['template'] = $value; |
113 | 113 | }; |
114 | - $this->mappings['title'] = function ($value) { |
|
114 | + $this->mappings['title'] = function($value) { |
|
115 | 115 | $this->object->getProperties()->setTitle($value); |
116 | 116 | }; |
117 | 117 | } |
@@ -156,7 +156,7 @@ |
||
156 | 156 | $format = $this->attributes['format']; |
157 | 157 | } |
158 | 158 | |
159 | - // try Symfony request |
|
159 | + // try Symfony request |
|
160 | 160 | elseif (isset($this->context['app'])) { |
161 | 161 | /** |
162 | 162 | * @var AppVariable $appVariable |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | |
39 | 39 | static::assertFileExists($path, 'File does not exist'); |
40 | 40 | static::assertGreaterThan(0, filesize($path), 'File is empty'); |
41 | - static::assertStringEqualsFile($path, '"Foo","Bar"' .PHP_EOL. '"Hello","World"' .PHP_EOL, 'Unexpected content'); |
|
41 | + static::assertStringEqualsFile($path, '"Foo","Bar"' . PHP_EOL . '"Hello","World"' . PHP_EOL, 'Unexpected content'); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | /** |
@@ -53,6 +53,6 @@ discard block |
||
53 | 53 | |
54 | 54 | static::assertFileExists($path, 'File does not exist'); |
55 | 55 | static::assertGreaterThan(0, filesize($path), 'File is empty'); |
56 | - static::assertStringEqualsFile($path, '"Hello2","World"' .PHP_EOL. '"Foo","Bar2"' .PHP_EOL, 'Unexpected content'); |
|
56 | + static::assertStringEqualsFile($path, '"Hello2","World"' . PHP_EOL . '"Foo","Bar2"' . PHP_EOL, 'Unexpected content'); |
|
57 | 57 | } |
58 | 58 | } |
@@ -106,7 +106,7 @@ |
||
106 | 106 | static::$fileSystem = new Filesystem(); |
107 | 107 | |
108 | 108 | $twigFileSystem = new \Twig_Loader_Filesystem([__DIR__ . static::$RESOURCE_PATH]); |
109 | - $twigFileSystem->addPath( __DIR__ . static::$TEMPLATE_PATH, 'templates'); |
|
109 | + $twigFileSystem->addPath(__DIR__ . static::$TEMPLATE_PATH, 'templates'); |
|
110 | 110 | |
111 | 111 | static::$environment = new \Twig_Environment($twigFileSystem, ['strict_variables' => true]); |
112 | 112 | static::$environment->addExtension(new TwigSpreadsheetExtension()); |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | protected function parseBody(): \Twig_Node |
15 | 15 | { |
16 | - $body = $this->parser->subparse(function (\Twig_Token $token) { |
|
16 | + $body = $this->parser->subparse(function(\Twig_Token $token) { |
|
17 | 17 | return $token->test('end' . $this->getTag()); |
18 | 18 | }, |
19 | 19 | true |