Skip to content

Commit 90948c3

Browse files
mrtuvntuna2smc
authored andcommitted
Fix code style
1 parent 1bca471 commit 90948c3

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

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

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
use Magento\Framework\View\Design\ThemeInterface;
2121
use Magento\Framework\View\DesignInterface;
2222
use Magento\Framework\View\File\CollectorInterface;
23+
use Magento\Framework\View\Asset\PreProcessor\Chain;
2324

2425
/**
2526
* @magento_import instruction preprocessor
@@ -104,9 +105,12 @@ public function __construct(
104105
}
105106

106107
/**
107-
* {@inheritdoc}
108+
* Transform content and/or content type for the specified preprocessing chain object
109+
*
110+
* @param Chain $chain
111+
* @return void
108112
*/
109-
public function process(\Magento\Framework\View\Asset\PreProcessor\Chain $chain)
113+
public function process(Chain $chain): void
110114
{
111115
$asset = $chain->getAsset();
112116
$replaceCallback = function ($matchContent) use ($asset) {
@@ -122,7 +126,7 @@ public function process(\Magento\Framework\View\Asset\PreProcessor\Chain $chain)
122126
* @param LocalInterface $asset
123127
* @return string
124128
*/
125-
protected function replace(array $matchedContent, LocalInterface $asset)
129+
protected function replace(array $matchedContent, LocalInterface $asset): string
126130
{
127131
$importsContent = '';
128132
try {
@@ -157,7 +161,7 @@ protected function replace(array $matchedContent, LocalInterface $asset)
157161
* @param LocalInterface $asset
158162
* @return ThemeInterface
159163
*/
160-
protected function getTheme(LocalInterface $asset)
164+
protected function getTheme(LocalInterface $asset): ThemeInterface
161165
{
162166
$context = $asset->getContext();
163167
if ($context instanceof FallbackContext) {
@@ -169,10 +173,12 @@ protected function getTheme(LocalInterface $asset)
169173
}
170174

171175
/**
176+
* Retrieve theme provider instance
177+
*
172178
* @return ThemeProviderInterface
173179
* @deprecated 100.1.1
174180
*/
175-
private function getThemeProvider()
181+
private function getThemeProvider(): ThemeProviderInterface
176182
{
177183
if (null === $this->themeProvider) {
178184
$this->themeProvider = ObjectManager::getInstance()->get(ThemeProviderInterface::class);

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,7 @@ public function testProcess(
124124
string $expectedContent,
125125
array $enabledModules,
126126
bool $onlyEnabled
127-
): void
128-
{
127+
): void {
129128
$chain = new Chain($this->assetMock, $originalContent, 'css', 'path');
130129
$relatedAsset = $this->createMock(File::class);
131130
$relatedAsset->expects($this->once())

0 commit comments

Comments
 (0)