Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
…ixed return type (`self`), leveraging parent class API
  • Loading branch information
Ocramius committed Jan 3, 2015
1 parent 7b93260 commit 95d0ad2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/Helper/PartialLoop.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,21 +102,19 @@ public function getPartialCounter()
*
* @param string|null $key
*
* @return PartialLoop
* @return self
*/
public function setObjectKey($key)
{
if (null === $key) {
unset($this->objectKeyStack[$this->nestingLevel]);
$this->objectKey = null;

return $this;
return parent::setObjectKey($key);
}

$this->objectKeyStack[$this->nestingLevel] = (string) $key;
$this->objectKey = (string) $key;

return $this;
return parent::setObjectKey($key);
}

/**
Expand Down

0 comments on commit 95d0ad2

Please sign in to comment.