Skip to content

Commit daa576a

Browse files
committed
fix merge
1 parent cbdb1c9 commit daa576a

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

src/Model/Scope.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function addCondition($field, $operator = null, $value = null)
8989
return $this;
9090
}
9191

92-
protected function setSystem($system = true)
92+
protected function setSystem(bool $system = true)
9393
{
9494
foreach ($this->elements as $nestedCondition) {
9595
$nestedCondition->setSystem($system && $this->isAnd());

src/Model/Scope/AbstractScope.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,17 @@ protected function init(): void
3434
$this->_init();
3535

3636
// always set system flag if condition added to another condition
37-
$this->setSystem($this->owner instanceof RootScope);
37+
$this->setSystem($owner instanceof RootScope);
3838

3939
$this->onChangeModel();
4040
}
4141

4242
abstract protected function onChangeModel(): void;
4343

44-
abstract protected function setSystem($system = true);
44+
/**
45+
* @return $this
46+
*/
47+
abstract protected function setSystem(bool $system = true);
4548

4649
/**
4750
* Get the model this condition is associated with.

src/Model/Scope/Condition.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ public function __construct($key, $operator = null, $value = null)
151151
}
152152
}
153153

154-
protected function setSystem($system = true)
154+
protected function setSystem(bool $system = true)
155155
{
156156
$this->system = $system;
157157

0 commit comments

Comments
 (0)