File tree 1 file changed +3
-7
lines changed
Magento2/Sniffs/Templates
1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change 3
3
* Copyright © Magento. All rights reserved.
4
4
* See COPYING.txt for license details.
5
5
*/
6
-
7
6
namespace Magento2 \Sniffs \Templates ;
8
7
9
8
use PHP_CodeSniffer \Sniffs \Sniff ;
@@ -26,7 +25,7 @@ class ThisInTemplateSniff implements Sniff
26
25
*
27
26
* @var string
28
27
*/
29
- protected $ warningMessageFoundHelper = 'Usage of helpers in templates is discouraged. ' ;
28
+ protected $ warningMessageFoundHelper = 'The use of helpers in templates is discouraged. Use ViewModel instead . ' ;
30
29
31
30
/**
32
31
* Warning violation code.
@@ -40,17 +39,14 @@ class ThisInTemplateSniff implements Sniff
40
39
*
41
40
* @var string
42
41
*/
43
- protected $ warningMessageFoundThis = 'Usage of $this in template files is deprecated. ' ;
42
+ protected $ warningMessageFoundThis = 'The use of $this in templates is deprecated. Use $block instead . ' ;
44
43
45
44
/**
46
45
* @inheritdoc
47
46
*/
48
47
public function register ()
49
48
{
50
- return [
51
- T_VARIABLE ,
52
- T_STRING ,
53
- ];
49
+ return [T_VARIABLE ];
54
50
}
55
51
56
52
/**
You can’t perform that action at this time.
0 commit comments