Completed
Push — master ( 0298b9...d44bd0 )
by Vitaliy
02:53
created
src/Build/Setup.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
         $b = new Blueprint(self::GRID_CLASS, [
84 84
             new BuildDataProvider(),
85
-            new CustomInstruction(function (Scaffold $s) {
85
+            new CustomInstruction(function(Scaffold $s) {
86 86
                 /** @var EloquentDataProvider $provider */
87 87
                 $provider = $s->getInput('data_provider');
88 88
                 $is_eloquent = $provider  instanceof EloquentDataProvider;
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
     {
120 120
         $blueprint = new Blueprint(self::COMPONENT_CLASS, [
121 121
 
122
-            new CustomInstruction(function (Scaffold $s) {
122
+            new CustomInstruction(function(Scaffold $s) {
123 123
                 if ($s->input instanceof Closure) {
124 124
                     $s->class = 'Nayjest\Grids\Components\RenderFunc';
125 125
                     $s->constructor_arguments = [$s->input];
@@ -127,13 +127,13 @@  discard block
 block discarded – undo
127 127
                 } elseif (is_string($s->input)) {
128 128
                     $s->class = 'Nayjest\Grids\Components\RenderFunc';
129 129
                     $out = $s->input;
130
-                    $s->constructor_arguments = [function () use ($out) {
130
+                    $s->constructor_arguments = [function() use ($out) {
131 131
                         return $out;
132 132
                     }];
133 133
                     $s->input = [];
134 134
                 }
135 135
             }, Instruction::PHASE_PRE_INST),
136
-            new CustomMapping('type', function ($type, Scaffold $s) {
136
+            new CustomMapping('type', function($type, Scaffold $s) {
137 137
                 if (strpos($type, '\\') !== false) {
138 138
                     $s->class = $type;
139 139
                 } else {
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 
150 150
         $blueprint->add(new Rename('component', 'add_component'));
151 151
         $blueprint->add(new Build('add_component', $blueprint));
152
-        $blueprint->add(new CallMethodWith('add_component','addComponent'));
152
+        $blueprint->add(new CallMethodWith('add_component', 'addComponent'));
153 153
 
154 154
         return $blueprint;
155 155
     }
@@ -163,8 +163,8 @@  discard block
 block discarded – undo
163 163
     {
164 164
         return new Blueprint(self::FILTER_CLASS, [
165 165
             new SimpleValueAsField('name'),
166
-            new CustomMapping('type', function ($type, Scaffold $s) {
167
-                switch($type) {
166
+            new CustomMapping('type', function($type, Scaffold $s) {
167
+                switch ($type) {
168 168
                     case 'select':
169 169
                         $s->class = 'Nayjest\Grids\SelectFilterConfig';
170 170
                         break;
@@ -172,8 +172,8 @@  discard block
 block discarded – undo
172 172
                         break;
173 173
                 }
174 174
             }, null, Instruction::PHASE_PRE_INST),
175
-            new Rename(0,'name'),
176
-            new Rename(1,'operator'),
175
+            new Rename(0, 'name'),
176
+            new Rename(1, 'operator'),
177 177
         ]);
178 178
     }
179 179
 
@@ -192,12 +192,12 @@  discard block
 block discarded – undo
192 192
         }
193 193
         return new Blueprint(self::COLUMN_CLASS, [
194 194
             new SimpleValueAsField('name'),
195
-            new Rename(0,'name'),
195
+            new Rename(0, 'name'),
196 196
             new BuildChildren('filters', $filter_blueprint),
197 197
 
198 198
             new Rename('filter', 'add_filter'),
199 199
             new Build('add_filter', $filter_blueprint),
200
-            new CallMethodWith('add_filter','addFilter'),
200
+            new CallMethodWith('add_filter', 'addFilter'),
201 201
         ]);
202 202
     }
203 203
 }
Please login to merge, or discard this patch.
src/Components/Base/RenderableRegistry.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
     public function getSectionComponents($sectionName)
51 51
     {
52 52
         return $this->getComponents()->filter(
53
-            function (ComponentInterface $component) use ($sectionName) {
53
+            function(ComponentInterface $component) use ($sectionName) {
54 54
                 return $component instanceof RenderableComponentInterface
55 55
                 && $component->getRenderSection() === $sectionName;
56 56
             }
Please login to merge, or discard this patch.
src/Components/Base/TComponentView.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
src/Components/Base/TRegistry.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
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
         );
Please login to merge, or discard this patch.
src/Components/Container.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,9 +17,9 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Components/CsvExport.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/Components/ExcelExport.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Components/Filters/DateRangePicker.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@
 block discarded – undo
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')
Please login to merge, or discard this patch.
src/Components/Laravel5/Pager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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)
Please login to merge, or discard this patch.