Bug Report
| Subject |
Details |
| Rector version |
Rector dev-master@765862c |
| Installed as |
composer dependency |
I want to replace snake_case to cameCase in all my code.
When I run rector with the configuration below (see the link), it somehow changes PHPDoc annotation, but there is no rule which indicates these changes.
Minimal PHP Code Causing Issue
https://getrector.org/demo/05099819-f088-4e4b-9863-c082ba5eb4bc
Expected Behaviour
public function showAction(Request $request, $id)
{
- $invoice_service = $this->get(InvoiceService::class);
- $current_user = $this->get('security.token_storage')->getToken()->getUser();
+ $invoiceService = $this->get(InvoiceService::class);
+ $currentUser = $this->get('security.token_storage')->getToken()->getUser();
}
}
Actual Behaviour
class InvoiceAdminController
{
/**
- * @Route("/admin/invoice/show/{id}", options={ "expose" = true }, name="invoice_admin_show")
+ * @Route("/admin/invoice/show/{id}", options={expose=true}, name="invoice_admin_show")
*
* @param mixed $id
*/
public function showAction(Request $request, $id)
{
- $invoice_service = $this->get(InvoiceService::class);
- $current_user = $this->get('security.token_storage')->getToken()->getUser();
+ $invoiceService = $this->get(InvoiceService::class);
+ $currentUser = $this->get('security.token_storage')->getToken()->getUser();
}
}
Bug Report
I want to replace
snake_casetocameCasein all my code.When I run
rectorwith the configuration below (see the link), it somehow changes PHPDoc annotation, but there is no rule which indicates these changes.Minimal PHP Code Causing Issue
https://getrector.org/demo/05099819-f088-4e4b-9863-c082ba5eb4bc
Expected Behaviour
public function showAction(Request $request, $id) { - $invoice_service = $this->get(InvoiceService::class); - $current_user = $this->get('security.token_storage')->getToken()->getUser(); + $invoiceService = $this->get(InvoiceService::class); + $currentUser = $this->get('security.token_storage')->getToken()->getUser(); } }Actual Behaviour
class InvoiceAdminController { /** - * @Route("/admin/invoice/show/{id}", options={ "expose" = true }, name="invoice_admin_show") + * @Route("/admin/invoice/show/{id}", options={expose=true}, name="invoice_admin_show") * * @param mixed $id */ public function showAction(Request $request, $id) { - $invoice_service = $this->get(InvoiceService::class); - $current_user = $this->get('security.token_storage')->getToken()->getUser(); + $invoiceService = $this->get(InvoiceService::class); + $currentUser = $this->get('security.token_storage')->getToken()->getUser(); } }