Skip to content

Commit 3e33815

Browse files
committed
Sattic-test fix
1 parent e8cfc55 commit 3e33815

File tree

3 files changed

+34
-27
lines changed

3 files changed

+34
-27
lines changed

dev/tests/static/framework/Magento/CodeMessDetector/Test/Unit/Rule/Design/AllPurposeActionTest.php

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ public function getCases(): array
4040
{
4141
return [
4242
[
43-
new class implements ActionInterface, HttpGetActionInterface {
43+
new class implements ActionInterface, HttpGetActionInterface
44+
{
4445
/**
4546
* @inheritDoc
4647
*/
@@ -52,7 +53,8 @@ public function execute()
5253
false
5354
],
5455
[
55-
new class implements ActionInterface {
56+
new class implements ActionInterface
57+
{
5658
/**
5759
* @inheritDoc
5860
*/
@@ -64,7 +66,8 @@ public function execute()
6466
true
6567
],
6668
[
67-
new class implements HttpGetActionInterface {
69+
new class implements HttpGetActionInterface
70+
{
6871
/**
6972
* @inheritDoc
7073
*/
@@ -76,7 +79,8 @@ public function execute()
7679
false
7780
],
7881
[
79-
new class {
82+
new class
83+
{
8084

8185
},
8286
false
@@ -94,13 +98,15 @@ private function createNodeMock($dynamicObject): MockObject
9498
$node = $this->getMockBuilder(ClassNode::class)
9599
->disableOriginalConstructor()
96100
->disableProxyingToOriginalMethods()
97-
->setMethods([
98-
// disable name lookup from AST artifact
99-
'getNamespaceName',
100-
'getParentName',
101-
'getName',
102-
'getFullQualifiedName',
103-
])
101+
->setMethods(
102+
[
103+
// disable name lookup from AST artifact
104+
'getNamespaceName',
105+
'getParentName',
106+
'getName',
107+
'getFullQualifiedName',
108+
]
109+
)
104110
->getMock();
105111
$node->expects($this->any())
106112
->method('getFullQualifiedName')
@@ -114,10 +120,8 @@ private function createNodeMock($dynamicObject): MockObject
114120
* @param bool $expects
115121
* @return InvocationMocker
116122
*/
117-
private function expectsRuleViolation(
118-
AllPurposeAction $rule,
119-
bool $expects
120-
): InvocationMocker {
123+
private function expectsRuleViolation(AllPurposeAction $rule, bool $expects): InvocationMocker
124+
{
121125
/** @var Report|MockObject $report */
122126
$report = $this->getMockBuilder(Report::class)->getMock();
123127
if ($expects) {

lib/internal/Magento/Framework/Api/ExtensionAttribute/JoinProcessor.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function __construct(
6161
}
6262

6363
/**
64-
* {@inheritdoc}
64+
* @inheritdoc
6565
*/
6666
public function process(DbCollection $collection, $extensibleEntityClass = null)
6767
{
@@ -95,7 +95,7 @@ private function getReferenceTableAlias($attributeCode)
9595
}
9696

9797
/**
98-
* {@inheritdoc}
98+
* @inheritdoc
9999
*/
100100
public function extractExtensionAttributes($extensibleEntityClass, array $data)
101101
{
@@ -127,10 +127,9 @@ public function extractExtensionAttributes($extensibleEntityClass, array $data)
127127
*
128128
* @param string $attributeCode
129129
* @param array $directive
130-
* @param array &$data
131-
* @param array &$extensionData
130+
* @param array $data
131+
* @param array $extensionData
132132
* @param string $extensibleEntityClass
133-
* @return void
134133
*/
135134
private function populateAttributeCodeWithDirective(
136135
$attributeCode,

lib/internal/Magento/Framework/ObjectManager/Profiler/Log.php

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
67
namespace Magento\Framework\ObjectManager\Profiler;
78

89
use Magento\Framework\ObjectManager\Profiler\Tree\Item;
@@ -133,17 +134,19 @@ public function display()
133134
{
134135
$this->stats['used'] = count($this->used);
135136
$this->stats['unused'] = $this->stats['total'] - $this->stats['used'];
137+
//phpcs:disable
136138
echo '<table border="1" cellspacing="0" cellpadding="2">',
137-
'<thead><tr><th>',
138-
"Creation chain (Red items are never used) Total: {$this->stats['total']}\n",
139-
"Used: {$this->stats['used']} Not used: {$this->stats['unused']}",
140-
'</th></tr></thead>',
141-
'<tbody>',
142-
'<tr><th>Instance class</th></tr>';
139+
'<thead><tr><th>',
140+
"Creation chain (Red items are never used) Total: {$this->stats['total']}\n",
141+
"Used: {$this->stats['used']} Not used: {$this->stats['unused']}",
142+
'</th></tr></thead>',
143+
'<tbody>',
144+
'<tr><th>Instance class</th></tr>';
143145
foreach ($this->roots as $root) {
144146
$this->displayItem($root);
145147
}
146148
echo '</tbody></table>';
149+
//phpcs:enable
147150
}
148151

149152
/**
@@ -156,9 +159,10 @@ public function display()
156159
protected function displayItem(Item $item, $level = 0)
157160
{
158161
$colorStyle = isset($this->used[$item->getHash()]) ? '' : ' style="color:red" ';
159-
162+
//phpcs:disable
160163
echo "<tr><td $colorStyle>" . str_repeat('·&nbsp;', $level) . $item->getClass()
161164
. ' - ' . $item->getHash() . '</td></tr>';
165+
//phpcs:enable
162166

163167
foreach ($item->getChildren() as $child) {
164168
$this->displayItem($child, $level + 1);

0 commit comments

Comments
 (0)