Skip to content

Commit 1c4c0ff

Browse files
author
dereuromark
committed
Fix up late static binding newable.
1 parent 666281f commit 1c4c0ff

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/Collection/Iterator/NestIterator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function getChildren()
5454
{
5555
$property = $this->_propertyExtractor($this->_nestKey);
5656

57-
return new self($property($this->current()), $this->_nestKey);
57+
return new static($property($this->current()), $this->_nestKey);
5858
}
5959

6060
/**

src/Database/Expression/QueryExpression.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -450,10 +450,10 @@ public function between($field, $from, $to, $type = null)
450450
public function and_($conditions, $types = [])
451451
{
452452
if ($this->isCallable($conditions)) {
453-
return $conditions(new self([], $this->getTypeMap()->setTypes($types)));
453+
return $conditions(new static([], $this->getTypeMap()->setTypes($types)));
454454
}
455455

456-
return new self($conditions, $this->getTypeMap()->setTypes($types));
456+
return new static($conditions, $this->getTypeMap()->setTypes($types));
457457
}
458458

459459
/**
@@ -468,10 +468,10 @@ public function and_($conditions, $types = [])
468468
public function or_($conditions, $types = [])
469469
{
470470
if ($this->isCallable($conditions)) {
471-
return $conditions(new self([], $this->getTypeMap()->setTypes($types), 'OR'));
471+
return $conditions(new static([], $this->getTypeMap()->setTypes($types), 'OR'));
472472
}
473473

474-
return new self($conditions, $this->getTypeMap()->setTypes($types), 'OR');
474+
return new static($conditions, $this->getTypeMap()->setTypes($types), 'OR');
475475
}
476476
// @codingStandardsIgnoreEnd
477477

@@ -685,7 +685,7 @@ protected function _addConditions(array $conditions, array $types)
685685
}
686686

687687
if ($this->isCallable($c)) {
688-
$expr = new QueryExpression([], $typeMap);
688+
$expr = new static([], $typeMap);
689689
$c = $c($expr, $this);
690690
}
691691

@@ -695,12 +695,12 @@ protected function _addConditions(array $conditions, array $types)
695695
}
696696

697697
if ($numericKey && is_array($c) || in_array(strtolower($k), $operators)) {
698-
$this->_conditions[] = new self($c, $typeMap, $numericKey ? 'AND' : $k);
698+
$this->_conditions[] = new static($c, $typeMap, $numericKey ? 'AND' : $k);
699699
continue;
700700
}
701701

702702
if (strtolower($k) === 'not') {
703-
$this->_conditions[] = new UnaryExpression('NOT', new self($c, $typeMap));
703+
$this->_conditions[] = new UnaryExpression('NOT', new static($c, $typeMap));
704704
continue;
705705
}
706706

0 commit comments

Comments
 (0)