Skip to content

Commit

Permalink
Remove return by reference from methods that return self
Browse files Browse the repository at this point in the history
  • Loading branch information
davidrans committed Aug 20, 2024
1 parent 8e9b3ba commit 74967c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 3 additions & 3 deletions QueryGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ public function __construct(
* Append the given clause components and parameters to their existing
* counterparts for the specified clause.
*/
public function &__call($method, $args) {
public function __call($method, $args) {
$method = strtolower($method);

if (!isset(self::$methods[$method])) {
Expand Down Expand Up @@ -335,15 +335,15 @@ public function build($skipClauses = false) {
/**
* Bypass query validation when building.
*/
public function &skipValidation() {
public function skipValidation(): self {
$this->validateQuery = false;
return $this;
}

/**
* Use OR when joining where conditions
*/
public function &useOr() {
public function useOr(): self {
$this->useOr = true;
return $this;
}
Expand Down
2 changes: 0 additions & 2 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
<code><![CDATA[getPrimaryClauses]]></code>
<code><![CDATA[getPrimaryMethod]]></code>
<code><![CDATA[getSetMethods]]></code>
<code><![CDATA[skipValidation]]></code>
<code><![CDATA[useOr]]></code>
</MissingReturnType>
<PossiblyUnusedMethod>
<code><![CDATA[useOr]]></code>
Expand Down

0 comments on commit 74967c0

Please sign in to comment.