Skip to content

Commit 7f4bebe

Browse files
author
Christian Blank
committed
Fix issues with checker
1 parent bf2cb1f commit 7f4bebe

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/Checker.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ class Checker implements CheckerInterface
1414
/**
1515
* @inheritdoc
1616
*/
17-
public function fulfills($argument1, TypeInterface $requirement)
17+
public function fulfills($element, TypeInterface $requirement)
1818
{
19-
return new Result(true, []);
19+
return $requirement->check($element);
2020
}
2121

2222
}

src/Type/ListType.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function check($value)
4545
foreach ($value as $item) {
4646
$result = $this->child->check($item);
4747

48-
$valid &= $result->isValid();
48+
$valid = $valid && $result->isValid();
4949
$errors += $result->getErrors();
5050
}
5151

src/Type/ObjectType.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function check($value)
4040
}
4141

4242
$result = $child->check($value[$key]);
43-
$valid &= $result->isValid();
43+
$valid = $valid && $result->isValid();
4444
$errors += $result->getErrors();
4545
}
4646

0 commit comments

Comments
 (0)