File tree Expand file tree Collapse file tree 4 files changed +0
-87
lines changed
app/code/Magento/Widget/Block/Adminhtml
framework/Magento/CodeMessDetector
testsuite/Magento/Test/Php/_files/phpmd Expand file tree Collapse file tree 4 files changed +0
-87
lines changed Original file line number Diff line number Diff line change @@ -16,8 +16,6 @@ class Widget extends \Magento\Backend\Block\Widget\Form\Container
16
16
{
17
17
/**
18
18
* @inheritdoc
19
- *
20
- * @SuppressWarnings(PHPMD.RequestAwareBlockMethod)
21
19
*/
22
20
protected function _construct ()
23
21
{
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -54,37 +54,6 @@ class PostOrder implements ActionInterface
54
54
...
55
55
return $response;
56
56
}
57
- }
58
- ]]>
59
- </example >
60
- </rule >
61
- <rule name =" RequestAwareBlockMethod"
62
- class =" Magento\CodeMessDetector\Rule\Design\RequestAwareBlockMethod"
63
- message =" {0} uses request object directly. Add user input validation and suppress this warning." >
64
- <description >
65
- <![CDATA[
66
- Blocks must not depend on being used with certain controllers.
67
- If you use request object in a block directly you must validate all user input inside the block.
68
- ]]>
69
- </description >
70
- <priority >2</priority >
71
- <properties />
72
- <example >
73
- <![CDATA[
74
- class MyOrder extends AbstractBlock
75
- {
76
-
77
- .......
78
-
79
- public function getOrder()
80
- {
81
- $orderId = $this->getRequest()->getParam('order_id');
82
- //Validate customer having such order.
83
- if (!$this->hasOrder($this->getCustomerId(), $orderId)) {
84
- ...deny access...
85
- }
86
- .....
87
- }
88
57
}
89
58
]]>
90
59
</example >
Original file line number Diff line number Diff line change 48
48
<!-- Magento Specific Rules -->
49
49
<rule ref =" Magento/CodeMessDetector/resources/rulesets/design.xml/FinalImplementation" />
50
50
<rule ref =" Magento/CodeMessDetector/resources/rulesets/design.xml/AllPurposeAction" />
51
- <rule ref =" Magento/CodeMessDetector/resources/rulesets/design.xml/RequestAwareBlockMethod" />
52
51
53
52
</ruleset >
You can’t perform that action at this time.
0 commit comments