diff --git a/captcha.admin.inc b/captcha.admin.inc
index cc736b8..536ade9 100755
--- a/captcha.admin.inc
+++ b/captcha.admin.inc
@@ -37,7 +37,6 @@ function _captcha_available_challenge_types($add_special_options = TRUE) {
   return $captcha_types;
 }
 
-
 /**
  * Helper function for generating an example challenge.
  */
diff --git a/captcha.inc b/captcha.inc
index 4f8f296..863db4c 100755
--- a/captcha.inc
+++ b/captcha.inc
@@ -62,7 +62,6 @@ function captcha_get_form_id_setting($form_id, $symbolic = FALSE) {
   return $captcha_point;
 }
 
-
 /**
  * Helper function for generating a new CAPTCHA session.
  *
@@ -84,14 +83,14 @@ function _captcha_generate_captcha_session($form_id = NULL, $status = CAPTCHA_ST
   // of the autoincrement field 'csid'.
   $captcha_sid = db_insert('captcha_sessions')
     ->fields([
-    'uid' => $user->id(),
-    'sid' => session_id(),
-    'ip_address' => Drupal::request()->getClientIp(),
-    'timestamp' => REQUEST_TIME,
-    'form_id' => $form_id,
-    'solution' => $solution,
-    'status' => $status,
-    'attempts' => 0,
+      'uid' => $user->id(),
+      'sid' => session_id(),
+      'ip_address' => Drupal::request()->getClientIp(),
+      'timestamp' => REQUEST_TIME,
+      'form_id' => $form_id,
+      'solution' => $solution,
+      'status' => $status,
+      'attempts' => 0,
     ])
     ->execute();
   return $captcha_sid;
@@ -158,7 +157,6 @@ function _captcha_required_for_user($captcha_sid, $form_id) {
   return TRUE;
 }
 
-
 /**
  * Get the CAPTCHA description.
  *
diff --git a/image_captcha/image_captcha.admin.inc b/image_captcha/image_captcha.admin.inc
index 98f6c34..c0344fc 100755
--- a/image_captcha/image_captcha.admin.inc
+++ b/image_captcha/image_captcha.admin.inc
@@ -1,4 +1,5 @@
 <?php
+
 /**
  * @file
  * Contains functions used in the backend forms.
diff --git a/image_captcha/src/Controller/CaptchaFontPreview.php b/image_captcha/src/Controller/CaptchaFontPreview.php
index 768f78f..6013fbb 100755
--- a/image_captcha/src/Controller/CaptchaFontPreview.php
+++ b/image_captcha/src/Controller/CaptchaFontPreview.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains CAPTCHA font previews controller class.
- */
-
 namespace Drupal\image_captcha\Controller;
 
 use Symfony\Component\HttpFoundation\Request;
