We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b053cf7 commit 964ea93Copy full SHA for 964ea93
1 file changed
rules/Php85/Rector/Class_/FinalPropertyPromotionRector.php
@@ -78,13 +78,8 @@ public function refactor(Node $node): ?Node
78
}
79
80
$hasChanged = false;
81
-
82
$params = $constructClassMethod->getParams();
83
84
- if ($this->shouldSkipParams($params)) {
85
- return null;
86
- }
87
88
foreach ($params as $param) {
89
if (! $param->isPromoted()) {
90
continue;
@@ -128,17 +123,4 @@ private function shouldSkip(Class_ $class): bool
128
123
129
124
return false;
130
125
131
132
- /**
133
- * @param Param[] $params
134
- */
135
- private function shouldSkipParams(array $params): bool
136
- {
137
- foreach ($params as $param) {
138
- if ($this->visibilityManipulator->hasVisibility($param, Visibility::FINAL) && $param->isPromoted()) {
139
- return true;
140
141
142
- return false;
143
144
126
0 commit comments