Skip to content

Commit

Permalink
#16337 - Adjust Validation:validate() signature
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeckerson committed May 14, 2023
1 parent 6de92b9 commit c721c22
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion phalcon/Filter/Validation.zep
Original file line number Diff line number Diff line change
Expand Up @@ -478,8 +478,10 @@ class Validation extends Injectable implements ValidationInterface
*
* @param array|object data
* @param object entity
*
* @return Messages|false
*/
public function validate(var data = null, var entity = null) -> <Messages>
public function validate(var data = null, var entity = null) -> <Messages> | false
{
var combinedFieldsValidators, field, messages, scope, status, validator,
validatorData, validators;
Expand Down
4 changes: 3 additions & 1 deletion phalcon/Filter/Validation/ValidationInterface.zep
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ interface ValidationInterface
*
* @param array|object data
* @param object entity
*
* @return Messages|false
*/
public function validate(var data = null, var entity = null) -> <Messages>;
public function validate(var data = null, var entity = null) -> <Messages> | false;
}

0 comments on commit c721c22

Please sign in to comment.