Skip to content

Commit 7563605

Browse files
committed
add declare strict type tag
1 parent b00d4b2 commit 7563605

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

app/code/Magento/Cms/Model/Config/Source/Block.php

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

810
use Magento\Cms\Model\ResourceModel\Block\CollectionFactory;
11+
use Magento\Framework\Data\OptionSourceInterface;
912

1013
/**
1114
* Class Block
1215
*/
13-
class Block implements \Magento\Framework\Option\ArrayInterface
16+
class Block implements OptionSourceInterface
1417
{
1518
/**
1619
* @var array
1720
*/
1821
private $options;
1922

2023
/**
21-
* @var CollectionFactory
24+
* @var \Magento\Cms\Model\ResourceModel\Block\CollectionFactory
2225
*/
2326
private $collectionFactory;
2427

2528
/**
26-
* @param CollectionFactory $collectionFactory
29+
* @param \Magento\Cms\Model\ResourceModel\Block\CollectionFactory $collectionFactory
2730
*/
2831
public function __construct(
2932
CollectionFactory $collectionFactory
@@ -32,15 +35,14 @@ public function __construct(
3235
}
3336

3437
/**
35-
* To option array
36-
*
37-
* @return array
38+
* {@inheritdoc}
3839
*/
3940
public function toOptionArray()
4041
{
4142
if (!$this->options) {
4243
$this->options = $this->collectionFactory->create()->toOptionIdArray();
4344
}
45+
4446
return $this->options;
4547
}
4648
}

app/code/Magento/Cms/Test/Unit/Model/Config/Source/BlockTest.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\Cms\Test\Unit\Model\Config\Source;
79

810
/**

0 commit comments

Comments
 (0)