Problem/Motivation


5) web/modules/orig/firebase_php/src/Form/FirebasePhpConfigurationForm.php:19

    ---------- begin diff ----------
@@ Line 19 @@
  */
 final class FirebasePhpConfigurationForm extends ConfigFormBase {

-  const FORM_ID = 'firebase_php.settings';
+  const string FORM_ID = 'firebase_php.settings';

   public function __construct(
     ConfigFactoryInterface $config_factory,
@@ Line 34 @@
    */
   #[\Override]
   public static function create(ContainerInterface $container): static {
-    return new static(
+    return new self(
       $container->get('config.factory'),
       $container->get('config.typed'),
       $container->get('file_system'),
    ----------- end diff -----------

Applied rules:
 * NewStaticToNewSelfRector
 * AddTypeToConstRector


6) web/modules/orig/firebase_php/src/Service/FirebasePhpMessagingApi.php:369

    ---------- begin diff ----------
@@ Line 369 @@
     if (isset($payload['data']) && is_array($payload['data'])) {
       $summary['data_keys'] = array_values(array_filter(
         array_keys($payload['data']),
-        static fn(mixed $key): bool => is_string($key),
+        is_string(...),
       ));
     }
    ----------- end diff -----------

Applied rules:
 * ArrowFunctionDelegatingCallToFirstClassCallableRector


7) web/modules/orig/firebase_php/tests/src/Unit/Service/FirebasePhpMessagingApiTest.php:48

    ---------- begin diff ----------
@@ Line 48 @@
     ?ImmutableConfig $config = NULL,
     ?LoggerInterface $logger = NULL,
   ): FirebasePhpMessagingApi {
-    $api = (new \ReflectionClass(FirebasePhpMessagingApi::class))
+    $api = new \ReflectionClass(FirebasePhpMessagingApi::class)
       ->newInstanceWithoutConstructor();
     // $messaging is a public property declared on the parent service.
     $api->messaging = $messaging;
@@ Line 135 @@
    */
   private function invalidMessageWithCode(int $code): InvalidMessage {
     $exception = new InvalidMessage('bad message');
-    (new \ReflectionProperty($exception, 'errors'))
+    new \ReflectionProperty($exception, 'errors')
       ->setValue($exception, ['error' => ['code' => $code]]);
     return $exception;
   }
    ----------- end diff -----------

Applied rules:
 * NewMethodCallWithoutParenthesesRector

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 35420930 on 8.0.x
    task: #3607657 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.