@@ -14,6 +9,7 @@ use Symfony\Component\HttpFoundation\StreamedResponse;
  * A Controller to preview the captcha font on the settings page.
  */
 class CaptchaFontPreview extends StreamedResponse {
+
   /**
    * {@inheritdoc}
    */
diff --git a/image_captcha/src/Controller/CaptchaImageGeneratorController.php b/image_captcha/src/Controller/CaptchaImageGeneratorController.php
index e9b6054..da6b81b 100644
--- a/image_captcha/src/Controller/CaptchaImageGeneratorController.php
+++ b/image_captcha/src/Controller/CaptchaImageGeneratorController.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains CAPTCHA image response class.
- */
-
 namespace Drupal\image_captcha\Controller;
 
 use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
diff --git a/image_captcha/src/Form/ImageCaptchaSettingsForm.php b/image_captcha/src/Form/ImageCaptchaSettingsForm.php
index bc2df1b..853328e 100755
--- a/image_captcha/src/Form/ImageCaptchaSettingsForm.php
+++ b/image_captcha/src/Form/ImageCaptchaSettingsForm.php
@@ -320,7 +320,7 @@ class ImageCaptchaSettingsForm extends ConfigFormBase {
         '#options' => $available_fonts,
         '#attributes' => ['class' => ['image_captcha_admin_fonts_selection']],
         '#process' => ['form_process_checkboxes'],
-        ];
+      ];
 
       $form['image_captcha_font_size'] = [
         '#type' => 'select',
@@ -361,7 +361,7 @@ class ImageCaptchaSettingsForm extends ConfigFormBase {
   /**
    * Helper function to get fonts from the given directories.
    *
-   * @param array|NULL $directories
+   * @param array|null $directories
    *   (Optional) an array of directories
    *   to recursively search through, if not given, the default
    *   directories will be used.
diff --git a/image_captcha/src/Response/CaptchaImageResponse.php b/image_captcha/src/Response/CaptchaImageResponse.php
index 7dc8899..13c9e18 100755
--- a/image_captcha/src/Response/CaptchaImageResponse.php
+++ b/image_captcha/src/Response/CaptchaImageResponse.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains CAPTCHA image response class.
- */
-
 namespace Drupal\image_captcha\Response;
 
 use Drupal\Core\Logger\LoggerChannelInterface;
diff --git a/src/CaptchaPointInterface.php b/src/CaptchaPointInterface.php
index f3349ff..5845616 100755
--- a/src/CaptchaPointInterface.php
+++ b/src/CaptchaPointInterface.php
@@ -50,7 +50,7 @@ interface CaptchaPointInterface extends ConfigEntityInterface {
   /**
    * Setter for captcha type property.
    *
-   * @param string|NULL $captcha_type
+   * @param string|null $captcha_type
    *   Captcha type.
    */
   public function setCaptchaType($captcha_type);
diff --git a/src/Controller/CaptchaPointListBuilder.php b/src/Controller/CaptchaPointListBuilder.php
index e115cfd..1ee13ee 100755
--- a/src/Controller/CaptchaPointListBuilder.php
+++ b/src/Controller/CaptchaPointListBuilder.php
@@ -9,6 +9,7 @@ use Drupal\Core\Entity\EntityInterface;
  * Builds the list of capture points for the captcha point form.
  */
 class CaptchaPointListBuilder extends ConfigEntityListBuilder {
+
   /**
    * {@inheritdoc}
    */
diff --git a/src/Element/Captcha.php b/src/Element/Captcha.php
index 6145278..72f6762 100644
--- a/src/Element/Captcha.php
+++ b/src/Element/Captcha.php
@@ -42,7 +42,7 @@ class Captcha extends FormElement {
    * Process callback for CAPTCHA form element.
    */
   public static function processCaptchaElement(&$element, FormStateInterface $form_state, &$complete_form) {
-    // Add captcha.inc file
+    // Add captcha.inc file.
     module_load_include('inc', 'captcha');
 
     // Add Javascript for general CAPTCHA functionality.
@@ -119,7 +119,7 @@ class Captcha extends FormElement {
       $captcha = \Drupal::moduleHandler()->invoke($captcha_type_module, 'captcha', ['generate', $captcha_type_challenge, $captcha_sid]);
 
       // @todo Isn't this moment a bit late to figure out that we don't need CAPTCHA?
-      if(!isset($captcha)) {
+      if (!isset($captcha)) {
         return $element;
       }
 
diff --git a/src/Entity/CaptchaPoint.php b/src/Entity/CaptchaPoint.php
index e82bd5a..1a37dba 100755
--- a/src/Entity/CaptchaPoint.php
+++ b/src/Entity/CaptchaPoint.php
@@ -3,7 +3,6 @@
 namespace Drupal\captcha\Entity;
 
 use Drupal\Core\Config\Entity\ConfigEntityBase;
-use Drupal\Core\Cache\Cache;
 use Drupal\captcha\CaptchaPointInterface;
 
 /**
diff --git a/src/Form/CaptchaPointEnableForm.php b/src/Form/CaptchaPointEnableForm.php
index 4d2e31e..07a4c1f 100644
--- a/src/Form/CaptchaPointEnableForm.php
+++ b/src/Form/CaptchaPointEnableForm.php
@@ -24,6 +24,7 @@ class CaptchaPointEnableForm extends EntityConfirmFormBase {
   public function getDescription() {
     return $this->t('This will enable the captcha.');
   }
+
   /**
    * {@inheritdoc}
    */
diff --git a/src/Form/CaptchaPointForm.php b/src/Form/CaptchaPointForm.php
index f5560f1..9871945 100755
--- a/src/Form/CaptchaPointForm.php
+++ b/src/Form/CaptchaPointForm.php
@@ -2,9 +2,7 @@
 
 namespace Drupal\captcha\Form;
 
-use Drupal\captcha\Entity\CaptchaPoint;
 use Drupal\Core\Entity\EntityForm;
-use Drupal\captcha\CaptchaPointInterface;
 use Drupal\Core\Form\FormStateInterface;
 
 /**
diff --git a/src/Form/CaptchaSettingsForm.php b/src/Form/CaptchaSettingsForm.php
index 6450179..e7274ae 100755
--- a/src/Form/CaptchaSettingsForm.php
+++ b/src/Form/CaptchaSettingsForm.php
@@ -143,13 +143,13 @@ class CaptchaSettingsForm extends ConfigFormBase {
       '#default_value' => $config->get('persistence'),
       '#options' => [
         CAPTCHA_PERSISTENCE_SHOW_ALWAYS =>
-          $this->t('Always add a challenge.'),
+        $this->t('Always add a challenge.'),
         CAPTCHA_PERSISTENCE_SKIP_ONCE_SUCCESSFUL_PER_FORM_INSTANCE =>
-          $this->t('Omit challenges in a multi-step/preview workflow once the user successfully responds to a challenge.'),
+        $this->t('Omit challenges in a multi-step/preview workflow once the user successfully responds to a challenge.'),
         CAPTCHA_PERSISTENCE_SKIP_ONCE_SUCCESSFUL_PER_FORM_TYPE =>
-          $this->t('Omit challenges on a form type once the user successfully responds to a challenge on a form of that type.'),
+        $this->t('Omit challenges on a form type once the user successfully responds to a challenge on a form of that type.'),
         CAPTCHA_PERSISTENCE_SKIP_ONCE_SUCCESSFUL =>
-          $this->t('Omit challenges on all forms once the user successfully responds to any challenge on the site.'),
+        $this->t('Omit challenges on all forms once the user successfully responds to any challenge on the site.'),
       ],
       '#description' => t('Define if challenges should be omitted during the rest of a session once the user successfully responds to a challenge.'),
     ];
diff --git a/src/Tests/CaptchaAdminTestCase.php b/src/Tests/CaptchaAdminTestCase.php
index d236ad7..5b6bd35 100755
--- a/src/Tests/CaptchaAdminTestCase.php
+++ b/src/Tests/CaptchaAdminTestCase.php
@@ -41,7 +41,7 @@ class CaptchaAdminTestCase extends CaptchaBaseWebTestCase {
     $this->assertNotNull($result, 'CAPTCHA exists', 'CAPTCHA');
     $this->assertEqual($result, 'test', 'Setting and symbolic getting CAPTCHA point: "test"', 'CAPTCHA');
 
-    // Set to 'default'
+    // Set to 'default'.
     captcha_set_form_id_setting($comment_form_id, 'default');
     $this->config('captcha.settings')->set('default_challenge', 'foo/bar')->save();
     $result = captcha_get_form_id_setting($comment_form_id);
@@ -74,7 +74,7 @@ class CaptchaAdminTestCase extends CaptchaBaseWebTestCase {
     $result = captcha_get_form_id_setting($comment_form_id);
     $this->assertNotNull($result, 'Setting and getting CAPTCHA point: baba/fofo', 'CAPTCHA');
     // $this->assertEqual($result->module, 'baba', 'Setting and getting
-    // CAPTCHA point: baba/fofo', 'CAPTCHA');
+    // CAPTCHA point: baba/fofo', 'CAPTCHA');.
     $this->assertEqual($result->getCaptchaType(), 'baba/fofo', 'Setting and getting CAPTCHA point: baba/fofo', 'CAPTCHA');
     $result = captcha_get_form_id_setting($comment_form_id, TRUE);
     $this->assertEqual($result, 'baba/fofo', 'Setting and symbolic getting CAPTCHA point: "baba/fofo"', 'CAPTCHA');
diff --git a/src/Tests/CaptchaBaseWebTestCase.php b/src/Tests/CaptchaBaseWebTestCase.php
index 66bc052..7d6648c 100755
--- a/src/Tests/CaptchaBaseWebTestCase.php
+++ b/src/Tests/CaptchaBaseWebTestCase.php
@@ -245,10 +245,10 @@ abstract class CaptchaBaseWebTestCase extends WebTestBase {
   protected function allowCommentPostingForAnonymousVisitors() {
     // Enable anonymous comments.
     user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array(
-        'access comments',
-        'post comments',
-        'skip comment approval',
-      ));
+      'access comments',
+      'post comments',
+      'skip comment approval',
+    ));
   }
 
 }
diff --git a/src/Tests/CaptchaCacheTestCase.php b/src/Tests/CaptchaCacheTestCase.php
index 94c9573..0587eee 100644
--- a/src/Tests/CaptchaCacheTestCase.php
+++ b/src/Tests/CaptchaCacheTestCase.php
@@ -2,9 +2,6 @@
 
 namespace Drupal\captcha\Tests;
 
-use Drupal\captcha\Entity\CaptchaPoint;
-use Drupal\Core\Url;
-
 /**
  * Tests CAPTCHA caching on various pages.
  *
diff --git a/src/Tests/CaptchaCronTestCase.php b/src/Tests/CaptchaCronTestCase.php
index 84f4732..599c8b7 100644
--- a/src/Tests/CaptchaCronTestCase.php
+++ b/src/Tests/CaptchaCronTestCase.php
@@ -1,8 +1,4 @@
 <?php
-/**
- * @file
- * Contains Drupal\captcha\Tests\CaptchaCronTestCase.
- */
 
 namespace Drupal\captcha\Tests;
 
@@ -23,9 +19,9 @@ class CaptchaCronTestCase extends CaptchaBaseWebTestCase {
   public function setUp() {
     parent::setUp();
 
-    // add removed session.
+    // Add removed session.
     $this->captcha_sessions['remove_sid'] = $this->addCaptchaSession(REQUEST_TIME - 1 - 60 * 60 * 24);
-    // add remain session.
+    // Add remain session.
     $this->captcha_sessions['remain_sid'] = $this->addCaptchaSession(REQUEST_TIME);
   }
 
@@ -78,4 +74,5 @@ class CaptchaCronTestCase extends CaptchaBaseWebTestCase {
     // Test if Captcha cron appropriately keeps sessions younger than a day.
     $this->assertTrue(in_array($this->captcha_sessions['remain_sid'], $sids), 'Captcha cron does not remove captcha session data younger than 1 day.');
   }
+
 }
diff --git a/src/Tests/CaptchaPersistenceTestCase.php b/src/Tests/CaptchaPersistenceTestCase.php
index d481dae..72dd311 100755
--- a/src/Tests/CaptchaPersistenceTestCase.php
+++ b/src/Tests/CaptchaPersistenceTestCase.php
@@ -119,7 +119,7 @@ class CaptchaPersistenceTestCase extends CaptchaBaseWebTestCase {
     $this->assertCaptchaPresence(FALSE);
     $this->assertPreservedCsid($captcha_sid_initial);
 
-    // Start a new form instance/session
+    // Start a new form instance/session.
     $this->drupalGet('node');
     $this->drupalGet('user');
     $this->assertCaptchaPresence(TRUE);
@@ -156,7 +156,7 @@ class CaptchaPersistenceTestCase extends CaptchaBaseWebTestCase {
     $this->assertCaptchaPresence(FALSE);
     $this->assertPreservedCsid($captcha_sid_initial);
 
-    // Start a new form instance/session
+    // Start a new form instance/session.
     $this->drupalGet('node');
     $this->drupalGet('user');
     $this->assertCaptchaPresence(FALSE);
@@ -196,7 +196,7 @@ class CaptchaPersistenceTestCase extends CaptchaBaseWebTestCase {
     $this->assertCaptchaPresence(FALSE);
     $this->assertPreservedCsid($captcha_sid_initial);
 
-    // Start a new form instance/session
+    // Start a new form instance/session.
     $this->drupalGet('node');
     $this->drupalGet('user');
     $this->assertCaptchaPresence(FALSE);
