Skip to content

Commit 0a1b76a

Browse files
authored
Update based on review for getBeforeForwardInfo
1 parent 45a668a commit 0a1b76a

File tree

1 file changed

+5
-4
lines changed
  • lib/internal/Magento/Framework/App/Request

1 file changed

+5
-4
lines changed

lib/internal/Magento/Framework/App/Request/Http.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -286,14 +286,15 @@ public function initForward()
286286
* If passed name will be null whole state array will be returned.
287287
*
288288
* @param string $name
289-
* @return mixed|null
289+
* @return array|string|null
290290
*/
291291
public function getBeforeForwardInfo($name = null)
292292
{
293-
if ($name !== null && isset($this->beforeForwardInfo[$name])) {
294-
return $this->beforeForwardInfo[$name];
293+
if ($name === null) {
294+
return $this->beforeForwardInfo;
295295
}
296-
return null;
296+
297+
return $this->beforeForwardInfo[$name] ?? null;
297298
}
298299

299300
/**

0 commit comments

Comments
 (0)