Completed
Pull Request — master (#2262)
by
unknown
17:07
created
src/Show.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -317,7 +317,7 @@
 block discarded – undo
317 317
      * @param string $method
318 318
      * @param array  $arguments
319 319
      *
320
-     * @return bool|mixed
320
+     * @return Field
321 321
      */
322 322
     public function __call($method, $arguments = [])
323 323
     {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 
184 184
         $this->overwriteExistingField($name);
185 185
 
186
-        return tap($field, function ($field) {
186
+        return tap($field, function($field) {
187 187
             $this->fields->push($field);
188 188
         });
189 189
     }
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 
206 206
         $this->overwriteExistingRelation($name);
207 207
 
208
-        return tap($relation, function ($relation) {
208
+        return tap($relation, function($relation) {
209 209
             $this->relations->push($relation);
210 210
         });
211 211
     }
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
         }
223 223
 
224 224
         $this->fields = $this->fields->filter(
225
-            function (Field $field) use ($name) {
225
+            function(Field $field) use ($name) {
226 226
                 return $field->getName() != $name;
227 227
             }
228 228
         );
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
         }
241 241
 
242 242
         $this->relations = $this->relations->filter(
243
-            function (Relation $relation) use ($name) {
243
+            function(Relation $relation) use ($name) {
244 244
                 return $relation->getName() != $name;
245 245
             }
246 246
         );
Please login to merge, or discard this patch.
src/Show/Field.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
     /**
89 89
      * Get name of this column.
90 90
      *
91
-     * @return mixed
91
+     * @return string
92 92
      */
93 93
     public function getName()
94 94
     {
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
     /**
113 113
      * Get label of the column.
114 114
      *
115
-     * @return mixed
115
+     * @return string
116 116
      */
117 117
     public function getLabel()
118 118
     {
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
      */
144 144
     public function using(array $values, $default = null)
145 145
     {
146
-        return $this->as(function ($value) use ($values, $default) {
146
+        return $this->as(function($value) use ($values, $default) {
147 147
             return array_get($values, $value, $default);
148 148
         });
149 149
     }
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
      */
160 160
     public function image($server = '', $width = 200, $height = 200)
161 161
     {
162
-        return $this->as(function ($path) use ($server, $width, $height) {
162
+        return $this->as(function($path) use ($server, $width, $height) {
163 163
             if (url()->isValidUrl($path)) {
164 164
                 $src = $path;
165 165
             } elseif ($server) {
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
      */
183 183
     public function link($href = '', $target = '_blank')
184 184
     {
185
-        return $this->as(function ($link) use ($href, $target) {
185
+        return $this->as(function($link) use ($href, $target) {
186 186
             $href = $href ?: $link;
187 187
 
188 188
             return "<a href='$href' target='{$target}'>{$link}</a>";
@@ -198,12 +198,12 @@  discard block
 block discarded – undo
198 198
      */
199 199
     public function label($style = 'success')
200 200
     {
201
-        return $this->as(function ($value) use ($style) {
201
+        return $this->as(function($value) use ($style) {
202 202
             if ($value instanceof Arrayable) {
203 203
                 $value = $value->toArray();
204 204
             }
205 205
 
206
-            return collect((array) $value)->map(function ($name) use ($style) {
206
+            return collect((array) $value)->map(function($name) use ($style) {
207 207
                 return "<span class='label label-{$style}'>$name</span>";
208 208
             })->implode('&nbsp;');
209 209
         });
@@ -218,12 +218,12 @@  discard block
 block discarded – undo
218 218
      */
219 219
     public function badge($style = 'blue')
220 220
     {
221
-        return $this->as(function ($value) use ($style) {
221
+        return $this->as(function($value) use ($style) {
222 222
             if ($value instanceof Arrayable) {
223 223
                 $value = $value->toArray();
224 224
             }
225 225
 
226
-            return collect((array) $value)->map(function ($name) use ($style) {
226
+            return collect((array) $value)->map(function($name) use ($style) {
227 227
                 return "<span class='badge bg-{$style}'>$name</span>";
228 228
             })->implode('&nbsp;');
229 229
         });
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
     public function render()
290 290
     {
291 291
         if ($this->showAs->isNotEmpty()) {
292
-            $this->showAs->each(function ($callable) {
292
+            $this->showAs->each(function($callable) {
293 293
                 $this->value = $callable->call(
294 294
                     $this->parent->getModel(),
295 295
                     $this->value
Please login to merge, or discard this patch.
src/Show/Panel.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@
 block discarded – undo
138 138
     /**
139 139
      * Fill fields to panel.
140 140
      *
141
-     * @param []Field $fields
141
+     * @param Collection $fields
142 142
      *
143 143
      * @return $this
144 144
      */
Please login to merge, or discard this patch.
src/Grid/Filter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
     {
185 185
         $inputs = array_dot(Input::all());
186 186
 
187
-        $inputs = array_filter($inputs, function ($input) {
187
+        $inputs = array_filter($inputs, function($input) {
188 188
             return $input !== '' && !is_null($input);
189 189
         });
190 190
 
@@ -221,9 +221,9 @@  discard block
 block discarded – undo
221 221
             return $inputs;
222 222
         }
223 223
 
224
-        $inputs = collect($inputs)->filter(function ($input, $key) {
224
+        $inputs = collect($inputs)->filter(function($input, $key) {
225 225
             return starts_with($key, "{$this->name}_");
226
-        })->mapWithKeys(function ($val, $key) {
226
+        })->mapWithKeys(function($val, $key) {
227 227
             $key = str_replace("{$this->name}_", '', $key);
228 228
 
229 229
             return [$key => $val];
Please login to merge, or discard this patch.
src/Grid/Tools/BatchActions.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
     /**
53 53
      * Add a batch action.
54 54
      *
55
-     * @param $title
55
+     * @param BatchDelete $title
56 56
      * @param BatchAction|null $action
57 57
      *
58 58
      * @return $this
Please login to merge, or discard this patch.
src/Console/FormCommand.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 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
     {
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
     /**
160 160
      * Check if the table column contains the specified keywords of the array
161 161
      * @param string $haystack
162
-     * @param array $needle
162
+     * @param string[] $needle
163 163
      * @return bool
164 164
      */
165 165
     private function check_column(string $haystack, array $needle)
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
 namespace Encore\Admin\Console;
4 4
 
5 5
 use Illuminate\Console\Command;
6
-use Symfony\Component\Console\Input\InputArgument;
7 6
 use Symfony\Component\Console\Input\InputOption;
8 7
 
9 8
 class FormCommand extends Command
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
         // use doctrine/dbal
39 39
         $model = $this->laravel->make($modelName);
40
-        $table = $model->getConnection()->getTablePrefix() . $model->getTable();
40
+        $table = $model->getConnection()->getTablePrefix().$model->getTable();
41 41
         $schema = $model->getConnection()->getDoctrineSchemaManager($table);
42 42
 
43 43
         if (!method_exists($schema, 'getDatabasePlatform')) {
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
     {
183 183
         return [
184 184
             ['model', null, InputOption::VALUE_REQUIRED,
185
-                'The eloquent model that should be use as controller data source.',],
185
+                'The eloquent model that should be use as controller data source.', ],
186 186
         ];
187 187
     }
188 188
 }
Please login to merge, or discard this patch.