for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Yiisoft\Data\Reader\Iterable\FilterHandler;
use DateTimeInterface;
/**
* `GreaterThanOrEqual` iterable filter handler checks that the item's field value
* is greater than or equal to the given value.
*/
final class GreaterThanOrEqual extends Compare
{
public function getOperator(): string
return \Yiisoft\Data\Reader\Filter\GreaterThanOrEqual::getOperator();
}
protected function compare(mixed $itemValue, mixed $argumentValue): bool
if (!$itemValue instanceof DateTimeInterface) {
return $itemValue >= $argumentValue;
return $argumentValue instanceof DateTimeInterface
&& $itemValue->getTimestamp() >= $argumentValue->getTimestamp();