Skip to content

Commit df2e73b

Browse files
MaatwebsiteMaatwebsite
authored andcommitted
Merge pull request SpartnerNL#250 from pablobernardo/1.2
Transform short array syntax back to classic
2 parents 22a1a8f + 4184897 commit df2e73b

File tree

7 files changed

+18
-18
lines changed

7 files changed

+18
-18
lines changed

src/Maatwebsite/Excel/Classes/PHPExcel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function setDefaultProperties($custom)
8383
$value = in_array($prop, array_keys($custom)) ? $custom[$prop] : Config::get('excel::properties.' . $prop, null);
8484

8585
// set the property
86-
call_user_func_array([$properties, $method], [$value]);
86+
call_user_func_array(array($properties, $method), array($value));
8787
}
8888
}
8989

src/Maatwebsite/Excel/Excel.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ class Excel {
2424
* Filter
2525
* @var array
2626
*/
27-
protected $filters = [
28-
'registered' => [],
29-
'enabled' => []
30-
];
27+
protected $filters = array(
28+
'registered' => array(),
29+
'enabled' => array()
30+
);
3131

3232
/**
3333
* Excel object
@@ -193,7 +193,7 @@ public function loadView($view, $data = array(), $mergeData = array())
193193
* @param array $filters
194194
* @return Excel
195195
*/
196-
public function registerFilters($filters = [])
196+
public function registerFilters($filters = array())
197197
{
198198
// If enabled array key exists
199199
if(array_key_exists('enabled', $filters))
@@ -263,7 +263,7 @@ public function __call($method, $params)
263263
if (method_exists($this->excel, $method))
264264
{
265265
// Call the method from the excel object with the given params
266-
return call_user_func_array([$this->excel, $method], $params);
266+
return call_user_func_array(array($this->excel, $method), $params);
267267
}
268268

269269
throw new LaravelExcelException('Laravel Excel method [' . $method . '] does not exist');

src/Maatwebsite/Excel/ExcelServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ public function setAutoSizingSettings()
207207
*/
208208
public function registerFilters()
209209
{
210-
app('excel')->registerFilters(Config::get('excel::filters', []));
210+
app('excel')->registerFilters(Config::get('excel::filters', array() ));
211211
}
212212

213213
/**

src/Maatwebsite/Excel/Readers/HtmlReader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1293,6 +1293,6 @@ private function processMergedCells($sheet, &$column, $row, $cellContent)
12931293
}
12941294
}
12951295

1296-
return [$column, $cellContent];
1296+
return array($column, $cellContent);
12971297
}
12981298
}

src/Maatwebsite/Excel/Readers/LaravelExcelReader.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,9 @@ class LaravelExcelReader {
170170
* Filters
171171
* @var array
172172
*/
173-
public $filters = [
174-
'registered' => []
175-
];
173+
public $filters = array(
174+
'registered' => array()
175+
);
176176

177177
/**
178178
* @var LaravelExcelWorksheet
@@ -563,7 +563,7 @@ public function injectExcel($excel)
563563
* Set filters
564564
* @param array $filters
565565
*/
566-
public function setFilters($filters = [])
566+
public function setFilters($filters = array())
567567
{
568568
$this->filters = $filters;
569569
}
@@ -1055,7 +1055,7 @@ public function __call($method, $params)
10551055

10561056
elseif($this->writerHasMethod($method))
10571057
{
1058-
return call_user_func_array([$this->writer, $method], $params);
1058+
return call_user_func_array(array($this->writer, $method), $params);
10591059
}
10601060

10611061
throw new LaravelExcelException('[ERROR] Reader method [' . $method . '] does not exist.');

src/config/cache.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
return [
3+
return array(
44

55
/*
66
|--------------------------------------------------------------------------
@@ -54,4 +54,4 @@
5454

5555
'dir' => storage_path('cache')
5656

57-
];
57+
);

src/config/csv.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
return [
3+
return array(
44

55
/*
66
|--------------------------------------------------------------------------
@@ -28,4 +28,4 @@
2828
*/
2929

3030
'line_ending' => "\r\n"
31-
];
31+
);

0 commit comments

Comments
 (0)