@@ -779,8 +779,8 @@ protected function validateAttribute(string $attribute, $rule)
779
779
// First we will get the correct keys for the given attribute in case the field is nested in
780
780
// an array. Then we determine if the given rule accepts other field names as parameters.
781
781
// If so, we will replace any asterisks found in the parameters with the correct keys.
782
- if (($ keys = $ this ->getExplicitKeys ($ attribute )) &&
783
- $ this ->dependsOnOtherFields ($ rule )) {
782
+ if (($ keys = $ this ->getExplicitKeys ($ attribute ))
783
+ && $ this ->dependsOnOtherFields ($ rule )) {
784
784
$ parameters = $ this ->replaceAsterisksInParameters ($ parameters , $ keys );
785
785
}
786
786
@@ -789,8 +789,8 @@ protected function validateAttribute(string $attribute, $rule)
789
789
// If the attribute is a file, we will verify that the file upload was actually successful
790
790
// and if it wasn't we will add a failure for the attribute. Files may not successfully
791
791
// upload if they are too large based on PHP's settings so we will bail in this case.
792
- if ($ value instanceof UploadedFile && ! $ value ->isValid () &&
793
- $ this ->hasRule ($ attribute , array_merge ($ this ->fileRules , $ this ->implicitRules ))
792
+ if ($ value instanceof UploadedFile && ! $ value ->isValid ()
793
+ && $ this ->hasRule ($ attribute , array_merge ($ this ->fileRules , $ this ->implicitRules ))
794
794
) {
795
795
return $ this ->addFailure ($ attribute , 'uploaded ' , []);
796
796
}
@@ -875,10 +875,10 @@ protected function replaceAsterisksInParameters(array $parameters, array $keys):
875
875
*/
876
876
protected function isValidatable ($ rule , string $ attribute , $ value ): bool
877
877
{
878
- return $ this ->presentOrRuleIsImplicit ($ rule , $ attribute , $ value ) &&
879
- $ this ->passesOptionalCheck ($ attribute ) &&
880
- $ this ->isNotNullIfMarkedAsNullable ($ rule , $ attribute ) &&
881
- $ this ->hasNotFailedPreviousRuleIfPresenceRule ($ rule , $ attribute );
878
+ return $ this ->presentOrRuleIsImplicit ($ rule , $ attribute , $ value )
879
+ && $ this ->passesOptionalCheck ($ attribute )
880
+ && $ this ->isNotNullIfMarkedAsNullable ($ rule , $ attribute )
881
+ && $ this ->hasNotFailedPreviousRuleIfPresenceRule ($ rule , $ attribute );
882
882
}
883
883
884
884
/**
@@ -893,8 +893,8 @@ protected function presentOrRuleIsImplicit($rule, string $attribute, $value): bo
893
893
return $ this ->isImplicit ($ rule );
894
894
}
895
895
896
- return $ this ->validatePresent ($ attribute , $ value ) ||
897
- $ this ->isImplicit ($ rule );
896
+ return $ this ->validatePresent ($ attribute , $ value )
897
+ || $ this ->isImplicit ($ rule );
898
898
}
899
899
900
900
/**
@@ -904,8 +904,8 @@ protected function presentOrRuleIsImplicit($rule, string $attribute, $value): bo
904
904
*/
905
905
protected function isImplicit ($ rule ): bool
906
906
{
907
- return $ rule instanceof ImplicitRule ||
908
- in_array ($ rule , $ this ->implicitRules );
907
+ return $ rule instanceof ImplicitRule
908
+ || in_array ($ rule , $ this ->implicitRules );
909
909
}
910
910
911
911
/**
@@ -980,17 +980,17 @@ protected function shouldStopValidating(string $attribute): bool
980
980
return $ this ->messages ->has ($ attribute );
981
981
}
982
982
983
- if (isset ($ this ->failedRules [$ attribute ]) &&
984
- array_key_exists ('uploaded ' , $ this ->failedRules [$ attribute ])) {
983
+ if (isset ($ this ->failedRules [$ attribute ])
984
+ && array_key_exists ('uploaded ' , $ this ->failedRules [$ attribute ])) {
985
985
return true ;
986
986
}
987
987
988
988
// In case the attribute has any rule that indicates that the field is required
989
989
// and that rule already failed then we should stop validation at this point
990
990
// as now there is no point in calling other rules with this field empty.
991
- return $ this ->hasRule ($ attribute , $ this ->implicitRules ) &&
992
- isset ($ this ->failedRules [$ attribute ]) &&
993
- array_intersect (array_keys ($ this ->failedRules [$ attribute ]), $ this ->implicitRules );
991
+ return $ this ->hasRule ($ attribute , $ this ->implicitRules )
992
+ && isset ($ this ->failedRules [$ attribute ])
993
+ && array_intersect (array_keys ($ this ->failedRules [$ attribute ]), $ this ->implicitRules );
994
994
}
995
995
996
996
/**
0 commit comments