Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
Before
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
2
100.00% covered (success)
100.00%
1 / 1
 compare
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
2
1<?php
2
3declare(strict_types=1);
4
5namespace Engelsystem\Http\Validation\Rules;
6
7use Respect\Validation\Rules\AbstractRule;
8
9class Before extends AbstractRule
10{
11    use ComparesDateTime;
12
13    protected function compare(mixed $input): bool
14    {
15        return $this->orEqual ? $input <= $this->compareTo : $input < $this->compareTo;
16    }
17}