getMethod(\Rector\Core\ValueObject\MethodName::CONSTRUCT); if (!$constructClassMethod instanceof \PhpParser\Node\Stmt\ClassMethod) { return []; } $promotedPropertyParams = []; foreach ($constructClassMethod->getParams() as $param) { if ($param->flags === 0) { continue; } $promotedPropertyParams[] = $param; } return $promotedPropertyParams; } }