Skip to content

Commit 3f98cb8

Browse files
committed
MAGETWO-94122: Independent blocks rule
1 parent f93dae1 commit 3f98cb8

File tree

1 file changed

+8
-5
lines changed
  • dev/tests/static/framework/Magento/CodeMessDetector/resources/rulesets

1 file changed

+8
-5
lines changed

dev/tests/static/framework/Magento/CodeMessDetector/resources/rulesets/design.xml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,18 @@
66
-->
77
<ruleset name="Magento Specific Design Rules" xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd" xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd" xmlns="http://pmd.sf.net/ruleset/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
88
<rule name="RequestAwareBlockMethod" class="Magento\CodeMessDetector\Rule\Design\RequestAwareBlockMethod" message="{0} uses request object directly. Add user input validation and suppress this warning.">
9-
<description><![CDATA[
9+
<description>
10+
<![CDATA[
1011
1112
Blocks must not depend on being used with certain controllers.
1213
If you use request object in a block directly you must validate all user input inside the block.
1314
14-
]]></description>
15+
]]>
16+
</description>
1517
<priority>2</priority>
1618
<properties/>
17-
<example><![CDATA[
19+
<example>
20+
<![CDATA[
1821
1922
class MyOrder extends AbstractBlock
2023
{
@@ -31,7 +34,7 @@ class MyOrder extends AbstractBlock
3134
.....
3235
}
3336
}
34-
35-
]]></example>
37+
]]>
38+
</example>
3639
</rule>
3740
</ruleset>

0 commit comments

Comments
 (0)