@@ -779,8 +779,8 @@ protected function validateAttribute(string $attribute, $rule)
779779 // First we will get the correct keys for the given attribute in case the field is nested in
780780 // an array. Then we determine if the given rule accepts other field names as parameters.
781781 // 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 )) {
784784 $ parameters = $ this ->replaceAsterisksInParameters ($ parameters , $ keys );
785785 }
786786
@@ -789,8 +789,8 @@ protected function validateAttribute(string $attribute, $rule)
789789 // If the attribute is a file, we will verify that the file upload was actually successful
790790 // and if it wasn't we will add a failure for the attribute. Files may not successfully
791791 // 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 ))
794794 ) {
795795 return $ this ->addFailure ($ attribute , 'uploaded ' , []);
796796 }
@@ -875,10 +875,10 @@ protected function replaceAsterisksInParameters(array $parameters, array $keys):
875875 */
876876 protected function isValidatable ($ rule , string $ attribute , $ value ): bool
877877 {
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 );
882882 }
883883
884884 /**
@@ -893,8 +893,8 @@ protected function presentOrRuleIsImplicit($rule, string $attribute, $value): bo
893893 return $ this ->isImplicit ($ rule );
894894 }
895895
896- return $ this ->validatePresent ($ attribute , $ value ) ||
897- $ this ->isImplicit ($ rule );
896+ return $ this ->validatePresent ($ attribute , $ value )
897+ || $ this ->isImplicit ($ rule );
898898 }
899899
900900 /**
@@ -904,8 +904,8 @@ protected function presentOrRuleIsImplicit($rule, string $attribute, $value): bo
904904 */
905905 protected function isImplicit ($ rule ): bool
906906 {
907- return $ rule instanceof ImplicitRule ||
908- in_array ($ rule , $ this ->implicitRules );
907+ return $ rule instanceof ImplicitRule
908+ || in_array ($ rule , $ this ->implicitRules );
909909 }
910910
911911 /**
@@ -980,17 +980,17 @@ protected function shouldStopValidating(string $attribute): bool
980980 return $ this ->messages ->has ($ attribute );
981981 }
982982
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 ])) {
985985 return true ;
986986 }
987987
988988 // In case the attribute has any rule that indicates that the field is required
989989 // and that rule already failed then we should stop validation at this point
990990 // 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 );
994994 }
995995
996996 /**
0 commit comments