jqh 6 years ago
parent
commit
c23898b832

+ 2 - 2
src/Form/Field/Checkbox.php

@@ -56,9 +56,9 @@ class Checkbox extends MultipleSelect
         return $this;
     }
 
-    public function circle(bool $flag)
+    public function circle(bool $value = true)
     {
-        $this->circle = $flag;
+        $this->circle = $value;
 
         return $this;
     }

+ 2 - 2
src/Repositories/EloquentRepository.php

@@ -222,7 +222,7 @@ class EloquentRepository extends Repository
 
             $updates = $form->updates();
 
-            list($relations, $relationKeyMap) = $this->getRelationInputs($model, $updates);
+            [$relations, $relationKeyMap] = $this->getRelationInputs($model, $updates);
 
             if ($relations) {
                 $updates = Arr::except($updates, array_keys($relationKeyMap));
@@ -275,7 +275,7 @@ class EloquentRepository extends Repository
         DB::transaction(function () use ($form, $model, &$result) {
             $updates = $form->updates();
 
-            list($relations, $relationKeyMap) = $this->getRelationInputs($model, $updates);
+            [$relations, $relationKeyMap] = $this->getRelationInputs($model, $updates);
 
             if ($relations) {
                 $updates = Arr::except($updates, array_keys($relationKeyMap));

+ 5 - 5
src/Widgets/Checkbox.php

@@ -15,7 +15,7 @@ class Checkbox extends Radio
     protected $checked = [];
 
     /**
-     * @param $id
+     * @param string $id
      *
      * @return $this
      */
@@ -27,18 +27,18 @@ class Checkbox extends Radio
     }
 
     /**
-     * @param $excepts
+     * @param string|array $excepts
      *
-     * @return Checkbox
+     * @return $this
      */
     public function checkedAll($excepts = [])
     {
         return $this->checked(array_keys(Arr::except($this->options, $excepts)));
     }
 
-    public function circle(bool $flag)
+    public function circle(bool $value = true)
     {
-        $this->circle = $flag;
+        $this->circle = $value;
 
         return $this;
     }

+ 6 - 6
src/Widgets/Radio.php

@@ -26,14 +26,14 @@ class Radio extends Widget
     }
 
     /**
-     * @param null $options
+     * @param string|array $values
      *
      * @return $this
      */
-    public function disabled($options = null)
+    public function disabled($values = null)
     {
-        if ($options) {
-            $this->disabledValues = (array) $options;
+        if ($values) {
+            $this->disabledValues = (array) $values;
 
             return $this;
         }
@@ -54,7 +54,7 @@ class Radio extends Widget
     }
 
     /**
-     * @param $id
+     * @param string $id
      *
      * @return $this
      */
@@ -91,7 +91,7 @@ class Radio extends Widget
     /**
      * "info", "primary", "inverse", "danger", "success", "purple".
      *
-     * @param $v
+     * @param string $v
      *
      * @return $this
      */