File tree Expand file tree Collapse file tree 1 file changed +30
-30
lines changed Expand file tree Collapse file tree 1 file changed +30
-30
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,36 @@ public function __construct(array $input)
27
27
$ this ->input = $ input ;
28
28
}
29
29
30
+ /**
31
+ * Determine if the validated input has one or more keys.
32
+ *
33
+ * @param mixed $keys
34
+ * @return bool
35
+ */
36
+ public function has ($ keys )
37
+ {
38
+ $ keys = is_array ($ keys ) ? $ keys : func_get_args ();
39
+
40
+ foreach ($ keys as $ key ) {
41
+ if (! Arr::has ($ this ->input , $ key )) {
42
+ return false ;
43
+ }
44
+ }
45
+
46
+ return true ;
47
+ }
48
+
49
+ /**
50
+ * Determine if the validated input is missing one or more keys.
51
+ *
52
+ * @param mixed $keys
53
+ * @return bool
54
+ */
55
+ public function missing ($ keys )
56
+ {
57
+ return ! $ this ->has ($ keys );
58
+ }
59
+
30
60
/**
31
61
* Get a subset containing the provided keys with values from the input data.
32
62
*
@@ -100,36 +130,6 @@ public function all()
100
130
return $ this ->input ;
101
131
}
102
132
103
- /**
104
- * Determine if the validated input has one or more keys.
105
- *
106
- * @param mixed $keys
107
- * @return bool
108
- */
109
- public function has ($ keys )
110
- {
111
- $ keys = is_array ($ keys ) ? $ keys : func_get_args ();
112
-
113
- foreach ($ keys as $ key ) {
114
- if (! Arr::has ($ this ->input , $ key )) {
115
- return false ;
116
- }
117
- }
118
-
119
- return true ;
120
- }
121
-
122
- /**
123
- * Determine if the validated input is missing one or more keys.
124
- *
125
- * @param mixed $keys
126
- * @return bool
127
- */
128
- public function missing ($ keys )
129
- {
130
- return ! $ this ->has ($ keys );
131
- }
132
-
133
133
/**
134
134
* Get the instance as an array.
135
135
*
You can’t perform that action at this time.
0 commit comments