From 9817c50262fcdd45246bf59475795689e7cbca30 Mon Sep 17 00:00:00 2001 From: nmalevanec Date: Mon, 11 Feb 2019 12:36:21 +0200 Subject: [PATCH] Fix static test. --- app/code/Magento/Downloadable/Helper/Download.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Downloadable/Helper/Download.php b/app/code/Magento/Downloadable/Helper/Download.php index 9b91c18a33cbd..e98d400794dd1 100644 --- a/app/code/Magento/Downloadable/Helper/Download.php +++ b/app/code/Magento/Downloadable/Helper/Download.php @@ -15,6 +15,7 @@ /** * Downloadable Products Download Helper * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.CookieAndSessionMisuse) */ class Download extends \Magento\Framework\App\Helper\AbstractHelper { @@ -263,9 +264,9 @@ public function setResource($resourceFile, $linkType = self::LINK_TYPE_FILE) */ if ($linkType === self::LINK_TYPE_URL) { $headers = array_change_key_case(get_headers($this->_resourceFile, 1), CASE_LOWER); - if(isset($headers['location'])){ - $this->_resourceFile = is_array($headers['location']) ? current($headers['location']): - $headers['location']; + if (isset($headers['location'])) { + $this->_resourceFile = is_array($headers['location']) ? current($headers['location']) + : $headers['location']; } }