for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace DCP\Mapper;
use DCP\Mapper\Exception\InvalidArgumentException;
class RuleCollection extends Collection
{
/**
* @param RuleInterface $rule
* @return $this
* @throws InvalidArgumentException
*/
public function add($rule)
if (!($rule instanceof RuleInterface)) {
throw new InvalidArgumentException('$rule must be an instance of RuleInterface');
}
parent::add($rule);
return $this;
* @return RuleInterface[]
public function toArray()
return parent::toArray();