Completed
Push — master ( 559d96...6b41e8 )
by Song
03:31
created
src/Form/Field/Select.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -198,13 +198,13 @@  discard block
 block discarded – undo
198 198
      */
199 199
     protected function selected($model, $textField = 'name', $idField = 'id')
200 200
     {
201
-        $this->options = function ($resource) use ($model, $textField, $idField) {
201
+        $this->options = function($resource) use ($model, $textField, $idField) {
202 202
             if (null == $resource) {
203 203
                 return [];
204 204
             }
205 205
 
206 206
             if (is_array($resource) && !empty($resource) && isset($resource[0]['id'])) {
207
-                $resource = array_map(function ($res) {
207
+                $resource = array_map(function($res) {
208 208
                     return $res['id'];
209 209
                 }, $resource);
210 210
             } elseif (is_array($resource) && !empty($resource) && isset($resource['id'])) {
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
             'groups'  => $this->groups,
380 380
         ]);
381 381
 
382
-        $this->attribute('data-value', implode(',', (array)$this->value()));
382
+        $this->attribute('data-value', implode(',', (array) $this->value()));
383 383
 
384 384
         return parent::render();
385 385
     }
Please login to merge, or discard this patch.