Skip to content

Commit 9983943

Browse files
author
Pavlo Cherniavskyi
committed
MAGETWO-33622: Junior+ Developer Workflow
- fix static tests
1 parent 0e7e6d1 commit 9983943

File tree

9 files changed

+24
-11
lines changed

9 files changed

+24
-11
lines changed

dev/tests/unit/testsuite/Magento/Framework/App/View/Asset/MaterializationStrategy/FactoryTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ public function testCreateSupported()
5454
->with($asset)
5555
->willReturn(false);
5656

57-
$supportedStrategy = $this->getMockBuilder('Magento\Framework\App\View\Asset\MaterializationStrategy\StrategyInterface')
57+
$supportedStrategy = $this->getMockBuilder(
58+
'Magento\Framework\App\View\Asset\MaterializationStrategy\StrategyInterface'
59+
)
5860
->setMethods([])
5961
->getMock();
6062
$supportedStrategy->expects($this->once())

dev/tests/unit/testsuite/Magento/Framework/App/View/Asset/MaterializationStrategy/SymlinkTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@ public function sourceFileDataProvider()
6565
[DirectoryList::TMP_MATERIALIZATION_DIR . '/path/to/file', false]
6666
];
6767
}
68-
}
68+
}

lib/internal/Magento/Framework/App/View/Asset/MaterializationStrategy/Copy.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ class Copy implements StrategyInterface
1616
*
1717
* @param WriteInterface $rootDir
1818
* @param WriteInterface $targetDir
19-
* @param $sourcePath
20-
* @param $destinationPath
19+
* @param string $sourcePath
20+
* @param string $destinationPath
2121
* @return bool
2222
*/
2323
public function publishFile(

lib/internal/Magento/Framework/App/View/Asset/MaterializationStrategy/StrategyInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ interface StrategyInterface
1616
*
1717
* @param WriteInterface $rootDir
1818
* @param WriteInterface $targetDir
19-
* @param $sourcePath
20-
* @param $destinationPath
19+
* @param string $sourcePath
20+
* @param string $destinationPath
2121
* @return bool
2222
*/
2323
public function publishFile(

lib/internal/Magento/Framework/App/View/Asset/MaterializationStrategy/Symlink.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ class Symlink implements StrategyInterface
1717
*
1818
* @param WriteInterface $rootDir
1919
* @param WriteInterface $targetDir
20-
* @param $sourcePath
21-
* @param $destinationPath
20+
* @param string $sourcePath
21+
* @param string $destinationPath
2222
* @return bool
2323
*/
2424
public function publishFile(

lib/internal/Magento/Framework/View/Asset/File.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public function getPath()
101101
public function getRelativeSourceFilePath()
102102
{
103103
$path = $this->filePath;
104-
if (strpos($this->source->findRelativeSourceFilePath($this), 'less')) {
104+
if (strpos($this->source->findRelativeSourceFilePath($this), 'less')) {
105105
$path = str_replace('.css', '.less', $this->filePath);
106106
}
107107
$result = '';

lib/internal/Magento/Framework/View/Asset/PreProcessor/Chain.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ class Chain
4747
*/
4848
private $appMode;
4949

50+
/**
51+
* @var null|string
52+
*/
5053
private $targetAssetPath;
5154

5255
/**
@@ -60,7 +63,7 @@ public function __construct(
6063
\Magento\Framework\View\Asset\LocalInterface $asset,
6164
$origContent,
6265
$origContentType,
63-
$origAssetPath = null,
66+
$origAssetPath = null,
6467
$appMode = \Magento\Framework\App\State::MODE_DEFAULT
6568
) {
6669
$this->asset = $asset;

lib/internal/Magento/Framework/View/Asset/Source.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ class Source
6262
* @param PreProcessor\Pool $preProcessorPool
6363
* @param \Magento\Framework\View\Design\FileResolution\Fallback\StaticFile $fallback
6464
* @param \Magento\Framework\View\Design\Theme\ListInterface $themeList
65+
* @param string $appMode
6566
*/
6667
public function __construct(
6768
PreProcessor\Cache $cache,
@@ -229,6 +230,11 @@ private function findFile(LocalInterface $asset, \Magento\Framework\View\Asset\F
229230
return $dir->getAbsolutePath($asset->getPath());
230231
}
231232

233+
/**
234+
* @param \Magento\Framework\View\Asset\LocalInterface $asset
235+
*
236+
* @return bool|string
237+
*/
232238
public function findRelativeSourceFilePath(LocalInterface $asset)
233239
{
234240
$sourceFile = $this->findSourceFile($asset);

lib/internal/Magento/Framework/View/Page/Config/Renderer.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ class Renderer
7272
* @param \Magento\Framework\Escaper $escaper
7373
* @param \Magento\Framework\Stdlib\String $string
7474
* @param \Psr\Log\LoggerInterface $logger
75+
* @param \Magento\Framework\View\Asset\Repository $assetRepo
76+
* @param string $appMode
7577
*/
7678
public function __construct(
7779
Config $pageConfig,
@@ -402,7 +404,7 @@ protected function renderAssetHtml($template, $assets)
402404
/**
403405
* Injecting less.js compiler
404406
*
405-
* @param $resultGroups
407+
* @param array $resultGroups
406408
*
407409
* @return mixed
408410
*/

0 commit comments

Comments
 (0)