|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
declare(strict_types=1); |
|
4
|
|
|
|
|
5
|
|
|
/* |
|
6
|
|
|
* This file is part of the Valkyrja Framework package. |
|
7
|
|
|
* |
|
8
|
|
|
* (c) Melech Mizrachi <[email protected]> |
|
9
|
|
|
* |
|
10
|
|
|
* For the full copyright and license information, please view the LICENSE |
|
11
|
|
|
* file that was distributed with this source code. |
|
12
|
|
|
*/ |
|
13
|
|
|
|
|
14
|
|
|
namespace Valkyrja\Orm\Data; |
|
15
|
|
|
|
|
16
|
|
|
use Stringable; |
|
17
|
|
|
use Valkyrja\Orm\Constant\Statement; |
|
|
|
|
|
|
18
|
|
|
use Valkyrja\Orm\Enum\Comparison; |
|
19
|
|
|
use Valkyrja\Orm\Enum\JoinOperator; |
|
20
|
|
|
use Valkyrja\Orm\Enum\JoinType; |
|
21
|
|
|
|
|
22
|
|
|
/** |
|
23
|
|
|
* Class Join. |
|
24
|
|
|
* |
|
25
|
|
|
* @author Melech Mizrachi |
|
26
|
|
|
*/ |
|
27
|
|
|
readonly class Join implements Stringable |
|
28
|
|
|
{ |
|
29
|
|
|
/** |
|
30
|
|
|
* @param non-empty-string $table The join table |
|
|
|
|
|
|
31
|
|
|
* @param non-empty-string $column The column to compare |
|
32
|
|
|
* @param non-empty-string $joinColumn The join table column |
|
33
|
|
|
*/ |
|
34
|
|
|
public function __construct( |
|
35
|
|
|
public string $table, |
|
36
|
|
|
public string $column, |
|
37
|
|
|
public string $joinColumn, |
|
38
|
|
|
public Comparison $comparison, |
|
39
|
|
|
public JoinOperator $operator, |
|
40
|
|
|
public JoinType $type = JoinType::DEFAULT, |
|
41
|
|
|
) { |
|
42
|
|
|
} |
|
43
|
|
|
|
|
44
|
|
|
/** |
|
45
|
|
|
* Get the join as a string. |
|
46
|
|
|
* |
|
47
|
|
|
* @return non-empty-string |
|
|
|
|
|
|
48
|
|
|
*/ |
|
49
|
|
|
public function __toString(): string |
|
50
|
|
|
{ |
|
51
|
|
|
$type = $this->type->value; |
|
52
|
|
|
$join = Statement::JOIN; |
|
53
|
|
|
$table = $this->table; |
|
54
|
|
|
$operator = $this->operator->value; |
|
55
|
|
|
$comparison = $this->comparison->value; |
|
56
|
|
|
$column = $this->column; |
|
57
|
|
|
$joinColumn = $this->joinColumn; |
|
58
|
|
|
|
|
59
|
|
|
return "$type $join $table $operator $column $comparison $joinColumn"; |
|
60
|
|
|
} |
|
61
|
|
|
} |
|
62
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths