Problem/Motivation
PHPStan identifies some type-safety errors:
------ ----------------------------------------------------------------------------------------------------
Line web/modules/contrib/push_notifications_registration_tokens/src/RegistrationTokenTypePluginManager.php
------ ----------------------------------------------------------------------------------------------------
42 Cannot cast mixed to string.
🪪 cast.string
------ ----------------------------------------------------------------------------------------------------
------ -----------------------------------------------------------------------------------------------------------------------------
Line web/modules/contrib/push_notifications_registration_tokens/src/Services/ProcessTokens.php
------ -----------------------------------------------------------------------------------------------------------------------------
90 Parameter #1 $value of function intval expects array|bool|float|GMP|int|resource|SimpleXMLElement|string|null, mixed given.
🪪 argument.type
------ -----------------------------------------------------------------------------------------------------------------------------
------ -------------------------------------------------------------------------------------------------------------------------------
Line web/modules/contrib/push_notifications_registration_tokens/submodules/firebase_php_integration/src/Form/FirebasePhpIntegrationSe
ndMessageSingleUserForm.php
------ -------------------------------------------------------------------------------------------------------------------------------
117 Parameter #1 $id of method Drupal\Core\Entity\EntityStorageInterface::load() expects int|string, mixed given.
🪪 argument.type
119 Part $user_value (mixed) of encapsed string cannot be cast to string.
🪪 encapsedStringPart.nonString
131 Parameter #2 $notification_title of method Drupal\firebase_php\FirebasePhpMessagingApiInterface::sendMessageSingleDevice()
expects string|null, mixed given.
🪪 argument.type
132 Parameter #3 $notification_body of method Drupal\firebase_php\FirebasePhpMessagingApiInterface::sendMessageSingleDevice()
expects string|null, mixed given.
🪪 argument.type
136 Parameter #1 $value of function intval expects array|bool|float|GMP|int|resource|SimpleXMLElement|string|null, mixed given.
🪪 argument.type
150 Parameter #2 $notification_title of method Drupal\firebase_php\FirebasePhpMessagingApiInterface::sendMessageMultipleDevices()
expects string|null, mixed given.
🪪 argument.type
151 Parameter #3 $notification_body of method Drupal\firebase_php\FirebasePhpMessagingApiInterface::sendMessageMultipleDevices()
expects string|null, mixed given.
🪪 argument.type
155 Parameter #1 $value of function intval expects array|bool|float|GMP|int|resource|SimpleXMLElement|string|null, mixed given.
🪪 argument.type
------ -------------------------------------------------------------------------------------------------------------------------------
------ -------------------------------------------------------------------------------------------------------------------------------
Line web/modules/contrib/push_notifications_registration_tokens/submodules/firebase_php_integration/src/Plugin/Action/RegistrationTok
enValidateAction.php
------ -------------------------------------------------------------------------------------------------------------------------------
102 Parameter #1 $token of method Drupal\firebase_php\FirebasePhpMessagingApiInterface::validateToken() expects string, mixed
given.
🪪 argument.type
168 Cannot call method access() on mixed.
🪪 method.nonObject
169 Cannot call method access() on mixed.
🪪 method.nonObject
170 Cannot call method access() on mixed.
🪪 method.nonObject
------ -------------------------------------------------------------------------------------------------------------------------------
------ -------------------------------------------------------------------------------------------------------------------------------
Line web/modules/contrib/push_notifications_registration_tokens/submodules/jsonrpc_add_registration_token/src/Plugin/jsonrpc/Method/A
ddPushToken.php
------ -------------------------------------------------------------------------------------------------------------------------------
62 Parameter #3 $plugin_definition of class Drupal\jsonrpc_add_registration_token\Plugin\jsonrpc\Method\AddPushToken constructor
expects Drupal\jsonrpc\MethodInterface, mixed given.
🪪 argument.type
------ -------------------------------------------------------------------------------------------------------------------------------
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
Comment #3
ptmkenny commentedComment #5
ptmkenny commented