Skip to content

Commit

Permalink
Update based on review for getBeforeForwardInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
df2k2 committed Jun 8, 2020
1 parent 45a668a commit 0a1b76a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/internal/Magento/Framework/App/Request/Http.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,14 +286,15 @@ public function initForward()
* If passed name will be null whole state array will be returned.
*
* @param string $name
* @return mixed|null
* @return array|string|null
*/
public function getBeforeForwardInfo($name = null)
{
if ($name !== null && isset($this->beforeForwardInfo[$name])) {
return $this->beforeForwardInfo[$name];
if ($name === null) {
return $this->beforeForwardInfo;
}
return null;

return $this->beforeForwardInfo[$name] ?? null;
}

/**
Expand Down

0 comments on commit 0a1b76a

Please sign in to comment.