File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -151,6 +151,10 @@ private function findSpecialAnnotation($stackPtr)
151151 $ startOfStatement = $ this ->file ->findPrevious (T_OPEN_TAG , $ stackPtr );
152152 return $ this ->file ->findPrevious (T_COMMENT , $ stackPtr , $ startOfStatement );
153153 }
154+ if ($ this ->tokens [$ stackPtr ]['code ' ] === T_OPEN_TAG_WITH_ECHO ) {
155+ $ endOfStatement = $ this ->file ->findNext (T_CLOSE_TAG , $ stackPtr );
156+ return $ this ->file ->findNext (T_COMMENT , $ stackPtr , $ endOfStatement );
157+ }
154158 return false ;
155159 }
156160
Original file line number Diff line number Diff line change 11<!--unsafe-->
2- <?php /* @noEscape */ echo $ code ; ?>
2+
33<?php $ block ->getSomeData (); echo $ block ->getSomeData (); /* @escapeNotVerified */ echo $ block ->getSomeData ();?>
44<?= $ block ->getTitle ();?>
55<?php echo $ object ->getSomeMethod ($ block ->getHtmlId ());?>
@@ -56,3 +56,4 @@ echo $var;
5656<?php echo $ block ->escapeJs ($ js ); ?>
5757<?php echo $ block ->escapeCss ($ css ); ?>
5858<?php echo $ block ->getJsLayout ($ jsLayout ); ?>
59+ <?= /* @noEscape */ json_encode ($ config ) ?>
Original file line number Diff line number Diff line change 6060 <severity >10</severity >
6161 <type >error</type >
6262 <exclude-pattern >*/lib/*</exclude-pattern >
63+ <exclude-pattern >*/Test/*</exclude-pattern >
6364 </rule >
6465 <rule ref =" Magento2.Strings.ExecutableRegEx" >
6566 <severity >10</severity >
9798 <severity >9</severity >
9899 <type >warning</type >
99100 <exclude-pattern >*/lib/*</exclude-pattern >
101+ <exclude-pattern >*/Test/*</exclude-pattern >
100102 </rule >
101103 <rule ref =" Magento2.Security.XssTemplate" >
102104 <include-pattern >*.phtml</include-pattern >
252254 <rule ref =" Squiz.PHP.GlobalKeyword" >
253255 <severity >7</severity >
254256 <type >warning</type >
257+ <exclude-pattern >*/Test/*</exclude-pattern >
255258 </rule >
256259 <rule ref =" Squiz.Scope.MemberVarScope" >
257260 <severity >7</severity >
You can’t perform that action at this time.
0 commit comments