-
-
Notifications
You must be signed in to change notification settings - Fork 740
Closed
rectorphp/rector-src
#5774Labels
Description
Bug Report
| Subject | Details |
|---|---|
| Rector version | last dev-main |
| Installed as | composer dependency |
Minimal PHP Code Causing Issue
See https://getrector.com/demo/2012b4c2-deb0-410a-b2cc-799e09b77dd0
<?php
class Service
{
public function __construct($msg)
{
}
public function getSnake($sentence): string|array|null
{
return preg_replace_callback('/([A-Z])/', [__CLASS__, 'convertToSnakeCase'], $sentence);
}
private function convertToSnakeCase($c) {
return "_" . strtolower($c[1]);
}
}Responsible rules
RemoveUnusedPrivateMethodRector
Expected Behavior
- Rector should skip it.
Similar Case
Reactions are currently unavailable