diff options
author | msquare <msquare@notrademark.de> | 2017-06-20 16:50:21 +0200 |
---|---|---|
committer | msquare <msquare@notrademark.de> | 2017-06-20 16:50:21 +0200 |
commit | 56814fa2fdf58b4013f4d57c5ea87619c7122957 (patch) | |
tree | 640945769b7e9626cdf43162c786147f5c962029 /includes/model/ValidationResult.php | |
parent | a5fc5bd0979e8de1fce8a8addd351a6e7bd6aeb8 (diff) | |
parent | cd30017b97afc3c7001fbb9eb14b54dbb980b7b6 (diff) |
Merge branch 'pr/316' into feature-igel-rewrite
Diffstat (limited to 'includes/model/ValidationResult.php')
-rw-r--r-- | includes/model/ValidationResult.php | 62 |
1 files changed, 33 insertions, 29 deletions
diff --git a/includes/model/ValidationResult.php b/includes/model/ValidationResult.php index 0fc24161..7f88b432 100644 --- a/includes/model/ValidationResult.php +++ b/includes/model/ValidationResult.php @@ -6,37 +6,41 @@ namespace Engelsystem; * BO that represents the result of an entity attribute validation. * It contains the validated value and a bool for validation success. */ -class ValidationResult { +class ValidationResult +{ + /** @var bool */ + private $valid; - private $valid; + /** @var mixed */ + private $value; - private $value; + /** + * @param boolean $valid Is the value valid? + * @param mixed $value The validated value + */ + public function __construct($valid, $value) + { + $this->valid = $valid; + $this->value = $value; + } - /** - * Constructor. - * - * @param boolean $valid - * Is the value valid? - * @param * $value - * The validated value - */ - public function __construct($valid, $value) { - $this->valid = $valid; - $this->value = $value; - } + /** + * Is the value valid? + * + * @return bool + */ + public function isValid() + { + return $this->valid; + } - /** - * Is the value valid? - */ - public function isValid() { - return $this->valid; - } - - /** - * The parsed/validated value. - */ - public function getValue() { - return $this->value; - } + /** + * The parsed/validated value. + * + * @return mixed + */ + public function getValue() + { + return $this->value; + } } -?>
\ No newline at end of file |