Issues (12)

src/Query/Capability/CanUnion.php (1 issue)

Labels
Severity
1
<?php
2
declare(strict_types=1);
3
4
namespace Latitude\QueryBuilder\Query\Capability;
5
6
use Latitude\QueryBuilder\Query\UnionQuery;
7
use Latitude\QueryBuilder\StatementInterface;
8
9
trait CanUnion
10
{
11 2
    public function union(StatementInterface $right): UnionQuery
12
    {
13 2
        return new UnionQuery($this->engine, $this, $right);
0 ignored issues
show
$this of type Latitude\QueryBuilder\Query\Capability\CanUnion is incompatible with the type Latitude\QueryBuilder\StatementInterface expected by parameter $left of Latitude\QueryBuilder\Qu...ionQuery::__construct(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

13
        return new UnionQuery($this->engine, /** @scrutinizer ignore-type */ $this, $right);
Loading history...
14
    }
15
16 1
    public function unionAll(StatementInterface $right): UnionQuery
17
    {
18 1
        return $this->union($right)->all();
19
    }
20
}
21