diff --git a/modules/sms_blast/src/SmsBlastForm.php b/modules/sms_blast/src/SmsBlastForm.php
index 0a5fc45..5fc3a08 100644
--- a/modules/sms_blast/src/SmsBlastForm.php
+++ b/modules/sms_blast/src/SmsBlastForm.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms_blast\SmsBlastForm
- */
-
 namespace Drupal\sms_blast;
 
 use Drupal\Core\Form\FormBase;
@@ -14,6 +9,9 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\sms\Message\SmsMessage;
 
+/**
+ * Defines a form for sending mass messages.
+ */
 class SmsBlastForm extends FormBase {
 
   /**
@@ -105,4 +103,5 @@ class SmsBlastForm extends FormBase {
 
     drupal_set_message($this->formatPlural(count($entity_ids), 'Message sent to @count user.', 'Message sent to @count users.'));
   }
-}
\ No newline at end of file
+
+}
diff --git a/modules/sms_blast/src/Tests/SmsBlastWebTest.php b/modules/sms_blast/src/Tests/SmsBlastWebTest.php
index 922bb67..6366c3d 100644
--- a/modules/sms_blast/src/Tests/SmsBlastWebTest.php
+++ b/modules/sms_blast/src/Tests/SmsBlastWebTest.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains tests for the sms_blast module.
- */
-
 namespace Drupal\sms_blast\Tests;
 
 use Drupal\sms\Tests\SmsFrameworkWebTestBase;
@@ -23,6 +18,8 @@ class SmsBlastWebTest extends SmsFrameworkWebTestBase {
   public static $modules = ['sms', 'user', 'sms_blast'];
 
   /**
+   * Phone number settings of user entity type.
+   *
    * @var \Drupal\sms\Entity\PhoneNumberSettingsInterface
    */
   protected $phoneNumberSettings;
@@ -62,7 +59,7 @@ class SmsBlastWebTest extends SmsFrameworkWebTestBase {
   /**
    * Tests sending SMS blast.
    */
-  function testSendBlast() {
+  public function testSendBlast() {
     // Create users with two phone numbers. Only one message should be sent to
     // each user.
     $phone_numbers = ['+123123123', '+456456456'];
diff --git a/modules/sms_devel/src/Form/SmsDevelMessageForm.php b/modules/sms_devel/src/Form/SmsDevelMessageForm.php
index ca8b661..371e515 100644
--- a/modules/sms_devel/src/Form/SmsDevelMessageForm.php
+++ b/modules/sms_devel/src/Form/SmsDevelMessageForm.php
@@ -150,7 +150,7 @@ class SmsDevelMessageForm extends FormBase {
     if (!empty($gateway)) {
       $this->message->setGateway(SmsGateway::load($gateway));
     }
-    else if ($triggering_element['#name'] == 'receive') {
+    elseif ($triggering_element['#name'] == 'receive') {
       $form_state->setError($form['gateway'], $this->t('Gateway must be selected if receiving a message.'));
     }
   }
@@ -163,7 +163,7 @@ class SmsDevelMessageForm extends FormBase {
    * @param \Drupal\Core\Form\FormStateInterface $form_state
    *   The current state of the form.
    */
-  function submitReceive(array &$form, FormStateInterface $form_state) {
+  public function submitReceive(array &$form, FormStateInterface $form_state) {
     $this->message->setDirection(Direction::INCOMING);
 
     if ($form_state->getValue('skip_queue')) {
@@ -188,7 +188,7 @@ class SmsDevelMessageForm extends FormBase {
    * @param \Drupal\Core\Form\FormStateInterface $form_state
    *   The current state of the form.
    */
-  function submitSend(array &$form, FormStateInterface $form_state) {
+  public function submitSend(array &$form, FormStateInterface $form_state) {
     $this->message->setDirection(Direction::OUTGOING);
 
     try {
@@ -214,13 +214,13 @@ class SmsDevelMessageForm extends FormBase {
   /**
    * {@inheritdoc}
    */
-  function submitForm(array &$form, FormStateInterface $form_state) {}
+  public function submitForm(array &$form, FormStateInterface $form_state) {}
 
   /**
    * Output a status message for a result object.
    *
    * @param \Drupal\sms\Message\SmsMessageResultInterface $result
-   *   An SMS result object
+   *   An SMS result object.
    */
   protected function resultMessage(SmsMessageResultInterface $result) {
     if ($status_code = $result->getError()) {
@@ -230,7 +230,7 @@ class SmsDevelMessageForm extends FormBase {
         '@message' => $status_message,
       ]), 'error');
     }
-    else if ($report_count = count($result->getReports())) {
+    elseif ($report_count = count($result->getReports())) {
       drupal_set_message($this->t('Message was processed, @count delivery reports were generated.', [
         '@count' => $report_count,
       ]));
diff --git a/modules/sms_sendtophone/sms_sendtophone.css b/modules/sms_sendtophone/sms_sendtophone.css
index b7a81ec..4e9d71d 100644
--- a/modules/sms_sendtophone/sms_sendtophone.css
+++ b/modules/sms_sendtophone/sms_sendtophone.css
@@ -1,7 +1,7 @@
 span.sms-sendtophone-inline {
-  background: #F9F7BC;
+  background: #f9f7bc;
 }
 
 #sms-sendtophone-send-form .message-preview {
   font-family: monospace;
-}
\ No newline at end of file
+}
diff --git a/modules/sms_sendtophone/src/Form/AdminOverviewForm.php b/modules/sms_sendtophone/src/Form/AdminOverviewForm.php
index f1cccea..aa55b0d 100644
--- a/modules/sms_sendtophone/src/Form/AdminOverviewForm.php
+++ b/modules/sms_sendtophone/src/Form/AdminOverviewForm.php
@@ -1,17 +1,14 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms_sendtophone\Form\AdminOverviewForm.
- */
-
 namespace Drupal\sms_sendtophone\Form;
 
 use Drupal\Core\Form\ConfigFormBase;
 use Drupal\Core\Form\FormStateInterface;
-use Drupal\Core\Render\Element;
 use Drupal\node\Entity\NodeType;
 
+/**
+ * Defines admin overview form.
+ */
 class AdminOverviewForm extends ConfigFormBase {
 
   /**
@@ -21,7 +18,10 @@ class AdminOverviewForm extends ConfigFormBase {
     return 'sms_sendtophone_admin_overview';
   }
 
-  public function buildForm(array $form, \Drupal\Core\Form\FormStateInterface $form_state) {
+  /**
+   * {@inheritdoc}
+   */
+  public function buildForm(array $form, FormStateInterface $form_state) {
     $node_types = NodeType::loadMultiple();
     $types = [];
     foreach ($node_types as $type) {
diff --git a/modules/sms_sendtophone/src/Form/SendToPhoneForm.php b/modules/sms_sendtophone/src/Form/SendToPhoneForm.php
index 940936a..d6bc96a 100644
--- a/modules/sms_sendtophone/src/Form/SendToPhoneForm.php
+++ b/modules/sms_sendtophone/src/Form/SendToPhoneForm.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms_sendtophone\Form\SendToPhoneForm.
- */
-
 namespace Drupal\sms_sendtophone\Form;
 
 use Drupal\Core\Form\FormBase;
@@ -28,7 +23,7 @@ class SendToPhoneForm extends FormBase {
    *
    * @var array
    */
-  protected $phone_numbers = [];
+  protected $phoneNumbers = [];
 
   /**
    * The SMS Provider.
@@ -67,21 +62,22 @@ class SendToPhoneForm extends FormBase {
 
     // @todo This block should be a route access checker.
     try {
-      $this->phone_numbers = $phone_number_provider->getPhoneNumbers($user);
+      $this->phoneNumbers = $phone_number_provider->getPhoneNumbers($user);
+    }
+    catch (PhoneNumberSettingsException $e) {
     }
-    catch (PhoneNumberSettingsException $e) {}
 
-    if ($user->hasPermission('send to any number') || count($this->phone_numbers)) {
+    if ($user->hasPermission('send to any number') || count($this->phoneNumbers)) {
       $form = $this->getForm($form, $form_state, $type, $extra);
     }
     else {
-      if (!count($this->phone_numbers)) {
+      if (!count($this->phoneNumbers)) {
         // User has no phone number, or unconfirmed.
         $form['message'] = [
           '#type' => 'markup',
           '#markup' => $this->t('You need to @setup and confirm your mobile phone to send messages.', [
             '@setup' => $user->toLink('set up', 'edit-form')->toString(),
-          ])
+          ]),
         ];
       }
       else {
@@ -124,6 +120,7 @@ class SendToPhoneForm extends FormBase {
           '#title' => t('Message preview'),
         );
         break;
+
       case 'node':
         if (is_numeric($extra)) {
           $node = Node::load($extra);
@@ -149,8 +146,8 @@ class SendToPhoneForm extends FormBase {
       '#title' => $this->t('Phone number'),
     ];
 
-    if (count($this->phone_numbers)) {
-      $form['number']['#default_value'] = reset($this->phone_numbers);
+    if (count($this->phoneNumbers)) {
+      $form['number']['#default_value'] = reset($this->phoneNumbers);
     }
 
     $form['submit'] = array(
diff --git a/modules/sms_sendtophone/src/Plugin/Field/FieldFormatter/SmsLinkFormatter.php b/modules/sms_sendtophone/src/Plugin/Field/FieldFormatter/SmsLinkFormatter.php
index d3b17d4..94091b1 100644
--- a/modules/sms_sendtophone/src/Plugin/Field/FieldFormatter/SmsLinkFormatter.php
+++ b/modules/sms_sendtophone/src/Plugin/Field/FieldFormatter/SmsLinkFormatter.php
@@ -1,18 +1,14 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms_sendtophone\Plugin\Field\FieldFormatter\SmsLinkFormatter.
- */
-
 namespace Drupal\sms_sendtophone\Plugin\Field\FieldFormatter;
 
-use Drupal\Component\Utility\SafeMarkup;
 use Drupal\Core\Field\FieldItemListInterface;
 use Drupal\Core\Field\FormatterBase;
 use Drupal\Core\Url;
 
 /**
+ * Defines a SMS field formatter.
+ *
  * @FieldFormatter(
  *   id = "sms_link",
  *   label = @Translation("SMS Link"),
@@ -41,10 +37,10 @@ class SmsLinkFormatter extends FormatterBase {
           '#prefix' => ' (',
           '#suffix' => ')',
           '#title' => $this->t('Send to phone'),
-          '#url' =>  Url::fromRoute('sms_sendtophone.page', ['type' => 'field'], ['query' => ['text' => $text, 'destination' => \Drupal::destination()->get()]]),
+          '#url' => Url::fromRoute('sms_sendtophone.page', ['type' => 'field'], ['query' => ['text' => $text, 'destination' => \Drupal::destination()->get()]]),
           '#attributes' => array(
             'title' => $this->t('Send this text via SMS.'),
-            'class' => 'sms-sendtophone'
+            'class' => 'sms-sendtophone',
           ),
         ),
       );
diff --git a/modules/sms_sendtophone/src/Plugin/Field/FieldWidget/SmsSendWidget.php b/modules/sms_sendtophone/src/Plugin/Field/FieldWidget/SmsSendWidget.php
index 16602ea..460817c 100644
--- a/modules/sms_sendtophone/src/Plugin/Field/FieldWidget/SmsSendWidget.php
+++ b/modules/sms_sendtophone/src/Plugin/Field/FieldWidget/SmsSendWidget.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms_sendtophone\Plugin\Field\FieldWidget\SmsSendWidget.
- */
-
 namespace Drupal\sms_sendtophone\Plugin\Field\FieldWidget;
 
 use Drupal\Core\Field\FieldItemListInterface;
@@ -48,10 +43,16 @@ class SmsSendWidget extends WidgetBase {
     return $element;
   }
 
+  /**
+   * {@inheritdoc}
+   */
   public static function defaultSettings() {
     return ['rows' => 1];
   }
 
+  /**
+   * {@inheritdoc}
+   */
   public function settingsForm(array $form, FormStateInterface $form_state) {
     $form = parent::settingsForm($form, $form_state);
     $form['rows'] = array(
diff --git a/modules/sms_sendtophone/src/Plugin/Filter/FilterInlineSms.php b/modules/sms_sendtophone/src/Plugin/Filter/FilterInlineSms.php
index 0bcb775..438d302 100644
--- a/modules/sms_sendtophone/src/Plugin/Filter/FilterInlineSms.php
+++ b/modules/sms_sendtophone/src/Plugin/Filter/FilterInlineSms.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms_sendtophone\Plugin\Filter\FilterInlineSms.
- */
-
 namespace Drupal\sms_sendtophone\Plugin\Filter;
 
 use Drupal\Core\Form\FormStateInterface;
@@ -55,6 +50,9 @@ class FilterInlineSms extends FilterBase {
     return $this->t('Text between [sms][/sms] tags will be highlighted and appended with a "send to phone" button.');
   }
 
+  /**
+   * {@inheritdoc}
+   */
   public function settingsForm(array $form, FormStateInterface $form_state) {
     $elements['display'] = array(
       '#type' => 'radios',
@@ -124,11 +122,10 @@ class FilterInlineSms extends FilterBase {
     $options = array(
       'attributes' => array(
         'title' => t('Send the highlighted text via SMS.'),
-        'class' => 'sms-sendtophone'
+        'class' => 'sms-sendtophone',
       ),
       'query' => array(
         'text' => urlencode($text),
-        drupal_get_destination()
       ),
       'html' => TRUE,
     );
@@ -138,13 +135,14 @@ class FilterInlineSms extends FilterBase {
       '#title' => $markup,
       '#url' => Url::fromRoute('sms_sendtophone.page', ['type' => 'inline'], $options),
     ];
-    return  $this->renderer()->renderPlain($link);
+    return $this->renderer()->renderPlain($link);
   }
 
   /**
    * Encapsulates the renderer service for unit testing purposes.
    *
    * @return \Drupal\Core\Render\RendererInterface
+   *   Returns the renderer service.
    */
   protected function renderer() {
     return \Drupal::service('renderer');
diff --git a/modules/sms_sendtophone/src/Tests/SmsSendToPhoneWebTest.php b/modules/sms_sendtophone/src/Tests/SmsSendToPhoneWebTest.php
index f8e9744..2346ded 100644
--- a/modules/sms_sendtophone/src/Tests/SmsSendToPhoneWebTest.php
+++ b/modules/sms_sendtophone/src/Tests/SmsSendToPhoneWebTest.php
@@ -1,15 +1,9 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms_sendtophone\Tests\SmsSendToPhoneWebTest
- */
-
 namespace Drupal\sms_sendtophone\Tests;
 
 use Drupal\Component\Utility\Unicode;
 use Drupal\Core\Entity\Entity\EntityViewDisplay;
-use Drupal\Core\Url;
 use Drupal\field\Entity\FieldConfig;
 use Drupal\field\Entity\FieldStorageConfig;
 use Drupal\node\Entity\NodeType;
@@ -18,19 +12,30 @@ use Drupal\sms\Entity\PhoneNumberSettings;
 
 /**
  * Integration tests for the SMS SendToPhone Module.
- * 
+ *
  * @group SMS Framework
  */
 class SmsSendToPhoneWebTest extends SmsFrameworkWebTestBase {
 
-  public static $modules = ['sms', 'sms_sendtophone', 'sms_test_gateway', 'node', 'field', 'field_ui'];
+  public static $modules = [
+    'sms',
+    'sms_sendtophone',
+    'sms_test_gateway',
+    'node',
+    'field',
+    'field_ui',
+  ];
 
   /**
+   * The phone field for testing.
+   *
    * @var \Drupal\field\FieldStorageConfigInterface
    */
   protected $phoneField;
 
   /**
+   * Phone number settings for user entity type.
+   *
    * @var \Drupal\sms\Entity\PhoneNumberSettingsInterface
    */
   protected $phoneNumberSettings;
@@ -50,7 +55,7 @@ class SmsSendToPhoneWebTest extends SmsFrameworkWebTestBase {
       ));
       $this->drupalCreateContentType(array(
         'type' => 'article',
-        'name' => 'Article'
+        'name' => 'Article',
       ));
     }
 
@@ -143,7 +148,7 @@ class SmsSendToPhoneWebTest extends SmsFrameworkWebTestBase {
     $this->drupalLogin($user);
 
     $edit = array(
-      'filters[filter_inline_sms][status]' => true,
+      'filters[filter_inline_sms][status]' => TRUE,
       'filters[filter_inline_sms][settings][display]' => 'text',
     );
     $this->drupalPostForm('admin/config/content/formats/manage/plain_text', $edit, t('Save configuration'));
@@ -155,10 +160,11 @@ class SmsSendToPhoneWebTest extends SmsFrameworkWebTestBase {
       'body' => array(array(
         'value' => "[sms]{$node_body}[/sms]",
         'format' => 'plain_text',
-      )),
+      ),
+      ),
     ));
 
-    // Unconfirmed users
+    // Unconfirmed users.
     $this->drupalGet('sms/sendtophone/inline');
     $this->assertText('You need to set up and confirm your mobile phone to send messages');
 
@@ -197,11 +203,13 @@ class SmsSendToPhoneWebTest extends SmsFrameworkWebTestBase {
       'entity_type' => 'node',
       'bundle' => $bundles[0],
       // Need to verify this.
-//      'display' => array(
-//        'teaser' => array(
-//          'type' => 'sms_link',
-//        )
-//      ),
+      /*
+          'display' => array(
+            'teaser' => array(
+              'type' => 'sms_link',
+            )
+          ),
+      */
     );
     $field_storage = FieldStorageConfig::create(array(
       'field_name' => $field_name,
@@ -227,11 +235,13 @@ class SmsSendToPhoneWebTest extends SmsFrameworkWebTestBase {
       'type' => $bundles[0],
       $field_name => [[
         'value' => $random_text,
-      ]],
+      ],
+      ],
     ]);
-    // This is a quick-fix. Need to find out how to add display filters from code.
+
+    // This is a quick-fix. Need to find out how to add display filters in code.
     $this->drupalLogin($this->rootUser);
-    $this->drupalPostForm('admin/structure/types/manage/article/display', ['fields['. $field_name . '][type]' => 'sms_link'], 'Save');
+    $this->drupalPostForm('admin/structure/types/manage/article/display', ['fields[' . $field_name . '][type]' => 'sms_link'], 'Save');
 
     // Confirm phone number.
     $user = $this->drupalCreateUser();
diff --git a/modules/sms_user/src/AccountRegistration.php b/modules/sms_user/src/AccountRegistration.php
index 7bc78ba..66a7336 100644
--- a/modules/sms_user/src/AccountRegistration.php
+++ b/modules/sms_user/src/AccountRegistration.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms_user\AccountRegistration.
- */
-
 namespace Drupal\sms_user;
 
 use Drupal\Core\Config\ConfigFactoryInterface;
@@ -18,6 +13,7 @@ use Drupal\Component\Utility\Random;
 use Drupal\sms\Entity\SmsMessage;
 use Drupal\Core\Entity\EntityConstraintViolationListInterface;
 use Symfony\Component\Validator\ConstraintViolationListInterface;
+use Drupal\user\UserInterface;
 
 /**
  * Defines the account registration service.
@@ -79,7 +75,7 @@ class AccountRegistration implements AccountRegistrationInterface {
   }
 
   /**
-   * @inheritdoc
+   * {@inheritdoc}
    */
   public function createAccount(SmsMessageInterface $sms_message) {
     $this->userPhoneNumberSettings = $this->phoneNumberProvider
@@ -106,8 +102,7 @@ class AccountRegistration implements AccountRegistrationInterface {
   }
 
   /**
-   * Process an incoming message and create a user if the phone number is
-   * unrecognised.
+   * Process incoming message and create a user if the phone number is unknown.
    *
    * @param \Drupal\sms\Message\SmsMessageInterface $sms_message
    *   An incoming SMS message.
@@ -154,8 +149,7 @@ class AccountRegistration implements AccountRegistrationInterface {
   }
 
   /**
-   * Process an incoming message and create a user if the message matches
-   * the incoming message format.
+   * Creates a user if an incoming message contents matches a pattern.
    *
    * @param \Drupal\sms\Message\SmsMessageInterface $sms_message
    *   An incoming SMS message.
@@ -235,15 +229,15 @@ class AccountRegistration implements AccountRegistrationInterface {
   /**
    * Send a reply message to the sender of a message.
    *
-   * @param $sender_number
+   * @param string $sender_number
    *   Phone number of sender of incoming message. And if a user was created,
    *   this number was used.
-   * @param $user
+   * @param \Drupal\user\UserInterface $user
    *   A user account. The account may not be saved.
-   * @param $message
+   * @param string $message
    *   Message to send as a reply.
    */
-  protected function sendReply($sender_number, $user, $message) {
+  protected function sendReply($sender_number, UserInterface $user, $message) {
     $sms_message = SmsMessage::create();
     $sms_message
       ->addRecipient($sender_number)
@@ -293,9 +287,9 @@ class AccountRegistration implements AccountRegistrationInterface {
     $regex = '/(' . implode('|', $regex_placeholders) . '+)/';
     $words = preg_split($regex, $form_string, NULL, PREG_SPLIT_DELIM_CAPTURE);
 
-    // Track if a placeholder was used, so subsequent usages create a named
-    // back reference. This allows you to use placeholders more than once as a form of
-    // confirmation. e.g: 'U [username] P [password] [password]'
+    // Track if a placeholder was used, so subsequent usages create a named back
+    // reference. This allows you to use placeholders more than once as a form
+    // of confirmation. e.g: 'U [username] P [password] [password]'.
     $placeholder_usage = [];
 
     $compiled = '';
@@ -337,7 +331,7 @@ class AccountRegistration implements AccountRegistrationInterface {
   protected function buildError(ConstraintViolationListInterface $violations) {
     $error = '';
     foreach ($violations as $violation) {
-      $error .= (string)$violation->getMessage() . " ";
+      $error .= (string) $violation->getMessage() . " ";
     }
     return strip_tags($error);
   }
@@ -352,17 +346,16 @@ class AccountRegistration implements AccountRegistrationInterface {
     $random = new Random();
     do {
       $username = $random->name(8, TRUE);
-    }
-    while (user_validate_name($username) || user_load_by_name($username));
+    } while (user_validate_name($username) || user_load_by_name($username));
     return $username;
   }
 
   /**
    * Filter out acceptable validation errors.
-
+   *
    * @param \Drupal\Core\Entity\EntityConstraintViolationListInterface $violations
    *   A violation list.
-   * @param string|NULL
+   * @param string|NULL $incoming_form
    *   Incoming form, if applicable.
    *
    * @return \Drupal\Core\Entity\EntityConstraintViolationListInterface
@@ -385,11 +378,12 @@ class AccountRegistration implements AccountRegistrationInterface {
 
   /**
    * Get the account_registration configuration.
-
+   *
    * @param string $name
    *   The configuration name.
    *
-   * @return array|mixed|null
+   * @return array|NULL
+   *   The values for the requested configuration.
    */
   protected function settings($name) {
     return $this->configFactory
diff --git a/modules/sms_user/src/AccountRegistrationInterface.php b/modules/sms_user/src/AccountRegistrationInterface.php
index 448d0cc..d9ae753 100644
--- a/modules/sms_user/src/AccountRegistrationInterface.php
+++ b/modules/sms_user/src/AccountRegistrationInterface.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms_user\AccountRegistrationInterface.
- */
-
 namespace Drupal\sms_user;
 
 use Drupal\sms\Message\SmsMessageInterface;
diff --git a/modules/sms_user/src/ActiveHours.php b/modules/sms_user/src/ActiveHours.php
index a28eb89..72593af 100644
--- a/modules/sms_user/src/ActiveHours.php
+++ b/modules/sms_user/src/ActiveHours.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms_user\ActiveHours.
- */
-
 namespace Drupal\sms_user;
 
 use Drupal\Core\Config\ConfigFactoryInterface;
@@ -25,10 +20,11 @@ class ActiveHours implements ActiveHoursInterface {
   protected $configFactory;
 
   /**
-   * Whether active hours is enabled in configuration, or null if configuration
-   * has not been built yet.
+   * Whether active hours is enabled in configuration.
    *
    * @var boolean|NULL
+   *   Whether active hours is enabled in configuration or NULL if configuration
+   *   has not been built yet.
    */
   protected $status = NULL;
 
@@ -52,7 +48,7 @@ class ActiveHours implements ActiveHoursInterface {
   }
 
   /**
-   * @inheritdoc
+   * {@inheritdoc}
    */
   public function inHours(UserInterface $user, $now = 'now') {
     $this->build();
@@ -74,7 +70,7 @@ class ActiveHours implements ActiveHoursInterface {
   }
 
   /**
-   * @inheritdoc
+   * {@inheritdoc}
    */
   public function findNextTime(UserInterface $user, $now = 'now') {
     $timezone = $user->getTimeZone();
@@ -90,7 +86,7 @@ class ActiveHours implements ActiveHoursInterface {
   }
 
   /**
-   * @inheritdoc
+   * {@inheritdoc}
    */
   public function delaySmsMessage(SmsMessageInterface &$sms_message) {
     $recipient = $sms_message->getRecipientEntity();
@@ -102,7 +98,7 @@ class ActiveHours implements ActiveHoursInterface {
   }
 
   /**
-   * @inheritdoc
+   * {@inheritdoc}
    */
   public function getRanges($timezone) {
     $this->build();
@@ -118,7 +114,7 @@ class ActiveHours implements ActiveHoursInterface {
     // Sort so nearest date is closest.
     // Can't do this in build() since computed relative dates can be different
     // per timezone.
-    usort($dates, function($a, $b) {
+    usort($dates, function ($a, $b) {
       if ($a->getStartDate() == $b->getStartDate()) {
         return 0;
       }
diff --git a/modules/sms_user/src/ActiveHoursDates.php b/modules/sms_user/src/ActiveHoursDates.php
index 9c3874e..054ca66 100644
--- a/modules/sms_user/src/ActiveHoursDates.php
+++ b/modules/sms_user/src/ActiveHoursDates.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms_user\ActiveHoursDates.
- */
-
 namespace Drupal\sms_user;
 
 use Drupal\Core\Datetime\DrupalDateTime;
@@ -38,7 +33,7 @@ class ActiveHoursDates {
    * @param \Drupal\Core\Datetime\DrupalDateTime $end
    *   The end date.
    */
-  function __construct(DrupalDateTime $start, DrupalDateTime $end) {
+  public function __construct(DrupalDateTime $start, DrupalDateTime $end) {
     $this->start = $start;
     $this->end = $end;
   }
@@ -49,7 +44,7 @@ class ActiveHoursDates {
    * @return \Drupal\Core\Datetime\DrupalDateTime
    *   The start date.
    */
-  function getStartDate() {
+  public function getStartDate() {
     return $this->start;
   }
 
@@ -59,7 +54,7 @@ class ActiveHoursDates {
    * @return \Drupal\Core\Datetime\DrupalDateTime
    *   The end date.
    */
-  function getEndDate() {
+  public function getEndDate() {
     return $this->end;
   }
 
diff --git a/modules/sms_user/src/ActiveHoursInterface.php b/modules/sms_user/src/ActiveHoursInterface.php
index 30052bb..47ffc64 100644
--- a/modules/sms_user/src/ActiveHoursInterface.php
+++ b/modules/sms_user/src/ActiveHoursInterface.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms_user\ActiveHoursInterface.
- */
-
 namespace Drupal\sms_user;
 
 use Drupal\user\UserInterface;
diff --git a/modules/sms_user/src/Form/AdminSettingsForm.php b/modules/sms_user/src/Form/AdminSettingsForm.php
index b5428b3..a659fa1 100644
--- a/modules/sms_user/src/Form/AdminSettingsForm.php
+++ b/modules/sms_user/src/Form/AdminSettingsForm.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains AdminSettingsForm class
- */
-
 namespace Drupal\sms_user\Form;
 
 use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -55,10 +50,10 @@ class AdminSettingsForm extends ConfigFormBase {
   /**
    * {@inheritdoc}
    */
-  public function getFormID() {
+  public function getFormId() {
     return 'sms_user_admin_settings';
   }
-  
+
   /**
    * {@inheritdoc}
    */
@@ -97,7 +92,7 @@ class AdminSettingsForm extends ConfigFormBase {
         'start' => $this->t('Start time'),
         'end' => $this->t('End time'),
       ],
-      '#parents' => ['active_hours', 'days']
+      '#parents' => ['active_hours', 'days'],
     ];
 
     // Convert configuration into days.
@@ -122,14 +117,14 @@ class AdminSettingsForm extends ConfigFormBase {
     for ($i = 0; $i < 24; $i++) {
       $hours[$i] = DrupalDateTime::datePad($i) . ':00';
     }
-    $hours[0] = $this->t(' - Start of day - ');
+    $hours[0] = $this->t('- Start of day -');
     $end_hours = $hours;
     unset($end_hours[0]);
-    $end_hours[24] = $this->t(' - End of day - ');
+    $end_hours[24] = $this->t('- End of day -');
 
     $timestamp = strtotime('next Sunday');
     for ($i = 0; $i < 7; $i++) {
-      $row = ['#tree' => TRUE,];
+      $row = ['#tree' => TRUE];
       $day = strftime('%A', $timestamp);
       $day_lower = strtolower($day);
 
@@ -143,7 +138,7 @@ class AdminSettingsForm extends ConfigFormBase {
         '#title_display' => 'invisible',
         '#default_value' => isset($day_defaults[$day_lower]['start']) ? $day_defaults[$day_lower]['start'] : -1,
         '#options' => $hours,
-        '#empty_option' => $this->t(' - Suspend messages for this day - '),
+        '#empty_option' => $this->t('- Suspend messages for this day -'),
         '#empty_value' => -1,
       ];
       $row['end'] = [
@@ -175,7 +170,7 @@ class AdminSettingsForm extends ConfigFormBase {
     if ($config->get('account_registration.unrecognized_sender.status')) {
       $radio_value = 'all';
     }
-    else if ($config->get('account_registration.incoming_pattern.status')) {
+    elseif ($config->get('account_registration.incoming_pattern.status')) {
       $radio_value = 'incoming_pattern';
     }
     else {
@@ -344,7 +339,7 @@ class AdminSettingsForm extends ConfigFormBase {
           $form_state->unsetValue(['active_hours', 'days', $day]);
           continue 2;
         }
-        else if ($hour == 24) {
+        elseif ($hour == 24) {
           $str = $day . ' +1 day';
         }
         else {
@@ -384,7 +379,7 @@ class AdminSettingsForm extends ConfigFormBase {
       // Empty incoming message.
       $form_state->setError($form['account_registration']['incoming_pattern_options']['incoming_message'], $this->t('Incoming message must be filled if using pre-incoming_pattern option.'));
     }
-    else if (!empty($incoming_message)) {
+    elseif (!empty($incoming_message)) {
       $contains_email = strpos($incoming_message, '[email]') !== FALSE;
       $contains_password = strpos($incoming_message, '[password]') !== FALSE;
       $activation_email = $account_registration['incoming_pattern_options']['send_activation_email'];
@@ -451,9 +446,9 @@ class AdminSettingsForm extends ConfigFormBase {
       ->set('account_registration.incoming_pattern.reply.message_failure', $account_registration['incoming_pattern_options']['reply']['message_failure'])
       ->set('account_registration.incoming_pattern.send_activation_email', $account_registration['incoming_pattern_options']['send_activation_email'])
       // Active Hours.
-      ->set('active_hours.status', (boolean)$form_state->getValue(['active_hours', 'status']))
-      // Days make sense for this form, however storage uses generic 'range' term.
-      // Remove keys so it is a raw sequence.
+      ->set('active_hours.status', (boolean) $form_state->getValue(['active_hours', 'status']))
+      // Days make sense for this form, however storage uses generic 'range'
+      // term. Remove keys so it is a raw sequence.
       ->set('active_hours.ranges', array_values($form_state->getValue(['active_hours', 'days'])))
       ->save();
 
diff --git a/modules/sms_user/src/Tests/SmsFrameworkUserMenuLinksTest.php b/modules/sms_user/src/Tests/SmsFrameworkUserMenuLinksTest.php
index a596784..6989cf4 100644
--- a/modules/sms_user/src/Tests/SmsFrameworkUserMenuLinksTest.php
+++ b/modules/sms_user/src/Tests/SmsFrameworkUserMenuLinksTest.php
@@ -6,7 +6,7 @@ use Drupal\sms\Tests\SmsFrameworkWebTestBase;
 use Drupal\Core\Url;
 
 /**
- * Tests dynamically created SMS User menu links
+ * Tests dynamically created SMS User menu links.
  *
  * @group SMS User
  */
diff --git a/modules/sms_user/src/Tests/SmsFrameworkUserSettingsTest.php b/modules/sms_user/src/Tests/SmsFrameworkUserSettingsTest.php
index eb54797..448c853 100644
--- a/modules/sms_user/src/Tests/SmsFrameworkUserSettingsTest.php
+++ b/modules/sms_user/src/Tests/SmsFrameworkUserSettingsTest.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms_user\Tests\SmsFrameworkUserSettingsTest.
- */
-
 namespace Drupal\sms_user\Tests;
 
 use Drupal\sms\Tests\SmsFrameworkWebTestBase;
@@ -162,11 +157,11 @@ class SmsFrameworkUserSettingsTest extends SmsFrameworkWebTestBase {
 
     $settings = $this->config('sms_user.settings')->get('account_registration');
 
-    // Status
+    // Status.
     $this->assertTrue($settings['unrecognized_sender']['status']);
     $this->assertFalse($settings['incoming_pattern']['status']);
 
-    // Settings
+    // Settings.
     $this->assertTrue($settings['unrecognized_sender']['reply']['status']);
     $this->assertEqual($reply_message, $settings['unrecognized_sender']['reply']['message']);
   }
@@ -193,11 +188,11 @@ class SmsFrameworkUserSettingsTest extends SmsFrameworkWebTestBase {
 
     $settings = $this->config('sms_user.settings')->get('account_registration');
 
-    // Status
+    // Status.
     $this->assertFalse($settings['unrecognized_sender']['status']);
     $this->assertTrue($settings['incoming_pattern']['status']);
 
-    // Settings
+    // Settings.
     $this->assertEqual($incoming_message, $settings['incoming_pattern']['incoming_messages'][0]);
     $this->assertTrue($settings['incoming_pattern']['send_activation_email']);
     $this->assertTrue($settings['incoming_pattern']['reply']['status']);
@@ -276,8 +271,9 @@ class SmsFrameworkUserSettingsTest extends SmsFrameworkWebTestBase {
   }
 
   /**
-   * Test if notice is displayed and some form elements and disabled if no
-   * phone number settings exist for user entity type.
+   * Test form state when no phone number settings exist for user entity type.
+   *
+   * Tests notice is displayed and some form elements are disabled.
    */
   public function testFormNoUserPhoneNumberSettings() {
     $this->drupalGet(Url::fromRoute('sms_user.options'));
@@ -293,8 +289,9 @@ class SmsFrameworkUserSettingsTest extends SmsFrameworkWebTestBase {
   }
 
   /**
-   * Test if notice is not displayed if phone number settings exist for user
-   * entity type.
+   * Test form state when phone number settings exist for user entity type.
+   *
+   * Tests notice is not displayed and form elements are not disabled.
    */
   public function testFormUserPhoneNumberSettings() {
     $this->createPhoneNumberSettings('user', 'user');
diff --git a/modules/sms_user/tests/src/Kernel/SmsFrameworkUserAccountRegistrationServiceTest.php b/modules/sms_user/tests/src/Kernel/SmsFrameworkUserAccountRegistrationServiceTest.php
index f9aa4bb..6845588 100644
--- a/modules/sms_user/tests/src/Kernel/SmsFrameworkUserAccountRegistrationServiceTest.php
+++ b/modules/sms_user/tests/src/Kernel/SmsFrameworkUserAccountRegistrationServiceTest.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\Tests\sms_user\Kernel\SmsFrameworkUserAccountRegistrationServiceTest.
- */
-
 namespace Drupal\Tests\sms_user\Kernel;
 
 use Drupal\Tests\sms\Kernel\SmsFrameworkKernelBase;
@@ -34,19 +29,28 @@ class SmsFrameworkUserAccountRegistrationServiceTest extends SmsFrameworkKernelB
    *
    * @var array
    */
-  public static $modules = ['system', 'sms', 'sms_user', 'sms_test_gateway', 'user', 'telephone', 'dynamic_entity_reference', 'field'];
+  public static $modules = [
+    'system',
+    'sms',
+    'sms_user',
+    'sms_test_gateway',
+    'user',
+    'telephone',
+    'dynamic_entity_reference',
+    'field',
+  ];
 
   /**
-   * @var \Drupal\sms_user\AccountRegistrationInterface
-   *
    * The account registration service.
+   *
+   * @var \Drupal\sms_user\AccountRegistrationInterface
    */
   protected $accountRegistration;
 
   /**
-   * @var \Drupal\sms\Provider\SmsProviderInterface
-   *
    * The default SMS provider.
+   *
+   * @var \Drupal\sms\Provider\SmsProviderInterface
    */
   protected $smsProvider;
 
@@ -58,11 +62,15 @@ class SmsFrameworkUserAccountRegistrationServiceTest extends SmsFrameworkKernelB
   protected $gateway;
 
   /**
+   * A phone field ofr testing.
+   *
    * @var \Drupal\field\FieldStorageConfigInterface
    */
   protected $phoneField;
 
   /**
+   * Phone number settings for user entity type.
+   *
    * @var \Drupal\sms\Entity\PhoneNumberSettingsInterface
    */
   protected $phoneNumberSettings;
@@ -278,7 +286,7 @@ class SmsFrameworkUserAccountRegistrationServiceTest extends SmsFrameworkKernelB
   }
 
   /**
-   * Test if a duplicated placeholder is not confirmed
+   * Test if a duplicated placeholder is not confirmed.
    */
   public function testIncomingPatternMultiplePlaceholderFailure() {
     $this->config('sms_user.settings')
@@ -316,7 +324,7 @@ class SmsFrameworkUserAccountRegistrationServiceTest extends SmsFrameworkKernelB
   }
 
   /**
-   * Test if a user is created despite no placeholders
+   * Test if a user is created despite no placeholders.
    */
   public function testIncomingPatternNoPlaceholders() {
     $incoming_message = $this->randomString();
@@ -525,7 +533,7 @@ class SmsFrameworkUserAccountRegistrationServiceTest extends SmsFrameworkKernelB
   /**
    * Count number of registered users.
    *
-   * @return integer
+   * @return int
    *   Number of users in database.
    */
   protected function countUsers() {
@@ -551,7 +559,7 @@ class SmsFrameworkUserAccountRegistrationServiceTest extends SmsFrameworkKernelB
    * @param string $message
    *   The message to check.
    *
-   * @return boolean
+   * @return bool
    *   Whether message was found in any memory messages.
    */
   public function inTestMessages(SmsGatewayInterface $sms_gateway, $message) {
diff --git a/modules/sms_user/tests/src/Kernel/SmsFrameworkUserActiveHoursServiceTest.php b/modules/sms_user/tests/src/Kernel/SmsFrameworkUserActiveHoursServiceTest.php
index e8ed276..9e46b34 100644
--- a/modules/sms_user/tests/src/Kernel/SmsFrameworkUserActiveHoursServiceTest.php
+++ b/modules/sms_user/tests/src/Kernel/SmsFrameworkUserActiveHoursServiceTest.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\Tests\sms_user\Kernel\SmsFrameworkUserActiveHoursServiceTest.
- */
-
 namespace Drupal\Tests\sms_user\Kernel;
 
 use Drupal\Core\Datetime\DrupalDateTime;
@@ -28,19 +23,25 @@ class SmsFrameworkUserActiveHoursServiceTest extends SmsFrameworkKernelBase {
    *
    * @var array
    */
-  public static $modules = ['sms', 'sms_user', 'user', 'telephone', 'dynamic_entity_reference'];
+  public static $modules = [
+    'sms',
+    'sms_user',
+    'user',
+    'telephone',
+    'dynamic_entity_reference',
+  ];
 
   /**
-   * @var \Drupal\sms_user\ActiveHoursInterface
-   *
    * The active hours service.
+   *
+   * @var \Drupal\sms_user\ActiveHoursInterface
    */
   protected $activeHoursService;
 
   /**
-   * @var \Drupal\sms\Provider\SmsProviderInterface
+   * The SMS provider.
    *
-   * The default SMS provider.
+   * @var \Drupal\sms\Provider\SmsProviderInterface
    */
   protected $smsProvider;
 
diff --git a/modules/sms_user/tests/src/Kernel/SmsFrameworkUserTest.php b/modules/sms_user/tests/src/Kernel/SmsFrameworkUserTest.php
index d26221b..3238e02 100644
--- a/modules/sms_user/tests/src/Kernel/SmsFrameworkUserTest.php
+++ b/modules/sms_user/tests/src/Kernel/SmsFrameworkUserTest.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\Tests\sms_user\Kernel\SmsFrameworkUserTest.
- */
-
 namespace Drupal\Tests\sms_user\Kernel;
 
 use Drupal\Tests\sms\Kernel\SmsFrameworkKernelBase;
@@ -24,12 +19,21 @@ class SmsFrameworkUserTest extends SmsFrameworkKernelBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'sms', 'sms_user', 'sms_test_gateway', 'user', 'telephone', 'dynamic_entity_reference', 'field'];
+  public static $modules = [
+    'system',
+    'sms',
+    'sms_user',
+    'sms_test_gateway',
+    'user',
+    'telephone',
+    'dynamic_entity_reference',
+    'field',
+  ];
 
   /**
-   * @var \Drupal\sms\Provider\SmsProviderInterface
+   * The SMS provider.
    *
-   * The default SMS provider.
+   * @var \Drupal\sms\Provider\SmsProviderInterface
    */
   protected $smsProvider;
 
@@ -56,6 +60,8 @@ class SmsFrameworkUserTest extends SmsFrameworkKernelBase {
   }
 
   /**
+   * Ensure account registration service does not crash if missing user config.
+   *
    * Ensure sms_user.account_registration service does not crash and burn if
    * there are no phone number settings for user.user.
    */
diff --git a/sms.api.php b/sms.api.php
index 384919c..e503af2 100644
--- a/sms.api.php
+++ b/sms.api.php
@@ -42,6 +42,8 @@ function hook_sms_gateway_info_alter(&$gateways) {
 class MySmsEventSubscriber implements \Symfony\Component\EventDispatcher\EventSubscriberInterface {
 
   /**
+   * An example event subscriber.
+   *
    * @see \Drupal\sms\Event\SmsEvents::MESSAGE_PRE_PROCESS
    */
   public function mySmsMessagePreprocess(\Drupal\sms\Event\SmsMessageEvent $event) {
@@ -54,6 +56,8 @@ class MySmsEventSubscriber implements \Symfony\Component\EventDispatcher\EventSu
   }
 
   /**
+   * An example event subscriber.
+   *
    * @see \Drupal\sms\Event\SmsEvents::MESSAGE_POST_PROCESS
    */
   public function mySmsMessagePostProcess(\Drupal\sms\Event\SmsMessageEvent $event) {
@@ -66,6 +70,8 @@ class MySmsEventSubscriber implements \Symfony\Component\EventDispatcher\EventSu
   }
 
   /**
+   * An example event subscriber.
+   *
    * @see \Drupal\sms\Event\SmsEvents::MESSAGE_GATEWAY
    */
   public function mySmsMessageGateway(\Drupal\sms\Event\RecipientGatewayEvent $event) {
@@ -79,6 +85,8 @@ class MySmsEventSubscriber implements \Symfony\Component\EventDispatcher\EventSu
   }
 
   /**
+   * An example event subscriber.
+   *
    * @see \Drupal\sms\Event\SmsEvents::DELIVERY_REPORT_POST_PROCESS
    */
   public function myDeliveryReportPostProcessor(\Drupal\sms\Event\SmsDeliveryReportEvent $event) {
diff --git a/sms.tokens.inc b/sms.tokens.inc
index 585b62c..55d4dfe 100644
--- a/sms.tokens.inc
+++ b/sms.tokens.inc
@@ -1,7 +1,5 @@
 <?php
 
-// $Id$
-
 /**
  * @file
  * Token callbacks for the sms module.
@@ -71,6 +69,7 @@ function sms_tokens($type, $tokens, array $data, array $options, BubbleableMetad
             $recipients = $sms_message->getRecipients();
             $replacements[$original] = reset($recipients) ?: '';
             break;
+
           case 'message':
             $replacements[$original] = $sms_message->getMessage();
             break;
diff --git a/src/Access/SupportsPushedReportsAccessCheck.php b/src/Access/SupportsPushedReportsAccessCheck.php
index 1358b40..4e8a858 100644
--- a/src/Access/SupportsPushedReportsAccessCheck.php
+++ b/src/Access/SupportsPushedReportsAccessCheck.php
@@ -4,7 +4,6 @@ namespace Drupal\sms\Access;
 
 use Symfony\Component\Routing\Route;
 use Drupal\Core\Access\AccessResult;
-use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Core\Routing\Access\AccessInterface;
 use Drupal\Core\Routing\RouteMatchInterface;
 use Drupal\Core\Session\AccountInterface;
@@ -16,7 +15,7 @@ use Drupal\sms\Entity\SmsGatewayInterface;
 class SupportsPushedReportsAccessCheck implements AccessInterface {
 
   /**
-   * Checks if the gateway supports pushed reports
+   * Checks if the gateway supports pushed reports.
    */
   public function access(Route $route, RouteMatchInterface $route_match, AccountInterface $account, SmsGatewayInterface $sms_gateway) {
     return AccessResult::allowedIf($sms_gateway->supportsReportsPush())
diff --git a/src/Annotation/SmsGateway.php b/src/Annotation/SmsGateway.php
index 208f094..db9c531 100644
--- a/src/Annotation/SmsGateway.php
+++ b/src/Annotation/SmsGateway.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Annotation\SmsGateway
- */
-
 namespace Drupal\sms\Annotation;
 
 use Drupal\Component\Annotation\Plugin;
@@ -25,6 +20,7 @@ class SmsGateway extends Plugin {
 
   /**
    * Translated user-readable label.
+   *
    * @var string
    */
   protected $label;
diff --git a/src/DeliveryReportController.php b/src/DeliveryReportController.php
index 3923cbf..c9e36fb 100644
--- a/src/DeliveryReportController.php
+++ b/src/DeliveryReportController.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\DeliveryReportController
- */
-
 namespace Drupal\sms;
 
 use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
@@ -63,6 +58,7 @@ class DeliveryReportController implements ContainerInjectionInterface {
    *   upcasted.
    *
    * @return \Symfony\Component\HttpFoundation\Response
+   *   A response object to return.
    */
   public function processDeliveryReport(SmsGatewayInterface $sms_gateway) {
     return $this->smsProvider->processDeliveryReport($this->requestStack->getCurrentRequest(), $sms_gateway);
diff --git a/src/Direction.php b/src/Direction.php
index a603fba..1d057b3 100644
--- a/src/Direction.php
+++ b/src/Direction.php
@@ -3,21 +3,21 @@
 namespace Drupal\sms;
 
 /**
- * Contains direction constants for SMS Framework
+ * Contains direction constants for SMS Framework.
  */
 final class Direction {
 
   /**
    * Whether the message is queued to be sent from the website.
    *
-   * @var integer
+   * @var int
    */
   const OUTGOING = 1;
 
   /**
    * Whether the message was received by the website.
    *
-   * @var integer
+   * @var int
    */
   const INCOMING = -1;
 
diff --git a/src/Entity/PhoneNumberSettings.php b/src/Entity/PhoneNumberSettings.php
index 035539a..dc659b7 100644
--- a/src/Entity/PhoneNumberSettings.php
+++ b/src/Entity/PhoneNumberSettings.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Entity\PhoneNumberSettings.
- */
-
 namespace Drupal\sms\Entity;
 
 use Drupal\Core\Config\Entity\ConfigEntityBase;
@@ -80,8 +75,7 @@ class PhoneNumberSettings extends ConfigEntityBase implements PhoneNumberSetting
   protected $verification_code_lifetime = 0;
 
   /**
-   * Whether to remove phone number field values when phone number
-   * verifications expire.
+   * Whether to remove phone numbers from entities when verifications expire.
    *
    * @var bool
    */
diff --git a/src/Entity/PhoneNumberSettingsInterface.php b/src/Entity/PhoneNumberSettingsInterface.php
index 518f423..7e6ebfe 100644
--- a/src/Entity/PhoneNumberSettingsInterface.php
+++ b/src/Entity/PhoneNumberSettingsInterface.php
@@ -1,14 +1,12 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Entity\PhoneNumberSettingsInterface.
- */
-
 namespace Drupal\sms\Entity;
 
 use Drupal\Core\Config\Entity\ConfigEntityInterface;
 
+/**
+ * Interface for SMS Gateway configuration entity.
+ */
 interface PhoneNumberSettingsInterface extends ConfigEntityInterface {
 
   /**
@@ -88,6 +86,8 @@ interface PhoneNumberSettingsInterface extends ConfigEntityInterface {
   public function setVerificationCodeLifetime($lifetime);
 
   /**
+   * Whether phone numbers are purged when verifications expire.
+   *
    * Determines if phone number field values are removed when phone number
    * verifications expire.
    *
@@ -97,11 +97,13 @@ interface PhoneNumberSettingsInterface extends ConfigEntityInterface {
   public function getPurgeVerificationPhoneNumber();
 
   /**
+   * Whether phone numbers should be purged when verifications expire.
+   *
    * Sets if phone number field values are removed when phone number
    * verifications expire.
    *
    * @param bool $purge
-   *   Whether to remove phone number field values
+   *   Whether to remove phone number field values.
    *
    * @return $this
    *   Return phone number settings for chaining.
@@ -132,4 +134,4 @@ interface PhoneNumberSettingsInterface extends ConfigEntityInterface {
    */
   public function setFieldName($map, $field_name);
 
-}
\ No newline at end of file
+}
diff --git a/src/Entity/PhoneNumberVerification.php b/src/Entity/PhoneNumberVerification.php
index dcac1de..4113795 100644
--- a/src/Entity/PhoneNumberVerification.php
+++ b/src/Entity/PhoneNumberVerification.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Entity\PhoneNumberVerification.
- */
-
 namespace Drupal\sms\Entity;
 
 use Drupal\Core\Entity\ContentEntityBase;
diff --git a/src/Entity/PhoneNumberVerificationInterface.php b/src/Entity/PhoneNumberVerificationInterface.php
index 5b62d85..f93787b 100644
--- a/src/Entity/PhoneNumberVerificationInterface.php
+++ b/src/Entity/PhoneNumberVerificationInterface.php
@@ -1,11 +1,13 @@
 <?php
 
-
 namespace Drupal\sms\Entity;
 
 use Drupal\Core\Entity\ContentEntityInterface;
 use Drupal\Core\Entity\EntityInterface;
 
+/**
+ * Interface for phone number verification entity.
+ */
 interface PhoneNumberVerificationInterface extends ContentEntityInterface {
 
   /**
@@ -94,4 +96,4 @@ interface PhoneNumberVerificationInterface extends ContentEntityInterface {
    */
   public function setStatus($status);
 
-}
\ No newline at end of file
+}
diff --git a/src/Entity/SmsGateway.php b/src/Entity/SmsGateway.php
index 24aafe4..c23781c 100644
--- a/src/Entity/SmsGateway.php
+++ b/src/Entity/SmsGateway.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Entity\SmsGateway.
- */
-
 namespace Drupal\sms\Entity;
 
 use Drupal\Core\Config\Entity\ConfigEntityBase;
@@ -92,14 +87,14 @@ class SmsGateway extends ConfigEntityBase implements SmsGatewayInterface, Entity
   /**
    * How many seconds to hold messages after they are received.
    *
-   * @var integer
+   * @var int
    */
   protected $retention_duration_incoming;
 
   /**
    * How many seconds to hold messages after they are sent.
    *
-   * @var integer
+   * @var int
    */
   protected $retention_duration_outgoing;
 
@@ -152,7 +147,7 @@ class SmsGateway extends ConfigEntityBase implements SmsGatewayInterface, Entity
    * {@inheritdoc}
    */
   public function setSkipQueue($skip_queue) {
-    $this->skip_queue = (boolean)$skip_queue;
+    $this->skip_queue = (boolean) $skip_queue;
     return $this;
   }
 
@@ -162,9 +157,11 @@ class SmsGateway extends ConfigEntityBase implements SmsGatewayInterface, Entity
   public function getRetentionDuration($direction) {
     switch ($direction) {
       case Direction::INCOMING:
-        return (int)$this->retention_duration_incoming;
+        return (int) $this->retention_duration_incoming;
+
       case Direction::OUTGOING:
-        return (int)$this->retention_duration_outgoing;
+        return (int) $this->retention_duration_outgoing;
+
       default:
         throw new \Exception('%s is not a valid direction.', $direction);
     }
@@ -178,6 +175,7 @@ class SmsGateway extends ConfigEntityBase implements SmsGatewayInterface, Entity
       case Direction::INCOMING:
         $this->retention_duration_incoming = $retention_duration;
         break;
+
       case Direction::OUTGOING:
         $this->retention_duration_outgoing = $retention_duration;
         break;
@@ -191,7 +189,7 @@ class SmsGateway extends ConfigEntityBase implements SmsGatewayInterface, Entity
   public function getMaxRecipientsOutgoing() {
     $definition = $this->getPlugin()
       ->getPluginDefinition();
-    return isset($definition['outgoing_message_max_recipients']) ? (int)$definition['outgoing_message_max_recipients'] : 1;
+    return isset($definition['outgoing_message_max_recipients']) ? (int) $definition['outgoing_message_max_recipients'] : 1;
   }
 
   /**
diff --git a/src/Entity/SmsGatewayInterface.php b/src/Entity/SmsGatewayInterface.php
index 3fcc9eb..a4f124e 100644
--- a/src/Entity/SmsGatewayInterface.php
+++ b/src/Entity/SmsGatewayInterface.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Entity\SmsGatewayInterface.
- */
-
 namespace Drupal\sms\Entity;
 
 use Drupal\Core\Config\Entity\ConfigEntityInterface;
@@ -33,7 +28,7 @@ interface SmsGatewayInterface extends ConfigEntityInterface {
   /**
    * Get whether messages sent to this gateway should be sent immediately.
    *
-   * @return boolean
+   * @return bool
    *   Whether messages sent to this gateway should be sent immediately.
    */
   public function getSkipQueue();
@@ -41,7 +36,7 @@ interface SmsGatewayInterface extends ConfigEntityInterface {
   /**
    * Set whether messages sent to this gateway should be sent immediately.
    *
-   * @param boolean $skip_queue
+   * @param bool $skip_queue
    *   Whether messages sent to this gateway should be sent immediately.
    *
    * @return $this
@@ -54,7 +49,7 @@ interface SmsGatewayInterface extends ConfigEntityInterface {
    *
    * @param int $direction
    *   The direction of the message. See SmsMessageInterface::DIRECTION_*
-   *   constants
+   *   constants.
    *
    * @return int
    *   How long messages should persist in seconds. -1 to never expire.
@@ -66,7 +61,7 @@ interface SmsGatewayInterface extends ConfigEntityInterface {
    *
    * @param int $direction
    *   The direction of the message. See SmsMessageInterface::DIRECTION_*
-   *   constants
+   *   constants.
    * @param int $retention_duration
    *   How many seconds to hold messages, or use -1 to never expire.
    *
@@ -86,7 +81,7 @@ interface SmsGatewayInterface extends ConfigEntityInterface {
   /**
    * Get whether this gateway is schedule aware.
    *
-   * @return boolean
+   * @return bool
    *   Whether this gateway is schedule aware.
    */
   public function isScheduleAware();
@@ -94,7 +89,7 @@ interface SmsGatewayInterface extends ConfigEntityInterface {
   /**
    * Gets whether this gateway can pull reports.
    *
-   * @return boolean
+   * @return bool
    *   Whether this gateway can pull reports.
    *
    * @see \Drupal\sms\Annotation\SmsGateway::reports_pull
@@ -104,7 +99,7 @@ interface SmsGatewayInterface extends ConfigEntityInterface {
   /**
    * Gets whether this gateway can handle reports pushed to the site.
    *
-   * @return boolean
+   * @return bool
    *   Whether this gateway can handle reports pushed to the site.
    *
    * @see \Drupal\sms\Annotation\SmsGateway::reports_push
@@ -114,7 +109,7 @@ interface SmsGatewayInterface extends ConfigEntityInterface {
   /**
    * Get whether this gateway supports credit balance queries.
    *
-   * @return boolean
+   * @return bool
    *   Whether this gateway supports credit balance queries.
    *
    * @see \Drupal\sms\Annotation\SmsGateway::credit_balance_available
diff --git a/src/Entity/SmsMessage.php b/src/Entity/SmsMessage.php
index 77484ce..b17af81 100644
--- a/src/Entity/SmsMessage.php
+++ b/src/Entity/SmsMessage.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Entity\SmsMessage.
- */
-
 namespace Drupal\sms\Entity;
 
 use Drupal\Core\Entity\ContentEntityBase;
@@ -163,7 +158,8 @@ class SmsMessage extends ContentEntityBase implements SmsMessageInterface {
     $sender_name = $this->get('sender_name');
     if (isset($sender_name->value)) {
       return $sender_name->value;
-    } else {
+    }
+    else {
       return ($sender_entity = $this->getSenderEntity()) ? $sender_entity->label() : NULL;
     }
   }
@@ -171,7 +167,7 @@ class SmsMessage extends ContentEntityBase implements SmsMessageInterface {
   /**
    * {@inheritdoc}
    *
-   * @param string $sender|NULL
+   * @param string|NULL $sender
    *   The name of the sender. Or NULL to defer to the label of the sender
    *   entity.
    *
@@ -320,7 +316,7 @@ class SmsMessage extends ContentEntityBase implements SmsMessageInterface {
    * {@inheritdoc}
    */
   public function isQueued() {
-    return (boolean)$this->get('queued')->value;
+    return (boolean) $this->get('queued')->value;
   }
 
   /**
diff --git a/src/Entity/SmsMessageInterface.php b/src/Entity/SmsMessageInterface.php
index d32fb95..4236f9a 100644
--- a/src/Entity/SmsMessageInterface.php
+++ b/src/Entity/SmsMessageInterface.php
@@ -1,16 +1,14 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Entity\SmsMessageInterface.
- */
-
 namespace Drupal\sms\Entity;
 
 use Drupal\Core\Entity\ContentEntityInterface;
 use Drupal\sms\Message\SmsMessageInterface as PlainSmsMessageInterface;
 use Drupal\Core\Entity\EntityInterface;
 
+/**
+ * Interface for SMS message entity.
+ */
 interface SmsMessageInterface extends ContentEntityInterface, PlainSmsMessageInterface {
 
   /**
@@ -73,7 +71,7 @@ interface SmsMessageInterface extends ContentEntityInterface, PlainSmsMessageInt
   /**
    * Get whether the SMS message is in the queue to be processed.
    *
-   * @return boolean
+   * @return bool
    *   Whether the SMS message is in the queue to be processed.
    */
   public function isQueued();
diff --git a/src/Event/RecipientGatewayEvent.php b/src/Event/RecipientGatewayEvent.php
index cda02d3..a1caf02 100644
--- a/src/Event/RecipientGatewayEvent.php
+++ b/src/Event/RecipientGatewayEvent.php
@@ -23,7 +23,7 @@ class RecipientGatewayEvent extends Event {
    * @var array
    *   The array of gateway/priority doubles where:
    *     - Key 0: SmsGatewayInterface $gateway
-   *     - Key 1: integer $priority
+   *     - Key 1: int $priority
    */
   protected $gateways = [];
 
@@ -75,10 +75,11 @@ class RecipientGatewayEvent extends Event {
    * Return gateways ordered by priority from highest to lowest.
    *
    * @return \Drupal\sms\Entity\SmsGatewayInterface[]
+   *   An array of gateways ordered by priority from highest to lowest.
    */
   public function getGatewaysSorted() {
     $sorted = $this->gateways;
-    uasort($sorted, function($a, $b) {
+    uasort($sorted, function ($a, $b) {
       list(, $priority_a) = $a;
       list(, $priority_b) = $b;
       if ($priority_a == $priority_b) {
@@ -90,7 +91,7 @@ class RecipientGatewayEvent extends Event {
     // Return the gateway object instead of tuples.
     $gateways = [];
     foreach ($sorted as $tuple) {
-      list($gateway, ) = $tuple;
+      list($gateway,) = $tuple;
       $gateways[] = $gateway;
     }
 
@@ -101,7 +102,7 @@ class RecipientGatewayEvent extends Event {
    * Add a gateway for the recipient on this event.
    *
    * @param \Drupal\sms\Entity\SmsGatewayInterface $gateway
-   *   The gateway for the recipient
+   *   The gateway for the recipient.
    * @param int $priority
    *   The priority for this gateway.
    *
@@ -116,10 +117,9 @@ class RecipientGatewayEvent extends Event {
   /**
    * Remove a gateway from this event.
    *
-   * @param $gateway_id
+   * @param string $gateway_id
    *   A gateway plugin ID.
-   *
-   * @param integer|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/Event/SmsMessageEvent.php b/src/Event/SmsMessageEvent.php
index 61314b6..295c75c 100644
--- a/src/Event/SmsMessageEvent.php
+++ b/src/Event/SmsMessageEvent.php
@@ -44,7 +44,7 @@ class SmsMessageEvent extends Event {
   /**
    * Set the messages on this event.
    *
-   * @param $messages
+   * @param \Drupal\sms\Message\SmsMessageInterface[] $messages
    *   The messages to set on this event.
    *
    * @return $this
diff --git a/src/EventSubscriber/SmsMessageProcessor.php b/src/EventSubscriber/SmsMessageProcessor.php
index 498d19f..326dfdc 100644
--- a/src/EventSubscriber/SmsMessageProcessor.php
+++ b/src/EventSubscriber/SmsMessageProcessor.php
@@ -128,7 +128,8 @@ class SmsMessageProcessor implements EventSubscriberInterface {
    * @param string $recipient
    *   A recipient phone number.
    *
-   * @return \Drupal\Core\Entity\EntityInterface|NULL
+   * @return \Drupal\sms\Entity\SmsGatewayInterface|NULL
+   *   A gateway for the phone number, or NULL if there is no gateway.
    */
   protected function getGatewayForPhoneNumber($recipient) {
     $event = new RecipientGatewayEvent($recipient);
diff --git a/src/Exception/NoPhoneNumberException.php b/src/Exception/NoPhoneNumberException.php
index a1c0cc6..863766e 100644
--- a/src/Exception/NoPhoneNumberException.php
+++ b/src/Exception/NoPhoneNumberException.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Exception\NoPhoneNumberException.
- */
-
 namespace Drupal\sms\Exception;
 
 /**
diff --git a/src/Exception/PhoneNumberSettingsException.php b/src/Exception/PhoneNumberSettingsException.php
index 580e73d..9217c63 100644
--- a/src/Exception/PhoneNumberSettingsException.php
+++ b/src/Exception/PhoneNumberSettingsException.php
@@ -1,14 +1,8 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Exception\PhoneNumberSettingsException.
- */
-
 namespace Drupal\sms\Exception;
 
 /**
- * Defines an exception when an entity is passed which is incorrectly configured
- * for phone numbers.
+ * Thrown when the entity is incorrectly configured for phone numbers.
  */
 class PhoneNumberSettingsException extends SmsException {}
diff --git a/src/Exception/SmsException.php b/src/Exception/SmsException.php
index 886e7fc..0a837da 100644
--- a/src/Exception/SmsException.php
+++ b/src/Exception/SmsException.php
@@ -1,9 +1,5 @@
 <?php
 
-/**
- * Contains \Drupal\sms\Exception\SmsException
- */
-
 namespace Drupal\sms\Exception;
 
 /**
diff --git a/src/Form/PhoneNumberSettingsDeleteForm.php b/src/Form/PhoneNumberSettingsDeleteForm.php
index a941862..2b53b29 100644
--- a/src/Form/PhoneNumberSettingsDeleteForm.php
+++ b/src/Form/PhoneNumberSettingsDeleteForm.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Form\PhoneNumberSettingsDeleteForm.
- */
-
 namespace Drupal\sms\Form;
 
 use Drupal\Core\Entity\EntityConfirmFormBase;
diff --git a/src/Form/PhoneNumberSettingsForm.php b/src/Form/PhoneNumberSettingsForm.php
index 771b3e3..4985299 100644
--- a/src/Form/PhoneNumberSettingsForm.php
+++ b/src/Form/PhoneNumberSettingsForm.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Form\PhoneNumberSettingsForm.
- */
-
 namespace Drupal\sms\Form;
 
 use Drupal\Core\Entity\EntityForm;
@@ -24,7 +19,7 @@ class PhoneNumberSettingsForm extends EntityForm {
   /**
    * Form field value used to indicate to create a new attached field.
    */
-  const createNewField = '!create';
+  const CREATE_NEW_FIELD = '!create';
 
   /**
    * The entity type manager.
@@ -127,8 +122,8 @@ class PhoneNumberSettingsForm extends EntityForm {
     }
 
     $field_options = [];
-    $field_options['telephone'][self::createNewField] = $this->t('- Create a new telephone field -');
-    $field_options['boolean'][self::createNewField] = $this->t('- Create a new boolean field -');
+    $field_options['telephone'][self::CREATE_NEW_FIELD] = $this->t('- Create a new telephone field -');
+    $field_options['boolean'][self::CREATE_NEW_FIELD] = $this->t('- Create a new boolean field -');
 
     if ($entity_bundle = $form_state->getValue('entity_bundle', $bundle_default_value ?: NULL)) {
       list($entity_type_id, $bundle) = explode('|', $entity_bundle);
@@ -153,7 +148,8 @@ class PhoneNumberSettingsForm extends EntityForm {
     ];
 
     // Form ID must be the same as found in $config->getFieldName().
-    // $config->getFieldName($config_key) == $form['field_mapping'][$config_key]
+    // ($config->getFieldName($config_key) ==
+    // $form['field_mapping'][$config_key]).
     $form['field_mapping']['phone_number'] = [
       '#type' => 'select',
       '#title' => $this->t('Phone number'),
@@ -172,7 +168,6 @@ class PhoneNumberSettingsForm extends EntityForm {
       '#default_value' => $config->getFieldName('automated_opt_out'),
     ];
 
-
     $form['message'] = [
       '#type' => 'fieldset',
       '#title' => $this->t('Messages'),
@@ -248,13 +243,12 @@ class PhoneNumberSettingsForm extends EntityForm {
       ->setPurgeVerificationPhoneNumber((bool) $form_state->getValue('phone_number_purge'));
 
     foreach ($form_state->getValue('field_mapping') as $config_key => $field_name) {
-      if ($field_name == self::createNewField) {
+      if ($field_name == self::CREATE_NEW_FIELD) {
         $field_config = $this->createNewField($entity_type_id, $bundle, $config_key);
         $field_name = $field_config->getName();
       }
       else {
         // Use existing field.
-
         /** @var \Drupal\Core\Entity\Display\EntityFormDisplayInterface $entity_form_display */
         $entity_form_display = $field_storage_config = $this->entityTypeManager
           ->getStorage('entity_form_display')
@@ -292,11 +286,11 @@ class PhoneNumberSettingsForm extends EntityForm {
   /**
    * Create a new field storage and field, and modify form display.
    *
-   * @param $entity_type_id
+   * @param string $entity_type_id
    *   An entity type ID.
-   * @param $bundle
+   * @param string $bundle
    *   A bundle ID.
-   * @param $config_key
+   * @param string $config_key
    *   A config ID as found in sms.phone.*.*.fields.$config_key
    *
    * @return \Drupal\field\FieldConfigInterface
diff --git a/src/Form/SmsGatewayDeleteForm.php b/src/Form/SmsGatewayDeleteForm.php
index 854a270..8a93a6e 100644
--- a/src/Form/SmsGatewayDeleteForm.php
+++ b/src/Form/SmsGatewayDeleteForm.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Form\SmsGatewayDeleteForm.
- */
-
 namespace Drupal\sms\Form;
 
 use Drupal\Core\Entity\EntityConfirmFormBase;
@@ -15,6 +10,7 @@ use Drupal\Core\Form\FormStateInterface;
  * Form controller to delete SMS Gateway.
  */
 class SmsGatewayDeleteForm extends EntityConfirmFormBase {
+
   /**
    * {@inheritdoc}
    */
diff --git a/src/Form/SmsGatewayForm.php b/src/Form/SmsGatewayForm.php
index 3abae57..7d6b47c 100644
--- a/src/Form/SmsGatewayForm.php
+++ b/src/Form/SmsGatewayForm.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Form\SmsGatewayForm.
- */
-
 namespace Drupal\sms\Form;
 
 use Drupal\Core\Access\AccessManagerInterface;
@@ -16,7 +11,6 @@ use Drupal\Core\Url;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 use Drupal\sms\Plugin\SmsGatewayPluginManagerInterface;
 use Drupal\sms\Entity\SmsGateway;
-use Drupal\sms\Entity\SmsMessageInterface;
 use Drupal\sms\Direction;
 
 /**
@@ -32,6 +26,8 @@ class SmsGatewayForm extends EntityForm {
   protected $accessManager;
 
   /**
+   * The entity query factory.
+   *
    * @var \Drupal\Core\Entity\Query\QueryFactory
    */
   protected $entityQueryFactory;
@@ -44,8 +40,12 @@ class SmsGatewayForm extends EntityForm {
   protected $gatewayManager;
 
   /**
+   * Constructs a new SmsGatewayForm object.
+   *
    * @param \Drupal\Core\Access\AccessManagerInterface $access_manager
    *   The access manager.
+   * @param \Drupal\Core\Entity\Query\QueryFactory $query_factory
+   *   The entity query factory.
    * @param \Drupal\sms\Plugin\SmsGatewayPluginManagerInterface $gateway_manager
    *   The gateway manager service.
    */
diff --git a/src/Form/SmsSettingsForm.php b/src/Form/SmsSettingsForm.php
index 983d122..9a7aadd 100644
--- a/src/Form/SmsSettingsForm.php
+++ b/src/Form/SmsSettingsForm.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Form\SmsSettingsForm
- */
-
 namespace Drupal\sms\Form;
 
 use Drupal\Core\Form\ConfigFormBase;
@@ -64,7 +59,7 @@ class SmsSettingsForm extends ConfigFormBase {
   /**
    * {@inheritdoc}
    */
-  public function getFormID() {
+  public function getFormId() {
     return 'sms_settings_form';
   }
 
@@ -109,7 +104,7 @@ class SmsSettingsForm extends ConfigFormBase {
    */
   public function validateForm(array &$form, FormStateInterface $form_state) {
     $verify = $form_state->getValue(['pages', 'verify']);
-    if (substr($verify, 0 , 1) !== '/') {
+    if (substr($verify, 0, 1) !== '/') {
       $form_state->setError($form['pages']['verify'], $this->t("Path must begin with a '/' character."));
     }
   }
diff --git a/src/Form/VerifyPhoneNumberForm.php b/src/Form/VerifyPhoneNumberForm.php
index ffee806..25ef463 100644
--- a/src/Form/VerifyPhoneNumberForm.php
+++ b/src/Form/VerifyPhoneNumberForm.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Form\VerifyPhoneNumberForm.
- */
-
 namespace Drupal\sms\Form;
 
 use Drupal\Core\Form\FormBase;
@@ -13,6 +8,9 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
 use Drupal\sms\Provider\PhoneNumberProviderInterface;
 use Drupal\Core\Form\FormStateInterface;
 
+/**
+ * Form to accept a verification code.
+ */
 class VerifyPhoneNumberForm extends FormBase {
 
   /**
@@ -52,10 +50,16 @@ class VerifyPhoneNumberForm extends FormBase {
     );
   }
 
+  /**
+   * {@inheritdoc}
+   */
   public function getFormId() {
     return 'sms_verify_phone_number';
   }
 
+  /**
+   * {@inheritdoc}
+   */
   public function buildForm(array $form, FormStateInterface $form_state) {
 
     $form['code'] = [
@@ -75,7 +79,7 @@ class VerifyPhoneNumberForm extends FormBase {
   }
 
   /**
-   * @inheritDoc
+   * {@inheritdoc}
    */
   public function validateForm(array &$form, FormStateInterface $form_state) {
     $flood_window = $this->config('sms.settings')->get('flood.verify_window');
@@ -109,6 +113,9 @@ class VerifyPhoneNumberForm extends FormBase {
       ->register('sms.verify_phone_number', $flood_window);
   }
 
+  /**
+   * {@inheritdoc}
+   */
   public function submitForm(array &$form, FormStateInterface $form_state) {
     $code = $form_state->getValue('code');
     $phone_verification = $this->phoneNumberProvider
@@ -120,4 +127,4 @@ class VerifyPhoneNumberForm extends FormBase {
     drupal_set_message($this->t('Phone number is now verified.'));
   }
 
-}
\ No newline at end of file
+}
diff --git a/src/Lists/PhoneNumberSettingsListBuilder.php b/src/Lists/PhoneNumberSettingsListBuilder.php
index 117c414..51bf25e 100644
--- a/src/Lists/PhoneNumberSettingsListBuilder.php
+++ b/src/Lists/PhoneNumberSettingsListBuilder.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Lists\PhoneNumberSettingsListBuilder.
- */
-
 namespace Drupal\sms\Lists;
 
 use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
@@ -133,6 +128,17 @@ class PhoneNumberSettingsListBuilder extends ConfigEntityListBuilder {
     return $render;
   }
 
+  /**
+   * Builds a phone number verification query.
+   *
+   * @param string $entity_type_id
+   *   Entity type to query.
+   * @param string $bundle
+   *   Entity bundle to query.
+   *
+   * @return \Drupal\Core\Entity\Query\QueryInterface
+   *   A phone number entity query.
+   */
   protected function buildPhoneNumberVerificationQuery($entity_type_id, $bundle) {
     return $this->phoneNumberVerificationStorage
       ->getQuery()
diff --git a/src/Lists/SmsGatewayListBuilder.php b/src/Lists/SmsGatewayListBuilder.php
index c5e2c03..b366a7e 100644
--- a/src/Lists/SmsGatewayListBuilder.php
+++ b/src/Lists/SmsGatewayListBuilder.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Lists\SmsGatewayListBuilder.
- */
-
 namespace Drupal\sms\Lists;
 
 use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
diff --git a/src/Message/SmsDeliveryReport.php b/src/Message/SmsDeliveryReport.php
index b5faf21..a60ba3e 100644
--- a/src/Message/SmsDeliveryReport.php
+++ b/src/Message/SmsDeliveryReport.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Message\SmsDeliveryReport.
- */
-
 namespace Drupal\sms\Message;
 
 /**
@@ -27,10 +22,12 @@ class SmsDeliveryReport implements SmsDeliveryReportInterface {
   protected $recipient = '';
 
   /**
+   * Status code for the message.
+   *
    * A status code from \Drupal\sms\Message\SmsMessageStatus, or NULL if
    * unknown.
    *
-   * @var string
+   * @var string|NULL
    */
   protected $status = NULL;
 
diff --git a/src/Message/SmsDeliveryReportInterface.php b/src/Message/SmsDeliveryReportInterface.php
index 1871d77..76b861b 100644
--- a/src/Message/SmsDeliveryReportInterface.php
+++ b/src/Message/SmsDeliveryReportInterface.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Message\SmsDeliveryReportInterface.
- */
-
 namespace Drupal\sms\Message;
 
 /**
@@ -95,7 +90,7 @@ interface SmsDeliveryReportInterface {
   /**
    * Gets the time the message was queued.
    *
-   * @return integer|NULL
+   * @return int|NULL
    *   The timestamp when the message was queued, or NULL if unknown.
    */
   public function getTimeQueued();
@@ -103,7 +98,7 @@ interface SmsDeliveryReportInterface {
   /**
    * Sets the time the message was queued.
    *
-   * @param integer|NULL $time
+   * @param int|NULL $time
    *   The timestamp when the message was queued, or NULL if unknown.
    *
    * @return $this
@@ -114,7 +109,7 @@ interface SmsDeliveryReportInterface {
   /**
    * Gets the time the message was delivered to the recipient.
    *
-   * @return integer|NULL
+   * @return int|NULL
    *   The timestamp when the message was delivered to the recipient, or NULL if
    *   unknown.
    */
@@ -123,7 +118,7 @@ interface SmsDeliveryReportInterface {
   /**
    * Sets the time the message was delivered to the recipient.
    *
-   * @param integer|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/SmsMessage.php b/src/Message/SmsMessage.php
index 6ae60e9..f3fb281 100644
--- a/src/Message/SmsMessage.php
+++ b/src/Message/SmsMessage.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Message\SmsMessage.
- */
-
 namespace Drupal\sms\Message;
 
 use Drupal\sms\Entity\SmsGatewayInterface;
@@ -26,17 +21,19 @@ class SmsMessage implements SmsMessageInterface {
    *
    * @var string
    */
-  protected $sender_phone_number;
+  protected $senderPhoneNumber;
 
   /**
+   * The recipients of the message.
+   *
    * @var array
-   *   The recipients of the message.
    */
   protected $recipients = array();
 
   /**
+   * The content of the message to be sent.
+   *
    * @var string
-   *   The content of the message to be sent.
    */
   protected $message;
 
@@ -52,7 +49,9 @@ class SmsMessage implements SmsMessageInterface {
    *
    * See \Drupal\sms\Direction constants for potential values.
    *
-   * @var integer
+   * @see \Drupal\sms\Direction
+   *
+   * @var int
    */
   protected $direction;
 
@@ -93,7 +92,7 @@ class SmsMessage implements SmsMessageInterface {
    * @param string $message
    *   (optional) The actual SMS message to be sent.
    * @param array $options
-   *   (optional) Additional options to be considered in building the SMS message
+   *   (optional) Additional options.
    * @param int $uid
    *   (optional) The user who created the SMS message.
    */
@@ -111,14 +110,14 @@ class SmsMessage implements SmsMessageInterface {
    * {@inheritdoc}
    */
   public function getSenderNumber() {
-    return $this->sender_phone_number;
+    return $this->senderPhoneNumber;
   }
 
   /**
    * {@inheritdoc}
    */
   public function setSenderNumber($number) {
-    $this->sender_phone_number = $number;
+    $this->senderPhoneNumber = $number;
     return $this;
   }
 
@@ -299,6 +298,7 @@ class SmsMessage implements SmsMessageInterface {
    * Gets the UUID generator.
    *
    * @return \Drupal\Component\Uuid\UuidInterface
+   *   The UUID generator.
    */
   protected function uuidGenerator() {
     return \Drupal::service('uuid');
diff --git a/src/Message/SmsMessageInterface.php b/src/Message/SmsMessageInterface.php
index 98fceef..eb2f0db 100644
--- a/src/Message/SmsMessageInterface.php
+++ b/src/Message/SmsMessageInterface.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains definition of \Drupal\sms\Message\SmsMessageInterface
- */
-
 namespace Drupal\sms\Message;
 
 use Drupal\sms\Entity\SmsGatewayInterface;
@@ -18,6 +13,7 @@ interface SmsMessageInterface {
    * Gets the list of recipients of this SMS message.
    *
    * @return array
+   *   The list of recipients of this SMS message.
    */
   public function getRecipients();
 
@@ -43,7 +39,7 @@ interface SmsMessageInterface {
    */
   public function addRecipients(array $recipients);
 
-    /**
+  /**
    * Removes a single recipient from the SMS message.
    *
    * @param string $recipient
@@ -107,13 +103,14 @@ interface SmsMessageInterface {
    * Gets the options for building or sending this SMS message.
    *
    * @return array
+   *   The options for building or sending this SMS message.
    */
   public function getOptions();
 
   /**
    * Gets the option specified by the key $name.
    *
-   * @param string
+   * @param string $name
    *   The name of the option.
    *
    * @return mixed
@@ -125,7 +122,7 @@ interface SmsMessageInterface {
    * Sets an option for this SMS message.
    *
    * @param string $name
-   *   The name of the option
+   *   The name of the option.
    * @param mixed $value
    *   The value of the option.
    *
@@ -189,6 +186,7 @@ interface SmsMessageInterface {
    * Gets the message to be sent.
    *
    * @return string
+   *   The message to be sent.
    */
   public function getMessage();
 
@@ -207,6 +205,7 @@ interface SmsMessageInterface {
    * Gets the UUID of the SMS object.
    *
    * @return string
+   *   The UUID of the SMS object.
    */
   public function getUuid();
 
@@ -220,7 +219,7 @@ interface SmsMessageInterface {
   public function getUid();
 
   /**
-   * Set the user who created the SMS message
+   * Set the user who created the SMS message.
    *
    * @param int $uid
    *   The ID of a user entity.
@@ -253,7 +252,7 @@ interface SmsMessageInterface {
   /**
    * Split this SMS message into new messages by chunks of recipients.
    *
-   * @param $size
+   * @param int $size
    *   The quantity of recipients to chunk by.
    *
    * @return static[]
diff --git a/src/Message/SmsMessageResult.php b/src/Message/SmsMessageResult.php
index 031b39a..a2577dc 100644
--- a/src/Message/SmsMessageResult.php
+++ b/src/Message/SmsMessageResult.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Message\SmsMessageResult
- */
-
 namespace Drupal\sms\Message;
 
 use Drupal\sms\Exception\SmsException;
diff --git a/src/Message/SmsMessageResultInterface.php b/src/Message/SmsMessageResultInterface.php
index 768afde..98b18c4 100644
--- a/src/Message/SmsMessageResultInterface.php
+++ b/src/Message/SmsMessageResultInterface.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains Drupal\sms\Message\SmsMessageResultInterface
- */
-
 namespace Drupal\sms\Message;
 
 /**
@@ -27,7 +22,7 @@ interface SmsMessageResultInterface {
    * Usually a setting an error on a result indicates something went wrong with
    * the entire transaction.
    *
-   * @param string $error|NULL
+   * @param string|NULL $error
    *   A error code from \Drupal\sms\Message\SmsMessageResultError, or NULL if
    *   unknown.
    *
diff --git a/src/Plugin/Field/FieldWidget/SmsTelephoneWidget.php b/src/Plugin/Field/FieldWidget/SmsTelephoneWidget.php
index eacab42..2b0e7b5 100644
--- a/src/Plugin/Field/FieldWidget/SmsTelephoneWidget.php
+++ b/src/Plugin/Field/FieldWidget/SmsTelephoneWidget.php
@@ -1,12 +1,8 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Plugin\Field\FieldWidget\SmsTelephoneWidget.
- */
-
 namespace Drupal\sms\Plugin\Field\FieldWidget;
 
+use Drupal\Core\Form\FormStateInterface;
 use Drupal\telephone\Plugin\Field\FieldWidget\TelephoneDefaultWidget;
 use Drupal\Core\Routing\UrlGeneratorTrait;
 use Drupal\Core\Field\FieldItemListInterface;
@@ -30,7 +26,7 @@ class SmsTelephoneWidget extends TelephoneDefaultWidget {
   /**
    * {@inheritdoc}
    */
-  public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, \Drupal\Core\Form\FormStateInterface $form_state) {
+  public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, FormStateInterface $form_state) {
     $element = parent::formElement($items, $delta, $element, $form, $form_state);
 
     /** @var \Drupal\sms\Provider\PhoneNumberProviderInterface $phone_number_provider */
diff --git a/src/Plugin/QueueWorker/SmsProcessor.php b/src/Plugin/QueueWorker/SmsProcessor.php
index fe4c066..6f0affa 100644
--- a/src/Plugin/QueueWorker/SmsProcessor.php
+++ b/src/Plugin/QueueWorker/SmsProcessor.php
@@ -1,16 +1,10 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Plugin\QueueWorker\SmsProcessor.
- */
-
 namespace Drupal\sms\Plugin\QueueWorker;
 
 use Drupal\Core\Queue\QueueWorkerBase;
 use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
 use Drupal\Core\Entity\EntityTypeManagerInterface;
-use Drupal\sms\Entity\SmsMessage;
 use Drupal\sms\Provider\SmsProviderInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 use Drupal\sms\Direction;
@@ -76,8 +70,8 @@ class SmsProcessor extends QueueWorkerBase implements ContainerFactoryPluginInte
   /**
    * {@inheritdoc}
    *
-   * @param $data
-   *   - id: integer: SMS message entity ID.
+   * @param array $data
+   *   - id: int: SMS message entity ID.
    */
   public function processItem($data) {
     if (isset($data['id'])) {
@@ -89,6 +83,7 @@ class SmsProcessor extends QueueWorkerBase implements ContainerFactoryPluginInte
             $this->smsProvider
               ->incoming($sms_message);
             break;
+
           case Direction::OUTGOING:
             $this->smsProvider
               ->send($sms_message);
diff --git a/src/Plugin/SmsGateway/LogGateway.php b/src/Plugin/SmsGateway/LogGateway.php
index eb36458..805b8ea 100644
--- a/src/Plugin/SmsGateway/LogGateway.php
+++ b/src/Plugin/SmsGateway/LogGateway.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Plugin\SmsGateway\LogGateway
- */
-
 namespace Drupal\sms\Plugin\SmsGateway;
 
 use Drupal\sms\Message\SmsDeliveryReport;
@@ -14,6 +9,8 @@ use Drupal\sms\Message\SmsMessageInterface;
 use Drupal\sms\Message\SmsMessageResult;
 
 /**
+ * Defines a logger gateway for testing and debugging.
+ *
  * @SmsGateway(
  *   id = "log",
  *   label = @Translation("Drupal log"),
@@ -26,8 +23,10 @@ class LogGateway extends SmsGatewayPluginBase {
    * {@inheritdoc}
    */
   public function send(SmsMessageInterface $sms) {
-    $this->logger()->notice('SMS message sent to %number with the text: @message',
-      ['%number' => implode(', ', $sms->getRecipients()), '@message' => $sms->getMessage()]);
+    $this->logger()->notice('SMS message sent to %number with the text: @message', [
+      '%number' => implode(', ', $sms->getRecipients()),
+      '@message' => $sms->getMessage(),
+    ]);
 
     $reports = [];
     foreach ($sms->getRecipients() as $number) {
diff --git a/src/Plugin/SmsGatewayPluginBase.php b/src/Plugin/SmsGatewayPluginBase.php
index cfc8424..6b5991d 100644
--- a/src/Plugin/SmsGatewayPluginBase.php
+++ b/src/Plugin/SmsGatewayPluginBase.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Plugin\SmsGatewayPluginBase
- */
-
 namespace Drupal\sms\Plugin;
 
 use Drupal\Core\Form\FormStateInterface;
@@ -25,7 +20,7 @@ abstract class SmsGatewayPluginBase extends PluginBase implements SmsGatewayPlug
   protected $logger;
 
   /**
-   * Construct a new SmsGateway plugin
+   * Construct a new SmsGateway plugin.
    *
    * @param array $configuration
    *   The configuration to use and build the sms gateway.
@@ -71,14 +66,12 @@ abstract class SmsGatewayPluginBase extends PluginBase implements SmsGatewayPlug
    * {@inheritdoc}
    */
   public function validateConfigurationForm(array &$form, FormStateInterface $form_state) {
-    return;
   }
 
   /**
    * {@inheritdoc}
    */
   public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
-    return;
   }
 
   /**
@@ -115,7 +108,7 @@ abstract class SmsGatewayPluginBase extends PluginBase implements SmsGatewayPlug
   protected function logger() {
     if (!isset($this->logger)) {
       $definition = $this->getPluginDefinition();
-      $this->logger = \Drupal::logger($definition['provider'] . '.' . $definition['id'] );
+      $this->logger = \Drupal::logger($definition['provider'] . '.' . $definition['id']);
     }
     return $this->logger;
   }
diff --git a/src/Plugin/SmsGatewayPluginCollection.php b/src/Plugin/SmsGatewayPluginCollection.php
index 4d3d6c0..7a8d0b4 100644
--- a/src/Plugin/SmsGatewayPluginCollection.php
+++ b/src/Plugin/SmsGatewayPluginCollection.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Plugin\SmsGatewayPluginCollection
- */
-
 namespace Drupal\sms\Plugin;
 
 use Drupal\Core\Plugin\DefaultSingleLazyPluginCollection;
diff --git a/src/Plugin/SmsGatewayPluginInterface.php b/src/Plugin/SmsGatewayPluginInterface.php
index c738e4c..6905ae0 100644
--- a/src/Plugin/SmsGatewayPluginInterface.php
+++ b/src/Plugin/SmsGatewayPluginInterface.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Plugin\SmsGatewayPluginInterface
- */
-
 namespace Drupal\sms\Plugin;
 
 use Drupal\Component\Plugin\ConfigurablePluginInterface;
@@ -15,7 +10,7 @@ use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpFoundation\Response;
 
 /**
- * Default implementation of sms gateway plugin
+ * Default implementation of SMS gateway plugin.
  */
 interface SmsGatewayPluginInterface extends ConfigurablePluginInterface, PluginFormInterface, PluginInspectionInterface {
 
diff --git a/src/Plugin/SmsGatewayPluginManager.php b/src/Plugin/SmsGatewayPluginManager.php
index 8e676d3..4e74626 100644
--- a/src/Plugin/SmsGatewayPluginManager.php
+++ b/src/Plugin/SmsGatewayPluginManager.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Plugin\SmsGatewayPluginManager
- */
-
 namespace Drupal\sms\Plugin;
 
 use Drupal\Core\Cache\CacheBackendInterface;
diff --git a/src/Plugin/SmsGatewayPluginManagerInterface.php b/src/Plugin/SmsGatewayPluginManagerInterface.php
index e2c6b4b..fcb0594 100644
--- a/src/Plugin/SmsGatewayPluginManagerInterface.php
+++ b/src/Plugin/SmsGatewayPluginManagerInterface.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\SmsGatewayPluginInterface
- */
-
 namespace Drupal\sms\Plugin;
 
 use Drupal\Component\Plugin\PluginManagerInterface;
diff --git a/src/Plugin/views/field/SmsMessageDirection.php b/src/Plugin/views/field/SmsMessageDirection.php
index 9796d77..f4b77c9 100644
--- a/src/Plugin/views/field/SmsMessageDirection.php
+++ b/src/Plugin/views/field/SmsMessageDirection.php
@@ -1,18 +1,13 @@
 <?php
 
-/**
- * Contains \Drupal\sms\Plugin\views\field\SmsMessageDirection
- */
-
 namespace Drupal\sms\Plugin\views\field;
 
-use Drupal\sms\Entity\SmsMessageInterface;
 use Drupal\views\Plugin\views\field\FieldPluginBase;
 use Drupal\views\ResultRow;
 use Drupal\sms\Direction;
 
 /**
- * Field handler to show SMS message direction
+ * Field handler to show SMS message direction.
  *
  * @ViewsField("sms_message_direction")
  */
@@ -21,12 +16,14 @@ class SmsMessageDirection extends FieldPluginBase {
   /**
    * {@inheritdoc}
    */
-  function render(ResultRow $values) {
+  public function render(ResultRow $values) {
     switch ($this->getValue($values)) {
       case Direction::INCOMING:
         return $this->t('Incoming');
+
       case Direction::OUTGOING:
         return $this->t('Outgoing');
+
       default:
         return $this->t('Unknown direction');
     }
diff --git a/src/Provider/DefaultSmsProvider.php b/src/Provider/DefaultSmsProvider.php
index 5eb6f52..b2fc180 100644
--- a/src/Provider/DefaultSmsProvider.php
+++ b/src/Provider/DefaultSmsProvider.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Provider\DefaultSmsProvider
- */
-
 namespace Drupal\sms\Provider;
 
 use Drupal\sms\Event\SmsDeliveryReportEvent;
@@ -63,6 +58,7 @@ class DefaultSmsProvider implements SmsProviderInterface {
           case Direction::INCOMING:
             $this->incoming($sms_message);
             break;
+
           case Direction::OUTGOING:
             $this->send($sms_message);
             break;
diff --git a/src/Provider/PhoneNumberProvider.php b/src/Provider/PhoneNumberProvider.php
index c76f8bb..04aa64d 100644
--- a/src/Provider/PhoneNumberProvider.php
+++ b/src/Provider/PhoneNumberProvider.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Provider\PhoneNumberProvider.
- */
-
 namespace Drupal\sms\Provider;
 
 use Symfony\Component\DependencyInjection\ContainerAwareTrait;
@@ -102,7 +97,7 @@ class PhoneNumberProvider implements PhoneNumberProviderInterface {
     }
 
     if (isset($verified)) {
-      return array_filter($phone_numbers, function($phone_number) use(&$entity, $verified) {
+      return array_filter($phone_numbers, function ($phone_number) use (&$entity, $verified) {
         $verification = $this->getPhoneVerificationByEntity($entity, $phone_number);
         return $verification && ($verification->getStatus() == $verified);
       });
@@ -166,7 +161,7 @@ class PhoneNumberProvider implements PhoneNumberProviderInterface {
       $properties['entity__target_type'] = $entity_type;
     }
     if (isset($verified)) {
-      $properties['status'] = (int)$verified;
+      $properties['status'] = (int) $verified;
     }
     return $this->phoneNumberVerificationStorage
       ->loadByProperties($properties);
@@ -193,7 +188,7 @@ class PhoneNumberProvider implements PhoneNumberProviderInterface {
     $message = $config->getVerificationMessage() ?: '';
 
     // @todo Replace with code generator.
-    $random = new Random;
+    $random = new Random();
     $code = strtoupper($random->name(6));
 
     /** @var \Drupal\sms\Entity\PhoneNumberVerificationInterface $phone_verification */
@@ -229,7 +224,7 @@ class PhoneNumberProvider implements PhoneNumberProviderInterface {
   /**
    * {@inheritdoc}
    */
-  function updatePhoneVerificationByEntity(EntityInterface $entity) {
+  public function updatePhoneVerificationByEntity(EntityInterface $entity) {
     try {
       $phone_number_settings = $this->getPhoneNumberSettingsForEntity($entity);
       $field_name = $phone_number_settings->getFieldName('phone_number');
@@ -274,10 +269,11 @@ class PhoneNumberProvider implements PhoneNumberProviderInterface {
   /**
    * {@inheritdoc}
    */
-  function deletePhoneVerificationByEntity(EntityInterface $entity) {
-    // Check the entity uses phone numbers. To save on a SQL call, and to prevent
-    // having to install phone number verification for SMS Framework tests which
-    // delete entities. Which would otherwise error on non-existent tables.
+  public function deletePhoneVerificationByEntity(EntityInterface $entity) {
+    // Check the entity uses phone numbers. To save on a SQL call, and to
+    // prevent having to install phone number verification for SMS Framework
+    // tests which delete entities. Which would otherwise error on non-existent
+    // tables.
     try {
       $this->getPhoneNumberSettingsForEntity($entity);
       $verification_entities = $this->phoneNumberVerificationStorage
diff --git a/src/Provider/PhoneNumberProviderInterface.php b/src/Provider/PhoneNumberProviderInterface.php
index c3ec00c..72371b1 100644
--- a/src/Provider/PhoneNumberProviderInterface.php
+++ b/src/Provider/PhoneNumberProviderInterface.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Provider\PhoneNumberProviderInterface.
- */
-
 namespace Drupal\sms\Provider;
 
 use Drupal\Core\Entity\EntityInterface;
@@ -51,9 +46,9 @@ interface PhoneNumberProviderInterface {
   /**
    * Gets read only phone number settings config object for a bundle.
    *
-   * @param $entity_type_id
+   * @param string $entity_type_id
    *   The entity type ID of the bundle.
-   * @param $bundle
+   * @param string $bundle
    *   An entity bundle.
    *
    * @return \Drupal\sms\Entity\PhoneNumberSettingsInterface|NULL
@@ -97,7 +92,7 @@ interface PhoneNumberProviderInterface {
    *
    * @param string $phone_number
    *   A phone number.
-   * @param boolean|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
@@ -117,6 +112,7 @@ interface PhoneNumberProviderInterface {
    *   A phone number.
    *
    * @return \Drupal\sms\Entity\PhoneNumberVerificationInterface|NULL
+   *   The phone number verification for an entity and phone number pair.
    */
   public function getPhoneVerificationByEntity(EntityInterface $entity, $phone_number);
 
@@ -146,7 +142,7 @@ interface PhoneNumberProviderInterface {
    * @param \Drupal\Core\Entity\EntityInterface $entity
    *   Update phone number verifications for this entity.
    */
-  function updatePhoneVerificationByEntity(EntityInterface $entity);
+  public function updatePhoneVerificationByEntity(EntityInterface $entity);
 
   /**
    * Deletes phone number verifications for an entity.
@@ -154,10 +150,10 @@ interface PhoneNumberProviderInterface {
    * @param \Drupal\Core\Entity\EntityInterface $entity
    *   Delete phone number verifications for this entity.
    */
-  function deletePhoneVerificationByEntity(EntityInterface $entity);
+  public function deletePhoneVerificationByEntity(EntityInterface $entity);
 
   /**
-   * Cleans up expired phone number verifications
+   * Cleans up expired phone number verifications.
    *
    * Removes phone numbers from entities if setting is verification expires, and
    * setting is enabled.
diff --git a/src/Provider/SmsProviderInterface.php b/src/Provider/SmsProviderInterface.php
index 6b440c1..fde5d47 100644
--- a/src/Provider/SmsProviderInterface.php
+++ b/src/Provider/SmsProviderInterface.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains definition of \Drupal\sms\Provider\SmsProviderInterface
- */
-
 namespace Drupal\sms\Provider;
 
 use Drupal\sms\Entity\SmsGatewayInterface;
@@ -12,7 +7,7 @@ use Drupal\sms\Message\SmsMessageInterface;
 use Symfony\Component\HttpFoundation\Request;
 
 /**
- * Provides an interface for sending messages
+ * Provides an interface for sending messages.
  */
 interface SmsProviderInterface {
 
@@ -35,7 +30,7 @@ interface SmsProviderInterface {
    *
    * It is preferred to use queue method over directly invoking send().
    *
-   * @param \Drupal\sms\Message\SmsMessageInterface
+   * @param \Drupal\sms\Message\SmsMessageInterface $sms
    *   The message to be sent.
    *
    * @return \Drupal\sms\Message\SmsMessageInterface[]
@@ -51,7 +46,7 @@ interface SmsProviderInterface {
   /**
    * Handles a message received by the server.
    *
-   * @param \Drupal\sms\Message\SmsMessageInterface
+   * @param \Drupal\sms\Message\SmsMessageInterface $sms_message
    *   The message received.
    *
    * @return \Drupal\sms\Message\SmsMessageInterface[]
diff --git a/src/Provider/SmsQueueProcessor.php b/src/Provider/SmsQueueProcessor.php
index 57dafea..8cabee7 100644
--- a/src/Provider/SmsQueueProcessor.php
+++ b/src/Provider/SmsQueueProcessor.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Provider\SmsQueueProcessor
- */
-
 namespace Drupal\sms\Provider;
 
 use Drupal\Core\Entity\EntityTypeManagerInterface;
@@ -62,7 +57,7 @@ class SmsQueueProcessor implements SmsQueueProcessorInterface {
   }
 
   /**
-   * @inheritdoc
+   * {@inheritdoc}
    */
   public function processUnqueued() {
     /** @var \Drupal\sms\Entity\SmsGatewayInterface $sms_gateway */
@@ -93,7 +88,7 @@ class SmsQueueProcessor implements SmsQueueProcessorInterface {
   }
 
   /**
-   * @inheritdoc
+   * {@inheritdoc}
    */
   public function garbageCollection() {
     $directions = [
diff --git a/src/Provider/SmsQueueProcessorInterface.php b/src/Provider/SmsQueueProcessorInterface.php
index 83d2d98..84c2c89 100644
--- a/src/Provider/SmsQueueProcessorInterface.php
+++ b/src/Provider/SmsQueueProcessorInterface.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Provider\SmsQueueProcessorInterface.
- */
-
 namespace Drupal\sms\Provider;
 
 /**
diff --git a/src/Routing/RouteSubscriber.php b/src/Routing/RouteSubscriber.php
index e80bb14..3c27e1a 100644
--- a/src/Routing/RouteSubscriber.php
+++ b/src/Routing/RouteSubscriber.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Routing\RouteSubscriber.
- */
-
 namespace Drupal\sms\Routing;
 
 use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
@@ -27,9 +22,9 @@ class RouteSubscriber implements ContainerInjectionInterface {
   protected $configFactory;
 
   /**
-   * Constructs a new SMS Framework RouteSubscriber
+   * Constructs a new SMS Framework RouteSubscriber.
    *
-   * @param \Drupal\Core\Config\ConfigFactoryInterface
+   * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
    *   The gateway manager.
    */
   public function __construct(ConfigFactoryInterface $config_factory) {
diff --git a/src/Tests/SmsFrameworkDeliveryReportTest.php b/src/Tests/SmsFrameworkDeliveryReportTest.php
index bd546e5..bdee8f7 100644
--- a/src/Tests/SmsFrameworkDeliveryReportTest.php
+++ b/src/Tests/SmsFrameworkDeliveryReportTest.php
@@ -41,7 +41,7 @@ class SmsFrameworkDeliveryReportTest extends SmsFrameworkWebTestBase {
     // Get the delivery reports url and simulate push delivery report.
     $url = Url::fromRoute('sms.process_delivery_report', ['sms_gateway' => $test_gateway->id()], ['absolute' => TRUE])->toString();
     $delivered_time = REQUEST_TIME;
-    $delivery_report =<<<EOF
+    $delivery_report = <<<EOF
 {
    "reports":[
       {
diff --git a/src/Tests/SmsFrameworkGatewayAdminTest.php b/src/Tests/SmsFrameworkGatewayAdminTest.php
index cea0864..c17e9a9 100644
--- a/src/Tests/SmsFrameworkGatewayAdminTest.php
+++ b/src/Tests/SmsFrameworkGatewayAdminTest.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Tests\SmsFrameworkGatewayAdminTest.
- */
-
 namespace Drupal\sms\Tests;
 
 use Drupal\Core\Url;
@@ -27,6 +22,8 @@ class SmsFrameworkGatewayAdminTest extends SmsFrameworkWebTestBase {
   public static $modules = ['block'];
 
   /**
+   * SMS Gateway entity storage.
+   *
    * @var \Drupal\Core\Config\Entity\ConfigEntityStorageInterface
    */
   protected $smsGatewayStorage;
@@ -184,7 +181,7 @@ class SmsFrameworkGatewayAdminTest extends SmsFrameworkWebTestBase {
     $this->assertNoRaw(t('Delivery report URL'));
   }
 
-    /**
+  /**
    * Tests deleting a gateway.
    */
   public function testGatewayDelete() {
diff --git a/src/Tests/SmsFrameworkMessageTestTrait.php b/src/Tests/SmsFrameworkMessageTestTrait.php
index 90297ef..910e42d 100644
--- a/src/Tests/SmsFrameworkMessageTestTrait.php
+++ b/src/Tests/SmsFrameworkMessageTestTrait.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Tests\SmsFrameworkMessageTestTrait
- */
-
 namespace Drupal\sms\Tests;
 
 use Drupal\sms\Direction;
@@ -224,7 +219,7 @@ trait SmsFrameworkMessageTestTrait {
   public function testAutomated() {
     $sms_message1 = $this->createSmsMessage();
 
-    // Default
+    // Default.
     $this->assertEquals(TRUE, $sms_message1->isAutomated());
 
     $sms_message2 = $this->createSmsMessage();
@@ -246,7 +241,7 @@ trait SmsFrameworkMessageTestTrait {
   }
 
   /**
-   * Tests chunk by recipients
+   * Tests chunk by recipients.
    *
    * @covers ::chunkByRecipients
    */
diff --git a/src/Tests/SmsFrameworkModuleInstallerTest.php b/src/Tests/SmsFrameworkModuleInstallerTest.php
index 4bc6bcb..df66031 100644
--- a/src/Tests/SmsFrameworkModuleInstallerTest.php
+++ b/src/Tests/SmsFrameworkModuleInstallerTest.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Tests\SmsFrameworkModuleInstallerTest.
- */
-
 namespace Drupal\sms\Tests;
 
 use Drupal\simpletest\WebTestBase;
@@ -18,6 +13,9 @@ class SmsFrameworkModuleInstallerTest extends WebTestBase {
 
   public static $modules = ['telephone', 'dynamic_entity_reference'];
 
+  /**
+   * Tests uninstall via UI.
+   */
   public function testUiInstallModule() {
     $edit = [
       'modules[SMS Framework][sms][enable]' => TRUE,
diff --git a/src/Tests/SmsFrameworkPhoneNumberAdminTest.php b/src/Tests/SmsFrameworkPhoneNumberAdminTest.php
index a220e75..b48d939 100644
--- a/src/Tests/SmsFrameworkPhoneNumberAdminTest.php
+++ b/src/Tests/SmsFrameworkPhoneNumberAdminTest.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Tests\SmsFrameworkPhoneNumberAdminTest.
- */
-
 namespace Drupal\sms\Tests;
 
 use Drupal\Component\Utility\Unicode;
@@ -47,7 +42,7 @@ class SmsFrameworkPhoneNumberAdminTest extends SmsFrameworkWebTestBase {
   }
 
   /**
-   * Tests phone number list
+   * Tests phone number list.
    */
   public function testPhoneNumberList() {
     $this->drupalGet('admin/config/smsframework/phone_number');
@@ -131,7 +126,6 @@ class SmsFrameworkPhoneNumberAdminTest extends SmsFrameworkWebTestBase {
       'code_lifetime' => '7777',
     ];
     $this->drupalPostForm('admin/config/smsframework/phone_number/entity_test.entity_test', $edit, t('Save'));
-    //
     $this->assertEqual(7777, $this->config('sms.phone.entity_test.entity_test')->get('verification_code_lifetime'));
 
     // Delete new phone number settings.
diff --git a/src/Tests/SmsFrameworkPhoneNumberTest.php b/src/Tests/SmsFrameworkPhoneNumberTest.php
index db9ef4f..c8981c5 100644
--- a/src/Tests/SmsFrameworkPhoneNumberTest.php
+++ b/src/Tests/SmsFrameworkPhoneNumberTest.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Tests\SmsFrameworkPhoneNumberTest.
- */
-
 namespace Drupal\sms\Tests;
 
 use Drupal\Core\Entity\EntityInterface;
@@ -31,7 +26,7 @@ class SmsFrameworkPhoneNumberTest extends SmsFrameworkWebTestBase {
   /**
    * Test verification code creation on entity postsave.
    *
-   * @see _sms_entity_postsave().
+   * @see _sms_entity_postsave()
    */
   public function testPhoneNumberVerificationCreated() {
     $phone_number_settings = $this->createPhoneNumberSettings('entity_test', 'entity_test');
@@ -42,7 +37,8 @@ class SmsFrameworkPhoneNumberTest extends SmsFrameworkWebTestBase {
 
       $this->assertEqual($quantity, $this->countVerificationCodes($test_entity), 'There is ' . $quantity . ' verification code.');
 
-      // Ensure postsave did not create verification codes if one already exists.
+      // Ensure post-save did not create verification codes if one already
+      // exists.
       $test_entity->save();
       $this->assertEqual($quantity, $this->countVerificationCodes($test_entity), 'Additional verification codes were not created.');
     }
@@ -51,7 +47,7 @@ class SmsFrameworkPhoneNumberTest extends SmsFrameworkWebTestBase {
   /**
    * Ensure phone number verification SMS sent.
    *
-   * @see _sms_entity_postsave().
+   * @see _sms_entity_postsave()
    */
   public function testPhoneNumberVerificationMessage() {
     $test_gateway = $this->createMemoryGateway(['skip_queue' => TRUE]);
@@ -77,7 +73,7 @@ class SmsFrameworkPhoneNumberTest extends SmsFrameworkWebTestBase {
   /**
    * Ensure phone number verification are deleted.
    *
-   * @see sms_entity_delete().
+   * @see sms_entity_delete()
    */
   public function testPhoneNumberVerificationDeleted() {
     $phone_number_settings = $this->createPhoneNumberSettings('entity_test', 'entity_test');
@@ -116,4 +112,4 @@ class SmsFrameworkPhoneNumberTest extends SmsFrameworkWebTestBase {
       ->execute();
   }
 
-}
\ No newline at end of file
+}
diff --git a/src/Tests/SmsFrameworkPhoneNumberVerifyForm.php b/src/Tests/SmsFrameworkPhoneNumberVerifyForm.php
index a31ef4d..1d18188 100644
--- a/src/Tests/SmsFrameworkPhoneNumberVerifyForm.php
+++ b/src/Tests/SmsFrameworkPhoneNumberVerifyForm.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Tests\SmsFrameworkPhoneNumberVerifyForm.
- */
-
 namespace Drupal\sms\Tests;
 
 use Drupal\Core\Url;
diff --git a/src/Tests/SmsFrameworkPhoneNumberWidgetTest.php b/src/Tests/SmsFrameworkPhoneNumberWidgetTest.php
index 368ef10..789fbc6 100644
--- a/src/Tests/SmsFrameworkPhoneNumberWidgetTest.php
+++ b/src/Tests/SmsFrameworkPhoneNumberWidgetTest.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Tests\SmsFrameworkPhoneNumberWidgetTest.
- */
-
 namespace Drupal\sms\Tests;
 
 use Drupal\Core\Url;
@@ -42,7 +37,6 @@ class SmsFrameworkPhoneNumberWidgetTest extends SmsFrameworkWebTestBase {
 
     $test_entity = $this->createEntityWithPhoneNumber($phone_number_settings);
 
-
     // No verification code created.
     $this->drupalGet($test_entity->toUrl('edit-form'));
     $t_args = [
diff --git a/src/Tests/SmsFrameworkSettingsTest.php b/src/Tests/SmsFrameworkSettingsTest.php
index 9711a4f..47d3dc4 100644
--- a/src/Tests/SmsFrameworkSettingsTest.php
+++ b/src/Tests/SmsFrameworkSettingsTest.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Tests\SmsFrameworkSettingsTest.
- */
-
 namespace Drupal\sms\Tests;
 
 use Drupal\Core\Url;
diff --git a/src/Tests/SmsFrameworkTestTrait.php b/src/Tests/SmsFrameworkTestTrait.php
index 48a481c..8da2540 100644
--- a/src/Tests/SmsFrameworkTestTrait.php
+++ b/src/Tests/SmsFrameworkTestTrait.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Tests\SmsFrameworkTestTrait.
- */
-
 namespace Drupal\sms\Tests;
 
 use Drupal\Core\Entity\EntityInterface;
@@ -39,6 +34,7 @@ trait SmsFrameworkTestTrait {
    *   Additional values to use when creating the gateway.
    *
    * @return \Drupal\sms\Entity\SmsGatewayInterface
+   *   A saved memory gateway.
    */
   protected function createMemoryGateway($values = []) {
     $id = isset($values['id']) ? $values['id'] : Unicode::strtolower($this->randomMachineName(16));
@@ -60,6 +56,7 @@ trait SmsFrameworkTestTrait {
    *   A gateway plugin instance.
    *
    * @return \Drupal\sms\Message\SmsMessageInterface[]
+   *   An array of SMS messages sent to a 'Memory' gateway.
    */
   function getTestMessages(SmsGatewayInterface $sms_gateway) {
     $gateway_id = $sms_gateway->id();
@@ -85,14 +82,15 @@ trait SmsFrameworkTestTrait {
   /**
    * Resets SMS messages stored in memory by 'Memory' gateway.
    *
-   * @param \Drupal\sms\Entity\SmsGatewayInterface $sms_gateway|NULL
+   * @param \Drupal\sms\Entity\SmsGatewayInterface|NULL $sms_gateway
    *   A gateway plugin, or NULL to reset all messages.
    */
   public function resetTestMessages(SmsGatewayInterface $sms_gateway = NULL) {
     $sms_messages = \Drupal::state()->get('sms_test_gateway.memory.send', []);
     if ($sms_gateway) {
       $sms_messages[$sms_gateway->id()] = [];
-    } else {
+    }
+    else {
       $sms_messages = [];
     }
     \Drupal::state()->set('sms_test_gateway.memory.send', $sms_messages);
@@ -105,6 +103,7 @@ trait SmsFrameworkTestTrait {
    *   A gateway plugin.
    *
    * @return \Drupal\sms\Message\SmsDeliveryReportInterface[]
+   *   An array of SMS reports for messages sent to 'Memory' gateway.
    */
   protected function getTestMessageReports(SmsGatewayInterface $sms_gateway) {
     $gateway_id = $sms_gateway->id();
@@ -184,7 +183,7 @@ trait SmsFrameworkTestTrait {
    *
    * @param \Drupal\Core\Entity\EntityInterface $entity
    *   An entity to verify phone number.
-   * @param $phone_number
+   * @param string $phone_number
    *   A phone number.
    */
   protected function verifyPhoneNumber(EntityInterface $entity, $phone_number) {
@@ -226,6 +225,7 @@ trait SmsFrameworkTestTrait {
    *   (optional) The user ID to generate the message as. Defaults to 1.
    *
    * @return \Drupal\sms\Message\SmsMessageInterface
+   *   A random SMS message by the specified user.
    */
   protected function randomSmsMessage($uid = 1) {
     $phone_numbers = $this->randomPhoneNumbers(1);
diff --git a/src/Tests/SmsFrameworkWebTest.php b/src/Tests/SmsFrameworkWebTest.php
index c453304..26176ed 100644
--- a/src/Tests/SmsFrameworkWebTest.php
+++ b/src/Tests/SmsFrameworkWebTest.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Tests\SmsFrameworkWebTest.
- */
-
 namespace Drupal\sms\Tests;
 
 use Drupal\Core\Url;
diff --git a/src/Tests/SmsFrameworkWebTestBase.php b/src/Tests/SmsFrameworkWebTestBase.php
index 29f7bbf..810d11d 100644
--- a/src/Tests/SmsFrameworkWebTestBase.php
+++ b/src/Tests/SmsFrameworkWebTestBase.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Tests\SmsFrameworkWebTestBase.
- */
-
 namespace Drupal\sms\Tests;
 
 use Drupal\simpletest\WebTestBase;
@@ -18,7 +13,12 @@ abstract class SmsFrameworkWebTestBase extends WebTestBase {
 
   use SmsFrameworkTestTrait;
 
-  public static $modules = ['sms', 'sms_test_gateway', 'telephone', 'dynamic_entity_reference'];
+  public static $modules = [
+    'sms',
+    'sms_test_gateway',
+    'telephone',
+    'dynamic_entity_reference',
+  ];
 
   /**
    * The gateway manager.
@@ -44,7 +44,7 @@ abstract class SmsFrameworkWebTestBase extends WebTestBase {
   }
 
   /**
-   * Utility to create phone number settings
+   * Utility to create phone number settings.
    *
    * Creates new field storage and field configs.
    *
@@ -62,7 +62,6 @@ abstract class SmsFrameworkWebTestBase extends WebTestBase {
         'type' => 'telephone',
       ]);
     $field_storage
-//      ->setCardinality(FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED)
       ->setCardinality(1)
       ->save();
 
diff --git a/src/Views/SmsMessageViewsData.php b/src/Views/SmsMessageViewsData.php
index b194a4b..162e04f 100644
--- a/src/Views/SmsMessageViewsData.php
+++ b/src/Views/SmsMessageViewsData.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms\Views\SmsMessageViewsData.
- */
-
 namespace Drupal\sms\Views;
 
 use Drupal\views\EntityViewsData;
diff --git a/tests/modules/sms_test/src/EventSubscriber/SmsTestEventSubscriber.php b/tests/modules/sms_test/src/EventSubscriber/SmsTestEventSubscriber.php
index 9ca67dd..9c4c762 100644
--- a/tests/modules/sms_test/src/EventSubscriber/SmsTestEventSubscriber.php
+++ b/tests/modules/sms_test/src/EventSubscriber/SmsTestEventSubscriber.php
@@ -2,7 +2,6 @@
 
 namespace Drupal\sms_test\EventSubscriber;
 
-use Drupal\sms\Event\SmsMessageEvent;
 use Symfony\Component\EventDispatcher\Event;
 use Symfony\Component\EventDispatcher\EventSubscriberInterface;
 use Drupal\sms\Entity\SmsGateway;
@@ -46,7 +45,7 @@ class SmsTestEventSubscriber implements EventSubscriberInterface {
    * @param \Symfony\Component\EventDispatcher\Event $event
    *   The event.
    * @param string $eventName
-   *   The event name
+   *   The event name.
    */
   public function testExecutionOrder(Event $event, $eventName) {
     $execution_order = \Drupal::state()->get('sms_test_event_subscriber__execution_order', []);
diff --git a/tests/modules/sms_test_gateway/src/Plugin/SmsGateway/Memory.php b/tests/modules/sms_test_gateway/src/Plugin/SmsGateway/Memory.php
index de6f06a..454081e 100644
--- a/tests/modules/sms_test_gateway/src/Plugin/SmsGateway/Memory.php
+++ b/tests/modules/sms_test_gateway/src/Plugin/SmsGateway/Memory.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms_test_gateway\Plugin\SmsGateway\Memory
- */
-
 namespace Drupal\sms_test_gateway\Plugin\SmsGateway;
 
 use Drupal\Component\Serialization\Json;
@@ -97,7 +92,6 @@ class Memory extends SmsGatewayPluginBase implements SmsGatewayPluginIncomingInt
   public function incoming(SmsMessageInterface $sms_message) {
     // @todo Contents of this method are subject to proposals made in
     // https://www.drupal.org/node/2712579
-
     // Set state so we test this method is executed, remove this after above is
     // addressed.
     \Drupal::state()->set('sms_test_gateway.memory.incoming', TRUE);
@@ -141,7 +135,7 @@ class Memory extends SmsGatewayPluginBase implements SmsGatewayPluginIncomingInt
   }
 
   /**
-   * @inheritdoc
+   * {@inheritdoc}
    */
   public function getDeliveryReports(array $message_ids = NULL) {
     return [];
@@ -151,7 +145,7 @@ class Memory extends SmsGatewayPluginBase implements SmsGatewayPluginIncomingInt
    * Generates random delivery reports for each of the recipients of a message.
    *
    * @param \Drupal\sms\Message\SmsMessageInterface $sms_message
-   *   The SMS message
+   *   The SMS message.
    *
    * @return \Drupal\sms\Message\SmsDeliveryReportInterface[]
    *   An array of delivery reports.
@@ -172,7 +166,7 @@ class Memory extends SmsGatewayPluginBase implements SmsGatewayPluginIncomingInt
   }
 
   /**
-   * @inheritdoc
+   * {@inheritdoc}
    */
   public function getCreditsBalance() {
     return 13.36;
diff --git a/tests/modules/sms_test_gateway/src/Plugin/SmsGateway/MemoryChunked.php b/tests/modules/sms_test_gateway/src/Plugin/SmsGateway/MemoryChunked.php
index e7db67c..ccbad58 100644
--- a/tests/modules/sms_test_gateway/src/Plugin/SmsGateway/MemoryChunked.php
+++ b/tests/modules/sms_test_gateway/src/Plugin/SmsGateway/MemoryChunked.php
@@ -1,13 +1,7 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\sms_test_gateway\Plugin\SmsGateway\MemoryChunked
- */
-
 namespace Drupal\sms_test_gateway\Plugin\SmsGateway;
 
-
 /**
  * Defines a gateway requiring chunked messages.
  *
diff --git a/tests/src/Kernel/SmsFrameworkGatewayEntityTest.php b/tests/src/Kernel/SmsFrameworkGatewayEntityTest.php
index 6937e42..2f1ffb0 100644
--- a/tests/src/Kernel/SmsFrameworkGatewayEntityTest.php
+++ b/tests/src/Kernel/SmsFrameworkGatewayEntityTest.php
@@ -1,14 +1,8 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\Tests\sms\Kernel\SmsFrameworkGatewayEntity.
- */
-
 namespace Drupal\Tests\sms\Kernel;
 
 use Drupal\sms\Entity\SmsGateway;
-use Drupal\sms\Entity\SmsMessageInterface;
 use Drupal\sms\Direction;
 
 /**
@@ -19,11 +13,11 @@ use Drupal\sms\Direction;
 class SmsFrameworkGatewayEntityTest extends SmsFrameworkKernelBase {
 
   /**
-   * Modules to enable.
-   *
-   * @var array
+   * {@inheritdoc}
    */
-  public static $modules = ['sms', 'sms_test_gateway', 'telephone', 'dynamic_entity_reference'];
+  public static $modules = [
+    'sms', 'sms_test_gateway', 'telephone', 'dynamic_entity_reference',
+  ];
 
   /**
    * Tests skip queue.
@@ -111,7 +105,7 @@ class SmsFrameworkGatewayEntityTest extends SmsFrameworkKernelBase {
     $this->assertFalse($gateway->supportsReportsPull());
   }
 
-  /*
+  /**
    * Tests 'max outgoing recipients' annotation custom value.
    */
   public function testGetMaxRecipientsOutgoingCustom() {
diff --git a/tests/src/Kernel/SmsFrameworkGatewayPluginTest.php b/tests/src/Kernel/SmsFrameworkGatewayPluginTest.php
index 2ffcb7c..bf8f9a8 100644
--- a/tests/src/Kernel/SmsFrameworkGatewayPluginTest.php
+++ b/tests/src/Kernel/SmsFrameworkGatewayPluginTest.php
@@ -13,11 +13,12 @@ use Drupal\sms\Direction;
 class SmsFrameworkGatewayPluginTest extends SmsFrameworkKernelBase {
 
   /**
-   * Modules to enable.
-   *
-   * @var array
+   * {@inheritdoc}
    */
-  public static $modules = ['sms', 'sms_test', 'sms_test_gateway', 'field', 'telephone', 'dynamic_entity_reference'];
+  public static $modules = [
+    'sms', 'sms_test', 'sms_test_gateway', 'field', 'telephone',
+    'dynamic_entity_reference',
+  ];
 
   /**
    * {@inheritdoc}
@@ -29,8 +30,7 @@ class SmsFrameworkGatewayPluginTest extends SmsFrameworkKernelBase {
   }
 
   /**
-   * Ensure incoming hook is fired on a gateway plugin implementing
-   * SmsGatewayPluginIncomingInterface.
+   * Tests if incoming hook is fired on a gateway plugin.
    */
   public function testIncoming() {
     $gateway = $this->createMemoryGateway([
diff --git a/tests/src/Kernel/SmsFrameworkKernelBase.php b/tests/src/Kernel/SmsFrameworkKernelBase.php
index 6d1412b..80fe987 100644
--- a/tests/src/Kernel/SmsFrameworkKernelBase.php
+++ b/tests/src/Kernel/SmsFrameworkKernelBase.php
@@ -1,16 +1,10 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\Tests\sms\Kernel\SmsFrameworkKernelBase.
- */
-
 namespace Drupal\Tests\sms\Kernel;
 
 use Drupal\KernelTests\KernelTestBase;
 use Drupal\sms\Tests\SmsFrameworkTestTrait;
 
-
 /**
  * Base class for SMS Framework unit tests.
  */
diff --git a/tests/src/Kernel/SmsFrameworkMessageEntityTest.php b/tests/src/Kernel/SmsFrameworkMessageEntityTest.php
index fcfe5ec..8f38448 100644
--- a/tests/src/Kernel/SmsFrameworkMessageEntityTest.php
+++ b/tests/src/Kernel/SmsFrameworkMessageEntityTest.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\Tests\sms\Kernel\SmsFrameworkMessageEntityTest.
- */
-
 namespace Drupal\Tests\sms\Kernel;
 
 use Drupal\Core\Datetime\DrupalDateTime;
@@ -14,8 +9,6 @@ use Drupal\sms\Entity\SmsMessage;
 use Drupal\sms\Tests\SmsFrameworkMessageTestTrait;
 use Drupal\sms\Tests\SmsFrameworkTestTrait;
 use Drupal\user\Entity\User;
-use Drupal\sms\Entity\SmsMessageInterface;
-use Drupal\sms\Direction;
 
 /**
  * Tests SMS message entity.
@@ -33,11 +26,12 @@ class SmsFrameworkMessageEntityTest extends SmsFrameworkKernelBase {
   }
 
   /**
-   * Modules to enable.
-   *
-   * @var array
+   * {@inheritdoc}
    */
-  public static $modules = ['sms', 'sms_test_gateway', 'telephone', 'dynamic_entity_reference', 'user', 'entity_test'];
+  public static $modules = [
+    'sms', 'sms_test_gateway', 'telephone', 'dynamic_entity_reference', 'user',
+    'entity_test',
+  ];
 
   /**
    * {@inheritdoc}
@@ -56,6 +50,7 @@ class SmsFrameworkMessageEntityTest extends SmsFrameworkKernelBase {
    *   An mixed array of values to pass when creating the SMS message entity.
    *
    * @return \Drupal\sms\Entity\SmsMessageInterface
+   *   A SMS message object for testing.
    */
   protected function createSmsMessage(array $values = []) {
     return SmsMessage::create($values);
@@ -70,7 +65,7 @@ class SmsFrameworkMessageEntityTest extends SmsFrameworkKernelBase {
   }
 
   /**
-   * @inheritdoc
+   * {@inheritdoc}
    */
   public function testUid() {
     // User must exist or setUid will throw an exception.
diff --git a/tests/src/Kernel/SmsFrameworkPhoneNumberProviderTest.php b/tests/src/Kernel/SmsFrameworkPhoneNumberProviderTest.php
index 583328a..c96d302 100644
--- a/tests/src/Kernel/SmsFrameworkPhoneNumberProviderTest.php
+++ b/tests/src/Kernel/SmsFrameworkPhoneNumberProviderTest.php
@@ -1,12 +1,9 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\Tests\sms\Kernel\SmsFrameworkPhoneNumberProviderTest.
- */
-
 namespace Drupal\Tests\sms\Kernel;
 
+use Drupal\sms\Exception\PhoneNumberSettingsException;
+use Drupal\sms\Exception\NoPhoneNumberException;
 use Drupal\entity_test\Entity\EntityTest;
 use Drupal\field\Entity\FieldConfig;
 use Drupal\field\Entity\FieldStorageConfig;
@@ -25,16 +22,30 @@ use Drupal\sms\Entity\PhoneNumberSettingsInterface;
 class SmsFrameworkPhoneNumberProviderTest extends SmsFrameworkKernelBase {
 
   /**
+   * {@inheritdoc}
+   */
+  public static $modules = [
+    'sms', 'entity_test', 'user', 'field', 'telephone',
+    'dynamic_entity_reference', 'sms_test_gateway',
+  ];
+
+  /**
+   * The phone number provider.
+   *
    * @var \Drupal\sms\Provider\PhoneNumberProviderInterface
    */
   protected $phoneNumberProvider;
 
   /**
+   * A telephone field for testing.
+   *
    * @var \Drupal\field\FieldStorageConfigInterface
    */
   protected $phoneField;
 
   /**
+   * Phone number settings for entity_test entity type.
+   *
    * @var \Drupal\sms\Entity\PhoneNumberSettingsInterface
    */
   protected $phoneNumberSettings;
@@ -47,13 +58,6 @@ class SmsFrameworkPhoneNumberProviderTest extends SmsFrameworkKernelBase {
   protected $gateway;
 
   /**
-   * Modules to enable.
-   *
-   * @var array
-   */
-  public static $modules = ['sms', 'entity_test', 'user', 'field', 'telephone', 'dynamic_entity_reference', 'sms_test_gateway'];
-
-  /**
    * {@inheritdoc}
    */
   protected function setUp() {
@@ -131,7 +135,7 @@ class SmsFrameworkPhoneNumberProviderTest extends SmsFrameworkKernelBase {
       $phone_number_verified = array_slice($phone_numbers, 0, 1, TRUE);
       $phone_number_unverified = array_slice($phone_numbers, 1, $i, TRUE);
 
-      if (!empty($phone_number_verified))  {
+      if (!empty($phone_number_verified)) {
         $this->verifyPhoneNumber($entity, reset($phone_number_verified));
       }
 
@@ -159,7 +163,7 @@ class SmsFrameworkPhoneNumberProviderTest extends SmsFrameworkKernelBase {
     $sms_message
       ->setSenderNumber('+999888777')
       ->setMessage($this->randomString());
-    $this->setExpectedException(\Drupal\sms\Exception\NoPhoneNumberException::class);
+    $this->setExpectedException(NoPhoneNumberException::class);
     $this->phoneNumberProvider->sendMessage($entity, $sms_message);
   }
 
@@ -230,7 +234,7 @@ class SmsFrameworkPhoneNumberProviderTest extends SmsFrameworkKernelBase {
       'type' => $this->randomMachineName(),
     ]);
 
-    $this->setExpectedException(\Drupal\sms\Exception\PhoneNumberSettingsException::class);
+    $this->setExpectedException(PhoneNumberSettingsException::class);
     $this->phoneNumberProvider->getPhoneNumberSettingsForEntity($test_entity_random_bundle);
   }
 
diff --git a/tests/src/Kernel/SmsFrameworkProviderTest.php b/tests/src/Kernel/SmsFrameworkProviderTest.php
index 92f99be..b7d9788 100644
--- a/tests/src/Kernel/SmsFrameworkProviderTest.php
+++ b/tests/src/Kernel/SmsFrameworkProviderTest.php
@@ -1,12 +1,8 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\Tests\sms\Kernel\SmsFrameworkProviderTest.
- */
-
 namespace Drupal\Tests\sms\Kernel;
 
+use Drupal\sms\Exception\RecipientRouteException;
 use Drupal\sms\Message\SmsMessage as StandardSmsMessage;
 use Drupal\sms\Message\SmsMessageInterface as StandardSmsMessageInterface;
 use Drupal\sms\Entity\SmsMessage;
@@ -25,11 +21,12 @@ use Drupal\sms\Message\SmsMessageResultInterface;
 class SmsFrameworkProviderTest extends SmsFrameworkKernelBase {
 
   /**
-   * Modules to enable.
-   *
-   * @var array
+   * {@inheritdoc}
    */
-  public static $modules = ['sms', 'sms_test', 'sms_test_gateway', 'field', 'telephone', 'dynamic_entity_reference'];
+  public static $modules = [
+    'sms', 'sms_test', 'sms_test_gateway', 'field', 'telephone',
+    'dynamic_entity_reference',
+  ];
 
   /**
    * SMS message entity storage.
@@ -39,9 +36,9 @@ class SmsFrameworkProviderTest extends SmsFrameworkKernelBase {
   protected $smsStorage;
 
   /**
-   * @var \Drupal\sms\Provider\SmsProviderInterface
+   * The SMS provider.
    *
-   * The default SMS provider.
+   * @var \Drupal\sms\Provider\SmsProviderInterface
    */
   protected $smsProvider;
 
@@ -111,7 +108,7 @@ class SmsFrameworkProviderTest extends SmsFrameworkKernelBase {
     $sms_message = SmsMessage::create()
       ->setDirection(Direction::OUTGOING)
       ->setMessage($this->randomString());
-    $this->setExpectedException(\Drupal\sms\Exception\RecipientRouteException::class, 'There are no recipients');
+    $this->setExpectedException(RecipientRouteException::class, 'There are no recipients');
     $this->smsProvider->send($sms_message);
     $this->assertEquals(0, count($this->getTestMessages($this->gateway)));
   }
@@ -123,7 +120,7 @@ class SmsFrameworkProviderTest extends SmsFrameworkKernelBase {
    */
   public function testSendNoFallbackGateway() {
     $this->setFallbackGateway(NULL);
-    $this->setExpectedException(\Drupal\sms\Exception\RecipientRouteException::class);
+    $this->setExpectedException(RecipientRouteException::class);
     $message = $this->createSmsMessage()
       ->addRecipients($this->randomPhoneNumbers());
     $this->smsProvider->send($message);
@@ -148,7 +145,7 @@ class SmsFrameworkProviderTest extends SmsFrameworkKernelBase {
    */
   public function testQueueNoFallbackGateway() {
     $this->setFallbackGateway(NULL);
-    $this->setExpectedException(\Drupal\sms\Exception\RecipientRouteException::class);
+    $this->setExpectedException(RecipientRouteException::class);
     $message = $this->createSmsMessage()
       ->addRecipients($this->randomPhoneNumbers());
     $this->smsProvider->queue($message);
@@ -235,10 +232,10 @@ class SmsFrameworkProviderTest extends SmsFrameworkKernelBase {
   }
 
   /**
-   * Test an exception is thrown if a message has no recipients
+   * Test an exception is thrown if a message has no recipients.
    */
   public function testNoRecipients() {
-    $this->setExpectedException(\Drupal\sms\Exception\RecipientRouteException::class, 'There are no recipients.');
+    $this->setExpectedException(RecipientRouteException::class, 'There are no recipients.');
     $sms_message = SmsMessage::create()
       ->setDirection(Direction::OUTGOING)
       ->setMessage($this->randomString());
@@ -310,6 +307,8 @@ class SmsFrameworkProviderTest extends SmsFrameworkKernelBase {
   }
 
   /**
+   * Test events for outgoing queue skip queue.
+   *
    * Ensure events are executed when a message added to the outgoing queue and
    * the gateway is set to skip queue.
    */
@@ -369,6 +368,8 @@ class SmsFrameworkProviderTest extends SmsFrameworkKernelBase {
   }
 
   /**
+   * Tests events for incoming queue skip queue.
+   *
    * Ensure events are executed when a message added to the incoming queue and
    * the gateway is set to skip queue.
    */
@@ -462,6 +463,7 @@ class SmsFrameworkProviderTest extends SmsFrameworkKernelBase {
    *   An mixed array of values to pass when creating the SMS message entity.
    *
    * @return \Drupal\sms\Entity\SmsMessageInterface
+   *   A SMS message entity for testing.
    */
   protected function createSmsMessage(array $values = []) {
     return SmsMessage::create($values)
diff --git a/tests/src/Kernel/SmsFrameworkPushedDeliveryReportTest.php b/tests/src/Kernel/SmsFrameworkPushedDeliveryReportTest.php
index 03851bb..b17373d 100644
--- a/tests/src/Kernel/SmsFrameworkPushedDeliveryReportTest.php
+++ b/tests/src/Kernel/SmsFrameworkPushedDeliveryReportTest.php
@@ -13,9 +13,12 @@ use Drupal\Core\Session\AnonymousUserSession;
 class SmsFrameworkPushedDeliveryReportTest extends SmsFrameworkKernelBase {
 
   /**
-   * @inheritdoc
+   * {@inheritdoc}
    */
-  public static $modules = ['system', 'sms', 'entity_test', 'user', 'field', 'telephone', 'dynamic_entity_reference', 'sms_test_gateway'];
+  public static $modules = [
+    'system', 'sms', 'entity_test', 'user', 'field', 'telephone',
+    'dynamic_entity_reference', 'sms_test_gateway',
+  ];
 
   /**
    * The access manager service.
@@ -32,7 +35,7 @@ class SmsFrameworkPushedDeliveryReportTest extends SmsFrameworkKernelBase {
   protected $anonymous;
 
   /**
-   * @inheritdoc
+   * {@inheritdoc}
    */
   protected function setUp() {
     parent::setUp();
diff --git a/tests/src/Kernel/SmsFrameworkQueueTest.php b/tests/src/Kernel/SmsFrameworkQueueTest.php
index deeab81..8246272 100644
--- a/tests/src/Kernel/SmsFrameworkQueueTest.php
+++ b/tests/src/Kernel/SmsFrameworkQueueTest.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\Tests\sms\Kernel\SmsFrameworkQueueTest.
- */
-
 namespace Drupal\Tests\sms\Kernel;
 
 use Drupal\sms\Entity\SmsMessage;
@@ -18,23 +13,23 @@ use Drupal\sms\Direction;
 class SmsFrameworkQueueTest extends SmsFrameworkKernelBase {
 
   /**
-   * Modules to enable.
-   *
-   * @var array
+   * {@inheritdoc}
    */
-  public static $modules = ['sms', 'sms_test_gateway', 'field', 'telephone', 'dynamic_entity_reference'];
+  public static $modules = [
+    'sms', 'sms_test_gateway', 'field', 'telephone', 'dynamic_entity_reference',
+  ];
 
   /**
-   * @var \Drupal\sms\Provider\SmsProviderInterface
+   * The SMS provider.
    *
-   * The default SMS provider.
+   * @var \Drupal\sms\Provider\SmsProviderInterface
    */
   protected $smsProvider;
 
   /**
-   * @var \Drupal\sms\Provider\SmsQueueProcessorInterface
-   *
    * The SMS queue processor.
+   *
+   * @var \Drupal\sms\Provider\SmsQueueProcessorInterface
    */
   protected $smsQueueProcessor;
 
@@ -46,7 +41,7 @@ class SmsFrameworkQueueTest extends SmsFrameworkKernelBase {
   protected $gateway;
 
   /**
-   * The cron service
+   * The cron service.
    *
    * @var \Drupal\Core\Cron;
    */
@@ -199,7 +194,7 @@ class SmsFrameworkQueueTest extends SmsFrameworkKernelBase {
       ->setProcessedTime(1)
       ->save();
 
-    // Garbage collect
+    // Garbage collect.
     $this->cronService->run();
 
     $this->assertEquals(1, count(SmsMessage::loadMultiple()), 'There are SMS entities in storage.');
@@ -212,6 +207,7 @@ class SmsFrameworkQueueTest extends SmsFrameworkKernelBase {
    *   An mixed array of values to pass when creating the SMS message entity.
    *
    * @return \Drupal\sms\Entity\SmsMessageInterface
+   *   A SMS message entity for testing.
    */
   protected function createSmsMessage(array $values = []) {
     return SmsMessage::create($values)
diff --git a/tests/src/Kernel/SmsFrameworkRecipientGatewayEventTest.php b/tests/src/Kernel/SmsFrameworkRecipientGatewayEventTest.php
index acbf70a..f737525 100644
--- a/tests/src/Kernel/SmsFrameworkRecipientGatewayEventTest.php
+++ b/tests/src/Kernel/SmsFrameworkRecipientGatewayEventTest.php
@@ -13,11 +13,12 @@ use Drupal\sms\Direction;
 class SmsFrameworkRecipientGatewayEventTest extends SmsFrameworkKernelBase {
 
   /**
-   * Modules to enable.
-   *
-   * @var array
+   * {@inheritdoc}
    */
-  public static $modules = ['sms', 'sms_test', 'sms_test_gateway', 'field', 'telephone', 'dynamic_entity_reference'];
+  public static $modules = [
+    'sms', 'sms_test', 'sms_test_gateway', 'field', 'telephone',
+    'dynamic_entity_reference',
+  ];
 
   /**
    * @var \Drupal\sms\Provider\SmsProviderInterface
diff --git a/tests/src/Kernel/SmsFrameworkSmsSendTest.php b/tests/src/Kernel/SmsFrameworkSmsSendTest.php
index c1d4d47..46677b0 100644
--- a/tests/src/Kernel/SmsFrameworkSmsSendTest.php
+++ b/tests/src/Kernel/SmsFrameworkSmsSendTest.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\Tests\sms\Kernel\SmsFrameworkSmsSendTest.
- */
-
 namespace Drupal\Tests\sms\Kernel;
 
 use Drupal\sms\Entity\SmsGateway;
@@ -20,11 +15,11 @@ use Drupal\sms\Direction;
 class SmsFrameworkSmsSendTest extends SmsFrameworkKernelBase {
 
   /**
-   * Modules to enable.
-   *
-   * @var array
+   * {@inheritdoc}
    */
-  public static $modules = ['sms', 'sms_test_gateway', 'telephone', 'dynamic_entity_reference'];
+  public static $modules = [
+    'sms', 'sms_test_gateway', 'telephone', 'dynamic_entity_reference',
+  ];
 
   /**
    * The default SMS provider service.
diff --git a/tests/src/Kernel/SmsFrameworkTokenTest.php b/tests/src/Kernel/SmsFrameworkTokenTest.php
index d36a354..737df6b 100644
--- a/tests/src/Kernel/SmsFrameworkTokenTest.php
+++ b/tests/src/Kernel/SmsFrameworkTokenTest.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\Tests\sms\Kernel\SmsFrameworkTokenTest.
- */
-
 namespace Drupal\Tests\sms\Kernel;
 
 use Drupal\sms\Message\SmsMessage;
@@ -18,11 +13,12 @@ use Drupal\Component\Utility\Html;
 class SmsFrameworkTokenTest extends SmsFrameworkKernelBase {
 
   /**
-   * Modules to enable.
-   *
-   * @var array
+   * {@inheritdoc}
    */
-  public static $modules = ['system', 'sms', 'entity_test', 'user', 'field', 'telephone', 'dynamic_entity_reference'];
+  public static $modules = [
+    'system', 'sms', 'entity_test', 'user', 'field', 'telephone',
+    'dynamic_entity_reference',
+  ];
 
   /**
    * The token service.
diff --git a/tests/src/Kernel/SmsFrameworkVerificationMaintenanceTest.php b/tests/src/Kernel/SmsFrameworkVerificationMaintenanceTest.php
index 97903b2..c8af608 100644
--- a/tests/src/Kernel/SmsFrameworkVerificationMaintenanceTest.php
+++ b/tests/src/Kernel/SmsFrameworkVerificationMaintenanceTest.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\Tests\sms\Kernel\SmsFrameworkVerificationMaintenanceTest.
- */
-
 namespace Drupal\Tests\sms\Kernel;
 
 use Drupal\sms\Entity\PhoneNumberSettings;
@@ -22,18 +17,23 @@ use Drupal\entity_test\Entity\EntityTest;
 class SmsFrameworkVerificationMaintenanceTest extends SmsFrameworkKernelBase {
 
   /**
-   * Modules to enable.
-   *
-   * @var array
+   * {@inheritdoc}
    */
-  public static $modules = ['sms', 'sms_test_gateway', 'entity_test', 'user', 'field', 'telephone', 'dynamic_entity_reference'];
+  public static $modules = [
+    'sms', 'sms_test_gateway', 'entity_test', 'user', 'field', 'telephone',
+    'dynamic_entity_reference',
+  ];
 
   /**
+   * Phone number settings for entity_test entity type.
+   *
    * @var \Drupal\sms\Entity\PhoneNumberSettingsInterface
    */
   protected $phoneNumberSettings;
 
   /**
+   * A telephone field for testing.
+   *
    * @var \Drupal\field\FieldStorageConfigInterface
    */
   protected $phoneField;
diff --git a/tests/src/Kernel/SmsFrameworkViewsTest.php b/tests/src/Kernel/SmsFrameworkViewsTest.php
index 386c6cc..d7898af 100644
--- a/tests/src/Kernel/SmsFrameworkViewsTest.php
+++ b/tests/src/Kernel/SmsFrameworkViewsTest.php
@@ -2,7 +2,6 @@
 
 namespace Drupal\Tests\sms\Kernel;
 
-use Drupal\sms\Entity\SmsMessageInterface;
 use Drupal\sms\Tests\SmsFrameworkTestTrait;
 use Drupal\Tests\views\Kernel\ViewsKernelTestBase;
 use Drupal\views\Views;
@@ -22,7 +21,13 @@ class SmsFrameworkViewsTest extends ViewsKernelTestBase {
 
   use SmsFrameworkTestTrait;
 
-  public static $modules = ['user', 'sms', 'sms_test_gateway', 'sms_test_views', 'telephone', 'dynamic_entity_reference', 'field'];
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = [
+    'user', 'sms', 'sms_test_gateway', 'sms_test_views', 'telephone',
+    'dynamic_entity_reference', 'field',
+  ];
 
   /**
    * Views used by this test.
@@ -45,6 +50,9 @@ class SmsFrameworkViewsTest extends ViewsKernelTestBase {
    */
   protected $gateway;
 
+  /**
+   * {@inheritdoc}
+   */
   protected function setUp($import_test_views = TRUE) {
     parent::setUp($import_test_views);
 
@@ -112,7 +120,11 @@ class SmsFrameworkViewsTest extends ViewsKernelTestBase {
 
     $this->assertEquals(2, $view->total_rows);
 
-    $cols = ['direction_1', 'sender_phone_number', 'recipient_phone_number', 'message', 'created', 'gateway', 'sender_entity__target_id', 'recipient_entity__target_id', 'automated', 'processed', 'queued'];
+    $cols = [
+      'direction_1', 'sender_phone_number', 'recipient_phone_number',
+      'message', 'created', 'gateway', 'sender_entity__target_id',
+      'recipient_entity__target_id', 'automated', 'processed', 'queued',
+    ];
     $this->assertEquals($cols, array_keys($view->field));
 
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
diff --git a/tests/src/Unit/Event/RecipientGatewayEventTest.php b/tests/src/Unit/Event/RecipientGatewayEventTest.php
index f99d796..6645c07 100644
--- a/tests/src/Unit/Event/RecipientGatewayEventTest.php
+++ b/tests/src/Unit/Event/RecipientGatewayEventTest.php
@@ -96,9 +96,9 @@ class RecipientGatewayEventTest extends UnitTestCase {
 
     $gateways = $event->getGateways();
     $this->assertEquals('gateway_1', $gateways[0][0]->id());
-    $this->assertEquals(200,         $gateways[0][1]);
+    $this->assertEquals(200, $gateways[0][1]);
     $this->assertEquals('gateway_2', $gateways[1][0]->id());
-    $this->assertEquals(400,         $gateways[1][1]);
+    $this->assertEquals(400, $gateways[1][1]);
   }
 
   /**
diff --git a/tests/src/Unit/Message/SmsFrameworkDeliveryReportUnitTest.php b/tests/src/Unit/Message/SmsFrameworkDeliveryReportUnitTest.php
index 7224681..8647a51 100644
--- a/tests/src/Unit/Message/SmsFrameworkDeliveryReportUnitTest.php
+++ b/tests/src/Unit/Message/SmsFrameworkDeliveryReportUnitTest.php
@@ -120,6 +120,7 @@ class SmsFrameworkDeliveryReportUnitTest extends UnitTestCase {
    * Create a delivery report for testing.
    *
    * @return \Drupal\sms\Message\SmsDeliveryReportInterface
+   *   A delivery report for testing.
    */
   protected function createDeliveryReport() {
     return new SmsDeliveryReport();
diff --git a/tests/src/Unit/Message/SmsFrameworkResultUnitTest.php b/tests/src/Unit/Message/SmsFrameworkResultUnitTest.php
index e57aec4..4591d11 100644
--- a/tests/src/Unit/Message/SmsFrameworkResultUnitTest.php
+++ b/tests/src/Unit/Message/SmsFrameworkResultUnitTest.php
@@ -2,6 +2,7 @@
 
 namespace Drupal\Tests\sms\Unit\Message;
 
+use Drupal\sms\Exception\SmsException;
 use Drupal\Tests\UnitTestCase;
 use Drupal\sms\Message\SmsMessageResultInterface;
 use Drupal\sms\Message\SmsMessageResult;
@@ -112,7 +113,7 @@ class SmsFrameworkResultUnitTest extends UnitTestCase {
     $balance = 'foobar';
     $result = $this->createResult();
 
-    $this->setExpectedException(\Drupal\sms\Exception\SmsException::class, 'Credit balance set is a string');
+    $this->setExpectedException(SmsException::class, 'Credit balance set is a string');
     $result->setCreditsBalance($balance);
   }
 
@@ -141,7 +142,7 @@ class SmsFrameworkResultUnitTest extends UnitTestCase {
     $used = 'foobar';
     $result = $this->createResult();
 
-    $this->setExpectedException(\Drupal\sms\Exception\SmsException::class, 'Credit used is a string');
+    $this->setExpectedException(SmsException::class, 'Credit used is a string');
     $result->setCreditsUsed($used);
   }
 
@@ -149,6 +150,7 @@ class SmsFrameworkResultUnitTest extends UnitTestCase {
    * Create a result for testing.
    *
    * @return \Drupal\sms\Message\SmsMessageResultInterface
+   *   A result for testing.
    */
   protected function createResult() {
     return new SmsMessageResult();
diff --git a/tests/src/Unit/Message/SmsMessageTest.php b/tests/src/Unit/Message/SmsMessageTest.php
index a06e873..b4f6350 100644
--- a/tests/src/Unit/Message/SmsMessageTest.php
+++ b/tests/src/Unit/Message/SmsMessageTest.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\Tests\sms\Unit\Message\SmsMessageTest
- */
-
 namespace Drupal\Tests\sms\Unit\Message;
 
 use Drupal\Component\Uuid\Php;
@@ -26,6 +21,7 @@ class SmsMessageTest extends UnitTestCase {
    * Create a SMS message object for testing.
    *
    * @return \Drupal\sms\Message\SmsMessageInterface
+   *   A SMS message object for testing.
    */
   protected function createSmsMessage() {
     return new TestSmsMessage();
