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 @@ -83,37 +83,6 @@ class OrderProcessor
83
83
$currentOrder = $this->session->get('current_order');
84
84
...
85
85
}
86
- }
87
- ]]>
88
- </example >
89
- </rule >
90
- <rule name =" RequestAwareBlockMethod"
91
- class =" Magento\CodeMessDetector\Rule\Design\RequestAwareBlockMethod"
92
- message =" {0} uses request object directly. Add user input validation and suppress this warning." >
93
- <description >
94
- <![CDATA[
95
- Blocks must not depend on being used with certain controllers.
96
- If you use request object in a block directly you must validate all user input inside the block.
97
- ]]>
98
- </description >
99
- <priority >2</priority >
100
- <properties />
101
- <example >
102
- <![CDATA[
103
- class MyOrder extends AbstractBlock
104
- {
105
-
106
- .......
107
-
108
- public function getOrder()
109
- {
110
- $orderId = $this->getRequest()->getParam('order_id');
111
- //Validate customer having such order.
112
- if (!$this->hasOrder($this->getCustomerId(), $orderId)) {
113
- ...deny access...
114
- }
115
- .....
116
- }
117
86
}
118
87
]]>
119
88
</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
<rule ref =" Magento/CodeMessDetector/resources/rulesets/design.xml/CookieAndSessionMisuse" />
53
52
54
53
</ruleset >
You can’t perform that action at this time.
0 commit comments