Completed
Pull Request — master (#118)
by
unknown
05:41
created
src/CollectionDataProvider.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
     /**
19 19
      * Constructor.
20 20
      *
21
-     * @param Builder $src
21
+     * @param Collection $src
22 22
      */
23 23
     public function __construct(Collection $src)
24 24
     {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 
4 4
 use Illuminate\Database\Eloquent\Builder;
5 5
 use Event;
6
-use Illuminate\Foundation\Application;
7 6
 use Illuminate\Support\Collection;
8 7
 
9 8
 class CollectionDataProvider extends DataProvider
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
      */
56 56
     public function getPaginationFactory()
57 57
     {
58
-        return $this->getPaginator();//$this->src->getQuery()->getConnection()->getPaginator();
58
+        return $this->getPaginator(); //$this->src->getQuery()->getConnection()->getPaginator();
59 59
     }
60 60
 
61 61
     protected function getIterator()
Please login to merge, or discard this patch.
src/Build/Setup.php 1 patch
Spacing   +5 added lines, -5 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 {
@@ -163,7 +163,7 @@  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) {
166
+            new CustomMapping('type', function($type, Scaffold $s) {
167 167
                 switch ($type) {
168 168
                     case 'select':
169 169
                         $s->class = 'Nayjest\Grids\SelectFilterConfig';
Please login to merge, or discard this patch.
src/Components/Container.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,8 +18,8 @@
 block discarded – undo
18 18
         $before = '';
19 19
         $after = '';
20 20
         foreach ($this->html_tags as $tag) {
21
-            $before.="<$tag>";
22
-            $after = "</$tag>".$after;
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   +2 added lines, -2 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);
Please login to merge, or discard this patch.
src/Components/Filters/DateRangePicker.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
                     ]
147 147
                 ],
148 148
                 'current_month' => [
149
-                    'Cur. month (' . date('F'). ')',
149
+                    'Cur. month (' . date('F') . ')',
150 150
                     [
151 151
                         $carbon->startOfMonth()->format('Y-m-d'),
152 152
                         $carbon->endOfMonth()->format('Y-m-d')
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
 
225 225
     protected function getDefaultFilteringFunc()
226 226
     {
227
-        return function ($value, DataProvider $provider) {
227
+        return function($value, DataProvider $provider) {
228 228
             $provider->filter($this->getName(), '>=', $value[0]);
229 229
             $provider->filter($this->getName(), '<=', $value[1]);
230 230
         };
Please login to merge, or discard this patch.
src/Components/Laravel5/Pager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 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
     }
Please login to merge, or discard this patch.
src/Components/RecordsPerPage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
         if ($from_input === null) {
74 74
             return $this->grid->getConfig()->getPageSize();
75 75
         } else {
76
-            return (int) $from_input;
76
+            return (int)$from_input;
77 77
         }
78 78
     }
79 79
 
Please login to merge, or discard this patch.
src/Components/TotalsRow.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
     {
60 60
         $field_names = $this->field_names;
61 61
         $this->fields = $this->grid->getConfig()->getColumns()->filter(
62
-            function (FieldConfig $field) use ($field_names) {
62
+            function(FieldConfig $field) use ($field_names) {
63 63
                 return in_array($field->getName(), $field_names);
64 64
             }
65 65
         );
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     {
77 77
         Event::listen(
78 78
             DataProvider::EVENT_FETCH_ROW,
79
-            function (DataRow $row, DataProvider $currentProvider) use ($provider) {
79
+            function(DataRow $row, DataProvider $currentProvider) use ($provider) {
80 80
                 if ($currentProvider !== $provider) {
81 81
                     return;
82 82
                 }
@@ -219,6 +219,6 @@  discard block
 block discarded – undo
219 219
      */
220 220
     public function getFieldOperation($fieldName)
221 221
     {
222
-        return isset($this->field_operations[$fieldName])?$this->field_operations[$fieldName]:self::OPERATION_SUM;
222
+        return isset($this->field_operations[$fieldName]) ? $this->field_operations[$fieldName] : self::OPERATION_SUM;
223 223
     }
224 224
 }
Please login to merge, or discard this patch.