diff --git a/README.md b/README.md
index d0ce42f..ab1238c 100644
--- a/README.md
+++ b/README.md
@@ -2,11 +2,12 @@ Introduction
 =======================
 
 This module:  
-    1. Sets the X-Tag http header required by StackPath for tag based Purging in Drupal 8. 
-       No config is required for this.  
+    1. Sets the X-Tag http header required by StackPath for tag based Purging
+       in Drupal 8. No config is required for this.
     2. Offers a purger plugin for invalidating via tag at StackPath. See below.  
     3. Recommended modules:  
-       - purge_queuer_coretags (provides the queueing of the invalidations made by Drupal core)  
+       - purge_queuer_coretags (provides the queueing of the invalidations made
+         by Drupal core)
        - purge_processor_cron (actual processor of the queue)   
        - purge_drush (all above in one but with drush)  
 
diff --git a/drupalci.yml b/drupalci.yml
new file mode 100644
index 0000000..b9f8d9b
--- /dev/null
+++ b/drupalci.yml
@@ -0,0 +1,15 @@
+# This is the DrupalCI testbot build file for the adsense module.
+
+build:
+  assessment:
+    validate_codebase:
+      phplint:
+      csslint:
+        halt-on-fail: false
+      eslint:
+        # A test must pass eslinting standards check in order to continue processing.
+        halt-on-fail: false
+      phpcs:
+        # phpcs will use core's specified version of Coder.
+        sniff-all-files: false
+        halt-on-fail: false
diff --git a/src/Entity/StackPathPurgerSettings.php b/src/Entity/StackPathPurgerSettings.php
index 20bf13d..438d14d 100644
--- a/src/Entity/StackPathPurgerSettings.php
+++ b/src/Entity/StackPathPurgerSettings.php
@@ -1,9 +1,7 @@
 <?php
 
-
 namespace Drupal\stackpath\Entity;
 
-
 use Drupal\purge\Plugin\Purge\Purger\PurgerSettingsBase;
 use Drupal\purge\Plugin\Purge\Purger\PurgerSettingsInterface;
 
@@ -40,24 +38,24 @@ class StackPathPurgerSettings extends PurgerSettingsBase implements PurgerSettin
   public $name = '';
 
   /**
-   * The Stack Id
+   * The stack ID.
    *
    * @var string
    */
-  public $stack_id;
+  public $stackId;
 
   /**
-   * The Client Id
+   * The client ID.
    *
    * @var string
    */
-  public $client_id;
+  public $clientId;
 
   /**
-   * The Client Secret
+   * The client secret.
    *
    * @var string
    */
-  public $client_secret;
+  public $clientSecret;
 
 }
diff --git a/src/Form/StackPathPurgerConfigForm.php b/src/Form/StackPathPurgerConfigForm.php
index 959de40..5b5dc4f 100644
--- a/src/Form/StackPathPurgerConfigForm.php
+++ b/src/Form/StackPathPurgerConfigForm.php
@@ -2,12 +2,13 @@
 
 namespace Drupal\stackpath\Form;
 
-use Drupal\stackpath\StackPathApi;
-use Symfony\Component\DependencyInjection\ContainerInterface;
 use Drupal\Core\Config\ConfigFactoryInterface;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\purge_ui\Form\PurgerConfigFormBase;
 use Drupal\stackpath\Entity\StackPathPurgerSettings;
+use Drupal\stackpath\StackPathApi;
+use Exception;
+use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
  * Form for Stackpath configurable purgers.
