Run Rector on your code to see what it can do for you:

 <?php
 
 namespace App\Controller;
 use Symfony\Component\HttpFoundation\Response;
 use Symfony\Component\Routing\Annotation\Route;
 
-#[Route(path: '/electronics-signatures-orders')]
-class ElectronicSignatureOrderController extends AbstractController
-{
+class ElectronicSignatureOrderController extends AbstractController
+{
     #[Route(path: '/', name: 'index_electronic_signature_order')]
     public function __invoke(): string
     {
         return 'foo';
-    }
-
-    #[Route(path: '/add', name: 'electronic-signature-orders-add')]
+    }
+    #[Route(path: '/electronics-signatures-orders/add', name: 'electronic-signature-orders-add')]
     public function addElectronicSignatureCommand(): string
     {
         return 'bar';
-    }
+    }
 }
PHP snippet to change

Applied Rules:

Not a change you expect?

Config  rector.php
Rector version: 0221a9 - released at 2025-11-28 23:34