src/Leevel/Database/Ddd/Specification.php
public function and(ISpecification $spec): ISpecification
    {
        return new self(function (IEntity $entity) use ($spec): bool {
            return $this->isSatisfiedBy($entity) && $spec->isSatisfiedBy($entity);
        }, function (Select $select, IEntity $entity) use ($spec) {
            $this->handle($select, $entity);
            $spec->handle($select, $entity);
        });
    }
public function and(ISpecification $spec): ISpecification
    {
        return new self(function (IEntity $entity) use ($spec): bool {
            return $this->isSatisfiedBy($entity) && $spec->isSatisfiedBy($entity);
        }, function (Select $select, IEntity $entity) use ($spec) {
            $this->handle($select, $entity);
            $spec->handle($select, $entity);
        });
    }
规约 And 操作.

@param \Leevel\Database\Ddd\ISpecification $spec

@return \Leevel\Database\Ddd\ISpecification