Problem/Motivation

10) web/modules/orig/push_notifications_registration_tokens/tests/src/Kernel/RegistrationTokenDeviceInfoTest.php:51

    ---------- begin diff ----------
@@ Line 51 @@
     // real request User-Agent are not required. The payload is injected because
     // the anonymous class is a separate scope and cannot read the private
     // constant directly.
-    $detector = new class(self::DETECTED_DEVICE) implements DeviceDetectorInterface {
+    $detector = new readonly class(self::DETECTED_DEVICE) implements DeviceDetectorInterface {

-      public function __construct(private readonly array $device) {}
+      public function __construct(private array $device) {}

       /**
        * {@inheritdoc}
    ----------- end diff -----------

Applied rules:
 * ProtectedStaticModulesPropertyRector
 * ReadOnlyAnonymousClassRector


Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

ptmkenny created an issue. See original summary.

  • ptmkenny committed da9f7a9e on 1.0.x
    task: #3607660 rector fixes July 2026
    
    By: ptmkenny
    
ptmkenny’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.