Skip to content

Commit

Permalink
Fix issues with checker
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Blank committed Jan 7, 2017
1 parent bf2cb1f commit 7f4bebe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Checker.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ class Checker implements CheckerInterface
/**
* @inheritdoc
*/
public function fulfills($argument1, TypeInterface $requirement)
public function fulfills($element, TypeInterface $requirement)
{
return new Result(true, []);
return $requirement->check($element);
}

}
2 changes: 1 addition & 1 deletion src/Type/ListType.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function check($value)
foreach ($value as $item) {
$result = $this->child->check($item);

$valid &= $result->isValid();
$valid = $valid && $result->isValid();
$errors += $result->getErrors();
}

Expand Down
2 changes: 1 addition & 1 deletion src/Type/ObjectType.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function check($value)
}

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

Expand Down

0 comments on commit 7f4bebe

Please sign in to comment.