Skip to content

Commit 03498bb

Browse files
committed
AC-12731 Constructor changes and removed unused import
1 parent a8bbf25 commit 03498bb

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

app/code/Magento/Theme/Controller/Result/AsyncCssPlugin.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use Magento\Csp\Api\InlineUtilInterface;
1111
use Magento\Framework\App\Config\ScopeConfigInterface;
1212
use Magento\Store\Model\ScopeInterface;
13-
use Magento\Framework\App\Response\Http;
13+
use Magento\Framework\App\ObjectManager;
1414
use Magento\Framework\App\Response\HttpInterface as HttpResponseInterface;
1515
use Magento\Framework\App\ResponseInterface;
1616
use Magento\Framework\View\Result\Layout;
@@ -34,14 +34,16 @@ class AsyncCssPlugin
3434

3535
/**
3636
* @param ScopeConfigInterface $scopeConfig
37-
* @param InlineUtilInterface $cspInlineUtil
37+
* @param InlineUtilInterface|null $cspInlineUtil
3838
*/
3939
public function __construct(
4040
ScopeConfigInterface $scopeConfig,
41-
InlineUtilInterface $cspInlineUtil
41+
InlineUtilInterface $cspInlineUtil = null
4242
) {
4343
$this->scopeConfig = $scopeConfig;
44-
$this->cspInlineUtil = $cspInlineUtil;
44+
$this->cspInlineUtil = $cspInlineUtil ?: ObjectManager::getInstance()->get(
45+
InlineUtilInterface::class
46+
);
4547
}
4648

4749
/**

0 commit comments

Comments
 (0)