Skip to content

Commit 8ce092e

Browse files
committed
MC-31618: Move static config to files - PLUGIN_LIST
- Add declaration of strict types;
1 parent 738649d commit 8ce092e

File tree

6 files changed

+22
-13
lines changed

6 files changed

+22
-13
lines changed

dev/tests/integration/testsuite/Magento/Framework/Interception/PluginListGeneratorTest.php

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

78
namespace Magento\Framework\Interception;
89

lib/internal/Magento/Framework/Interception/ConfigLoaderInterface.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@
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\Interception;
79

10+
use Magento\Framework\Exception\FileSystemException;
11+
812
/**
913
* Interception configuration loader interface.
1014
*/
@@ -15,6 +19,7 @@ interface ConfigLoaderInterface
1519
*
1620
* @param string $cacheId
1721
* @return array
22+
* @throws FileSystemException
1823
*/
19-
public function load($cacheId);
24+
public function load(string $cacheId): array;
2025
}

lib/internal/Magento/Framework/Interception/ConfigWriterInterface.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@
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\Interception;
79

10+
use Magento\Framework\Exception\FileSystemException;
11+
812
/**
913
* Interception config writer interface.
1014
*/
@@ -15,6 +19,7 @@ interface ConfigWriterInterface
1519
*
1620
* @param array $scopes
1721
* @return void
22+
* @throws FileSystemException
1823
*/
19-
public function write($scopes);
24+
public function write(array $scopes): void;
2025
}

lib/internal/Magento/Framework/Interception/PluginListGenerator.php

Lines changed: 6 additions & 11 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\Interception;
79

810
use Magento\Framework\App\Filesystem\DirectoryList;
@@ -143,12 +145,9 @@ public function __construct(
143145
}
144146

145147
/**
146-
* Write interception configuration for scopes.
147-
*
148-
* @param array $scopes
149-
* @return void
148+
* @inheritdoc
150149
*/
151-
public function write($scopes)
150+
public function write(array $scopes): void
152151
{
153152
foreach ($scopes as $scope) {
154153
$this->scopeConfig->setCurrentScope($scope);
@@ -198,13 +197,9 @@ public function write($scopes)
198197
}
199198

200199
/**
201-
* Load interception configuration data per scope.
202-
*
203-
* @param string $cacheId
204-
* @return array
205-
* @throws \Magento\Framework\Exception\FileSystemException
200+
* @inheritdoc
206201
*/
207-
public function load($cacheId)
202+
public function load(string $cacheId): array
208203
{
209204
$file = $this->directoryList->getPath(DirectoryList::GENERATED_METADATA) . '/' . $cacheId . '.' . 'php';
210205
if (file_exists($file)) {

lib/internal/Magento/Framework/Interception/Test/Unit/_files/load_scoped_mock_map.php

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

78
use Magento\Framework\Interception\Test\Unit\Custom\Module\Model\Item;
89
use Magento\Framework\Interception\Test\Unit\Custom\Module\Model\ItemContainer;

setup/src/Magento/Setup/Module/Di/App/Task/Operation/PluginListGenerator.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\Setup\Module\Di\App\Task\Operation;
79

810
use Magento\Framework\Config\ScopeInterface;

0 commit comments

Comments
 (0)