summaryrefslogtreecommitdiff
path: root/includes/model/ValidationResult.php
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2017-11-28 15:43:51 +0100
committerGitHub <noreply@github.com>2017-11-28 15:43:51 +0100
commit599f2fd264bfc7b1b6826fe206442806e317340f (patch)
tree50cf84d7d07d11bd65b45c2c17f37632f6cd8eff /includes/model/ValidationResult.php
parenta5fc5bd0979e8de1fce8a8addd351a6e7bd6aeb8 (diff)
parenteda7f7788ea8012bd8be46405c56a666c11f3fa5 (diff)
Merge pull request #365 from engelsystem/feature-igel-rewrite
Feature igel rewrite
Diffstat (limited to 'includes/model/ValidationResult.php')
-rw-r--r--includes/model/ValidationResult.php62
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