Skip to content

Commit c6affac

Browse files
committed
Updated mathrandom class property to private to meet Magento technical guidelines
Made mathrandom class optional to meet backwards compatibility requirements.
1 parent 1b46c96 commit c6affac

File tree

1 file changed

+4
-3
lines changed
  • lib/internal/Magento/Framework/View/Asset/MergeStrategy

1 file changed

+4
-3
lines changed

lib/internal/Magento/Framework/View/Asset/MergeStrategy/Direct.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,21 @@ class Direct implements \Magento\Framework\View\Asset\MergeStrategyInterface
3333
/**
3434
* @var \Magento\Framework\Math\Random
3535
*/
36-
protected $mathRandom;
36+
private $mathRandom;
3737

3838
/**
3939
* @param \Magento\Framework\Filesystem $filesystem
4040
* @param \Magento\Framework\View\Url\CssResolver $cssUrlResolver
41+
* @param \Magento\Framework\Math\Random|null $mathRandom
4142
*/
4243
public function __construct(
4344
\Magento\Framework\Filesystem $filesystem,
4445
\Magento\Framework\View\Url\CssResolver $cssUrlResolver,
45-
\Magento\Framework\Math\Random $mathRandom
46+
\Magento\Framework\Math\Random $mathRandom = null
4647
) {
4748
$this->filesystem = $filesystem;
4849
$this->cssUrlResolver = $cssUrlResolver;
49-
$this->mathRandom = $mathRandom;
50+
$this->mathRandom = $mathRandom ?: \Magento\Framework\App\ObjectManager::getInstance()->get(\Magento\Framework\Math\Random::class);;
5051
}
5152

5253
/**

0 commit comments

Comments
 (0)