Conditions | 3 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
17 | public function add(Join $join): self |
||
18 | { |
||
19 | if (isset($this->joined_tables[$join->alias()]) && $this->joined_tables[$join->alias()] !== $join->table()) { |
||
20 | $res = sprintf('JOIN %s WITH ALIAS %s ALREADY ALLOCATED FOR TABLE %s', $join->table(), $join->alias(), $this->joined_tables[$join->alias()]); |
||
21 | throw new \Exception($res); |
||
22 | } |
||
23 | |||
24 | $this->joined_tables[$join->alias()] = $join->table(); |
||
25 | $this->joins[$join->alias()] = $join; |
||
26 | |||
27 | return $this; |
||
28 | } |
||
40 | } |