Skip to content

Commit b4a7ca4

Browse files
#22182: Static tests fix.
1 parent e54c7f7 commit b4a7ca4

File tree

3 files changed

+40
-8
lines changed

3 files changed

+40
-8
lines changed

app/code/Magento/Deploy/Package/Package.php

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ public function __construct(
150150
}
151151

152152
/**
153+
* Get area.
154+
*
153155
* @return string
154156
*/
155157
public function getArea()
@@ -158,6 +160,8 @@ public function getArea()
158160
}
159161

160162
/**
163+
* Get parent.
164+
*
161165
* @return Package
162166
*/
163167
public function getParent()
@@ -166,6 +170,8 @@ public function getParent()
166170
}
167171

168172
/**
173+
* Get theme.
174+
*
169175
* @return string
170176
*/
171177
public function getTheme()
@@ -174,6 +180,8 @@ public function getTheme()
174180
}
175181

176182
/**
183+
* Get locale.
184+
*
177185
* @return string
178186
*/
179187
public function getLocale()
@@ -204,6 +212,8 @@ public function isVirtual()
204212
}
205213

206214
/**
215+
* Get param.
216+
*
207217
* @param string $name
208218
* @return mixed|null
209219
*/
@@ -213,6 +223,8 @@ public function getParam($name)
213223
}
214224

215225
/**
226+
* Set param.
227+
*
216228
* @param string $name
217229
* @param mixed $value
218230
* @return bool
@@ -351,6 +363,8 @@ public function aggregate(Package $parentPackage = null)
351363
}
352364

353365
/**
366+
* Set parent.
367+
*
354368
* @param Package $parent
355369
* @return bool
356370
*/
@@ -371,6 +385,8 @@ public function getMap()
371385
}
372386

373387
/**
388+
* Get state.
389+
*
374390
* @return int
375391
*/
376392
public function getState()
@@ -379,6 +395,8 @@ public function getState()
379395
}
380396

381397
/**
398+
* Set state.
399+
*
382400
* @param int $state
383401
* @return bool
384402
*/
@@ -389,6 +407,8 @@ public function setState($state)
389407
}
390408

391409
/**
410+
* Get inheritance level.
411+
*
392412
* @return int
393413
*/
394414
public function getInheritanceLevel()
@@ -425,6 +445,7 @@ public function getParentMap()
425445
{
426446
$map = [];
427447
foreach ($this->getParentPackages() as $parentPackage) {
448+
// phpcs:ignore Magento2.Performance.ForeachArrayMerge.ForeachArrayMerge
428449
$map = array_merge($map, $parentPackage->getMap());
429450
}
430451
return $map;
@@ -441,8 +462,10 @@ public function getParentFiles($type = null)
441462
$files = [];
442463
foreach ($this->getParentPackages() as $parentPackage) {
443464
if ($type === null) {
465+
// phpcs:ignore Magento2.Performance.ForeachArrayMerge.ForeachArrayMerge
444466
$files = array_merge($files, $parentPackage->getFiles());
445467
} else {
468+
// phpcs:ignore Magento2.Performance.ForeachArrayMerge.ForeachArrayMerge
446469
$files = array_merge($files, $parentPackage->getFilesByType($type));
447470
}
448471
}
@@ -480,6 +503,8 @@ public function getParentPackages()
480503
}
481504

482505
/**
506+
* Get pre processors.
507+
*
483508
* @return Processor\ProcessorInterface[]
484509
*/
485510
public function getPreProcessors()
@@ -488,6 +513,8 @@ public function getPreProcessors()
488513
}
489514

490515
/**
516+
* Get post processors.
517+
*
491518
* @return Processor\ProcessorInterface[]
492519
*/
493520
public function getPostProcessors()

dev/tests/integration/testsuite/Magento/Email/Model/Template/FilterTest.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -408,10 +408,12 @@ public function inlinecssDirectiveThrowsExceptionWhenMissingParameterDataProvide
408408
protected function setUpDesignParams()
409409
{
410410
$themeCode = 'Vendor_EmailTest/custom_theme';
411-
$this->model->setDesignParams([
412-
'area' => Area::AREA_FRONTEND,
413-
'theme' => $themeCode,
414-
'locale' => Locale::DEFAULT_SYSTEM_LOCALE,
415-
]);
411+
$this->model->setDesignParams(
412+
[
413+
'area' => Area::AREA_FRONTEND,
414+
'theme' => $themeCode,
415+
'locale' => Locale::DEFAULT_SYSTEM_LOCALE,
416+
]
417+
);
416418
}
417419
}

lib/internal/Magento/Framework/Css/PreProcessor/Adapter/Less/Processor.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ public function __construct(
6161

6262
/**
6363
* @inheritdoc
64-
* @throws ContentProcessorException
6564
*/
6665
public function processContent(File $asset)
6766
{
@@ -77,7 +76,9 @@ public function processContent(File $asset)
7776
$content = $this->assetSource->getContent($asset);
7877

7978
if (trim($content) === '') {
80-
throw new ContentProcessorException(new Phrase(ContentProcessorInterface::ERROR_MESSAGE_PREFIX . 'LESS file is empty: ' . $path));
79+
throw new ContentProcessorException(
80+
new Phrase('Compilation from source: LESS file is empty: ' . $path)
81+
);
8182
}
8283

8384
$tmpFilePath = $this->temporaryFile->createFile($path, $content);
@@ -88,7 +89,9 @@ public function processContent(File $asset)
8889
gc_enable();
8990

9091
if (trim($content) === '') {
91-
throw new ContentProcessorException(new Phrase(ContentProcessorInterface::ERROR_MESSAGE_PREFIX . 'LESS file is empty: ' . $path));
92+
throw new ContentProcessorException(
93+
new Phrase('Compilation from source: LESS file is empty: ' . $path)
94+
);
9295
} else {
9396
return $content;
9497
}

0 commit comments

Comments
 (0)