| Total Complexity | 5 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | abstract class BinarySpecification implements Specifies |
||
| 12 | { |
||
| 13 | use Specifying; |
||
| 14 | |||
| 15 | private $leftHandCondition; |
||
| 16 | private $rightHandCondition; |
||
| 17 | |||
| 18 | public function __construct( |
||
| 19 | Satisfiable $leftHandCondition, |
||
| 20 | Satisfiable $rightHandCondition |
||
| 21 | ) { |
||
| 22 | $this->leftHandCondition = $leftHandCondition; |
||
| 23 | $this->rightHandCondition = $rightHandCondition; |
||
| 24 | } |
||
| 25 | |||
| 26 | public function leftHandCondition() : Satisfiable |
||
| 27 | { |
||
| 28 | return $this->leftHandCondition; |
||
| 29 | } |
||
| 30 | |||
| 31 | public function rightHandCondition() : Satisfiable |
||
| 32 | { |
||
| 33 | return $this->rightHandCondition; |
||
| 34 | } |
||
| 35 | |||
| 36 | protected function leftIsSatisfiedBy($object) : bool |
||
| 37 | { |
||
| 38 | return $this->leftHandCondition->isSatisfiedBy($object); |
||
| 39 | } |
||
| 40 | |||
| 41 | protected function rightIsSatisfiedBy($object) : bool |
||
| 44 | } |
||
| 45 | } |
||
| 46 |