@@ -38,7 +38,7 @@ final public function onValidationScenario(string $scenario, array $parameters =
38
38
{
39
39
[$ on , $ extend ] = $ this ->getValidationSchemasName ($ scenario );
40
40
41
- $ this ->validationScenarios = \ compact ('on ' , 'extend ' , 'parameters ' );
41
+ $ this ->validationScenarios = compact ('on ' , 'extend ' , 'parameters ' );
42
42
43
43
return $ this ;
44
44
}
@@ -52,7 +52,7 @@ final public function onValidationScenario(string $scenario, array $parameters =
52
52
*/
53
53
final public function bindToValidation (array $ bindings ): self
54
54
{
55
- $ this ->validationBindings = \ array_merge ($ this ->validationBindings , $ bindings );
55
+ $ this ->validationBindings = array_merge ($ this ->validationBindings , $ bindings );
56
56
57
57
return $ this ;
58
58
}
@@ -78,7 +78,7 @@ final public function runValidation($request, array $phrases = [], $events = [])
78
78
79
79
[$ rules , $ phrases ] = $ this ->runValidationEvents ($ events , $ phrases );
80
80
81
- return \ tap (Validator::make ($ input , $ rules , $ phrases ), function (ValidatorContract $ validator ) {
81
+ return tap (Validator::make ($ input , $ rules , $ phrases ), function (ValidatorContract $ validator ) {
82
82
$ this ->runExtendedScenario ($ validator );
83
83
});
84
84
}
@@ -144,12 +144,12 @@ final protected function runExtendedScenario(ValidatorContract $validator): void
144
144
final protected function runValidationEvents ($ events , array $ phrases ): array
145
145
{
146
146
// Merge all the events.
147
- $ events = \ array_merge ($ this ->getValidationEvents (), Arr::wrap ($ events ));
147
+ $ events = array_merge ($ this ->getValidationEvents (), Arr::wrap ($ events ));
148
148
149
149
// Convert rules array to Fluent, in order to pass it by references
150
150
// in all event listening to this validation.
151
151
$ rules = new Fluent ($ this ->getBindedRules ());
152
- $ phrases = new Fluent (\ array_merge ($ this ->getValidationPhrases (), $ phrases ));
152
+ $ phrases = new Fluent (array_merge ($ this ->getValidationPhrases (), $ phrases ));
153
153
154
154
foreach ((array ) $ events as $ event ) {
155
155
Event::dispatch ($ event , [&$ rules , &$ phrases ]);
@@ -206,8 +206,8 @@ protected function getValidationSchemasName(string $scenario): array
206
206
$ extend = "extend {$ scenario }" ;
207
207
208
208
return [
209
- \ method_exists ($ this , $ on ) ? $ on : null ,
210
- \ method_exists ($ this , $ extend ) ? $ extend : null ,
209
+ method_exists ($ this , $ on ) ? $ on : null ,
210
+ method_exists ($ this , $ extend ) ? $ extend : null ,
211
211
];
212
212
}
213
213
}
0 commit comments