Skip to content

Commit fd11826

Browse files
authored
Have setType() return $this to realize fluent setter
This would allow: ``` new Specification([ (new Join('x','y'))->setType(Join::INNER_JOIN) ]); ```
1 parent 4a53c7a commit fd11826

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Query/Join.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ public function __construct($field, $newAlias, $dqlAlias = null)
6060
/**
6161
* @param string $type
6262
*
63+
* @return $this
64+
*
6365
* @throws InvalidArgumentException
6466
*/
6567
public function setType($type)
@@ -73,6 +75,8 @@ public function setType($type)
7375
}
7476

7577
$this->type = $type;
78+
79+
return $this;
7680
}
7781

7882
/**

0 commit comments

Comments
 (0)