Skip to content

Commit 0476689

Browse files
committed
#9347: Zend feed refactoring
- Fixes based on static tests
1 parent 310532c commit 0476689

File tree

5 files changed

+11
-3
lines changed

5 files changed

+11
-3
lines changed

app/code/Magento/Rss/Test/Unit/Model/RssTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class RssTest extends \PHPUnit\Framework\TestCase
4343
<link>http://magento.com/rss/link</link>
4444
<description><![CDATA[Feed Description]]></description>
4545
<pubDate>Sat, 22 Apr 2017 13:21:12 +0200</pubDate>
46-
<generator>Zend_Feed</generator>
46+
<generator>Zend\Feed</generator>
4747
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
4848
<item>
4949
<title><![CDATA[Feed 1 Title]]></title>

lib/internal/Magento/Framework/App/Feed.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
7+
68
namespace Magento\Framework\App;
79

810
use Zend\Feed\Writer\FeedFactory;

lib/internal/Magento/Framework/App/FeedFactory.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
7+
68
namespace Magento\Framework\App;
79

810
use Magento\Framework\ObjectManagerInterface;
@@ -46,7 +48,7 @@ public function __construct(
4648
/**
4749
* {@inheritdoc}
4850
*/
49-
public function create(array $data, $format = FeedFactoryInterface::FORMAT_RSS) : FeedInterface
51+
public function create(array $data, string $format = FeedFactoryInterface::FORMAT_RSS) : FeedInterface
5052
{
5153
if (!isset($this->formats[$format])) {
5254
throw new \Magento\Framework\Exception\InputException(

lib/internal/Magento/Framework/App/FeedFactoryInterface.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
7+
68
namespace Magento\Framework\App;
79

810
/**
@@ -24,5 +26,5 @@ interface FeedFactoryInterface
2426
* @param string $format
2527
* @return FeedInterface
2628
*/
27-
public function create(array $data, $format = self::FORMAT_RSS) : FeedInterface;
29+
public function create(array $data, string $format = self::FORMAT_RSS) : FeedInterface;
2830
}

lib/internal/Magento/Framework/App/FeedInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
7+
68
namespace Magento\Framework\App;
79

810
/**

0 commit comments

Comments
 (0)