Completed
Push — master ( 243f23...de48bf )
by Song
07:06
created
src/Auth/Permission.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,6 @@
 block discarded – undo
46 46
     /**
47 47
      * Send error response page.
48 48
      *
49
-     * @param \Exception $e
50 49
      */
51 50
     protected static function error()
52 51
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
      */
51 51
     protected static function error()
52 52
     {
53
-        $content = Admin::content(function ($content) {
53
+        $content = Admin::content(function($content) {
54 54
             $content->body(view('admin::deny'));
55 55
         });
56 56
 
Please login to merge, or discard this patch.
src/Commands/InstallCommand.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -174,7 +174,7 @@
 block discarded – undo
174 174
     /**
175 175
      * Get stub contents.
176 176
      *
177
-     * @param $name
177
+     * @param string $name
178 178
      *
179 179
      * @return string
180 180
      */
Please login to merge, or discard this patch.
src/Commands/MakeCommand.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
     /**
26 26
      * Execute the console command.
27 27
      *
28
-     * @return void
28
+     * @return false|null
29 29
      */
30 30
     public function handle()
31 31
     {
Please login to merge, or discard this patch.
src/Form.php 2 patches
Doc Comments   +7 added lines, -4 removed lines patch added patch discarded remove patch
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
      *
201 201
      * @param $id
202 202
      *
203
-     * @return mixed
203
+     * @return boolean
204 204
      */
205 205
     public function destroy($id)
206 206
     {
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
      * Prepare input data for insert or update.
270 270
      *
271 271
      * @param array    $data
272
-     * @param callable $callback
272
+     * @param Closure $callback
273 273
      */
274 274
     protected function prepare($data = [], Closure $callback = null)
275 275
     {
@@ -483,7 +483,7 @@  discard block
 block discarded – undo
483 483
     /**
484 484
      * Set saving callback.
485 485
      *
486
-     * @param callable $callback
486
+     * @param Closure $callback
487 487
      *
488 488
      * @return void
489 489
      */
@@ -495,7 +495,7 @@  discard block
 block discarded – undo
495 495
     /**
496 496
      * Set saved callback.
497 497
      *
498
-     * @param callable $callback
498
+     * @param Closure $callback
499 499
      *
500 500
      * @return void
501 501
      */
@@ -739,6 +739,9 @@  discard block
 block discarded – undo
739 739
         }
740 740
     }
741 741
 
742
+    /**
743
+     * @param string $method
744
+     */
742 745
     public static function findFieldClass($method)
743 746
     {
744 747
         $className = __NAMESPACE__.'\\Form\\Field\\'.ucfirst($method);
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -231,9 +231,9 @@  discard block
 block discarded – undo
231 231
         $data = $this->model->with($this->getRelations())
232 232
             ->findOrFail($id)->toArray();
233 233
 
234
-        $this->builder->fields()->filter(function ($field) {
234
+        $this->builder->fields()->filter(function($field) {
235 235
             return $field instanceof Field\File;
236
-        })->each(function (File $file) use ($data) {
236
+        })->each(function(File $file) use ($data) {
237 237
             $file->setOriginal($data);
238 238
 
239 239
             $file->destroy();
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 
256 256
         $this->prepare($data, $this->saving);
257 257
 
258
-        DB::transaction(function () {
258
+        DB::transaction(function() {
259 259
             $inserts = $this->prepareInsert($this->updates);
260 260
 
261 261
             foreach ($inserts as $column => $value) {
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
 
294 294
         $updates = array_except($this->inputs, array_keys($this->relations));
295 295
 
296
-        $this->updates = array_filter($updates, function ($val) {
296
+        $this->updates = array_filter($updates, function($val) {
297 297
             return !is_null($val);
298 298
         });
299 299
     }
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
 
391 391
         $this->prepare($data, $this->saving);
392 392
 
393
-        DB::transaction(function () {
393
+        DB::transaction(function() {
394 394
             $updates = $this->prepareUpdate($this->updates);
395 395
 
396 396
             foreach ($updates as $column => $value) {
@@ -590,7 +590,7 @@  discard block
 block discarded – undo
590 590
     protected function getFieldByColumn($column)
591 591
     {
592 592
         return $this->builder->fields()->first(
593
-            function ($index, Field $field) use ($column) {
593
+            function($index, Field $field) use ($column) {
594 594
                 if (is_array($field->column())) {
595 595
                     return in_array($column, $field->column());
596 596
                 }
@@ -609,7 +609,7 @@  discard block
 block discarded – undo
609 609
     {
610 610
         $values = $this->model->toArray();
611 611
 
612
-        $this->builder->fields()->each(function (Field $field) use ($values) {
612
+        $this->builder->fields()->each(function(Field $field) use ($values) {
613 613
             $field->setOriginal($values);
614 614
         });
615 615
     }
@@ -629,7 +629,7 @@  discard block
 block discarded – undo
629 629
 
630 630
         $data = $this->model->toArray();
631 631
 
632
-        $this->builder->fields()->each(function (Field $field) use ($data) {
632
+        $this->builder->fields()->each(function(Field $field) use ($data) {
633 633
             $field->fill($data);
634 634
         });
635 635
     }
Please login to merge, or discard this patch.
src/Form/Builder.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
     /**
56 56
      * Returns builder is $mode.
57 57
      *
58
-     * @param $mode
58
+     * @param string $mode
59 59
      *
60 60
      * @return bool
61 61
      */
Please login to merge, or discard this patch.
src/Grid.php 2 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
      * Create a new grid instance.
120 120
      *
121 121
      * @param Eloquent $model
122
-     * @param callable $builder
122
+     * @param Closure $builder
123 123
      */
124 124
     public function __construct(Eloquent $model, Closure $builder)
125 125
     {
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
     /**
302 302
      * Set grid row callback function.
303 303
      *
304
-     * @param callable $callable
304
+     * @param Closure $callable
305 305
      *
306 306
      * @return Collection|void
307 307
      */
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
     /**
374 374
      * Set the grid filter.
375 375
      *
376
-     * @param callable $callback
376
+     * @param Closure $callback
377 377
      */
378 378
     public function filter(Closure $callback)
379 379
     {
@@ -469,7 +469,7 @@  discard block
 block discarded – undo
469 469
      * @param $method
470 470
      * @param $arguments
471 471
      *
472
-     * @return $this|Column
472
+     * @return Column|null
473 473
      */
474 474
     public function __call($method, $arguments)
475 475
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
 
265 265
         $data = $this->filter->execute();
266 266
 
267
-        $this->columns->map(function (Column $column) use (&$data) {
267
+        $this->columns->map(function(Column $column) use (&$data) {
268 268
             $data = $column->map($data);
269 269
 
270 270
             $this->columnNames[] = $column->getName();
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
      */
285 285
     protected function buildRows(array $data)
286 286
     {
287
-        $this->rows = collect($data)->map(function ($val, $key) {
287
+        $this->rows = collect($data)->map(function($val, $key) {
288 288
             $row = new Row($key, $val);
289 289
 
290 290
             $row->setKeyName($this->keyName);
Please login to merge, or discard this patch.
src/Grid/Filter.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@
 block discarded – undo
109 109
      * @param string $method
110 110
      * @param array  $arguments
111 111
      *
112
-     * @return $this
112
+     * @return AbstractFilter|null
113 113
      */
114 114
     public function __call($method, $arguments)
115 115
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
      */
47 47
     public function conditions()
48 48
     {
49
-        $inputs = array_filter(Input::all(), function ($input) {
49
+        $inputs = array_filter(Input::all(), function($input) {
50 50
             return $input !== '';
51 51
         });
52 52
 
Please login to merge, or discard this patch.
src/Grid/Filter/Field/DateTime.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -11,6 +11,9 @@
 block discarded – undo
11 11
      */
12 12
     protected $filter;
13 13
 
14
+    /**
15
+     * @param \Encore\Admin\Grid\Filter\AbstractFilter $filter
16
+     */
14 17
     public function __construct($filter)
15 18
     {
16 19
         $this->filter = $filter;
Please login to merge, or discard this patch.
src/Grid/Model.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@
 block discarded – undo
140 140
     /**
141 141
      * Find query by method name.
142 142
      *
143
-     * @param $method
143
+     * @param string $method
144 144
      *
145 145
      * @return static
146 146
      */
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
         $this->setSort();
112 112
         $this->setPaginate();
113 113
 
114
-        $this->queries->each(function ($query) {
114
+        $this->queries->each(function($query) {
115 115
             $this->model = call_user_func_array([$this->model, $query['method']], $query['arguments']);
116 116
         });
117 117
 
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
     {
128 128
         $paginate = $this->findQueryByMethod('paginate')->first();
129 129
 
130
-        $this->queries = $this->queries->reject(function ($query) {
130
+        $this->queries = $this->queries->reject(function($query) {
131 131
             return $query['method'] == 'paginate';
132 132
         });
133 133
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
      */
147 147
     protected function findQueryByMethod($method)
148 148
     {
149
-        return $this->queries->filter(function ($query) use ($method) {
149
+        return $this->queries->filter(function($query) use ($method) {
150 150
             return $query['method'] == $method;
151 151
         });
152 152
     }
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
     {
189 189
         list($relationName, $relationColumn) = explode('.', $column);
190 190
 
191
-        if ($this->queries->contains(function ($key, $query) use ($relationName) {
191
+        if ($this->queries->contains(function($key, $query) use ($relationName) {
192 192
             return $query['method'] == 'with' && in_array($relationName, $query['arguments']);
193 193
         })) {
194 194
             $relation = $this->model->$relationName();
Please login to merge, or discard this patch.