Skip to content

Commit b6e6022

Browse files
committed
Fixed PHPDocs
1 parent 54245bf commit b6e6022

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/Kris/LaravelFormBuilder/Rules.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Kris\LaravelFormBuilder;
44

5+
use InvalidArgumentException;
6+
57
class Rules
68
{
79
/**
@@ -48,7 +50,7 @@ public function setFieldName($name)
4850
}
4951

5052
/**
51-
* @param string $fieldName
53+
* @param string|null $fieldName
5254
* @return array|mixed
5355
*/
5456
public function getFieldRules($fieldName = null)
@@ -61,7 +63,7 @@ public function getFieldRules($fieldName = null)
6163

6264
/**
6365
* @param mixed $rule
64-
* @param string $fieldName
66+
* @param string|null $fieldName
6567
* @return void
6668
*/
6769
public function addFieldRule($rule, $fieldName = null)
@@ -73,7 +75,7 @@ public function addFieldRule($rule, $fieldName = null)
7375

7476
/**
7577
* @param array $rules
76-
* @param string $fieldName
78+
* @param string|null $fieldName
7779
* @return void
7880
*/
7981
public function setFieldRules(array $rules, $fieldName = null)
@@ -83,15 +85,15 @@ public function setFieldRules(array $rules, $fieldName = null)
8385
}
8486

8587
/**
86-
* @param string $fieldName
88+
* @param string|null $fieldName
8789
* @return string|null
88-
* @throws \InvalidArgumentException
90+
* @throws InvalidArgumentException
8991
*/
9092
protected function ensureFieldName($fieldName)
9193
{
9294
if (!$fieldName) {
9395
if (!$this->fieldName) {
94-
throw new \InvalidArgumentException("Field functions on non-field Rules need explicit field name");
96+
throw new InvalidArgumentException("Field functions on non-field Rules need explicit field name");
9597
}
9698

9799
$fieldName = $this->fieldName;
@@ -101,7 +103,7 @@ protected function ensureFieldName($fieldName)
101103
}
102104

103105
/**
104-
* @param array $rules
106+
* @param array|static $rules
105107
* @return $this
106108
*/
107109
public function append($rules)

0 commit comments

Comments
 (0)