@@ -26,11 +27,12 @@ class StackPathPurgerConfigForm extends PurgerConfigFormBase {
    *
    * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
    *   The factory for configuration objects.
-   * @param \Drupal\stackpath\StackPathApi $stackPathApi
+   * @param \Drupal\stackpath\StackPathApi $stackpath_api
+   *   StackPath API service.
    */
-  public function __construct(ConfigFactoryInterface $config_factory, StackPathApi $stackPathApi) {
+  public function __construct(ConfigFactoryInterface $config_factory, StackPathApi $stackpath_api) {
     parent::__construct($config_factory);
-    $this->stackPath = $stackPathApi;
+    $this->stackPath = $stackpath_api;
   }
 
   /**
@@ -53,7 +55,7 @@ class StackPathPurgerConfigForm extends PurgerConfigFormBase {
   /**
    * {@inheritdoc}
    */
-  public function getFormID() {
+  public function getFormId() {
     return 'stackpath.config_form';
   }
 
@@ -74,21 +76,21 @@ class StackPathPurgerConfigForm extends PurgerConfigFormBase {
       '#title' => $this->t('Stack ID'),
       '#required' => TRUE,
       '#description' => $this->t('Enter the stack id here.'),
-      '#default_value' => $settings->stack_id,
+      '#default_value' => $settings->stackId,
     ];
     $form['client_id'] = [
       '#type' => 'textfield',
       '#title' => $this->t('Client ID'),
       '#required' => TRUE,
       '#description' => $this->t('Enter the client id here.'),
-      '#default_value' => $settings->client_id,
+      '#default_value' => $settings->clientId,
     ];
     $form['client_secret'] = [
       '#type' => 'textfield',
       '#title' => $this->t('Client Secret'),
       '#required' => TRUE,
       '#description' => $this->t('Enter the client secret here.'),
-      '#default_value' => $settings->client_secret,
+      '#default_value' => $settings->clientSecret,
     ];
     return parent::buildForm($form, $form_state);
   }
@@ -107,7 +109,7 @@ class StackPathPurgerConfigForm extends PurgerConfigFormBase {
           $form_state->setErrorByName('client_id', $this->t('Credential are invalid, please try again with different ID/Secret.'));
         }
       }
-      catch (\Exception $e) {
+      catch (Exception $e) {
         $form_state->setErrorByName('client_id', $this->t('It looks like StackPath is not responding or something is wrong.'));
       }
     }
@@ -127,4 +129,5 @@ class StackPathPurgerConfigForm extends PurgerConfigFormBase {
     }
     $settings->save();
   }
+
 }
diff --git a/src/Plugin/Purge/DiagnosticCheck/ConfigurationCheck.php b/src/Plugin/Purge/DiagnosticCheck/ConfigurationCheck.php
index 3289e36..001a021 100644
--- a/src/Plugin/Purge/DiagnosticCheck/ConfigurationCheck.php
+++ b/src/Plugin/Purge/DiagnosticCheck/ConfigurationCheck.php
@@ -2,10 +2,10 @@
 
 namespace Drupal\stackpath\Plugin\Purge\DiagnosticCheck;
 
-use Drupal\stackpath\Entity\StackPathPurgerSettings;
 use Drupal\purge\Plugin\Purge\DiagnosticCheck\DiagnosticCheckBase;
 use Drupal\purge\Plugin\Purge\DiagnosticCheck\DiagnosticCheckInterface;
 use Drupal\purge\Plugin\Purge\Purger\PurgersServiceInterface;
+use Drupal\stackpath\Entity\StackPathPurgerSettings;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
@@ -68,7 +68,7 @@ class ConfigurationCheck extends DiagnosticCheckBase implements DiagnosticCheckI
     }
 
     // Perform checks against configuration.
-    $labels  = $this->purgePurgers->getLabels();
+    $labels = $this->purgePurgers->getLabels();
     foreach ($plugins as $id => $settings) {
       $t = ['@purger' => $labels[$id]];
       foreach (['client_id', 'client_secret'] as $f) {
@@ -82,4 +82,5 @@ class ConfigurationCheck extends DiagnosticCheckBase implements DiagnosticCheckI
     $this->recommendation = "All purgers configured.";
     return self::SEVERITY_OK;
   }
+
 }
