Skip to content

Commit

Permalink
[phalcon#13208] - Interface corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
niden committed Jun 20, 2019
1 parent c66b03f commit 57bea9d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
5 changes: 4 additions & 1 deletion phalcon/Validation/Validator/File.zep
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ use Phalcon\Validation\Validator\File\Size\Min as MinFileSize;
*/
class File extends ValidatorComposite
{
private validators = [] {get};
/**
* @var array
*/
private validators = [] { get };

public function __construct(array! options = [])
{
Expand Down
8 changes: 4 additions & 4 deletions phalcon/Validation/Validator/File/FileAbstract.zep
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,17 @@ abstract class FileAbstract extends Validator
/**
* Empty is empty
*/
protected messageFileEmpty = "Field :field must not be empty" {get, set};
protected messageFileEmpty = "Field :field must not be empty" { get, set };

/**
* File exceeed the file size setted in PHP configuration
*/
protected messageIniSize = "File :field exceeds the maximum file size" {get, set};
protected messageIniSize = "File :field exceeds the maximum file size" { get, set };

/**
* File is not valid
*/
protected messageValid = "Field :field is not valid" {get, set};
protected messageValid = "Field :field is not valid" { get, set };

/**
* Check on empty
Expand Down Expand Up @@ -238,4 +238,4 @@ abstract class FileAbstract extends Validator

return floatval(matches[1]) * pow(2, byteUnits[unit]);
}
}
}
5 changes: 4 additions & 1 deletion phalcon/Validation/Validator/StringLength.zep
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ use Phalcon\Validation\Exception;
*/
class StringLength extends ValidatorComposite
{
private validators = [] {get};
/**
* @var array
*/
private validators = [] { get };

public function __construct(array! options = []) -> void
{
Expand Down
2 changes: 1 addition & 1 deletion phalcon/Validation/ValidatorComposite.zep
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ abstract class ValidatorComposite extends Validator implements ValidatorComposit
/**
* Executes the validation
*/
public function validate(<Validation> validation, var field) -> bool
public function validate(<\Phalcon\Validation> validation, var field) -> bool
{
var validator;

Expand Down
2 changes: 1 addition & 1 deletion phalcon/Validation/ValidatorCompositeInterface.zep
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ interface ValidatorCompositeInterface
/**
* Executes the validation
*/
public function validate(<Validation> validation, var field) -> bool;
public function validate(<\Phalcon\Validation> validation, var field) -> bool;
}

0 comments on commit 57bea9d

Please sign in to comment.