Find a Rector rule

Find the best Rector rule to solve your problem. Searching through 1005 rules.

Found 2 rules, grouped by set: Clear

jms/serializer 2 matches

Changes @Accessor annotation to #[Accessor] attribute with specific "getter" or "setter" keys

 use JMS\Serializer\Annotation\Accessor;

 class User
 {
-    /**
-     * @Accessor("getValue")
-     */
+    #[Accessor(getter: 'getValue')]
     private $value;
 }

Changes @AccessType annotation to #[AccessType] attribute with specific key

 use JMS\Serializer\Annotation\AccessType;

-/** @AccessType("public_method") */
+#[AccessType(values: ['public_method'])]
 class User
 {
 }