diff --git a/src/Plugin/Purge/Purger/StackPathPurger.php b/src/Plugin/Purge/Purger/StackPathPurger.php
index 7079769..cb76edc 100644
--- a/src/Plugin/Purge/Purger/StackPathPurger.php
+++ b/src/Plugin/Purge/Purger/StackPathPurger.php
@@ -1,16 +1,17 @@
 <?php
 
-
 namespace Drupal\stackpath\Plugin\Purge\Purger;
 
-
 use Drupal\Core\Config\ConfigFactory;
 use Drupal\purge\Plugin\Purge\Invalidation\InvalidationInterface;
 use Drupal\purge\Plugin\Purge\Purger\PurgerBase;
 use Drupal\purge\Plugin\Purge\Purger\PurgerInterface;
 use Drupal\stackpath\Entity\StackPathPurgerSettings;
 use Drupal\stackpath\StackPathApi;
+use Exception;
+use LogicException;
 use Symfony\Component\DependencyInjection\ContainerInterface;
+use UnexpectedValueException;
 
 /**
  * StackPath Purger implementation.
@@ -28,12 +29,14 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
 class StackPathPurger extends PurgerBase implements PurgerInterface {
 
   /**
+   * StackPath API.
+   *
    * @var \Drupal\stackpath\StackPathApi
    */
   protected $stackPath;
 
   /**
-   * Configuration factory
+   * Configuration factory.
    *
    * @var \Drupal\Core\Config\ConfigFactoryInterface
    */
@@ -46,19 +49,6 @@ class StackPathPurger extends PurgerBase implements PurgerInterface {
    */
   protected $settings;
 
-  /**
-   * {@inheritdoc}
-   */
-  public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
-    return new static(
-      $configuration,
-      $plugin_id,
-      $plugin_definition,
-      $container->get('stackpath.api'),
-      $container->get('config.factory')
-    );
-  }
-
   /**
    * Constructs an instance of KeyCDNPurger.
    *
@@ -68,18 +58,33 @@ class StackPathPurger extends PurgerBase implements PurgerInterface {
    *   The plugin_id for the plugin instance.
    * @param mixed $plugin_definition
    *   The plugin implementation definition.
-   * @param \Drupal\stackpath\StackPathApi $stackPathApi
+   * @param \Drupal\stackpath\StackPathApi $stackpath_api
+   *   StackPath API service.
    * @param \Drupal\Core\Config\ConfigFactory $factory
+   *   Configuration factory.
    */
