diff --git a/modules/sms_user/src/AccountRegistration.php b/modules/sms_user/src/AccountRegistration.php index ac39bcd..e4b3894 100644 --- a/modules/sms_user/src/AccountRegistration.php +++ b/modules/sms_user/src/AccountRegistration.php @@ -355,7 +355,7 @@ protected function generateUniqueUsername() { * * @param \Drupal\Core\Entity\EntityConstraintViolationListInterface $violations * A violation list. - * @param string|NULL $incoming_form + * @param string|null $incoming_form * Incoming form, if applicable. * * @return \Drupal\Core\Entity\EntityConstraintViolationListInterface @@ -382,7 +382,7 @@ protected function removeAcceptableViolations(EntityConstraintViolationListInter * @param string $name * The configuration name. * - * @return array|NULL + * @return array|null * The values for the requested configuration. */ protected function settings($name) { diff --git a/modules/sms_user/src/ActiveHoursInterface.php b/modules/sms_user/src/ActiveHoursInterface.php index 47ffc64..be9ae87 100644 --- a/modules/sms_user/src/ActiveHoursInterface.php +++ b/modules/sms_user/src/ActiveHoursInterface.php @@ -32,7 +32,7 @@ public function inHours(UserInterface $user, $now = 'now'); * A time or strtotime() relative string localised to the users timezone. * Defaults to current time for the user. * - * @return \Drupal\sms_user\ActiveHoursDates|FALSE + * @return \Drupal\sms_user\ActiveHoursDates|false * A date pair, or FALSE if no next date could be determined. */ public function findNextTime(UserInterface $user, $now = 'now'); diff --git a/modules/sms_user/tests/src/Kernel/SmsFrameworkUserAccountRegistrationServiceTest.php b/modules/sms_user/tests/src/Kernel/SmsFrameworkUserAccountRegistrationServiceTest.php index 91f5aa7..11d4a76 100644 --- a/modules/sms_user/tests/src/Kernel/SmsFrameworkUserAccountRegistrationServiceTest.php +++ b/modules/sms_user/tests/src/Kernel/SmsFrameworkUserAccountRegistrationServiceTest.php @@ -545,7 +545,7 @@ protected function countUsers() { /** * Count number of registered users. * - * @return \Drupal\user\UserInterface|NULL + * @return \Drupal\user\UserInterface|null * Get last created user, or NULL if no users in database. */ protected function getLastUser() { diff --git a/src/Entity/PhoneNumberSettingsInterface.php b/src/Entity/PhoneNumberSettingsInterface.php index 7e6ebfe..dec6789 100644 --- a/src/Entity/PhoneNumberSettingsInterface.php +++ b/src/Entity/PhoneNumberSettingsInterface.php @@ -116,7 +116,7 @@ public function setPurgeVerificationPhoneNumber($purge); * @param string $map * ID to map field name, as found in sms.phone.*.*.fields.$map. * - * @return string|NULL + * @return string|null * A field name, or NULL if not set. */ public function getFieldName($map); @@ -126,7 +126,7 @@ public function getFieldName($map); * * @param string $map * ID to map field name, as found in sms.phone.*.*.fields.$map. - * @param string|NULL $field_name + * @param string|null $field_name * A field name, or NULL to unset. * * @return $this diff --git a/src/Entity/PhoneNumberVerificationInterface.php b/src/Entity/PhoneNumberVerificationInterface.php index f93787b..53aee92 100644 --- a/src/Entity/PhoneNumberVerificationInterface.php +++ b/src/Entity/PhoneNumberVerificationInterface.php @@ -21,7 +21,7 @@ public function getCreatedTime(); /** * Gets the entity for the phone number verification. * - * @return \Drupal\Core\Entity\EntityInterface|NULL + * @return \Drupal\Core\Entity\EntityInterface|null * The entity for the phone number verification, or NULL if it is missing. */ public function getEntity(); diff --git a/src/Entity/SmsMessage.php b/src/Entity/SmsMessage.php index a3641b0..e3919a1 100644 --- a/src/Entity/SmsMessage.php +++ b/src/Entity/SmsMessage.php @@ -167,7 +167,7 @@ public function getSender() { /** * {@inheritdoc} * - * @param string|NULL $sender + * @param string|null $sender * The name of the sender. Or NULL to defer to the label of the sender * entity. * diff --git a/src/Entity/SmsMessageInterface.php b/src/Entity/SmsMessageInterface.php index f02d01b..e9b3240 100644 --- a/src/Entity/SmsMessageInterface.php +++ b/src/Entity/SmsMessageInterface.php @@ -14,7 +14,7 @@ interface SmsMessageInterface extends ContentEntityInterface, PlainSmsMessageInt /** * Gets the entity who sent the SMS message. * - * @return \Drupal\Core\Entity\EntityInterface|NULL + * @return \Drupal\Core\Entity\EntityInterface|null * The entity who sent the SMS message, or NULL if it is missing. */ public function getSenderEntity(); @@ -33,7 +33,7 @@ public function setSenderEntity(EntityInterface $entity); /** * Gets the entity who will receive the SMS message. * - * @return \Drupal\Core\Entity\EntityInterface|NULL + * @return \Drupal\Core\Entity\EntityInterface|null * The entity who will receive the SMS message, or NULL if it is missing. */ public function getRecipientEntity(); @@ -101,7 +101,7 @@ public function setSendTime($send_time); * This value does not indicate whether the message was sent, only that the * gateway accepted the request. * - * @return int|NULL + * @return int|null * The timestamp when SMS message was processed, or NULL if not processed. */ public function getProcessedTime(); diff --git a/src/Event/RecipientGatewayEvent.php b/src/Event/RecipientGatewayEvent.php index a1caf02..68ceaeb 100644 --- a/src/Event/RecipientGatewayEvent.php +++ b/src/Event/RecipientGatewayEvent.php @@ -119,7 +119,7 @@ public function addGateway(SmsGatewayInterface $gateway, $priority = 0) { * * @param string $gateway_id * A gateway plugin ID. - * @param int|NULL $priority + * @param int|null $priority * The priority of the gateway to remove, or NULL to remove all gateways * with the identifier. * diff --git a/src/EventSubscriber/SmsMessageProcessor.php b/src/EventSubscriber/SmsMessageProcessor.php index 1c2bf47..9f45ba9 100644 --- a/src/EventSubscriber/SmsMessageProcessor.php +++ b/src/EventSubscriber/SmsMessageProcessor.php @@ -215,7 +215,7 @@ public function ensureGateways(SmsMessageEvent $event) { * @param string $recipient * A recipient phone number. * - * @return \Drupal\sms\Entity\SmsGatewayInterface|NULL + * @return \Drupal\sms\Entity\SmsGatewayInterface|null * A gateway for the phone number, or NULL if there is no gateway. */ protected function getGatewayForPhoneNumber($recipient) { diff --git a/src/Message/SmsDeliveryReportInterface.php b/src/Message/SmsDeliveryReportInterface.php index 76b861b..09df60b 100644 --- a/src/Message/SmsDeliveryReportInterface.php +++ b/src/Message/SmsDeliveryReportInterface.php @@ -10,7 +10,7 @@ interface SmsDeliveryReportInterface { /** * Gets the gateway tracking ID for the message. * - * @return string|NULL + * @return string|null * The gateway tracking ID for the message, or NULL if there is no tracking * ID. */ @@ -19,7 +19,7 @@ public function getMessageId(); /** * Sets the gateway tracking ID for the message. * - * @param string|NULL $message_id + * @param string|null $message_id * The gateway tracking ID for the message, or NULL if there is no tracking * ID. * @@ -50,7 +50,7 @@ public function setRecipient($recipient); /** * Gets the status of the message. * - * @return string|NULL + * @return string|null * A status code from \Drupal\sms\Message\SmsMessageReportStatus, or NULL if * unknown. */ @@ -59,7 +59,7 @@ public function getStatus(); /** * Sets the status of the message. * - * @param string|NULL $status + * @param string|null $status * A status code from \Drupal\sms\Message\SmsMessageReportStatus, or NULL if * unknown. * @@ -90,7 +90,7 @@ public function setStatusMessage($message); /** * Gets the time the message was queued. * - * @return int|NULL + * @return int|null * The timestamp when the message was queued, or NULL if unknown. */ public function getTimeQueued(); @@ -98,7 +98,7 @@ public function getTimeQueued(); /** * Sets the time the message was queued. * - * @param int|NULL $time + * @param int|null $time * The timestamp when the message was queued, or NULL if unknown. * * @return $this @@ -109,7 +109,7 @@ public function setTimeQueued($time); /** * Gets the time the message was delivered to the recipient. * - * @return int|NULL + * @return int|null * The timestamp when the message was delivered to the recipient, or NULL if * unknown. */ @@ -118,7 +118,7 @@ public function getTimeDelivered(); /** * Sets the time the message was delivered to the recipient. * - * @param int|NULL $time + * @param int|null $time * The timestamp when the message was delivered to the recipient, or NULL if * unknown. * diff --git a/src/Message/SmsMessageInterface.php b/src/Message/SmsMessageInterface.php index 5646e11..a15c8ec 100644 --- a/src/Message/SmsMessageInterface.php +++ b/src/Message/SmsMessageInterface.php @@ -64,7 +64,7 @@ public function removeRecipients(array $recipients); /** * Get the gateway for this message. * - * @return \Drupal\sms\Entity\SmsGatewayInterface|NULL + * @return \Drupal\sms\Entity\SmsGatewayInterface|null * A gateway plugin instance, or NULL to let the provider decide. */ public function getGateway(); @@ -145,7 +145,7 @@ public function removeOption($name); /** * Get the result associated with this SMS message. * - * @return \Drupal\sms\Message\SmsMessageResultInterface|NULL + * @return \Drupal\sms\Message\SmsMessageResultInterface|null * The result associated with this SMS message, or NULL if there is no * result. */ @@ -154,7 +154,7 @@ public function getResult(); /** * Set the result associated with this SMS message. * - * @param \Drupal\sms\Message\SmsMessageResultInterface|NULL $result + * @param \Drupal\sms\Message\SmsMessageResultInterface|null $result * The result to associate with this SMS message, or NULL if there is no * result. * @@ -166,7 +166,7 @@ public function setResult(SmsMessageResultInterface $result = NULL); /** * Gets the name of the sender of this SMS message. * - * @return string|NULL + * @return string|null * The name of the sender, or NULL if none is defined. */ public function getSender(); @@ -174,7 +174,7 @@ public function getSender(); /** * Set the name of the sender of this SMS message. * - * @param string|NULL $sender + * @param string|null $sender * The name of the sender. * * @return $this @@ -231,7 +231,7 @@ public function getUuid(); /** * Gets the user who created the SMS message. * - * @return int|NULL + * @return int|null * The ID of the user who created the message. Or NULL if no user entity is * associated as the sender. */ diff --git a/src/Message/SmsMessageResultInterface.php b/src/Message/SmsMessageResultInterface.php index 840f286..d356ea5 100644 --- a/src/Message/SmsMessageResultInterface.php +++ b/src/Message/SmsMessageResultInterface.php @@ -10,7 +10,7 @@ interface SmsMessageResultInterface { /** * Gets the error of the message. * - * @return string|NULL + * @return string|null * A error code from \Drupal\sms\Message\SmsMessageResultError, or NULL if * there was no error. */ @@ -22,7 +22,7 @@ public function getError(); * Usually a setting an error on a result indicates something went wrong with * the entire transaction. * - * @param string|NULL $error + * @param string|null $error * A error code from \Drupal\sms\Message\SmsMessageResultError, or NULL if * unknown. * @@ -56,7 +56,7 @@ public function setErrorMessage($message); * @param string $recipient * The number of the recipient for which the report is to be retrieved. * - * @return \Drupal\sms\Message\SmsDeliveryReportInterface|NULL + * @return \Drupal\sms\Message\SmsDeliveryReportInterface|null * A delivery report object, or NULL if there is no report for the * recipient. * @@ -97,7 +97,7 @@ public function addReport(SmsDeliveryReportInterface $report); /** * Gets the credit balance after this transaction. * - * @return float|NULL + * @return float|null * The credit balance after the message is processed, or NULL if unknown. */ public function getCreditsBalance(); @@ -105,7 +105,7 @@ public function getCreditsBalance(); /** * Sets the credit balance after this transaction. * - * @param float|NULL $balance + * @param float|null $balance * The credit balance after the message is processed, or NULL if unknown. * * @return $this @@ -119,7 +119,7 @@ public function setCreditsBalance($balance); /** * Gets the credits consumed for this transaction. * - * @return float|NULL + * @return float|null * The credits consumed for this transaction, or NULL if unknown. */ public function getCreditsUsed(); @@ -127,7 +127,7 @@ public function getCreditsUsed(); /** * Sets the credits consumed for this transaction. * - * @param float|NULL $credits_used + * @param float|null $credits_used * The credits consumed for this transaction, or NULL if unknown. * * @return $this diff --git a/src/Plugin/SmsGatewayPluginInterface.php b/src/Plugin/SmsGatewayPluginInterface.php index 585c832..5f22690 100644 --- a/src/Plugin/SmsGatewayPluginInterface.php +++ b/src/Plugin/SmsGatewayPluginInterface.php @@ -31,7 +31,7 @@ public function send(SmsMessageInterface $sms); * The 'credit_balance_available' plugin annotation should be set to inform * the framework whether this gateway supports balance queries. * - * @return float|NULL + * @return float|null * The credit balance of the gateway, or NULL if unknown. */ public function getCreditsBalance(); @@ -56,7 +56,7 @@ public function parseDeliveryReports(Request $request, Response $response); /** * Gets delivery reports from the gateway. * - * @param string[]|NULL $message_ids + * @param string[]|null $message_ids * A list of specific message ID's to pull, or NULL to get any reports which * have not been requested previously. * diff --git a/src/Provider/PhoneNumberProviderInterface.php b/src/Provider/PhoneNumberProviderInterface.php index 2ac6e13..48ed1f9 100644 --- a/src/Provider/PhoneNumberProviderInterface.php +++ b/src/Provider/PhoneNumberProviderInterface.php @@ -15,7 +15,7 @@ interface PhoneNumberProviderInterface { * * @param \Drupal\Core\Entity\EntityInterface $entity * An entity to get phone numbers. - * @param bool|NULL $verified + * @param bool|null $verified * Whether the returned phone numbers must be verified, or NULL to get all * phone numbers regardless of status. * @@ -35,7 +35,7 @@ public function getPhoneNumbers(EntityInterface $entity, $verified = TRUE); * @param \Drupal\sms\Message\SmsMessageInterface $sms_message * The SMS message to send to the entity. * - * @return \Drupal\sms\Message\SmsMessageResultInterface|FALSE + * @return \Drupal\sms\Message\SmsMessageResultInterface|false * The message result from the gateway. * * @throws \Drupal\sms\Exception\NoPhoneNumberException diff --git a/src/Provider/PhoneNumberVerificationInterface.php b/src/Provider/PhoneNumberVerificationInterface.php index bd1474d..ff5af26 100644 --- a/src/Provider/PhoneNumberVerificationInterface.php +++ b/src/Provider/PhoneNumberVerificationInterface.php @@ -18,7 +18,7 @@ interface PhoneNumberVerificationInterface { * @param string $bundle * An entity bundle. * - * @return \Drupal\sms\Entity\PhoneNumberSettingsInterface|NULL + * @return \Drupal\sms\Entity\PhoneNumberSettingsInterface|null * A phone number settings entity, or NULL if it does not exist. */ public function getPhoneNumberSettings($entity_type_id, $bundle); @@ -29,7 +29,7 @@ public function getPhoneNumberSettings($entity_type_id, $bundle); * @param \Drupal\Core\Entity\EntityInterface $entity * The entity to get settings. * - * @return \Drupal\sms\Entity\PhoneNumberSettingsInterface|NULL + * @return \Drupal\sms\Entity\PhoneNumberSettingsInterface|null * A phone number settings entity, or NULL if it does not exist. * * @throws \Drupal\sms\Exception\PhoneNumberSettingsException @@ -43,7 +43,7 @@ public function getPhoneNumberSettingsForEntity(EntityInterface $entity); * @param string $code * A string to check is a verification code. * - * @return \Drupal\sms\Entity\PhoneNumberVerificationInterface|FALSE + * @return \Drupal\sms\Entity\PhoneNumberVerificationInterface|false * A phone number verification entity, or FALSE if $code is not a valid * verification code. */ @@ -59,7 +59,7 @@ public function getPhoneVerificationByCode($code); * * @param string $phone_number * A phone number. - * @param bool|NULL $verified + * @param bool|null $verified * Whether the returned phone numbers must be verified, or NULL to get all * regardless of status. * @param string $entity_type @@ -78,7 +78,7 @@ public function getPhoneVerificationByPhoneNumber($phone_number, $verified = TRU * @param string $phone_number * A phone number. * - * @return \Drupal\sms\Entity\PhoneNumberVerificationInterface|NULL + * @return \Drupal\sms\Entity\PhoneNumberVerificationInterface|null * The phone number verification for an entity and phone number pair. */ public function getPhoneVerificationByEntity(EntityInterface $entity, $phone_number); @@ -94,7 +94,7 @@ public function getPhoneVerificationByEntity(EntityInterface $entity, $phone_num * @param string $phone_number * A phone number. * - * @return \Drupal\sms\Entity\PhoneNumberVerificationInterface|NULL + * @return \Drupal\sms\Entity\PhoneNumberVerificationInterface|null * A phone number verification. */ public function newPhoneVerification(EntityInterface $entity, $phone_number); diff --git a/src/Tests/SmsFrameworkPhoneNumberTest.php b/src/Tests/SmsFrameworkPhoneNumberTest.php index c8981c5..89b5d3d 100644 --- a/src/Tests/SmsFrameworkPhoneNumberTest.php +++ b/src/Tests/SmsFrameworkPhoneNumberTest.php @@ -92,7 +92,7 @@ public function testPhoneNumberVerificationDeleted() { /** * Count verification codes in database. * - * @param \Drupal\Core\Entity\EntityInterface|NULL $entity + * @param \Drupal\Core\Entity\EntityInterface|null $entity * The entity to count verification codes for, or NULL to count all codes. * * @return int diff --git a/src/Tests/SmsFrameworkTestTrait.php b/src/Tests/SmsFrameworkTestTrait.php index 01e8b5a..4a4e814 100644 --- a/src/Tests/SmsFrameworkTestTrait.php +++ b/src/Tests/SmsFrameworkTestTrait.php @@ -73,7 +73,7 @@ function getTestMessages(SmsGatewayInterface $sms_gateway) { * @param \Drupal\sms\Entity\SmsGatewayInterface $sms_gateway * A gateway plugin. * - * @return \Drupal\sms\Message\SmsMessageInterface|FALSE + * @return \Drupal\sms\Message\SmsMessageInterface|false * The last SMS message, or FALSE if no messages have been sent. */ public function getLastTestMessage(SmsGatewayInterface $sms_gateway) { @@ -85,7 +85,7 @@ public function getLastTestMessage(SmsGatewayInterface $sms_gateway) { /** * Resets SMS messages stored in memory by 'Memory' gateway. * - * @param \Drupal\sms\Entity\SmsGatewayInterface|NULL $sms_gateway + * @param \Drupal\sms\Entity\SmsGatewayInterface|null $sms_gateway * A gateway plugin, or NULL to reset all messages. */ public function resetTestMessages(SmsGatewayInterface $sms_gateway = NULL) { @@ -120,7 +120,7 @@ protected function getIncomingMessages(SmsGatewayInterface $sms_gateway) { * @param \Drupal\sms\Entity\SmsGatewayInterface $sms_gateway * A gateway plugin. * - * @return \Drupal\sms\Message\SmsMessageInterface|FALSE + * @return \Drupal\sms\Message\SmsMessageInterface|false * The last message, or FALSE if no messages were received. */ protected function getLastIncomingMessage(SmsGatewayInterface $sms_gateway) { @@ -132,7 +132,7 @@ protected function getLastIncomingMessage(SmsGatewayInterface $sms_gateway) { /** * Resets incoming messages stored in memory by gateway. * - * @param \Drupal\sms\Entity\SmsGatewayInterface|NULL $sms_gateway + * @param \Drupal\sms\Entity\SmsGatewayInterface|null $sms_gateway * A gateway plugin, or NULL to reset all messages. */ protected function resetIncomingMessages(SmsGatewayInterface $sms_gateway = NULL) { @@ -252,7 +252,7 @@ protected function verifyPhoneNumber(EntityInterface $entity, $phone_number) { /** * Gets the last phone number verification that was created. * - * @return \Drupal\sms\Entity\PhoneNumberVerificationInterface|FALSE + * @return \Drupal\sms\Entity\PhoneNumberVerificationInterface|false * The last verification created, or FALSE if no verifications exist. */ protected function getLastVerification() { @@ -307,7 +307,7 @@ protected function randomSmsMessage($uid = 1) { /** * Generates random phone numbers for tests. * - * @param int|NULL $quantity + * @param int|null $quantity * Quantity of phone numbers, or NULL to generate at least 2. * * @return array