@@ -58,13 +58,15 @@ abstract class Block extends \Magento\Framework\App\Action\Action
58
58
* @param Json $jsonSerializer
59
59
* @param Base64Json $base64jsonSerializer
60
60
* @param LayoutCacheKeyInterface $layoutCacheKey
61
+ * @param RegexFactory|null $regexValidatorFactory
61
62
*/
62
63
public function __construct (
63
64
\Magento \Framework \App \Action \Context $ context ,
64
65
\Magento \Framework \Translate \InlineInterface $ translateInline ,
65
66
Json $ jsonSerializer = null ,
66
67
Base64Json $ base64jsonSerializer = null ,
67
- LayoutCacheKeyInterface $ layoutCacheKey = null
68
+ LayoutCacheKeyInterface $ layoutCacheKey = null ,
69
+ ?RegexFactory $ regexValidatorFactory = null
68
70
) {
69
71
parent ::__construct ($ context );
70
72
$ this ->translateInline = $ translateInline ;
@@ -115,10 +117,11 @@ protected function _getBlocks()
115
117
/**
116
118
* Validates handles parameter
117
119
*
118
- * @param $handles array
120
+ * @param array $handles
119
121
* @return bool
120
122
*/
121
- private function validateHandleParam ($ handles ): bool {
123
+ private function validateHandleParam ($ handles ): bool
124
+ {
122
125
$ validator = $ this ->regexValidatorFactory ->create (['pattern ' => self ::VALIDATION_RULE_PATTERN ]);
123
126
foreach ($ handles as $ handle ) {
124
127
if (!$ validator ->isValid ($ handle )) {
0 commit comments