From 0a1b76ae8714b3f9d386af7878ec987694ca1fba Mon Sep 17 00:00:00 2001 From: Chris Snedaker Date: Mon, 8 Jun 2020 11:06:30 -0400 Subject: [PATCH] Update based on review for getBeforeForwardInfo --- lib/internal/Magento/Framework/App/Request/Http.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/internal/Magento/Framework/App/Request/Http.php b/lib/internal/Magento/Framework/App/Request/Http.php index 57f33c2808ca8..9e05b6ca5cf01 100644 --- a/lib/internal/Magento/Framework/App/Request/Http.php +++ b/lib/internal/Magento/Framework/App/Request/Http.php @@ -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; } /**