Skip to content

Commit 169c42d

Browse files
ihor-svizievtuna2smc
authored andcommitted
Add logic check only import css from enabled modules
Fix static tests
1 parent 551efbf commit 169c42d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lib/internal/Magento/Framework/Css/PreProcessor/Instruction/MagentoImport.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public function __construct(
110110
* @param Chain $chain
111111
* @return void
112112
*/
113-
public function process(Chain $chain): void
113+
public function process(Chain $chain)
114114
{
115115
$asset = $chain->getAsset();
116116
$replaceCallback = function ($matchContent) use ($asset) {
@@ -126,7 +126,7 @@ public function process(Chain $chain): void
126126
* @param LocalInterface $asset
127127
* @return string
128128
*/
129-
protected function replace(array $matchedContent, LocalInterface $asset): string
129+
protected function replace(array $matchedContent, LocalInterface $asset)
130130
{
131131
$importsContent = '';
132132
try {
@@ -162,7 +162,7 @@ protected function replace(array $matchedContent, LocalInterface $asset): string
162162
* @param LocalInterface $asset
163163
* @return ThemeInterface
164164
*/
165-
protected function getTheme(LocalInterface $asset): ThemeInterface
165+
protected function getTheme(LocalInterface $asset)
166166
{
167167
$context = $asset->getContext();
168168
if ($context instanceof FallbackContext) {

lib/internal/Magento/Framework/Css/Test/Unit/PreProcessor/Instruction/MagentoImportTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ public function testProcess(
168168
}
169169

170170
/**
171+
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
171172
* @return array
172173
*/
173174
public function processDataProvider(): array

0 commit comments

Comments
 (0)