for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace RemiSan\Specification;
class OrSpecification extends AbstractSpecification implements Specification
{
/** @var Specification */
private $one;
private $other;
/**
* Constructor.
*
* @param Specification $one
* @param Specification $other
*/
public function __construct(Specification $one, Specification $other)
$this->one = $one;
$this->other = $other;
}
* @param $candidate
* @return bool
public function isSatisfiedBy($candidate)
return $this->one->isSatisfiedBy($candidate) || $this->other->isSatisfiedBy($candidate);