@@ -29,7 +29,7 @@ |
||
| 29 | 29 | public function getTemplate() |
| 30 | 30 | { |
| 31 | 31 | $grid_tpl = $this->grid->getConfig()->getTemplate(); |
| 32 | - return str_replace('*.',"$grid_tpl.", $this->template); |
|
| 32 | + return str_replace('*.', "$grid_tpl.", $this->template); |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | /** |
@@ -77,7 +77,7 @@ |
||
| 77 | 77 | public function getTagged($tagNames) |
| 78 | 78 | { |
| 79 | 79 | return $this->getComponents()->filter( |
| 80 | - function (ComponentInterface $component) use ($tagNames) { |
|
| 80 | + function(ComponentInterface $component) use ($tagNames) { |
|
| 81 | 81 | return is_array($tagNames) ? $component->hasTags($tagNames) : $component->hasTag($tagNames); |
| 82 | 82 | } |
| 83 | 83 | ); |
@@ -17,9 +17,9 @@ |
||
| 17 | 17 | { |
| 18 | 18 | $before = ''; |
| 19 | 19 | $after = ''; |
| 20 | - foreach($this->html_tags as $tag) { |
|
| 21 | - $before.="<$tag>"; |
|
| 22 | - $after = "</$tag>".$after; |
|
| 20 | + foreach ($this->html_tags as $tag) { |
|
| 21 | + $before .= "<$tag>"; |
|
| 22 | + $after = "</$tag>" . $after; |
|
| 23 | 23 | } |
| 24 | 24 | return $before . $this->renderComponents() . $after; |
| 25 | 25 | } |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | public function initialize(Grid $grid) |
| 49 | 49 | { |
| 50 | 50 | parent::initialize($grid); |
| 51 | - Event::listen(Grid::EVENT_PREPARE, function (Grid $grid) { |
|
| 51 | + Event::listen(Grid::EVENT_PREPARE, function(Grid $grid) { |
|
| 52 | 52 | if ($this->grid !== $grid) { |
| 53 | 53 | return; |
| 54 | 54 | } |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | $file = fopen('php://output', 'w'); |
| 114 | 114 | |
| 115 | 115 | header('Content-Type: text/csv'); |
| 116 | - header('Content-Disposition: attachment; filename="'. $this->getFileName() .'"'); |
|
| 116 | + header('Content-Disposition: attachment; filename="' . $this->getFileName() . '"'); |
|
| 117 | 117 | header('Pragma: no-cache'); |
| 118 | 118 | |
| 119 | 119 | set_time_limit(0); |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | $output = []; |
| 131 | 131 | foreach ($this->grid->getConfig()->getColumns() as $column) { |
| 132 | 132 | if (!$column->isHidden()) { |
| 133 | - $output[] = $this->escapeString( $column->getValue($row) ); |
|
| 133 | + $output[] = $this->escapeString($column->getValue($row)); |
|
| 134 | 134 | } |
| 135 | 135 | } |
| 136 | 136 | fputcsv($file, $output, static::CSV_DELIMITER); |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | public function initialize(Grid $grid) |
| 60 | 60 | { |
| 61 | 61 | parent::initialize($grid); |
| 62 | - Event::listen(Grid::EVENT_PREPARE, function (Grid $grid) { |
|
| 62 | + Event::listen(Grid::EVENT_PREPARE, function(Grid $grid) { |
|
| 63 | 63 | if ($this->grid !== $grid) { |
| 64 | 64 | return; |
| 65 | 65 | } |
@@ -184,10 +184,10 @@ discard block |
||
| 184 | 184 | |
| 185 | 185 | protected function renderExcel() |
| 186 | 186 | { |
| 187 | - $onSheetCreate = function (LaravelExcelWorksheet $sheet) { |
|
| 187 | + $onSheetCreate = function(LaravelExcelWorksheet $sheet) { |
|
| 188 | 188 | $sheet->fromArray($this->getData(), null, 'A1', false, false); |
| 189 | 189 | }; |
| 190 | - $onFileCreate = function (LaravelExcelWriter $excel) use ($onSheetCreate) { |
|
| 190 | + $onFileCreate = function(LaravelExcelWriter $excel) use ($onSheetCreate) { |
|
| 191 | 191 | $excel->sheet($this->getSheetName(), $onSheetCreate); |
| 192 | 192 | }; |
| 193 | 193 | |
@@ -121,7 +121,7 @@ |
||
| 121 | 121 | ] |
| 122 | 122 | ], |
| 123 | 123 | 'current_month' => [ |
| 124 | - 'Cur. month (' . date('F'). ')', |
|
| 124 | + 'Cur. month (' . date('F') . ')', |
|
| 125 | 125 | [ |
| 126 | 126 | $carbon->startOfMonth()->format('Y-m-d'), |
| 127 | 127 | $carbon->endOfMonth()->format('Y-m-d') |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | |
| 24 | 24 | protected function setupPaginationForReading() |
| 25 | 25 | { |
| 26 | - Paginator::currentPageResolver(function () { |
|
| 26 | + Paginator::currentPageResolver(function() { |
|
| 27 | 27 | return Input::get("$this->input_key.page", 1); |
| 28 | 28 | }); |
| 29 | 29 | } |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | if (isset($input['page'])) { |
| 51 | 51 | unset($input['page']); |
| 52 | 52 | } |
| 53 | - return str_replace('/?', '?',$paginator->appends($this->input_key, $input)->render()); |
|
| 53 | + return str_replace('/?', '?', $paginator->appends($this->input_key, $input)->render()); |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | public function initialize(Grid $grid) |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | */ |
| 33 | 33 | public function getVariants() |
| 34 | 34 | { |
| 35 | - return array_combine(array_values($this->variants),array_values($this->variants)); |
|
| 35 | + return array_combine(array_values($this->variants), array_values($this->variants)); |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | /** |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | */ |
| 48 | 48 | public function getName() |
| 49 | 49 | { |
| 50 | - return $this->name ? : 'column_' . $this->column->getName(); |
|
| 50 | + return $this->name ?: 'column_' . $this->column->getName(); |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | /** |