-  public function __construct(array $configuration, $plugin_id, $plugin_definition, StackPathApi $stackPathApi, ConfigFactory $factory) {
+  public function __construct(array $configuration, $plugin_id, $plugin_definition, StackPathApi $stackpath_api, ConfigFactory $factory) {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->settings = $factory->get('stackpath.settings.' . $this->getId());
     $this->factory = $factory;
-    $this->stackPath = $stackPathApi;
+    $this->stackPath = $stackpath_api;
   }
 
   /**
-   * {@inheritDoc}
+   * {@inheritdoc}
+   */
+  public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
+    return new static(
+      $configuration,
+      $plugin_id,
+      $plugin_definition,
+      $container->get('stackpath.api'),
+      $container->get('config.factory')
+    );
+  }
+
+  /**
+   * {@inheritdoc}
    */
   public function hasRuntimeMeasurement() {
     return TRUE;
@@ -98,10 +103,10 @@ class StackPathPurger extends PurgerBase implements PurgerInterface {
   }
 
   /**
-   * {@inheritDoc}
+   * {@inheritdoc}
    */
   public function invalidate(array $invalidations) {
-    throw new \LogicException('You should not be here.');
+    throw new LogicException('You should not be here.');
   }
 
   /**
@@ -133,7 +138,7 @@ class StackPathPurger extends PurgerBase implements PurgerInterface {
       try {
         $url = $invalidation->getUrl()->getInternalPath();
       }
-      catch (\UnexpectedValueException $e) {
+      catch (UnexpectedValueException $e) {
         $url = $this->normalizePath($invalidation->getUrl()->getUri());
       }
       $urls[] = $url;
@@ -142,7 +147,7 @@ class StackPathPurger extends PurgerBase implements PurgerInterface {
     if (empty($urls)) {
       foreach ($invalidations as $invalidation) {
         $invalidation->setState(InvalidationInterface::FAILED);
-        throw new \Exception('No url found to purge');
+        throw new Exception('No url found to purge');
       }
     }
 
@@ -171,7 +176,7 @@ class StackPathPurger extends PurgerBase implements PurgerInterface {
     if (empty($tags)) {
       foreach ($invalidations as $invalidation) {
         $invalidation->setState(InvalidationInterface::FAILED);
-        throw new \Exception('No tag found to purge');
+        throw new Exception('No tag found to purge');
       }
     }
 
@@ -184,6 +189,8 @@ class StackPathPurger extends PurgerBase implements PurgerInterface {
    *
    * @param \Drupal\purge\Plugin\Purge\Invalidation\InvalidationInterface[] $invalidations
    *   The invalidator instance.
+   *
+   * @throws \Drupal\purge\Plugin\Purge\Invalidation\Exception\InvalidStateException
    */
   public function invalidateAll(array $invalidations) {
     $this->updateState($invalidations, InvalidationInterface::PROCESSING);
@@ -201,7 +208,7 @@ class StackPathPurger extends PurgerBase implements PurgerInterface {
    *   A list of items to invalidate.
    *
    * @return int
-   *    Returns invalidate items.
+   *   Returns invalidate items.
    */
   protected function invalidateItems($type = NULL, array $invalidates = []) {
     try {
@@ -215,18 +222,19 @@ class StackPathPurger extends PurgerBase implements PurgerInterface {
         $this->logger()->debug('StackPath purge successful. Type: %type, Params: %params',
           ['%type' => $type, '%params' => print_r($invalidates, TRUE)]);
         return InvalidationInterface::SUCCEEDED;
-      } else {
+      }
+      else {
         // Should never be fired, since HTTP errors throw exceptions.
         $this->logger()
           ->error('StackPath purge failed. Status code %code: %message',
             [
               '%code' => $response['code'],
-              '%message' => $response['error']
+              '%message' => $response['error'],
             ]);
         return InvalidationInterface::FAILED;
       }
     }
-    catch (\Exception $e) {
+    catch (Exception $e) {
       // If something bad happens.
       $this->logger()->error('StackPath purge request failed. Status code %code: %message',
         ['%code' => $e->getCode(), '%message' => $e->getMessage()]);
@@ -241,7 +249,7 @@ class StackPathPurger extends PurgerBase implements PurgerInterface {
    *   URL to normalize.
    *
    * @return string
-   *    Returns normalized path.
+   *   Returns normalized path.
    */
   public function normalizePath($url) {
     $parsed_url = parse_url($url);
@@ -257,6 +265,8 @@ class StackPathPurger extends PurgerBase implements PurgerInterface {
    *   The invalidator instance.
    * @param int $invalidation_state
    *   The invalidation state.
+   *
+   * @throws \Drupal\purge\Plugin\Purge\Invalidation\Exception\InvalidStateException
    */
   protected function updateState(array $invalidations, $invalidation_state) {
     // Update the state.
@@ -266,7 +276,7 @@ class StackPathPurger extends PurgerBase implements PurgerInterface {
   }
 
   /**
-   * {@inheritDoc}
+   * {@inheritdoc}
    */
   public function delete() {
     StackPathPurgerSettings::load($this->getId())->delete();
diff --git a/src/Plugin/Purge/TagsHeader/StackPathTagsHeader.php b/src/Plugin/Purge/TagsHeader/StackPathTagsHeader.php
index 03dbdef..7598df8 100644
--- a/src/Plugin/Purge/TagsHeader/StackPathTagsHeader.php
+++ b/src/Plugin/Purge/TagsHeader/StackPathTagsHeader.php
@@ -1,9 +1,7 @@
 <?php
 
-
 namespace Drupal\stackpath\Plugin\Purge\TagsHeader;
 
-
 use Drupal\purge\Plugin\Purge\TagsHeader\TagsHeaderBase;
 use Drupal\purge\Plugin\Purge\TagsHeader\TagsHeaderInterface;
 use Drupal\stackpath\StackPathApi;
@@ -20,6 +18,8 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
 class StackPathTagsHeader extends TagsHeaderBase implements TagsHeaderInterface {
 
   /**
+   * StackPath API service.
+   *
    * @var \Drupal\stackpath\StackPathApi
    */
   protected $stackPath;
@@ -28,13 +28,17 @@ class StackPathTagsHeader extends TagsHeaderBase implements TagsHeaderInterface
    * StackPathTagsHeader constructor.
    *
    * @param array $configuration
-   * @param $plugin_id
-   * @param $plugin_definition
-   * @param \Drupal\stackpath\StackPathApi $stackPathApi
+   *   A configuration array containing information about the plugin instance.
+   * @param string $plugin_id
+   *   The plugin_id for the plugin instance.
+   * @param mixed $plugin_definition
+   *   The plugin implementation definition.
+   * @param \Drupal\stackpath\StackPathApi $stackpath_api
+   *   StackPath API service.
    */
-  public function __construct(array $configuration, $plugin_id, $plugin_definition, StackPathApi $stackPathApi) {
+  public function __construct(array $configuration, $plugin_id, $plugin_definition, StackPathApi $stackpath_api) {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
-    $this->stackPath = $stackPathApi;
+    $this->stackPath = $stackpath_api;
   }
 
   /**
diff --git a/src/StackPathApi.php b/src/StackPathApi.php
index 105115a..34a2aa2 100644
--- a/src/StackPathApi.php
+++ b/src/StackPathApi.php
@@ -1,18 +1,17 @@
 <?php
 
-
 namespace Drupal\stackpath;
 
-
+use Drupal\Component\Serialization\Json;
 use Drupal\Core\Http\ClientFactory;
 use Drupal\Core\Logger\LoggerChannelInterface;
-use Drupal\Component\Serialization\Json;
 use Drupal\Core\Site\Settings;
 use Drupal\Core\Url;
+use Exception;
 use Psr\Http\Message\ResponseInterface;
 
 /**
- * Class StackPathApi
+ * Class StackPathApi.
  *
  * @package Drupal\stackpath
  */
@@ -24,16 +23,22 @@ class StackPathApi {
   const STACKPATH_API_URI = "https://gateway.stackpath.com";
 
   /**
+   * HTTP client.
+   *
    * @var \GuzzleHttp\ClientInterface
    */
   protected $httpClient;
 
   /**
+   * Token.
+   *
    * @var string
    */
   protected $token;
 
   /**
+   * Logger instance.
+   *
    * @var \Drupal\Core\Logger\LoggerChannelInterface
    */
   protected $logger;
@@ -42,7 +47,9 @@ class StackPathApi {
    * StackPathApi constructor.
    *
    * @param \Drupal\Core\Http\ClientFactory $clientFactory
+   *   Client Factory.
    * @param \Drupal\Core\Logger\LoggerChannelInterface $loggerChannel
+   *   Logger.
    */
   public function __construct(ClientFactory $clientFactory, LoggerChannelInterface $loggerChannel) {
     $this->httpClient = $clientFactory->fromOptions(
@@ -55,9 +62,13 @@ class StackPathApi {
   }
 
   /**
-   * @param $cache_tag
+   * Create hash tag.
+   *
+   * @param string $cache_tag
+   *   Tag.
    *
    * @return bool|string
+   *   Hash tag with 5 characters, or FALSE on failure.
    */
   public function createHashTag($cache_tag) {
     return substr(md5(Settings::getHashSalt() . $cache_tag), 0, 5);
@@ -66,18 +77,22 @@ class StackPathApi {
   /**
    * Adds default parameters.
    *
-   * @param $input
+   * @param array $input
+   *   Additional parameters.
    *
    * @return array
+   *   Array of request parameters.
    */
-  private function prepareRequestParameters($input = []) {
+  private function prepareRequestParameters(array $input = []) {
     $parameters = [];
     if (!empty($input)) {
       $parameters['json'] = $input;
     }
-    // Default values can be overridden by defining them in the $opts passed to request.
+    // Default values can be overridden by defining them in the $opts passed to
+    // request.
     $default_options = [
-      // Unless overridden, every payload will send the Accept header set to application/json.
+      // Unless overridden, every payload will send the Accept header set to
+      // application/json.
       'headers' => [
         'Accept' => 'application/json',
       ],
@@ -92,10 +107,15 @@ class StackPathApi {
   }
 
   /**
-   * @param $client_id
-   * @param $client_secret
+   * Get Token.
+   *
+   * @param string $client_id
+   *   Client ID.
+   * @param string $client_secret
+   *   Client secret.
    *
    * @return bool|mixed|string
+   *   Token string. FALSE in case of failure.
    */
   public function getToken($client_id, $client_secret) {
     if (!empty($this->token)) {
@@ -113,36 +133,50 @@ class StackPathApi {
         $this->token = $data['access_token'];
         return $this->token;
       }
-    } catch (\Exception $e) {
+    }
+    catch (Exception $e) {
       $this->handleException($e);
     }
     return FALSE;
   }
 
   /**
-   * @param $response
+   * Process response.
+   *
+   * @param \Psr\Http\Message\ResponseInterface $response
+   *   Response object.
    *
    * @return mixed
+   *   Decoded response.
    */
   private function processResponse(ResponseInterface $response) {
     return Json::decode($response->getBody()->getContents());
   }
 
   /**
+   * Handle exceptions, by logging them as an error.
+   *
    * @param \Exception $e
+   *   Exception.
    */
-  private function handleException(\Exception $e) {
+  private function handleException(Exception $e) {
     $this->logger->error($e->getMessage());
   }
 
   /**
    * Invalidates CDN caches.
    *
-   * @param $stack_id
-   * @param null $type
+   * @param string $stack_id
+   *   Stack ID.
+   * @param string $type
+   *   Cache type.
    * @param array $invalidations
+   *   Array of invalidations.
+   *
+   * @return mixed
+   *   Result of the invalidation request. FALSE if an error occurred.
    */
-  public function invalidate($stack_id, $type = NULL, array $invalidations = []) {
+  public function invalidate($stack_id, $type = '', array $invalidations = []) {
     $root_url = new Url('<front>', [], ['absolute' => TRUE]);
     $url_parts = parse_url($root_url->toString());
     $url = $url_parts['scheme'] . '://' . $url_parts['host'];
@@ -165,6 +199,7 @@ class StackPathApi {
           ];
         }
         break;
+
       case 'url':
         foreach ($invalidations as $invalidation) {
           $params['items'][] = [
@@ -173,6 +208,7 @@ class StackPathApi {
           ];
         }
         break;
+
       default:
         $params['items'][] = [
           'url' => $url,
@@ -183,11 +219,12 @@ class StackPathApi {
     try {
       $params = $this->prepareRequestParameters($params);
       $response = $this->httpClient->post('/cdn/v1/stacks/' . $stack_id . '/purge', $params);
-      $data = $this->processResponse($response);
-      return $data;
-    } catch (\Exception $e) {
+      return $this->processResponse($response);
+    }
+    catch (Exception $e) {
       $this->handleException($e);
     }
+    return FALSE;
   }
 
 }
diff --git a/stackpath.info.yml b/stackpath.info.yml
index 9287b0b..8a5d0aa 100644
--- a/stackpath.info.yml
+++ b/stackpath.info.yml
@@ -2,5 +2,6 @@ name: StackPath
 description: Provides purger plugin for StackPath CDN.
 type: module
 core: 8.x
+core_version_requirement: ^8 || ^9
 dependencies:
   - purge:purge
