From 2b36f54f60063e8d40e7c46a66de984ac0e0adbf Mon Sep 17 00:00:00 2001
From: Aaron Bauman <aaron@messageagency.com>
Date: Mon, 11 Sep 2017 13:50:13 -0400
Subject: [PATCH] php linter

---
 .../salesforce_encrypt.install                | 20 ++--
 .../salesforce_encrypt.module                 |  4 +
 .../src/Form/SettingsForm.php                 |  6 +-
 .../src/Rest/EncryptedRestClientInterface.php |  7 +-
 .../src/Rest/RestClient.php                   | 15 ++-
 .../src/SalesforceEncryptServiceProvider.php  |  3 +-
 .../tests/src/Unit/RestClientTest.php         |  9 +-
 .../salesforce_example-apex_endpoint.php      | 43 +++++----
 .../salesforce_example.info.yml               |  2 +-
 .../salesforce_example.module                 | 40 ++++----
 .../salesforce_example.services.yml           |  1 -
 .../SalesforceExampleSubscriber.php           | 22 ++++-
 .../salesforce_logger.services.yml            |  1 -
 .../SalesforceLoggerSubscriber.php            |  4 +-
 .../salesforce_mapping.info.yml               |  1 -
 .../salesforce_mapping.install                | 19 ++--
 .../salesforce_mapping.links.action.yml       |  2 +-
 .../salesforce_mapping.module                 |  6 +-
 .../src/Controller/MappedObjectController.php | 15 ++-
 .../src/Entity/MappedObject.php               | 34 ++++---
 .../src/Entity/MappedObjectInterface.php      |  6 +-
 .../src/Entity/SalesforceMapping.php          | 34 +++----
 .../src/Entity/SalesforceMappingInterface.php | 44 +++++----
 .../Event/SalesforcePullEntityValueEvent.php  | 17 +++-
 .../src/Event/SalesforcePullEvent.php         | 11 ++-
 .../src/Event/SalesforcePushEvent.php         |  6 +-
 .../src/Event/SalesforcePushOpEvent.php       |  7 +-
 .../src/Event/SalesforcePushParamsEvent.php   | 10 +-
 .../src/Event/SalesforceQueryEvent.php        |  4 +-
 .../src/Form/MappedObjectForm.php             | 40 ++++----
 .../src/Form/SalesforceMappingFieldsForm.php  |  4 +-
 .../Form/SalesforceMappingFormCrudBase.php    | 21 ++---
 .../src/MappedObjectList.php                  |  6 +-
 .../src/MappedObjectStorageSchema.php         | 11 ++-
 .../src/MappingConstants.php                  |  3 +-
 .../Plugin/Field/CalculatedLinkItemBase.php   |  7 +-
 .../src/Plugin/Field/ComputedItemList.php     |  7 +-
 .../Field/FieldType/SalesforceLinkItem.php    |  6 +-
 .../SalesforceMappedObjectAddLocalAction.php  |  5 +-
 .../Plugin/SalesforceMappingField/Broken.php  | 14 +--
 .../SalesforceMappingField/Constant.php       |  2 +-
 .../SalesforceMappingField/Properties.php     |  3 +-
 .../SalesforceMappingField/RecordType.php     |  5 +-
 .../SalesforceMappingField/RelatedIDs.php     |  3 +-
 .../RelatedProperties.php                     |  3 +-
 .../Plugin/SalesforceMappingField/Token.php   |  2 +-
 .../Constraint/MappingEntityConstraint.php    |  5 +-
 .../MappingEntityTypeConstraint.php           |  2 +-
 .../MappingEntityTypeConstraintValidator.php  |  5 +-
 .../Constraint/MappingSfidConstraint.php      |  7 +-
 .../Constraint/UniqueFieldsConstraint.php     |  5 +-
 .../UniqueFieldsConstraintValidator.php       |  2 +-
 modules/salesforce_mapping/src/PushParams.php | 10 +-
 .../src/Routing/RouteSubscriber.php           | 12 +--
 .../src/SalesforceMappingFieldPluginBase.php  | 32 +++----
 .../SalesforceMappingFieldPluginInterface.php | 23 +++--
 .../SalesforceMappingFieldPluginManager.php   |  5 +-
 .../src/SalesforceMappingStorage.php          |  5 +-
 .../src/SalesforcePullEntityValueEvent.php    |  3 +
 .../src/SalesforcePullEvent.php               |  3 +
 .../src/SalesforcePushEvent.php               |  3 +
 .../src/SalesforcePushOpEvent.php             |  3 +
 .../src/SalesforcePushParamsEvent.php         |  3 +
 .../src/SalesforceQueryEvent.php              |  3 +
 .../Tests/SalesforceMappingCrudFormTest.php   |  5 +-
 .../src/Tests/TestMappedObjectList.php        | 12 ++-
 .../tests/src/Unit/MappedObjectTest.php       | 37 +++-----
 .../src/Unit/SalesforceMappingStorageTest.php |  1 -
 .../tests/src/Unit/SalesforceMappingTest.php  | 43 ++++-----
 .../salesforce_pull/salesforce_pull.drush.inc | 30 ++++--
 .../salesforce_pull/salesforce_pull.install   |  7 +-
 .../salesforce_pull/salesforce_pull.module    |  1 -
 modules/salesforce_pull/src/DeleteHandler.php |  3 +-
 .../src/Plugin/QueueWorker/PullBase.php       | 18 ++--
 modules/salesforce_pull/src/PullQueueItem.php |  7 +-
 modules/salesforce_pull/src/QueueHandler.php  | 44 +++++----
 .../tests/src/Unit/DeleteHandlerTest.php      | 11 ++-
 .../tests/src/Unit/PullBaseTest.php           | 57 +++++------
 .../tests/src/Unit/PullQueueItemTest.php      |  2 +-
 .../tests/src/Unit/QueueHandlerTest.php       | 21 ++---
 .../salesforce_push/salesforce_push.drush.inc |  9 +-
 .../salesforce_push/salesforce_push.install   |  9 +-
 .../salesforce_push/salesforce_push.module    | 13 ++-
 .../SalesforcePushQueueProcessor/Rest.php     | 33 ++++---
 .../salesforce_push/src/PushController.php    | 10 +-
 modules/salesforce_push/src/PushQueue.php     | 34 ++++---
 .../src/PushQueueInterface.php                |  9 +-
 .../src/PushQueueProcessorInterface.php       |  1 -
 .../src/PushQueueProcessorPluginManager.php   |  6 +-
 .../tests/src/Unit/PushQueueTest.php          |  5 +-
 .../SalesforcePushQueueProcessorRestTest.php  | 36 ++++---
 salesforce.api.php                            | 67 ++++++++-----
 salesforce.drush.inc                          | 94 ++++++++++---------
 salesforce.info.yml                           |  2 +-
 salesforce.install                            | 28 ++++--
 salesforce.libraries.yml                      |  1 -
 salesforce.module                             | 12 +--
 salesforce.permissions.yml                    |  2 +-
 src/Controller/SalesforceController.php       |  9 +-
 src/EntityNotFoundException.php               | 13 +++
 src/Event/SalesforceBaseEvent.php             |  2 +-
 src/Event/SalesforceEvents.php                | 17 ++--
 src/Event/SalesforceExceptionEvent.php        |  1 -
 .../SalesforceExceptionEventInterface.php     |  5 +-
 src/Form/AuthorizeForm.php                    |  3 +
 src/Rest/RestClient.php                       | 41 ++++----
 src/Rest/RestClientInterface.php              | 36 ++++---
 src/Rest/RestException.php                    |  6 ++
 src/Rest/RestResponse.php                     | 10 +-
 src/Rest/RestResponse_Describe.php            | 24 +++--
 src/Rest/RestResponse_Resources.php           | 10 +-
 src/SFID.php                                  |  9 ++
 src/SObject.php                               | 19 +++-
 src/SalesforceEvents.php                      |  4 +-
 src/SelectQueryResult.php                     | 33 +++++--
 src/Tests/SalesforceAdminSettingsTest.php     | 15 +--
 src/Tests/TestHttpClient.php                  |  6 +-
 src/Tests/TestHttpClientFactory.php           |  2 +-
 ...alesforceTestRestClientServiceProvider.php |  1 +
 tests/salesforce.test                         |  3 +-
 tests/src/Unit/AuthorizeFormTest.php          |  2 -
 tests/src/Unit/RestClientTest.php             | 38 ++++----
 tests/src/Unit/SFIDTest.php                   | 12 ++-
 tests/src/Unit/SObjectTest.php                | 32 ++++---
 tests/src/Unit/SelectQueryResultTest.php      | 17 ++--
 125 files changed, 984 insertions(+), 722 deletions(-)

diff --git a/modules/salesforce_encrypt/salesforce_encrypt.install b/modules/salesforce_encrypt/salesforce_encrypt.install
index 90aeb7be..9f578b1c 100644
--- a/modules/salesforce_encrypt/salesforce_encrypt.install
+++ b/modules/salesforce_encrypt/salesforce_encrypt.install
@@ -1,5 +1,9 @@
 <?php
 
+/**
+ * @file
+ */
+
 use Drupal\Core\Url;
 use Drupal\salesforce\EntityNotFoundException;
 
@@ -14,23 +18,23 @@ function salesforce_encrypt_requirements($phase) {
       $profile = \Drupal::service('salesforce.client')->getEncryptionProfile();
     }
     catch (EntityNotFoundException $e) {
-      // noop
+      // Noop.
     }
-    $requirements['salesforce_encrypt'] = array(
+    $requirements['salesforce_encrypt'] = [
       'title' => t('Salesforce Encrypt'),
       'value' => t('Encryption Profile'),
-    );
+    ];
     if (empty($profile)) {
-      $requirements['salesforce_encrypt'] += array(
+      $requirements['salesforce_encrypt'] += [
         'severity' => REQUIREMENT_ERROR,
-        'description' => t('You need to <a href="@url">select an encryption profile</a> in order to fully enable Salesforce Encrypt and protect sensitive information.', array('@url' => Url::fromRoute('salesforce_encrypt.settings')->toString())),
-      );
+        'description' => t('You need to <a href="@url">select an encryption profile</a> in order to fully enable Salesforce Encrypt and protect sensitive information.', ['@url' => Url::fromRoute('salesforce_encrypt.settings')->toString()]),
+      ];
     }
     else {
-      $requirements['salesforce_encrypt'] += array(
+      $requirements['salesforce_encrypt'] += [
         'severity' => REQUIREMENT_OK,
         'description' => t('Profile id: <a href=":url">%profile</a>', ['%profile' => $profile->id(), ':url' => $profile->url()]),
-      );
+      ];
     }
   }
   return $requirements;
diff --git a/modules/salesforce_encrypt/salesforce_encrypt.module b/modules/salesforce_encrypt/salesforce_encrypt.module
index a7c3b98d..ec0966d3 100644
--- a/modules/salesforce_encrypt/salesforce_encrypt.module
+++ b/modules/salesforce_encrypt/salesforce_encrypt.module
@@ -1,5 +1,9 @@
 <?php
 
+/**
+ * @file
+ */
+
 use Drupal\encrypt\EncryptionProfileInterface;
 
 /**
diff --git a/modules/salesforce_encrypt/src/Form/SettingsForm.php b/modules/salesforce_encrypt/src/Form/SettingsForm.php
index a231acbf..b9fbd4c9 100644
--- a/modules/salesforce_encrypt/src/Form/SettingsForm.php
+++ b/modules/salesforce_encrypt/src/Form/SettingsForm.php
@@ -77,11 +77,11 @@ class SettingsForm extends FormBase {
     ];
 
     $form['actions']['#type'] = 'actions';
-    $form['actions']['submit'] = array(
+    $form['actions']['submit'] = [
       '#type' => 'submit',
       '#value' => $this->t('Save configuration'),
       '#button_type' => 'primary',
-    );
+    ];
 
     // By default, render the form using system-config-form.html.twig.
     $form['#theme'] = 'system_config_form';
@@ -120,7 +120,7 @@ class SettingsForm extends FormBase {
       $this->client->enableEncryption($profile);
     }
     else {
-      // Changing encryption profiles: disable, then re-enable
+      // Changing encryption profiles: disable, then re-enable.
       $this->client->disableEncryption();
       $this->client->enableEncryption($profile);
     }
diff --git a/modules/salesforce_encrypt/src/Rest/EncryptedRestClientInterface.php b/modules/salesforce_encrypt/src/Rest/EncryptedRestClientInterface.php
index 4ec0d5ec..9542530a 100644
--- a/modules/salesforce_encrypt/src/Rest/EncryptedRestClientInterface.php
+++ b/modules/salesforce_encrypt/src/Rest/EncryptedRestClientInterface.php
@@ -14,7 +14,7 @@ interface EncryptedRestClientInterface extends RestClientInterface {
    * Encrypts all sensitive salesforce config values.
    *
    * @param string $profile_id
-   *   Id of the Encrypt Profile to use for encryption
+   *   Id of the Encrypt Profile to use for encryption.
    *
    * @return bool
    *   TRUE if encryption was enabled or FALSE if it is already enabled
@@ -30,6 +30,7 @@ interface EncryptedRestClientInterface extends RestClientInterface {
    *
    * @return bool
    *   TRUE if encryption was disabled or FALSE if it is already disabled
+   *
    * @throws RuntimeException
    *   if Salesforce encryption profile hasn't been selected
    */
@@ -42,7 +43,7 @@ interface EncryptedRestClientInterface extends RestClientInterface {
    * @throws Drupal\salesforce\EntityNotFoundException
    *   if a profile is assigned, but cannot be loaded.
    *
-   * @return EncryptionProfileInterface | NULL
+   * @return \Drupal\encrypt\EncryptionProfileInterface | NULL
    */
   public function getEncryptionProfile();
 
@@ -51,7 +52,7 @@ interface EncryptedRestClientInterface extends RestClientInterface {
    * it gets deleted. Check to see if the  profile being deleted is the one
    * assigned for encryption; if so, decrypt our config and disable encryption.
    *
-   * @param EncryptionProfileInterface $profile
+   * @param \Drupal\encrypt\EncryptionProfileInterface $profile
    */
   public function hookEncryptionProfileDelete(EncryptionProfileInterface $profile);
 
diff --git a/modules/salesforce_encrypt/src/Rest/RestClient.php b/modules/salesforce_encrypt/src/Rest/RestClient.php
index cd2bb8b9..09e82c3f 100644
--- a/modules/salesforce_encrypt/src/Rest/RestClient.php
+++ b/modules/salesforce_encrypt/src/Rest/RestClient.php
@@ -82,12 +82,18 @@ class RestClient extends SalesforceRestClient implements EncryptedRestClientInte
     return $ret;
   }
 
+  /**
+   *
+   */
   public function hookEncryptionProfileDelete(EncryptionProfileInterface $profile) {
     if ($this->encryptionProfileId == $profile->id()) {
       $this->disableEncryption();
     }
   }
 
+  /**
+   *
+   */
   protected function setEncryption(EncryptionProfileInterface $profile = NULL) {
     if (!$this->lock->acquire('salesforce_encrypt')) {
       throw new \RuntimeException('Unable to acquire lock.');
@@ -127,6 +133,9 @@ class RestClient extends SalesforceRestClient implements EncryptedRestClientInte
     return $profile;
   }
 
+  /**
+   *
+   */
   protected function getDecrypted($key) {
     $value = $this->state->get($key);
     try {
@@ -147,6 +156,9 @@ class RestClient extends SalesforceRestClient implements EncryptedRestClientInte
     return FALSE;
   }
 
+  /**
+   *
+   */
   protected function setEncrypted($key, $value) {
     try {
       $profile = $this->getEncryptionProfile();
@@ -207,7 +219,7 @@ class RestClient extends SalesforceRestClient implements EncryptedRestClientInte
       $profile_id = $this->getEncryptionProfile();
     }
     catch (EntityNotFoundException $e) {
-      // noop
+      // Noop.
     }
     if (!empty($profile_id) && is_array($data)) {
       $data = serialize($data);
@@ -230,7 +242,6 @@ class RestClient extends SalesforceRestClient implements EncryptedRestClientInte
     return $value;
   }
 
-
   /**
    *
    */
diff --git a/modules/salesforce_encrypt/src/SalesforceEncryptServiceProvider.php b/modules/salesforce_encrypt/src/SalesforceEncryptServiceProvider.php
index cb1dd9df..6146bfbd 100644
--- a/modules/salesforce_encrypt/src/SalesforceEncryptServiceProvider.php
+++ b/modules/salesforce_encrypt/src/SalesforceEncryptServiceProvider.php
@@ -16,11 +16,12 @@ class SalesforceEncryptServiceProvider extends ServiceProviderBase {
    * {@inheritdoc}
    */
   public function alter(ContainerBuilder $container) {
-    // Overrides salesforce.client class with our EncryptedRestClientInterface
+    // Overrides salesforce.client class with our EncryptedRestClientInterface.
     $container->getDefinition('salesforce.client')
       ->setClass(RestClient::class)
       ->addArgument(new Reference('encryption'))
       ->addArgument(new Reference('encrypt.encryption_profile.manager'))
       ->addArgument(new Reference('lock'));
   }
+
 }
diff --git a/modules/salesforce_encrypt/tests/src/Unit/RestClientTest.php b/modules/salesforce_encrypt/tests/src/Unit/RestClientTest.php
index bb5d8b83..c4e5aafa 100644
--- a/modules/salesforce_encrypt/tests/src/Unit/RestClientTest.php
+++ b/modules/salesforce_encrypt/tests/src/Unit/RestClientTest.php
@@ -23,11 +23,14 @@ class RestClientTest extends UnitTestCase {
 
   static $modules = ['key', 'encrypt', 'salesforce', 'salesforce_encrypt'];
 
+  /**
+   *
+   */
   public function setUp() {
     parent::setUp();
     $this->accessToken = 'foo';
     $this->refreshToken = 'bar';
-    $this->identity = array('zee' => 'bang');
+    $this->identity = ['zee' => 'bang'];
 
     $this->httpClient = $this->getMock(Client::CLASS);
     $this->configFactory =
@@ -56,7 +59,7 @@ class RestClientTest extends UnitTestCase {
    * This test covers the case where access token is NULL.
    */
   public function testGetDecryptedNull() {
-    // Test unencrypted
+    // Test unencrypted.
     $this->state->expects($this->any())
       ->method('get')
       ->willReturn(NULL);
@@ -76,7 +79,7 @@ class RestClientTest extends UnitTestCase {
    * This test covers the case where access token is not NULL.
    */
   public function testGetDecryptedNotNull() {
-    // Test unencrypted
+    // Test unencrypted.
     $this->state->expects($this->once())
       ->method('get')
       ->willReturn('not null');
diff --git a/modules/salesforce_example/salesforce_example-apex_endpoint.php b/modules/salesforce_example/salesforce_example-apex_endpoint.php
index 1c6eda6a..fba0315b 100644
--- a/modules/salesforce_example/salesforce_example-apex_endpoint.php
+++ b/modules/salesforce_example/salesforce_example-apex_endpoint.php
@@ -1,6 +1,10 @@
 <?php
 
-// This line for "security" purposes:
+/**
+ * @file
+ * This line for "security" purposes:.
+ */
+
 exit;
 
 // Include the exception class:
@@ -12,15 +16,15 @@ use Drupal\salesforce\Rest\RestException;
 $path = '/services/apexrest/MyEndpoint?getParam1=getValue1&getParam2=getValue2';
 
 // Create your POST body appropriately, if necessary.
-// This must be an array, which will be json-encoded before POSTing
-$payload = ['postParam1' => 'postValue1', 'postParam2' => 'postValue2', ... ];
+// This must be an array, which will be json-encoded before POSTing.
+$payload = ['postParam1' => 'postValue1', 'postParam2' => 'postValue2', ...];
 
 $returnObject = FALSE;
 // Uncomment the following line to get Drupal\salesforce\Rest\RestResponse object instead of json-decoded value:
-// $returnObject = TRUE;
-
+// $returnObject = TRUE;.
 // Instantiate the client so we can reference the response later if necessary:
-/** @var Drupal\salesforce\Rest\RestClient **/
+/**
+ * @var Drupal\salesforce\Rest\RestClient **/
 $client = \Drupal::service('salesforce.client');
 
 $method = 'POST';
@@ -31,33 +35,36 @@ try {
   // status code 401.
   // $response_data is json-decoded response body.
   // (or RestResponse if $returnObject is TRUE).
-  /** @var mixed array | Drupal\salesforce\Rest\RestResponse **/
+  /**
+ * @var mixed array | Drupal\salesforce\Rest\RestResponse **/
   $response_data = $client->apiCall($path, $payload, $method, $returnObject);
 }
 catch (RestException $e) {
   // RestException will be raised if:
-    // - SF responds with 300+ status code, or if Response 
-    // - SF response body is not valid JSON
-    // - SF response body is empty
-    // - SF response contains an 'error' element
-    // - SF response contains an 'errorCode' element
-
-  /** @var Psr\Http\Message\ResponseInterface **/
+  // - SF responds with 300+ status code, or if Response
+  // - SF response body is not valid JSON
+  // - SF response body is empty
+  // - SF response contains an 'error' element
+  // - SF response contains an 'errorCode' element.
+  /**
+ * @var Psr\Http\Message\ResponseInterface **/
   $response = $e->getResponse();
 
   // Convenience wrapper for $response->getBody()->getContents()
-  /** @var string **/
+  /**
+ * @var string **/
   $responseBody = $e->getResponseBody();
 
-  /** @var int **/
+  /**
+ * @var int **/
   $statusCode = $response->getStatusCode();
 
-  // insert exception handling here.
+  // Insert exception handling here.
   // ...
 }
 catch (\Exception $e) {
   // Another exception may be thrown, e.g. for a network error, missing OAuth credentials, invalid params, etc.
-  // see GuzzleHttp\Client
+  // see GuzzleHttp\Client.
 }
 
 ```
diff --git a/modules/salesforce_example/salesforce_example.info.yml b/modules/salesforce_example/salesforce_example.info.yml
index 3bc47ae7..07ace121 100644
--- a/modules/salesforce_example/salesforce_example.info.yml
+++ b/modules/salesforce_example/salesforce_example.info.yml
@@ -6,4 +6,4 @@ package: Salesforce
 dependencies:
   - salesforce
   - salesforce_push
-  - salesforce_mapping
\ No newline at end of file
+  - salesforce_mapping
diff --git a/modules/salesforce_example/salesforce_example.module b/modules/salesforce_example/salesforce_example.module
index 089da371..03e5d72f 100644
--- a/modules/salesforce_example/salesforce_example.module
+++ b/modules/salesforce_example/salesforce_example.module
@@ -5,6 +5,7 @@
  * Contains salesforce_example.module.
  */
 
+use Drupal\salesforce\SFID;
 use Drupal\Core\Routing\RouteMatchInterface;
 use Drupal\Core\Entity\EntityInterface;
 
@@ -25,10 +26,10 @@ function salesforce_example_help($route_name, RouteMatchInterface $route_match)
 }
 
 /**
- * implementation of hook_entity_insert()
+ * Implementation of hook_entity_insert()
  *
- * for this example we are simply calling a "manage" function and passing a
- * parameter to indicate what type of operaiton is taking place
+ * For this example we are simply calling a "manage" function and passing a
+ * parameter to indicate what type of operaiton is taking place.
  *
  * @param \Drupal\Core\Entity\EntityInterface $entity
  */
@@ -37,11 +38,10 @@ function salesforce_example_entity_insert(EntityInterface $entity) {
 }
 
 /**
- * implementation of hook_entity_update()
+ * Implementation of hook_entity_update()
  *
- *
- * for this example we are simply calling a "manage" function and passing a
- * parameter to indicate what type of operaiton is taking place
+ * For this example we are simply calling a "manage" function and passing a
+ * parameter to indicate what type of operaiton is taking place.
  *
  * @param \Drupal\Core\Entity\EntityInterface $entity
  */
@@ -50,11 +50,10 @@ function salesforce_example_entity_update(EntityInterface $entity) {
 }
 
 /**
- * implementation of hook_entity_delete()
- *
+ * Implementation of hook_entity_delete()
  *
- * for this example we are simply calling a "manage" function and passing a
- * parameter to indicate what type of operaiton is taking place
+ * For this example we are simply calling a "manage" function and passing a
+ * parameter to indicate what type of operaiton is taking place.
  *
  * @param \Drupal\Core\Entity\EntityInterface $entity
  */
@@ -77,16 +76,15 @@ function salesforce_example_entity_delete(EntityInterface $entity) {
  * will have four Product Variations, one for each size.  The Product object will have entity references
  * to each Product Variation.
  *
- *
  * @param \Drupal\Core\Entity\EntityInterface $entity
  * @param $op
  */
-function _salesforce_example_entity_manage(\Drupal\Core\Entity\EntityInterface &$entity, $op) {
+function _salesforce_example_entity_manage(EntityInterface &$entity, $op) {
 
   /** @var \Drupal\salesforce_mapping\MappedObjectStorage $mapped_object_storage */
   $mapped_object_storage = &drupal_static(__FUNCTION__);
 
-  if(!isset($mapped_object_storage)) {
+  if (!isset($mapped_object_storage)) {
     $mapped_object_storage = \Drupal::service('entity.manager')
       ->getStorage('salesforce_mapped_object');
   }
@@ -97,7 +95,7 @@ function _salesforce_example_entity_manage(\Drupal\Core\Entity\EntityInterface &
    * we could very well have product variations that are not being managed by the SFDC integration.
    * If this is the case, we do not want to be programmatically manipulating these objects.
    */
-  if($entity->getEntityTypeId() == 'salesforce_mapped_object') {
+  if ($entity->getEntityTypeId() == 'salesforce_mapped_object') {
 
     /** @var \Drupal\salesforce_mapping\Entity\MappedObject $entity */
     $mapped_entity = $entity->getMappedEntity();
@@ -119,20 +117,20 @@ function _salesforce_example_entity_manage(\Drupal\Core\Entity\EntityInterface &
          * the Salesforce Modules storage service and using the SDFC ID as the key.
          */
 
-        // get the SFDC ID for the parent Product (the Product -> Product Variation already exists in SFDC,
+        // Get the SFDC ID for the parent Product (the Product -> Product Variation already exists in SFDC,
         // conveniently mirroring the Drupal Commerce model)
         $course_sfdc_id = $sf->field('Parent_Product__c');
 
-        // create an SFID object using the vlaue
-        $sfid = new \Drupal\salesforce\SFID($course_sfdc_id);
+        // Create an SFID object using the vlaue.
+        $sfid = new SFID($course_sfdc_id);
 
-        // use the storage object to load the mapped object(s) that correspond to the SFID
+        // Use the storage object to load the mapped object(s) that correspond to the SFID.
         $mapped_objects = $mapped_object_storage->loadBySfid($sfid);
 
         if (is_array($mapped_objects)) {
 
-          // we are lazily assuming that there will only be one corresponding prodctu object
-          // and that it will be the first item in the returned array
+          // We are lazily assuming that there will only be one corresponding prodctu object
+          // and that it will be the first item in the returned array.
           $mapped_object = current($mapped_objects);
 
           /** @var \Drupal\commerce_product\Entity\Product $course */
diff --git a/modules/salesforce_example/salesforce_example.services.yml b/modules/salesforce_example/salesforce_example.services.yml
index 257b74a9..439b2de6 100644
--- a/modules/salesforce_example/salesforce_example.services.yml
+++ b/modules/salesforce_example/salesforce_example.services.yml
@@ -4,4 +4,3 @@ services:
     arguments: []
     tags:
       - { name: event_subscriber }
-
diff --git a/modules/salesforce_example/src/EventSubscriber/SalesforceExampleSubscriber.php b/modules/salesforce_example/src/EventSubscriber/SalesforceExampleSubscriber.php
index e7ada971..6f8f6509 100644
--- a/modules/salesforce_example/src/EventSubscriber/SalesforceExampleSubscriber.php
+++ b/modules/salesforce_example/src/EventSubscriber/SalesforceExampleSubscriber.php
@@ -8,16 +8,18 @@ use Drupal\salesforce_mapping\Event\SalesforcePushParamsEvent;
 use Symfony\Component\EventDispatcher\EventSubscriberInterface;
 use Drupal\salesforce\Exception;
 
-
 /**
  * Class SalesforceExampleSubscriber.
  * Trivial example of subscribing to salesforce.push_params event to set a
- * constant value for Contact.FirstName
+ * constant value for Contact.FirstName.
  *
  * @package Drupal\salesforce_example
  */
 class SalesforceExampleSubscriber implements EventSubscriberInterface {
 
+  /**
+   *
+   */
   public function pushAllowed(SalesforcePushOpEvent $event) {
     /** @var \Drupal\Core\Entity\Entity $entity */
     $entity = $event->getEntity();
@@ -26,6 +28,9 @@ class SalesforceExampleSubscriber implements EventSubscriberInterface {
     }
   }
 
+  /**
+   *
+   */
   public function pushParamsAlter(SalesforcePushParamsEvent $event) {
     $mapping = $event->getMapping();
     $mapped_object = $event->getMappedObject();
@@ -45,18 +50,25 @@ class SalesforceExampleSubscriber implements EventSubscriberInterface {
     $params->setParam('FirstName', 'SalesforceExample');
   }
 
+  /**
+   *
+   */
   public function pushSuccess(SalesforcePushParamsEvent $event) {
     switch ($event->getMappedObject()->getMapping()->id()) {
       case 'mapping1':
-        // do X
+        // Do X.
         break;
+
       case 'mapping2':
-        // do Y
+        // Do Y.
         break;
     }
     drupal_set_message('push success example subscriber!: ' . $event->getMappedObject()->sfid());
   }
 
+  /**
+   *
+   */
   public function pushFail(SalesforcePushOpEvent $event) {
     drupal_set_message('push fail example: ' . $event->getMappedObject()->id());
   }
@@ -64,7 +76,7 @@ class SalesforceExampleSubscriber implements EventSubscriberInterface {
   /**
    * {@inheritdoc}
    */
-  static function getSubscribedEvents() {
+  public static function getSubscribedEvents() {
     $events = [
       SalesforceEvents::PUSH_ALLOWED => 'pushAllowed',
       SalesforceEvents::PUSH_PARAMS => 'pushParamsAlter',
diff --git a/modules/salesforce_logger/salesforce_logger.services.yml b/modules/salesforce_logger/salesforce_logger.services.yml
index 07b82a8c..ec5f3b02 100644
--- a/modules/salesforce_logger/salesforce_logger.services.yml
+++ b/modules/salesforce_logger/salesforce_logger.services.yml
@@ -7,4 +7,3 @@ services:
     arguments: ['@logger.channel.salesforce']
     tags:
       - { name: event_subscriber }
-    
\ No newline at end of file
diff --git a/modules/salesforce_logger/src/EventSubscriber/SalesforceLoggerSubscriber.php b/modules/salesforce_logger/src/EventSubscriber/SalesforceLoggerSubscriber.php
index 6caa8eea..d5b15995 100644
--- a/modules/salesforce_logger/src/EventSubscriber/SalesforceLoggerSubscriber.php
+++ b/modules/salesforce_logger/src/EventSubscriber/SalesforceLoggerSubscriber.php
@@ -4,7 +4,6 @@ namespace Drupal\salesforce_logger\EventSubscriber;
 
 use Drupal\Core\Utility\Error;
 use Drupal\salesforce\Event\SalesforceEvents;
-use Drupal\salesforce\Exception;
 use Drupal\salesforce\Event\SalesforceExceptionEventInterface;
 use Psr\Log\LoggerInterface;
 use Symfony\Component\EventDispatcher\EventSubscriberInterface;
@@ -41,6 +40,9 @@ class SalesforceLoggerSubscriber implements EventSubscriberInterface {
     return $events;
   }
 
+  /**
+   *
+   */
   public function salesforceException(SalesforceExceptionEventInterface $event) {
     // @TODO configure log levels; only log if configured level >= error level
     $exception = $event->getException();
diff --git a/modules/salesforce_mapping/salesforce_mapping.info.yml b/modules/salesforce_mapping/salesforce_mapping.info.yml
index a9ebe2cb..9a5ffb78 100644
--- a/modules/salesforce_mapping/salesforce_mapping.info.yml
+++ b/modules/salesforce_mapping/salesforce_mapping.info.yml
@@ -7,4 +7,3 @@ configure: entity.salesforce_mapping.list
 dependencies:
   - salesforce
   - dynamic_entity_reference
-  
\ No newline at end of file
diff --git a/modules/salesforce_mapping/salesforce_mapping.install b/modules/salesforce_mapping/salesforce_mapping.install
index 85ac9c37..88032610 100644
--- a/modules/salesforce_mapping/salesforce_mapping.install
+++ b/modules/salesforce_mapping/salesforce_mapping.install
@@ -1,12 +1,11 @@
 <?php
 
-use Drupal\Core\Field\BaseFieldDefinition;
-use Drupal\Core\Entity\EntityTypeInterface;
-use Drupal\salesforce_mapping\Entity\MappedObject;
-use Drupal\salesforce_mapping\MappedObjectStorageSchema;
+/**
+ * @file
+ */
 
 /**
- * Copy entity_id-entity_type_id data into new mapped_entity field
+ * Copy entity_id-entity_type_id data into new mapped_entity field.
  */
 function salesforce_mapping_update_8001(&$sandbox) {
   if (!\Drupal::moduleHandler()->moduleExists('dynamic_entity_reference')) {
@@ -31,7 +30,7 @@ function salesforce_mapping_update_8001(&$sandbox) {
   // to the entity on load.
   $mapped_objects = db_query("SELECT id, entity_type_id, entity_id FROM salesforce_mapped_object WHERE id > {$sandbox['current_id']} ORDER BY id ASC LIMIT 3");
 
-  foreach($mapped_objects as $mapped_object_data) {
+  foreach ($mapped_objects as $mapped_object_data) {
     $sandbox['current_id'] = $mapped_object_data->id;
     $sandbox['progress']++;
 
@@ -50,7 +49,7 @@ function salesforce_mapping_update_8001(&$sandbox) {
   if ($sandbox['#finished'] >= 1) {
     return t('Mapped object update complete.');
   }
-  return t('Updated !n of !max mapped objects.', array('!n' => $sandbox['progress'], '!max' => $sandbox['max']));
+  return t('Updated !n of !max mapped objects.', ['!n' => $sandbox['progress'], '!max' => $sandbox['max']]);
 
 }
 
@@ -59,14 +58,14 @@ function salesforce_mapping_update_8001(&$sandbox) {
  */
 function salesforce_mapping_update_8002() {
   try {
-    // drop this index if it exists.
+    // Drop this index if it exists.
     db_drop_index('salesforce_mapped_object', 'entity__mapping');
   }
   catch (\Exception $e) {
-    // noop
+    // Noop.
   }
   db_drop_field('salesforce_mapped_object', 'entity_id');
   db_drop_field('salesforce_mapped_object', 'entity_type_id');
   db_drop_field('salesforce_mapped_object_revision', 'entity_id');
   db_drop_field('salesforce_mapped_object_revision', 'entity_type_id');
-}
\ No newline at end of file
+}
diff --git a/modules/salesforce_mapping/salesforce_mapping.links.action.yml b/modules/salesforce_mapping/salesforce_mapping.links.action.yml
index 66b88466..af56462b 100644
--- a/modules/salesforce_mapping/salesforce_mapping.links.action.yml
+++ b/modules/salesforce_mapping/salesforce_mapping.links.action.yml
@@ -48,4 +48,4 @@ salesforce_mapped_object.add_action:
   class: '\Drupal\salesforce_mapping\Plugin\Menu\LocalAction\SalesforceMappedObjectAddLocalAction'
   title: 'Create Mapped Object'
   appears_on:
-    - entity.salesforce_mapped_object.list
\ No newline at end of file
+    - entity.salesforce_mapped_object.list
diff --git a/modules/salesforce_mapping/salesforce_mapping.module b/modules/salesforce_mapping/salesforce_mapping.module
index 6c7d7998..0004d432 100644
--- a/modules/salesforce_mapping/salesforce_mapping.module
+++ b/modules/salesforce_mapping/salesforce_mapping.module
@@ -6,11 +6,12 @@
  */
 
 use Drupal\Core\Entity\EntityInterface;
-// Not sure if we'll actually need these, since entity API seems to provide everything:
 
+// Not sure if we'll actually need these, since entity API seems to provide everything:
 /**
  * Implements hook_entity_type_alter().
  */
+
 function salesforce_mapping_entity_type_alter(array &$entity_types) {
   /** @var $entity_types \Drupal\Core\Entity\EntityTypeInterface[] */
   foreach ($entity_types as $entity_type_id => $entity_type) {
@@ -21,6 +22,9 @@ function salesforce_mapping_entity_type_alter(array &$entity_types) {
   }
 }
 
+/**
+ *
+ */
 function salesforce_mapping_menu_local_actions_alter(&$local_actions) {
   foreach (\Drupal::entityManager()->getDefinitions() as $entity_type_id => $entity_type) {
     if ($entity_type->hasLinkTemplate('salesforce')) {
diff --git a/modules/salesforce_mapping/src/Controller/MappedObjectController.php b/modules/salesforce_mapping/src/Controller/MappedObjectController.php
index a2042747..c058f1b6 100644
--- a/modules/salesforce_mapping/src/Controller/MappedObjectController.php
+++ b/modules/salesforce_mapping/src/Controller/MappedObjectController.php
@@ -5,7 +5,6 @@ namespace Drupal\salesforce_mapping\Controller;
 use Drupal\Core\Controller\ControllerBase;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Routing\RouteMatchInterface;
-use Drupal\salesforce_mapping\Entity\MappedObject;
 
 /**
  * Returns responses for devel module routes.
@@ -16,9 +15,9 @@ class MappedObjectController extends ControllerBase {
    * Helper function to get entity from router path
    * e.g. get User from user/1/salesforce.
    *
-   * @param RouteMatchInterface $route_match
+   * @param \Drupal\Core\Routing\RouteMatchInterface $route_match
    *
-   * @return EntityInterface
+   * @return \Drupal\Core\Entity\EntityInterface
    *
    * @throws Exception if an EntityInterface is not found at the given route
    *
@@ -41,10 +40,10 @@ class MappedObjectController extends ControllerBase {
   /**
    * Helper function to fetch existing MappedObject or create a new one.
    *
-   * @param EntityInterface $entity
+   * @param \Drupal\Core\Entity\EntityInterface $entity
    *   The entity to be mapped.
    *
-   * @return MappedObject
+   * @return \Drupal\salesforce_mapping\Entity\MappedObject
    */
   private function getMappedObjects(EntityInterface $entity) {
     // @TODO this probably belongs in a service
@@ -58,17 +57,17 @@ class MappedObjectController extends ControllerBase {
    * List mapped objects for the entity along the current route.
    *
    * @param \Drupal\Core\Routing\RouteMatchInterface $route_match
-   *    A RouteMatch object.
+   *   A RouteMatch object.
    *
    * @return array
-   *    Array of page elements to render.
+   *   Array of page elements to render.
    */
   public function listing(RouteMatchInterface $route_match) {
     $entity = $this->getEntity($route_match);
     $salesforce_mapped_objects = $this->getMappedObjects($entity);
     if (empty($salesforce_mapped_objects)) {
       return [
-        '#markup' => $this->t('No mapped objects for %label.', ['%label' => $entity->label()])
+        '#markup' => $this->t('No mapped objects for %label.', ['%label' => $entity->label()]),
       ];
     }
 
diff --git a/modules/salesforce_mapping/src/Entity/MappedObject.php b/modules/salesforce_mapping/src/Entity/MappedObject.php
index cfcc2b38..70f7107a 100644
--- a/modules/salesforce_mapping/src/Entity/MappedObject.php
+++ b/modules/salesforce_mapping/src/Entity/MappedObject.php
@@ -36,7 +36,7 @@ use Drupal\salesforce_mapping\Plugin\Field\ComputedItemList;
  *     "storage" = "Drupal\salesforce_mapping\MappedObjectStorage",
  *     "storage_schema" = "Drupal\salesforce_mapping\MappedObjectStorageSchema",
  *     "view_builder" = "Drupal\Core\Entity\EntityViewBuilder",
-*      "views_data" = "Drupal\views\EntityViewsData",
+ *      "views_data" = "Drupal\views\EntityViewsData",
  *     "list_builder" = "Drupal\salesforce_mapping\MappedObjectList",
  *     "form" = {
  *       "default" = "Drupal\salesforce_mapping\Form\MappedObjectForm",
@@ -76,7 +76,7 @@ class MappedObject extends RevisionableContentEntityBase implements MappedObject
   /**
    * Salesforce Object.
    *
-   * @var SObject
+   * @var \Drupal\salesforce\SObject
    */
   protected $sf_object = NULL;
 
@@ -261,7 +261,7 @@ class MappedObject extends RevisionableContentEntityBase implements MappedObject
   /**
    * Get the mapped Drupal entity.
    *
-   * @return EntityInterface
+   * @return \Drupal\Core\Entity\EntityInterface
    *   The mapped Drupal entity.
    */
   public function getMappedEntity() {
@@ -322,7 +322,7 @@ class MappedObject extends RevisionableContentEntityBase implements MappedObject
 
   /**
    * @return mixed
-   *  SFID or NULL depending on result from SF.
+   *   SFID or NULL depending on result from SF.
    */
   public function push() {
     // @TODO need error handling, logging, and hook invocations within this function, where we can provide full context, or short of that clear documentation on how callers should handle errors and exceptions. At the very least, we need to make sure to include $params in some kind of exception if we're not going to handle it inside this function.
@@ -416,7 +416,7 @@ class MappedObject extends RevisionableContentEntityBase implements MappedObject
   /**
    * Attach a Drupal entity to the mapped object.
    *
-   * @param EntityInterface $entity
+   * @param \Drupal\Core\Entity\EntityInterface $entity
    *   The entity to be attached.
    *
    * @return $this
@@ -426,12 +426,15 @@ class MappedObject extends RevisionableContentEntityBase implements MappedObject
     return $this;
   }
 
+  /**
+   *
+   */
   public function getDrupalEntityStub(EntityInterface $entity = NULL) {
     return $this->drupal_entity_stub;
   }
 
   /**
-   * @param SObject $sf_object
+   * @param \Drupal\salesforce\SObject $sf_object
    *
    * @return $this
    */
@@ -442,7 +445,8 @@ class MappedObject extends RevisionableContentEntityBase implements MappedObject
 
   /**
    * Get the mapped Salesforce record.
-   * @return SObject
+   *
+   * @return \Drupal\salesforce\SObject
    */
   public function getSalesforceRecord() {
     return $this->sf_object;
@@ -511,14 +515,14 @@ class MappedObject extends RevisionableContentEntityBase implements MappedObject
       catch (\Exception $e) {
         $message = 'Exception during pull for @sfobj.@sffield @sfid to @dobj.@dprop @did with value @v';
         $args = [
-            '@sfobj' => $mapping->getSalesforceObjectType(),
-            '@sffield' => $sf_field,
-            '@sfid' => $this->sfid(),
-            '@dobj' => $drupal_entity->getEntityTypeId(),
-            '@dprop' => $drupal_field,
-            '@did' => $drupal_entity->id(),
-            '@v' => $value,
-          ];
+          '@sfobj' => $mapping->getSalesforceObjectType(),
+          '@sffield' => $sf_field,
+          '@sfid' => $this->sfid(),
+          '@dobj' => $drupal_entity->getEntityTypeId(),
+          '@dprop' => $drupal_field,
+          '@did' => $drupal_entity->id(),
+          '@v' => $value,
+        ];
         $this->eventDispatcher()->dispatch(SalesforceEvents::WARNING, new SalesforceWarningEvent($e, $message, $args));
         continue;
       }
diff --git a/modules/salesforce_mapping/src/Entity/MappedObjectInterface.php b/modules/salesforce_mapping/src/Entity/MappedObjectInterface.php
index 6f0e7486..69931924 100644
--- a/modules/salesforce_mapping/src/Entity/MappedObjectInterface.php
+++ b/modules/salesforce_mapping/src/Entity/MappedObjectInterface.php
@@ -19,7 +19,7 @@ interface MappedObjectInterface extends EntityChangedInterface, RevisionLogInter
   public function getMapping();
 
   /**
-   * @return EntityInterface
+   * @return \Drupal\Core\Entity\EntityInterface
    */
   public function getMappedEntity();
 
@@ -36,7 +36,7 @@ interface MappedObjectInterface extends EntityChangedInterface, RevisionLogInter
   public function getSalesforceLink(array $options = []);
 
   /**
-   * Wrapper for salesforce.client Drupal\salesforce\Rest\RestClient service
+   * Wrapper for salesforce.client Drupal\salesforce\Rest\RestClient service.
    */
   public function client();
 
@@ -58,7 +58,7 @@ interface MappedObjectInterface extends EntityChangedInterface, RevisionLogInter
 
   /**
    * @return mixed
-   *  SFID or NULL depending on result from SF.
+   *   SFID or NULL depending on result from SF.
    */
   public function push();
 
diff --git a/modules/salesforce_mapping/src/Entity/SalesforceMapping.php b/modules/salesforce_mapping/src/Entity/SalesforceMapping.php
index d6cc76b3..a1d39b37 100644
--- a/modules/salesforce_mapping/src/Entity/SalesforceMapping.php
+++ b/modules/salesforce_mapping/src/Entity/SalesforceMapping.php
@@ -8,7 +8,6 @@ use Drupal\Core\Entity\EntityStorageInterface;
 use Drupal\salesforce\Exception;
 use Drupal\salesforce\SelectQuery;
 use Drupal\salesforce_mapping\MappingConstants;
-use \Drupal\Component\Utility\NestedArray;
 
 /**
  * Defines a Salesforce Mapping configuration entity class.
@@ -188,7 +187,7 @@ class SalesforceMapping extends ConfigEntityBase implements SalesforceMappingInt
   protected $sync_triggers = [];
 
   /**
-   * Stateful push data for this mapping
+   * Stateful push data for this mapping.
    *
    * @var array
    */
@@ -202,7 +201,7 @@ class SalesforceMapping extends ConfigEntityBase implements SalesforceMappingInt
   protected $pull_info;
 
   /**
-   * How often (in seconds) to push with this mapping
+   * How often (in seconds) to push with this mapping.
    *
    * @var int
    */
@@ -289,8 +288,8 @@ class SalesforceMapping extends ConfigEntityBase implements SalesforceMappingInt
   public function postSave(EntityStorageInterface $storage, $update = TRUE) {
     // Update shared pull values across other mappings to same object type.
     $pull_mappings = $storage->loadByProperties([
-        'salesforce_object_type' => $this->salesforce_object_type,
-      ]);
+      'salesforce_object_type' => $this->salesforce_object_type,
+    ]);
     unset($pull_mappings[$this->id()]);
     foreach ($pull_mappings as $mapping) {
       if ($this->pull_frequency != $mapping->pull_frequency) {
@@ -442,7 +441,7 @@ class SalesforceMapping extends ConfigEntityBase implements SalesforceMappingInt
     return $this->checkTriggers([
       MappingConstants::SALESFORCE_MAPPING_SYNC_DRUPAL_CREATE,
       MappingConstants::SALESFORCE_MAPPING_SYNC_DRUPAL_UPDATE,
-      MappingConstants::SALESFORCE_MAPPING_SYNC_DRUPAL_DELETE
+      MappingConstants::SALESFORCE_MAPPING_SYNC_DRUPAL_DELETE,
     ]);
   }
 
@@ -453,7 +452,7 @@ class SalesforceMapping extends ConfigEntityBase implements SalesforceMappingInt
     return $this->checkTriggers([
       MappingConstants::SALESFORCE_MAPPING_SYNC_SF_CREATE,
       MappingConstants::SALESFORCE_MAPPING_SYNC_SF_UPDATE,
-      MappingConstants::SALESFORCE_MAPPING_SYNC_SF_DELETE
+      MappingConstants::SALESFORCE_MAPPING_SYNC_SF_DELETE,
     ]);
   }
 
@@ -509,10 +508,11 @@ class SalesforceMapping extends ConfigEntityBase implements SalesforceMappingInt
   }
 
   /**
-   * Setter for pull info
+   * Setter for pull info.
+   *
+   * @param string $key
+   * @param mixed $value
    *
-   * @param string $key 
-   * @param mixed $value 
    * @return $this
    */
   protected function setPullInfo($key, $value) {
@@ -545,10 +545,11 @@ class SalesforceMapping extends ConfigEntityBase implements SalesforceMappingInt
   }
 
   /**
-   * Setter for pull info
+   * Setter for pull info.
+   *
+   * @param string $key
+   * @param mixed $value
    *
-   * @param string $key 
-   * @param mixed $value 
    * @return $this
    */
   protected function setPushInfo($key, $value) {
@@ -566,7 +567,6 @@ class SalesforceMapping extends ConfigEntityBase implements SalesforceMappingInt
     return $this->push_info['last_timestamp'] + $this->push_frequency;
   }
 
-
   /**
    * {@inheritdoc}
    */
@@ -604,7 +604,7 @@ class SalesforceMapping extends ConfigEntityBase implements SalesforceMappingInt
   }
 
   /**
-   * Salesforce Mapping Field Manager service
+   * Salesforce Mapping Field Manager service.
    *
    * @return \Drupal\salesforce_mapping\SalesforceMappingFieldPluginManager
    */
@@ -613,7 +613,7 @@ class SalesforceMapping extends ConfigEntityBase implements SalesforceMappingInt
   }
 
   /**
-   * Salesforce API client service
+   * Salesforce API client service.
    *
    * @return \Drupal\salesforce\Rest\RestClient
    */
@@ -622,7 +622,7 @@ class SalesforceMapping extends ConfigEntityBase implements SalesforceMappingInt
   }
 
   /**
-   * State service
+   * State service.
    *
    * @return \Drupal\Core\State\StateInterface
    */
diff --git a/modules/salesforce_mapping/src/Entity/SalesforceMappingInterface.php b/modules/salesforce_mapping/src/Entity/SalesforceMappingInterface.php
index 27cc56f6..780f77e7 100644
--- a/modules/salesforce_mapping/src/Entity/SalesforceMappingInterface.php
+++ b/modules/salesforce_mapping/src/Entity/SalesforceMappingInterface.php
@@ -36,7 +36,7 @@ interface SalesforceMappingInterface extends ConfigEntityInterface {
   public function getFieldMappings();
 
   /**
-   * @param  array  $field
+   * @param  array $field
    * @return SalesforceMappingFieldPluginInterface
    */
   public function getFieldMapping(array $field);
@@ -57,13 +57,13 @@ interface SalesforceMappingInterface extends ConfigEntityInterface {
   public function getDrupalBundle();
 
   /**
-  * Given a Salesforce object, return an array of Drupal entity key-value pairs.
-  *
-  * @return array
-  *   Array of SalesforceMappingFieldPluginInterface objects
-  *
-  * @see salesforce_pull_map_field (from d7)
-  */
+   * Given a Salesforce object, return an array of Drupal entity key-value pairs.
+   *
+   * @return array
+   *   Array of SalesforceMappingFieldPluginInterface objects
+   *
+   * @see salesforce_pull_map_field (from d7)
+   */
   public function getPullFields();
 
   /**
@@ -83,24 +83,25 @@ interface SalesforceMappingInterface extends ConfigEntityInterface {
   public function doesPushStandalone();
 
   /**
-   * Checks mappings for any push operation positive
+   * Checks mappings for any push operation positive.
    *
-   * @return boolean
+   * @return bool
    */
   public function doesPush();
 
   /**
-   * Checks mappings for any pull operation positive
+   * Checks mappings for any pull operation positive.
    *
-   * @return boolean
+   * @return bool
    */
   public function doesPull();
 
   /**
-   * Checks if mapping has any of the given triggers
+   * Checks if mapping has any of the given triggers.
    *
    * @param array $triggers
-   * @return boolean
+   *
+   * @return bool
    *   TRUE if this mapping uses any of the given $triggers, otherwise FALSE.
    */
   public function checkTriggers(array $triggers);
@@ -136,9 +137,10 @@ interface SalesforceMappingInterface extends ConfigEntityInterface {
   public function getLastDeleteTime();
 
   /**
-   * Set this mapping as having been last processed for deletes at $time
+   * Set this mapping as having been last processed for deletes at $time.
    *
    * @param int $time
+   *
    * @return $this
    */
   public function setLastDeleteTime($time);
@@ -155,7 +157,8 @@ interface SalesforceMappingInterface extends ConfigEntityInterface {
   /**
    * Set this mapping as having been last pulled at $time.
    *
-   * @param int $time 
+   * @param int $time
+   *
    * @return $this
    */
   public function setLastPullTime($time);
@@ -176,13 +179,13 @@ interface SalesforceMappingInterface extends ConfigEntityInterface {
    *   Timestamp of starting window from which to pull records. If omitted, use
    *   ::getLastPullTime()
    * @param int $stop
-   *   Timestamp of ending window from which to pull records. If omitted, use 
-   *   "now"
+   *   Timestamp of ending window from which to pull records. If omitted, use
+   *   "now".
    *
    * @return \Drupal\salesforce\SelectQuery
    */
   public function getPullQuery(array $mapped_fields = [], $start = 0, $stop = 0);
-  
+
   /**
    * Returns a timstamp when the push queue was last processed for this mapping.
    *
@@ -193,7 +196,8 @@ interface SalesforceMappingInterface extends ConfigEntityInterface {
   /**
    * Set the timestamp when the push queue was last process for this mapping.
    *
-   * @param string $time 
+   * @param string $time
+   *
    * @return $this
    */
   public function setLastPushTime($time);
diff --git a/modules/salesforce_mapping/src/Event/SalesforcePullEntityValueEvent.php b/modules/salesforce_mapping/src/Event/SalesforcePullEntityValueEvent.php
index 8f2d53cb..976c1904 100644
--- a/modules/salesforce_mapping/src/Event/SalesforcePullEntityValueEvent.php
+++ b/modules/salesforce_mapping/src/Event/SalesforcePullEntityValueEvent.php
@@ -18,11 +18,11 @@ class SalesforcePullEntityValueEvent extends SalesforceBaseEvent {
   protected $entity;
 
   /**
-   * undocumented function
+   * Undocumented function.
    *
    * @param mixed &$value
-   * @param SalesforceMappingFieldPluginInterface $field_plugin
-   * @param MappedObjectInterface $mapped_object
+   * @param \Drupal\salesforce_mapping\SalesforceMappingFieldPluginInterface $field_plugin
+   * @param \Drupal\salesforce_mapping\Entity\MappedObjectInterface $mapped_object
    */
   public function __construct(&$value, SalesforceMappingFieldPluginInterface $field_plugin, MappedObjectInterface $mapped_object) {
     $this->entity_value = $value;
@@ -32,10 +32,16 @@ class SalesforcePullEntityValueEvent extends SalesforceBaseEvent {
     $this->mapping = $mapped_object->salesforce_mapping->entity;
   }
 
+  /**
+   *
+   */
   public function getEntityValue() {
     return $this->entity_value;
   }
 
+  /**
+   *
+   */
   public function getFieldPlugin() {
     return $this->field_plugin;
   }
@@ -55,12 +61,15 @@ class SalesforcePullEntityValueEvent extends SalesforceBaseEvent {
   }
 
   /**
-   * @return MappedObjectInterface
+   * @return \Drupal\salesforce_mapping\Entity\MappedObjectInterface
    */
   public function getMappedObject() {
     return $this->mapped_object;
   }
 
+  /**
+   *
+   */
   public function getOp() {
     return $this->op;
   }
diff --git a/modules/salesforce_mapping/src/Event/SalesforcePullEvent.php b/modules/salesforce_mapping/src/Event/SalesforcePullEvent.php
index 6ee90537..88e97459 100644
--- a/modules/salesforce_mapping/src/Event/SalesforcePullEvent.php
+++ b/modules/salesforce_mapping/src/Event/SalesforcePullEvent.php
@@ -19,13 +19,13 @@ class SalesforcePullEvent extends SalesforceBaseEvent {
   /**
    * {@inheritdoc}
    *
-   * @param MappedObjectInterface $mapped_object 
+   * @param \Drupal\salesforce_mapping\Entity\MappedObjectInterface $mapped_object
    * @param string $op
-   *   One of 
+   *   One of
    *     Drupal\salesforce_mapping\MappingConstants::
    *       SALESFORCE_MAPPING_SYNC_SF_CREATE
    *       SALESFORCE_MAPPING_SYNC_SF_UPDATE
-   *       SALESFORCE_MAPPING_SYNC_SF_DELETE
+   *       SALESFORCE_MAPPING_SYNC_SF_DELETE.
    */
   public function __construct(MappedObjectInterface $mapped_object, $op) {
     $this->mapped_object = $mapped_object;
@@ -49,12 +49,15 @@ class SalesforcePullEvent extends SalesforceBaseEvent {
   }
 
   /**
-   * @return MappedObjectInterface
+   * @return \Drupal\salesforce_mapping\Entity\MappedObjectInterface
    */
   public function getMappedObject() {
     return $this->mapped_object;
   }
 
+  /**
+   *
+   */
   public function getOp() {
     return $this->op;
   }
diff --git a/modules/salesforce_mapping/src/Event/SalesforcePushEvent.php b/modules/salesforce_mapping/src/Event/SalesforcePushEvent.php
index a693ecb8..7c92093c 100644
--- a/modules/salesforce_mapping/src/Event/SalesforcePushEvent.php
+++ b/modules/salesforce_mapping/src/Event/SalesforcePushEvent.php
@@ -17,13 +17,13 @@ abstract class SalesforcePushEvent extends SalesforceBaseEvent {
   /**
    * {@inheritdoc}
    *
-   * @param MappedObjectInterface $mapped_object
+   * @param \Drupal\salesforce_mapping\Entity\MappedObjectInterface $mapped_object
    * @param PushParams $params
    *   One of
    *     Drupal\salesforce_mapping\MappingConstants::
    *       SALESFORCE_MAPPING_SYNC_DRUPAL_CREATE
    *       SALESFORCE_MAPPING_SYNC_DRUPAL_UPDATE
-   *       SALESFORCE_MAPPING_SYNC_DRUPAL_DELETE
+   *       SALESFORCE_MAPPING_SYNC_DRUPAL_DELETE.
    */
   public function __construct(MappedObjectInterface $mapped_object) {
     $this->mapped_object = $mapped_object;
@@ -46,7 +46,7 @@ abstract class SalesforcePushEvent extends SalesforceBaseEvent {
   }
 
   /**
-   * @return MappedObjectInterface
+   * @return \Drupal\salesforce_mapping\Entity\MappedObjectInterface
    */
   public function getMappedObject() {
     return $this->mapped_object;
diff --git a/modules/salesforce_mapping/src/Event/SalesforcePushOpEvent.php b/modules/salesforce_mapping/src/Event/SalesforcePushOpEvent.php
index 004cfa52..6988736d 100644
--- a/modules/salesforce_mapping/src/Event/SalesforcePushOpEvent.php
+++ b/modules/salesforce_mapping/src/Event/SalesforcePushOpEvent.php
@@ -18,19 +18,22 @@ class SalesforcePushOpEvent extends SalesforcePushEvent {
    * example on SalesforceEvents::PUSH_ALLOWED, before any entities have been
    * loaded.
    *
-   * @param MappedObjectInterface $mapped_object
+   * @param \Drupal\salesforce_mapping\Entity\MappedObjectInterface $mapped_object
    * @param string $op
    *   One of
    *     Drupal\salesforce_mapping\MappingConstants::
    *       SALESFORCE_MAPPING_SYNC_DRUPAL_CREATE
    *       SALESFORCE_MAPPING_SYNC_DRUPAL_UPDATE
-   *       SALESFORCE_MAPPING_SYNC_DRUPAL_DELETE
+   *       SALESFORCE_MAPPING_SYNC_DRUPAL_DELETE.
    */
   public function __construct(MappedObjectInterface $mapped_object, $op) {
     parent::__construct($mapped_object);
     $this->op = $op;
   }
 
+  /**
+   *
+   */
   public function getOp() {
     return $this->op;
   }
diff --git a/modules/salesforce_mapping/src/Event/SalesforcePushParamsEvent.php b/modules/salesforce_mapping/src/Event/SalesforcePushParamsEvent.php
index 42316f09..070f9806 100644
--- a/modules/salesforce_mapping/src/Event/SalesforcePushParamsEvent.php
+++ b/modules/salesforce_mapping/src/Event/SalesforcePushParamsEvent.php
@@ -15,18 +15,18 @@ class SalesforcePushParamsEvent extends SalesforcePushEvent {
   /**
    * {@inheritdoc}
    *
-   * @param MappedObjectInterface $mapped_object
-   * @param PushParams $params
+   * @param \Drupal\salesforce_mapping\Entity\MappedObjectInterface $mapped_object
+   * @param \Drupal\salesforce_mapping\PushParams $params
    */
   public function __construct(MappedObjectInterface $mapped_object, PushParams $params) {
     parent::__construct($mapped_object);
     $this->params = $params;
-    $this->entity = ($params) ? $params->getDrupalEntity() : null;
-    $this->mapping = ($params) ? $params->getMapping() : null;
+    $this->entity = ($params) ? $params->getDrupalEntity() : NULL;
+    $this->mapping = ($params) ? $params->getMapping() : NULL;
   }
 
   /**
-   * @return PushParams
+   * @return \Drupal\salesforce_mapping\PushParams
    */
   public function getParams() {
     return $this->params;
diff --git a/modules/salesforce_mapping/src/Event/SalesforceQueryEvent.php b/modules/salesforce_mapping/src/Event/SalesforceQueryEvent.php
index 151baceb..0e0f4df9 100644
--- a/modules/salesforce_mapping/src/Event/SalesforceQueryEvent.php
+++ b/modules/salesforce_mapping/src/Event/SalesforceQueryEvent.php
@@ -18,7 +18,7 @@ class SalesforceQueryEvent extends SalesforceBaseEvent {
    * {@inheritdoc}
    *
    * @param MappedObjectInterface $mapped_object
-
+   *   *.
    */
   public function __construct(SalesforceMappingInterface $mapping, SelectQuery $query) {
     $this->mapping = $mapping;
@@ -33,7 +33,7 @@ class SalesforceQueryEvent extends SalesforceBaseEvent {
   }
 
   /**
-   * @return SalesforceMappingInterface (from PushParams)
+   * @return \Drupal\salesforce_mapping\Entity\SalesforceMappingInterface (from PushParams)
    */
   public function getMapping() {
     return $this->mapping;
diff --git a/modules/salesforce_mapping/src/Form/MappedObjectForm.php b/modules/salesforce_mapping/src/Form/MappedObjectForm.php
index 96a6e418..615c1de7 100644
--- a/modules/salesforce_mapping/src/Form/MappedObjectForm.php
+++ b/modules/salesforce_mapping/src/Form/MappedObjectForm.php
@@ -4,13 +4,10 @@ namespace Drupal\salesforce_mapping\Form;
 
 use Drupal\Component\Datetime\TimeInterface;
 use Drupal\Core\Entity\ContentEntityForm;
-use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Entity\EntityManagerInterface;
 use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Core\Entity\EntityTypeBundleInfoInterface;
 use Drupal\Core\Form\FormStateInterface;
-use Drupal\Core\Url;
-use Drupal\salesforce_mapping\Entity\SalesforceMappingInterface;
 use Drupal\salesforce\Event\SalesforceErrorEvent;
 use Drupal\salesforce\Event\SalesforceEvents;
 use Drupal\salesforce\SFID;
@@ -45,27 +42,27 @@ class MappedObjectForm extends ContentEntityForm {
   protected $eventDispatcher;
 
   /**
-   * Route matching service
+   * Route matching service.
    *
-   * @var RequestStack
+   * @var \Symfony\Component\HttpFoundation\RequestStack
    */
   protected $request_stack;
 
   /**
-   * Entity type manager
+   * Entity type manager.
    *
-   * @var EntityTypeManagerInterface
+   * @var \Drupal\Core\Entity\EntityTypeManagerInterface
    */
   protected $entityTypeManager;
-  
+
   /**
    * Constructs a ContentEntityForm object.
    *
-   * @param EventDispatcherInterface $event_dispatcher
+   * @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
    *   Event dispatcher service.
-   * @param RequestStack $request_stack
+   * @param \Symfony\Component\HttpFoundation\RequestStack $request_stack
    *   Route matching service.
-   * @param EntityTypeManagerInterface $entity_type_manager
+   * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
    *   Entity Type Manager service.
    */
   public function __construct(EntityManagerInterface $entity_manager, EntityTypeBundleInfoInterface $entity_type_bundle_info = NULL, TimeInterface $time = NULL, EventDispatcherInterface $event_dispatcher, RequestStack $request_stack, EntityTypeManagerInterface $entity_type_manager) {
@@ -74,7 +71,7 @@ class MappedObjectForm extends ContentEntityForm {
     $this->request = $request_stack->getCurrentRequest();
     $this->entityTypeManager = $entity_type_manager;
     $this->mappingStorage = $entity_type_manager->getStorage('salesforce_mapping');
-    $this->mappedObjectStorage =  $entity_type_manager->getStorage('salesforce_mapped_object');
+    $this->mappedObjectStorage = $entity_type_manager->getStorage('salesforce_mapped_object');
   }
 
   /**
@@ -144,8 +141,8 @@ class MappedObjectForm extends ContentEntityForm {
   /**
    * Verify that entity type and mapping agree.
    *
-   * @param array $form 
-   * @param FormStateInterface $form_state 
+   * @param array $form
+   * @param \Drupal\Core\Form\FormStateInterface $form_state
    */
   public function validatePush(array &$form, FormStateInterface $form_state) {
     $drupal_entity_array = $form_state->getValue(['drupal_entity', 0]);
@@ -161,8 +158,8 @@ class MappedObjectForm extends ContentEntityForm {
   /**
    * Salesforce ID is required for a pull.
    *
-   * @param array $form 
-   * @param FormStateInterface $form_state 
+   * @param array $form
+   * @param \Drupal\Core\Form\FormStateInterface $form_state
    */
   public function validatePull(array &$form, FormStateInterface $form_state) {
     // Verify SFID was given - required for pull.
@@ -184,7 +181,7 @@ class MappedObjectForm extends ContentEntityForm {
       ->set('salesforce_mapping', $form_state->getValue(['salesforce_mapping', 0, 'target_id']));
 
     if ($sfid = $form_state->getValue(['salesforce_id', 0, 'value'], FALSE)) {
-      $mapped_object->set('salesforce_id', (string)new SFID($sfid));
+      $mapped_object->set('salesforce_id', (string) new SFID($sfid));
     }
     else {
       $mapped_object->set('salesforce_id', '');
@@ -192,13 +189,13 @@ class MappedObjectForm extends ContentEntityForm {
 
     // Push to SF.
     try {
-      // push calls save(), so this is all we need to do:
+      // Push calls save(), so this is all we need to do:
       $mapped_object->push();
     }
     catch (\Exception $e) {
       $mapped_object->delete();
       $this->eventDispatcher->dispatch(SalesforceEvents::ERROR, new SalesforceErrorEvent($e));
-      drupal_set_message(t('Push failed with an exception: %exception', array('%exception' => $e->getMessage())), 'error');
+      drupal_set_message(t('Push failed with an exception: %exception', ['%exception' => $e->getMessage()]), 'error');
       $form_state->setRebuild();
       return;
     }
@@ -213,7 +210,7 @@ class MappedObjectForm extends ContentEntityForm {
    */
   public function submitPull(array &$form, FormStateInterface $form_state) {
     $mapped_object = $this->entity
-      ->set('salesforce_id', (string)new SFID($form_state->getValue(['salesforce_id', 0, 'value'])))
+      ->set('salesforce_id', (string) new SFID($form_state->getValue(['salesforce_id', 0, 'value'])))
       ->set('salesforce_mapping', $form_state->getValue(['salesforce_mapping', 0, 'target_id']));
     // Create stub entity.
     $drupal_entity_array = $form_state->getValue(['drupal_entity', 0]);
@@ -238,12 +235,11 @@ class MappedObjectForm extends ContentEntityForm {
     }
     catch (\Exception $e) {
       $this->eventDispatcher->dispatch(SalesforceEvents::ERROR, new SalesforceErrorEvent($e));
-      drupal_set_message(t('Pull failed with an exception: %exception', array('%exception' => $e->getMessage())), 'error');
+      drupal_set_message(t('Pull failed with an exception: %exception', ['%exception' => $e->getMessage()]), 'error');
       $form_state->setRebuild();
       return;
     }
 
-
     // @TODO: more verbose feedback for successful pull.
     drupal_set_message('Pull successful.');
     $form_state->setRedirect('entity.salesforce_mapped_object.canonical', ['salesforce_mapped_object' => $mapped_object->id()]);
diff --git a/modules/salesforce_mapping/src/Form/SalesforceMappingFieldsForm.php b/modules/salesforce_mapping/src/Form/SalesforceMappingFieldsForm.php
index b45a21c3..c6534746 100644
--- a/modules/salesforce_mapping/src/Form/SalesforceMappingFieldsForm.php
+++ b/modules/salesforce_mapping/src/Form/SalesforceMappingFieldsForm.php
@@ -154,7 +154,7 @@ class SalesforceMappingFieldsForm extends SalesforceMappingFormBase {
     return $form;
   }
 
-  /** 
+  /**
    * @return array
    *   Return an array of field names => labels for any field which is marked
    *   "externalId"
@@ -260,7 +260,7 @@ class SalesforceMappingFieldsForm extends SalesforceMappingFormBase {
   }
 
   /**
-   * Submit handler
+   * Submit handler.
    */
   public function submitForm(array &$form, FormStateInterface $form_state) {
     // Need to transform the schema slightly to remove the "config" dereference. Also trigger submit handlers on plugins.
diff --git a/modules/salesforce_mapping/src/Form/SalesforceMappingFormCrudBase.php b/modules/salesforce_mapping/src/Form/SalesforceMappingFormCrudBase.php
index 7ca26551..82ec38d0 100644
--- a/modules/salesforce_mapping/src/Form/SalesforceMappingFormCrudBase.php
+++ b/modules/salesforce_mapping/src/Form/SalesforceMappingFormCrudBase.php
@@ -100,10 +100,10 @@ abstract class SalesforceMappingFormCrudBase extends SalesforceMappingFormBase {
       '#required' => TRUE,
       '#prefix' => '<div id="drupal_bundle">',
       '#suffix' => '</div>',
-      // Don't expose the bundle listing until user has selected an entity
+      // Don't expose the bundle listing until user has selected an entity.
       '#states' => [
         'visible' => [
-          ':input[name="drupal_entity_type"]' => array('!value' => ''),
+          ':input[name="drupal_entity_type"]' => ['!value' => ''],
         ],
       ],
     ];
@@ -117,7 +117,7 @@ abstract class SalesforceMappingFormCrudBase extends SalesforceMappingFormBase {
     $bundle_info = $this->entityManager->getBundleInfo($entity_type);
 
     if (!empty($bundle_info)) {
-      $form['drupal_entity']['drupal_bundle']['#options'] = array();
+      $form['drupal_entity']['drupal_bundle']['#options'] = [];
       $form['drupal_entity']['drupal_bundle']['#title'] = $this->t('@entity_type Bundle', ['@entity_type' => $entity_types[$entity_type]]);
       foreach ($bundle_info as $key => $info) {
         $form['drupal_entity']['drupal_bundle']['#options'][$key] = $info['label'];
@@ -184,7 +184,7 @@ abstract class SalesforceMappingFormCrudBase extends SalesforceMappingFormBase {
         '#tree' => FALSE,
         '#states' => [
           'visible' => [
-            ':input[name^="sync_triggers[pull"]' => array('checked' => TRUE),
+            ':input[name^="sync_triggers[pull"]' => ['checked' => TRUE],
           ],
         ],
       ];
@@ -216,10 +216,8 @@ abstract class SalesforceMappingFormCrudBase extends SalesforceMappingFormBase {
           '#validate' => ['::lastDeleteReset'],
         ];
 
-
         // ' ; Last delete date/time: %last_delete',  '%last_delete' => $mapping->getLastDeleteTime() ? date('Y-m-d h:ia', $mapping->getLastDeleteTime()) : 'never'])
-        // ];
-
+        // ];.
         // This doesn't work until after mapping gets saved.
         // @TODO figure out best way to alert admins about this, or AJAX-ify it.
         $form['pull']['pull_trigger_date'] = [
@@ -263,7 +261,7 @@ abstract class SalesforceMappingFormCrudBase extends SalesforceMappingFormBase {
         '#tree' => FALSE,
         '#states' => [
           'visible' => [
-            ':input[name^="sync_triggers[push"]' => array('checked' => TRUE),
+            ':input[name^="sync_triggers[push"]' => ['checked' => TRUE],
           ],
         ],
       ];
@@ -366,7 +364,6 @@ abstract class SalesforceMappingFormCrudBase extends SalesforceMappingFormBase {
       '#default_value' => $mapping->locked,
     ];
 
-
     return $form;
   }
 
@@ -398,7 +395,7 @@ abstract class SalesforceMappingFormCrudBase extends SalesforceMappingFormBase {
   }
 
   /**
-   * Submit handler for "reset pull timestamp" button
+   * Submit handler for "reset pull timestamp" button.
    */
   public function lastPullReset(array $form, FormStateInterface $form_state) {
     $mapping = $this->entity->setLastPullTime(NULL);
@@ -408,7 +405,7 @@ abstract class SalesforceMappingFormCrudBase extends SalesforceMappingFormBase {
   }
 
   /**
-   * Submit handler for "reset delete timestamp" button
+   * Submit handler for "reset delete timestamp" button.
    */
   public function lastDeleteReset(array $form, FormStateInterface $form_state) {
     $mapping = $this->entity->setLastDeleteTime(NULL);
@@ -453,7 +450,7 @@ abstract class SalesforceMappingFormCrudBase extends SalesforceMappingFormBase {
       }
       foreach ($bundle_info as $bundle => $info) {
         $entity_label = $entities[$entity];
-        $options[(string)$entity_label][$bundle] = (string)$info['label'];
+        $options[(string) $entity_label][$bundle] = (string) $info['label'];
       }
     }
     return $options;
diff --git a/modules/salesforce_mapping/src/MappedObjectList.php b/modules/salesforce_mapping/src/MappedObjectList.php
index 9feff5d7..d80b6c75 100644
--- a/modules/salesforce_mapping/src/MappedObjectList.php
+++ b/modules/salesforce_mapping/src/MappedObjectList.php
@@ -7,7 +7,6 @@ use Drupal\Core\Entity\EntityTypeInterface;
 use Drupal\Core\Entity\EntityListBuilder;
 use Drupal\Core\Entity\EntityStorageInterface;
 use Drupal\Core\Routing\UrlGeneratorInterface;
-use Drupal\Core\Url;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
@@ -121,7 +120,7 @@ class MappedObjectList extends EntityListBuilder {
     $operations['view'] = [
       'title' => $this->t('View'),
       'weight' => -100,
-      'url' => $entity->urlInfo('canonical')
+      'url' => $entity->urlInfo('canonical'),
     ];
     $operations += parent::getDefaultOperations($entity);
     return $operations;
@@ -130,7 +129,7 @@ class MappedObjectList extends EntityListBuilder {
   /**
    * Set the given entity ids to show only those in a listing of mapped objects.
    *
-   * @param array $ids 
+   * @param array $ids
    *
    * @return $this
    */
@@ -138,6 +137,7 @@ class MappedObjectList extends EntityListBuilder {
     $this->entityIds = $ids;
     return $this;
   }
+
   /**
    * {@inheritdoc}
    */
diff --git a/modules/salesforce_mapping/src/MappedObjectStorageSchema.php b/modules/salesforce_mapping/src/MappedObjectStorageSchema.php
index b8a8da66..e60f5722 100644
--- a/modules/salesforce_mapping/src/MappedObjectStorageSchema.php
+++ b/modules/salesforce_mapping/src/MappedObjectStorageSchema.php
@@ -16,22 +16,22 @@ class MappedObjectStorageSchema extends SqlContentEntityStorageSchema {
    */
   protected function getEntitySchema(ContentEntityTypeInterface $entity_type, $reset = FALSE) {
     $schema = parent::getEntitySchema($entity_type, $reset);
-    // backwards compatibility for salesforce_mapping_update_8001
+    // Backwards compatibility for salesforce_mapping_update_8001
     // key is too long if length is 255, so we have to wait until the db update
-    // fires to avoid WSOD
+    // fires to avoid WSOD.
     $schema['salesforce_mapped_object']['unique keys'] += [
       'entity__mapping' => [
         'drupal_entity__target_type',
         'salesforce_mapping',
         'drupal_entity__target_id',
-      ]
+      ],
     ];
 
     $schema['salesforce_mapped_object']['unique keys'] += [
       'sfid__mapping' => [
         'salesforce_mapping',
-        'salesforce_id'
-      ]
+        'salesforce_id',
+      ],
     ];
 
     $schema['salesforce_mapped_object']['fields']['salesforce_mapping']['length'] =
@@ -40,4 +40,5 @@ class MappedObjectStorageSchema extends SqlContentEntityStorageSchema {
 
     return $schema;
   }
+
 }
diff --git a/modules/salesforce_mapping/src/MappingConstants.php b/modules/salesforce_mapping/src/MappingConstants.php
index 29d99382..20bdad39 100644
--- a/modules/salesforce_mapping/src/MappingConstants.php
+++ b/modules/salesforce_mapping/src/MappingConstants.php
@@ -30,7 +30,7 @@ final class MappingConstants {
   /**
    * Delimiter used in Salesforce multipicklists.
    */
-  const SALESFORCE_MAPPING_ARRAY_DELIMITER =';';
+  const SALESFORCE_MAPPING_ARRAY_DELIMITER = ';';
 
   /**
    * Field mapping maximum name length.
@@ -40,4 +40,5 @@ final class MappingConstants {
 
   const SALESFORCE_MAPPING_STATUS_SUCCESS = 1;
   const SALESFORCE_MAPPING_STATUS_ERROR = 0;
+
 }
diff --git a/modules/salesforce_mapping/src/Plugin/Field/CalculatedLinkItemBase.php b/modules/salesforce_mapping/src/Plugin/Field/CalculatedLinkItemBase.php
index 526d433d..687c0fd5 100644
--- a/modules/salesforce_mapping/src/Plugin/Field/CalculatedLinkItemBase.php
+++ b/modules/salesforce_mapping/src/Plugin/Field/CalculatedLinkItemBase.php
@@ -1,9 +1,12 @@
-<?php 
+<?php
 
 namespace Drupal\salesforce_mapping\Plugin\Field;
 
 use Drupal\link\Plugin\Field\FieldType\LinkItem;
 
+/**
+ *
+ */
 abstract class CalculatedLinkItemBase extends LinkItem {
 
   /**
@@ -37,4 +40,4 @@ abstract class CalculatedLinkItemBase extends LinkItem {
     return parent::getValue();
   }
 
-}
\ No newline at end of file
+}
diff --git a/modules/salesforce_mapping/src/Plugin/Field/ComputedItemList.php b/modules/salesforce_mapping/src/Plugin/Field/ComputedItemList.php
index 0810c937..359b4bd9 100644
--- a/modules/salesforce_mapping/src/Plugin/Field/ComputedItemList.php
+++ b/modules/salesforce_mapping/src/Plugin/Field/ComputedItemList.php
@@ -1,11 +1,11 @@
-<?php 
+<?php
 
 namespace Drupal\salesforce_mapping\Plugin\Field;
 
 use Drupal\Core\Field\FieldItemList;
 
 /**
- * Lifted from https://www.drupal.org/docs/8/api/entity-api/dynamicvirtual-field-values-using-computed-field-property-classes
+ * Lifted from https://www.drupal.org/docs/8/api/entity-api/dynamicvirtual-field-values-using-computed-field-property-classes.
  */
 class ComputedItemList extends FieldItemList {
 
@@ -51,4 +51,5 @@ class ComputedItemList extends FieldItemList {
       $this->list[0] = $this->createItem(0);
     }
   }
-}
\ No newline at end of file
+
+}
diff --git a/modules/salesforce_mapping/src/Plugin/Field/FieldType/SalesforceLinkItem.php b/modules/salesforce_mapping/src/Plugin/Field/FieldType/SalesforceLinkItem.php
index 8ece0fd4..314a38d7 100644
--- a/modules/salesforce_mapping/src/Plugin/Field/FieldType/SalesforceLinkItem.php
+++ b/modules/salesforce_mapping/src/Plugin/Field/FieldType/SalesforceLinkItem.php
@@ -1,11 +1,11 @@
-<?php 
+<?php
 
 namespace Drupal\salesforce_mapping\Plugin\Field\FieldType;
 
 use Drupal\salesforce_mapping\Plugin\Field\CalculatedLinkItemBase;
 
 /**
- * Lifted from https://www.drupal.org/docs/8/api/entity-api/dynamicvirtual-field-values-using-computed-field-property-classes
+ * Lifted from https://www.drupal.org/docs/8/api/entity-api/dynamicvirtual-field-values-using-computed-field-property-classes.
  *
  * @FieldType(
  *   id = "salesforce_link",
@@ -35,4 +35,4 @@ class SalesforceLinkItem extends CalculatedLinkItemBase {
     }
   }
 
-}
\ No newline at end of file
+}
diff --git a/modules/salesforce_mapping/src/Plugin/Menu/LocalAction/SalesforceMappedObjectAddLocalAction.php b/modules/salesforce_mapping/src/Plugin/Menu/LocalAction/SalesforceMappedObjectAddLocalAction.php
index a16751e8..dca20a93 100644
--- a/modules/salesforce_mapping/src/Plugin/Menu/LocalAction/SalesforceMappedObjectAddLocalAction.php
+++ b/modules/salesforce_mapping/src/Plugin/Menu/LocalAction/SalesforceMappedObjectAddLocalAction.php
@@ -6,6 +6,9 @@ use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Menu\LocalActionDefault;
 use Drupal\Core\Routing\RouteMatchInterface;
 
+/**
+ *
+ */
 class SalesforceMappedObjectAddLocalAction extends LocalActionDefault {
 
   /**
@@ -35,4 +38,4 @@ class SalesforceMappedObjectAddLocalAction extends LocalActionDefault {
     return $options;
   }
 
-}
\ No newline at end of file
+}
diff --git a/modules/salesforce_mapping/src/Plugin/SalesforceMappingField/Broken.php b/modules/salesforce_mapping/src/Plugin/SalesforceMappingField/Broken.php
index e7c43164..50a9997d 100644
--- a/modules/salesforce_mapping/src/Plugin/SalesforceMappingField/Broken.php
+++ b/modules/salesforce_mapping/src/Plugin/SalesforceMappingField/Broken.php
@@ -34,14 +34,16 @@ class Broken extends SalesforceMappingFieldPluginBase {
 
     $pluginForm['drupal_field_type'] = [
       '#type' => 'hidden',
-      '#value' => $this->config('drupal_field_type')
+      '#value' => $this->config('drupal_field_type'),
     ];
 
-    return ['message' => [
-      '#markup' => '<div class="error">'
-        . $this->t('The field plugin %plugin is broken or missing.', ['%plugin' => $this->config('drupal_field_type')]) 
-          . '</div>',
-    ]];
+    return [
+      'message' => [
+        '#markup' => '<div class="error">'
+        . $this->t('The field plugin %plugin is broken or missing.', ['%plugin' => $this->config('drupal_field_type')])
+        . '</div>',
+      ],
+    ];
   }
 
   /**
diff --git a/modules/salesforce_mapping/src/Plugin/SalesforceMappingField/Constant.php b/modules/salesforce_mapping/src/Plugin/SalesforceMappingField/Constant.php
index 63861296..e01137f4 100644
--- a/modules/salesforce_mapping/src/Plugin/SalesforceMappingField/Constant.php
+++ b/modules/salesforce_mapping/src/Plugin/SalesforceMappingField/Constant.php
@@ -34,7 +34,7 @@ class Constant extends SalesforceMappingFieldPluginBase {
     $pluginForm['direction']['#options'] = [
       MappingConstants::SALESFORCE_MAPPING_DIRECTION_DRUPAL_SF => $pluginForm['direction']['#options'][MappingConstants::SALESFORCE_MAPPING_DIRECTION_DRUPAL_SF],
     ];
-    $pluginForm['direction']['#default_value'] = 
+    $pluginForm['direction']['#default_value'] =
       MappingConstants::SALESFORCE_MAPPING_DIRECTION_DRUPAL_SF;
 
     return $pluginForm;
diff --git a/modules/salesforce_mapping/src/Plugin/SalesforceMappingField/Properties.php b/modules/salesforce_mapping/src/Plugin/SalesforceMappingField/Properties.php
index 7250fb8d..26d5dad5 100644
--- a/modules/salesforce_mapping/src/Plugin/SalesforceMappingField/Properties.php
+++ b/modules/salesforce_mapping/src/Plugin/SalesforceMappingField/Properties.php
@@ -66,7 +66,6 @@ class Properties extends SalesforceMappingFieldPluginBase {
   public function value(EntityInterface $entity, SalesforceMappingInterface $mapping) {
     // No error checking here. If a property is not defined, it's a
     // configuration bug that needs to be solved elsewhere.
-
     // Multipicklist is the only target type that handles multi-valued fields.
     $describe = $this
       ->salesforceClient
@@ -118,7 +117,7 @@ class Properties extends SalesforceMappingFieldPluginBase {
       return [];
     }
     return [
-      'config' => array($field_config->getConfigDependencyName()),
+      'config' => [$field_config->getConfigDependencyName()],
     ];
   }
 
diff --git a/modules/salesforce_mapping/src/Plugin/SalesforceMappingField/RecordType.php b/modules/salesforce_mapping/src/Plugin/SalesforceMappingField/RecordType.php
index 868aa56d..272aadf9 100644
--- a/modules/salesforce_mapping/src/Plugin/SalesforceMappingField/RecordType.php
+++ b/modules/salesforce_mapping/src/Plugin/SalesforceMappingField/RecordType.php
@@ -37,11 +37,10 @@ class RecordType extends SalesforceMappingFieldPluginBase {
     ];
 
     $pluginForm['direction']['#options'] = [
-      'drupal_sf' => $pluginForm['direction']['#options']['drupal_sf']
+      'drupal_sf' => $pluginForm['direction']['#options']['drupal_sf'],
     ];
     $pluginForm['direction']['#default_value'] = 'drupal_sf';
 
-
     return $pluginForm;
   }
 
@@ -49,7 +48,7 @@ class RecordType extends SalesforceMappingFieldPluginBase {
    *
    */
   public function value(EntityInterface $entity, SalesforceMappingInterface $mapping) {
-    return (string)($this
+    return (string) ($this
       ->salesforceClient
       ->getRecordTypeIdByDeveloperName(
           $mapping->getSalesforceObjectType(),
diff --git a/modules/salesforce_mapping/src/Plugin/SalesforceMappingField/RelatedIDs.php b/modules/salesforce_mapping/src/Plugin/SalesforceMappingField/RelatedIDs.php
index bb0b61d4..01f3e721 100644
--- a/modules/salesforce_mapping/src/Plugin/SalesforceMappingField/RelatedIDs.php
+++ b/modules/salesforce_mapping/src/Plugin/SalesforceMappingField/RelatedIDs.php
@@ -104,7 +104,6 @@ class RelatedIDs extends SalesforceMappingFieldPluginBase {
     }
   }
 
-
   /**
    *
    */
@@ -137,7 +136,7 @@ class RelatedIDs extends SalesforceMappingFieldPluginBase {
       return [];
     }
     return [
-      'config' => array($field_config->getConfigDependencyName()),
+      'config' => [$field_config->getConfigDependencyName()],
     ];
   }
 
diff --git a/modules/salesforce_mapping/src/Plugin/SalesforceMappingField/RelatedProperties.php b/modules/salesforce_mapping/src/Plugin/SalesforceMappingField/RelatedProperties.php
index a717f594..7a87ac74 100644
--- a/modules/salesforce_mapping/src/Plugin/SalesforceMappingField/RelatedProperties.php
+++ b/modules/salesforce_mapping/src/Plugin/SalesforceMappingField/RelatedProperties.php
@@ -164,7 +164,6 @@ class RelatedProperties extends SalesforceMappingFieldPluginBase {
     return $options;
   }
 
-
   /**
    * {@inheritdoc}
    *
@@ -179,7 +178,7 @@ class RelatedProperties extends SalesforceMappingFieldPluginBase {
       return $deps;
     }
     $deps[] = [
-      'config' => array($field_config->getConfigDependencyName()),
+      'config' => [$field_config->getConfigDependencyName()],
     ];
     $field_settings = $field_config->getSettings();
 
diff --git a/modules/salesforce_mapping/src/Plugin/SalesforceMappingField/Token.php b/modules/salesforce_mapping/src/Plugin/SalesforceMappingField/Token.php
index 9f4654b6..14b85451 100644
--- a/modules/salesforce_mapping/src/Plugin/SalesforceMappingField/Token.php
+++ b/modules/salesforce_mapping/src/Plugin/SalesforceMappingField/Token.php
@@ -34,7 +34,7 @@ class Token extends SalesforceMappingFieldPluginBase {
    * {@inheritdoc}
    */
   public function __construct(array $configuration, $plugin_id, array $plugin_definition, EntityTypeBundleInfoInterface $entity_type_bundle_info, EntityFieldManagerInterface $entity_field_manager, RestClientInterface $rest_client, EntityManagerInterface $entity_manager, EntityTypeManagerInterface $etm, DateFormatterInterface $dateFormatter, EventDispatcherInterface $event_dispatcher, TokenService $token) {
-    parent::__construct($configuration, $plugin_id, $plugin_definition, $entity_type_bundle_info, $entity_field_manager, $rest_client, $entity_manager, $etm,  $dateFormatter,  $event_dispatcher);
+    parent::__construct($configuration, $plugin_id, $plugin_definition, $entity_type_bundle_info, $entity_field_manager, $rest_client, $entity_manager, $etm, $dateFormatter, $event_dispatcher);
     $this->token = $token;
   }
 
diff --git a/modules/salesforce_mapping/src/Plugin/Validation/Constraint/MappingEntityConstraint.php b/modules/salesforce_mapping/src/Plugin/Validation/Constraint/MappingEntityConstraint.php
index ff6d422c..8d05ca15 100644
--- a/modules/salesforce_mapping/src/Plugin/Validation/Constraint/MappingEntityConstraint.php
+++ b/modules/salesforce_mapping/src/Plugin/Validation/Constraint/MappingEntityConstraint.php
@@ -13,9 +13,12 @@ namespace Drupal\salesforce_mapping\Plugin\Validation\Constraint;
  */
 class MappingEntityConstraint extends UniqueFieldsConstraint {
 
+  /**
+   *
+   */
   public function __construct($options = NULL) {
     $options = ['fields' => ["drupal_entity.target_type", "drupal_entity.target_id", "salesforce_mapping"]];
     parent::__construct($options);
   }
 
-}
\ No newline at end of file
+}
diff --git a/modules/salesforce_mapping/src/Plugin/Validation/Constraint/MappingEntityTypeConstraint.php b/modules/salesforce_mapping/src/Plugin/Validation/Constraint/MappingEntityTypeConstraint.php
index bf0a3e82..6260c8da 100644
--- a/modules/salesforce_mapping/src/Plugin/Validation/Constraint/MappingEntityTypeConstraint.php
+++ b/modules/salesforce_mapping/src/Plugin/Validation/Constraint/MappingEntityTypeConstraint.php
@@ -17,4 +17,4 @@ class MappingEntityTypeConstraint extends Constraint {
 
   public $message = 'Mapping %mapping cannot be used with entity type %entity_type.';
 
-}
\ No newline at end of file
+}
diff --git a/modules/salesforce_mapping/src/Plugin/Validation/Constraint/MappingEntityTypeConstraintValidator.php b/modules/salesforce_mapping/src/Plugin/Validation/Constraint/MappingEntityTypeConstraintValidator.php
index b78d37d3..c9730d7d 100644
--- a/modules/salesforce_mapping/src/Plugin/Validation/Constraint/MappingEntityTypeConstraintValidator.php
+++ b/modules/salesforce_mapping/src/Plugin/Validation/Constraint/MappingEntityTypeConstraintValidator.php
@@ -10,7 +10,6 @@ use Symfony\Component\Validator\ConstraintValidator;
  */
 class MappingEntityTypeConstraintValidator extends ConstraintValidator {
 
-
   /**
    * {@inheritdoc}
    */
@@ -19,9 +18,9 @@ class MappingEntityTypeConstraintValidator extends ConstraintValidator {
     if ($drupal_entity->getEntityTypeId() != $entity->getMapping()->getDrupalEntityType()) {
       $this->context->addViolation($constraint->message, [
         '%mapping' => $entity->getMapping()->label(),
-        '%entity_type' => $drupal_entity->getEntityType()->getLabel()
+        '%entity_type' => $drupal_entity->getEntityType()->getLabel(),
       ]);
     }
   }
 
-}
\ No newline at end of file
+}
diff --git a/modules/salesforce_mapping/src/Plugin/Validation/Constraint/MappingSfidConstraint.php b/modules/salesforce_mapping/src/Plugin/Validation/Constraint/MappingSfidConstraint.php
index c8fa184b..c208deb9 100644
--- a/modules/salesforce_mapping/src/Plugin/Validation/Constraint/MappingSfidConstraint.php
+++ b/modules/salesforce_mapping/src/Plugin/Validation/Constraint/MappingSfidConstraint.php
@@ -13,9 +13,12 @@ namespace Drupal\salesforce_mapping\Plugin\Validation\Constraint;
  */
 class MappingSfidConstraint extends UniqueFieldsConstraint {
 
-  public function __construct($options = null) {
+  /**
+   *
+   */
+  public function __construct($options = NULL) {
     $options = ['fields' => ['salesforce_id', 'salesforce_mapping']];
     parent::__construct($options);
   }
 
-}
\ No newline at end of file
+}
diff --git a/modules/salesforce_mapping/src/Plugin/Validation/Constraint/UniqueFieldsConstraint.php b/modules/salesforce_mapping/src/Plugin/Validation/Constraint/UniqueFieldsConstraint.php
index 9d552ff4..e58333bc 100644
--- a/modules/salesforce_mapping/src/Plugin/Validation/Constraint/UniqueFieldsConstraint.php
+++ b/modules/salesforce_mapping/src/Plugin/Validation/Constraint/UniqueFieldsConstraint.php
@@ -33,8 +33,11 @@ class UniqueFieldsConstraint extends Constraint {
     return 'fields';
   }
 
+  /**
+   *
+   */
   public function validatedBy() {
     return '\Drupal\salesforce_mapping\Plugin\Validation\Constraint\UniqueFieldsConstraintValidator';
   }
 
-}
\ No newline at end of file
+}
diff --git a/modules/salesforce_mapping/src/Plugin/Validation/Constraint/UniqueFieldsConstraintValidator.php b/modules/salesforce_mapping/src/Plugin/Validation/Constraint/UniqueFieldsConstraintValidator.php
index daf7ead6..c2ce14db 100644
--- a/modules/salesforce_mapping/src/Plugin/Validation/Constraint/UniqueFieldsConstraintValidator.php
+++ b/modules/salesforce_mapping/src/Plugin/Validation/Constraint/UniqueFieldsConstraintValidator.php
@@ -44,7 +44,7 @@ class UniqueFieldsConstraintValidator extends ConstraintValidator {
       $message_replacements = [
         '@entity_type' => $entity_type->getLowercaseLabel(),
         ':url' => $url->toString(),
-        '@label' => $entity->label()
+        '@label' => $entity->label(),
       ];
       $this->context->addViolation($constraint->message, $message_replacements);
     }
diff --git a/modules/salesforce_mapping/src/PushParams.php b/modules/salesforce_mapping/src/PushParams.php
index 2b8c0f4b..cc550778 100644
--- a/modules/salesforce_mapping/src/PushParams.php
+++ b/modules/salesforce_mapping/src/PushParams.php
@@ -19,8 +19,8 @@ class PushParams {
    * Given a Drupal entity, return an array of Salesforce key-value pairs
    * previously salesforce_push_map_params (d7)
    *
-   * @param SalesforceMappingInterface $mapping
-   * @param EntityInterface $entity
+   * @param \Drupal\salesforce_mapping\Entity\SalesforceMappingInterface $mapping
+   * @param \Drupal\Core\Entity\EntityInterface $entity
    * @param array $params
    *   (optional)
    */
@@ -45,7 +45,7 @@ class PushParams {
   }
 
   /**
-   * @return EntityInterface for this PushParams
+   * @return \Drupal\Core\Entity\EntityInterface for this PushParams
    */
   public function getDrupalEntity() {
     return $this->drupal_entity;
@@ -81,7 +81,7 @@ class PushParams {
 
   /**
    * @param string $key
-   *   Key to set for this param
+   *   Key to set for this param.
    * @param mixed $value
    *   Value to set for this param.
    * @return $this
@@ -93,7 +93,7 @@ class PushParams {
 
   /**
    * @param string $key
-   *   Key to unset for this param
+   *   Key to unset for this param.
    * @return $this
    */
   public function unsetParam($key) {
diff --git a/modules/salesforce_mapping/src/Routing/RouteSubscriber.php b/modules/salesforce_mapping/src/Routing/RouteSubscriber.php
index 3c700798..da6d80c9 100644
--- a/modules/salesforce_mapping/src/Routing/RouteSubscriber.php
+++ b/modules/salesforce_mapping/src/Routing/RouteSubscriber.php
@@ -1,13 +1,7 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\salesforce_mapping\Routing\RouteSubscriber.
- */
-
 namespace Drupal\salesforce_mapping\Routing;
 
-use Drupal\Core\Entity\EntityTypeInterface;
 use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Core\Routing\RouteSubscriberBase;
 use Drupal\Core\Routing\RoutingEvents;
@@ -34,14 +28,14 @@ class RouteSubscriber extends RouteSubscriberBase {
    */
   public function __construct(EntityTypeManagerInterface $entity_manager) {
     $this->entityTypeManager = $entity_manager;
-  } 
+  }
 
   /**
    * {@inheritdoc}
    */
   protected function alterRoutes(RouteCollection $collection) {
     foreach ($this->entityTypeManager->getDefinitions() as $entity_type_id => $entity_type) {
-      // Note the empty operation, so we get the nice clean route "entity.entity-type.salesforce"
+      // Note the empty operation, so we get the nice clean route "entity.entity-type.salesforce".
       if (!($path = $entity_type->getLinkTemplate('salesforce'))) {
         continue;
       }
@@ -73,4 +67,4 @@ class RouteSubscriber extends RouteSubscriberBase {
     return $events;
   }
 
-}
\ No newline at end of file
+}
diff --git a/modules/salesforce_mapping/src/SalesforceMappingFieldPluginBase.php b/modules/salesforce_mapping/src/SalesforceMappingFieldPluginBase.php
index 6add937a..2005bc8c 100644
--- a/modules/salesforce_mapping/src/SalesforceMappingFieldPluginBase.php
+++ b/modules/salesforce_mapping/src/SalesforceMappingFieldPluginBase.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\salesforce_mapping\Plugin\SalesforceMappingFieldPluginBase.
- */
-
 namespace Drupal\salesforce_mapping;
 
 use Drupal\Component\Plugin\ConfigurablePluginInterface;
@@ -25,9 +20,6 @@ use Drupal\salesforce\Rest\RestClientInterface;
 use Drupal\salesforce\SFID;
 use Drupal\salesforce\SObject;
 use Drupal\salesforce_mapping\Entity\SalesforceMappingInterface;
-use Drupal\salesforce_mapping\MappedObjectStorage;
-use Drupal\salesforce_mapping\SalesforceMappingFieldPluginInterface;
-use Drupal\salesforce_mapping\SalesforceMappingStorage;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\EventDispatcher\EventDispatcherInterface;
 
@@ -35,6 +27,7 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface;
  * Defines a base Salesforce Mapping Field Plugin implementation.
  * Extenders need to implement SalesforceMappingFieldPluginInterface::value() and
  * PluginFormInterface::buildConfigurationForm().
+ *
  * @see Drupal\salesforce_mapping\SalesforceMappingFieldPluginInterface
  * @see Drupal\Core\Plugin\PluginFormInterface
  */
@@ -48,19 +41,17 @@ abstract class SalesforceMappingFieldPluginBase extends PluginBase implements Sa
 
   // @see SalesforceMappingFieldPluginInterface::value()
   // public function value();
-
   // @see PluginFormInterface::buildConfigurationForm().
   // public function buildConfigurationForm(array $form, FormStateInterface $form_state);
-
   /**
-   * Storage handler for SF mappings
+   * Storage handler for SF mappings.
    *
    * @var \Drupal\salesforce_mapping\Entity\SalesforceMappingStorage
    */
   protected $mapping_storage;
 
   /**
-   * Storage handler for Mapped Objects
+   * Storage handler for Mapped Objects.
    *
    * @var \Drupal\salesforce_mapping\MappedObjectStorage
    */
@@ -337,7 +328,7 @@ abstract class SalesforceMappingFieldPluginBase extends PluginBase implements Sa
    * {@inheritdoc}
    */
   public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
-    $pluginForm = array();
+    $pluginForm = [];
     $plugin_def = $this->getPluginDefinition();
 
     // Extending plugins will probably inject most of their own logic here:
@@ -371,7 +362,6 @@ abstract class SalesforceMappingFieldPluginBase extends PluginBase implements Sa
     return $pluginForm;
   }
 
-
   /**
    * Implements PluginFormInterface::validateConfigurationForm().
    */
@@ -398,14 +388,14 @@ abstract class SalesforceMappingFieldPluginBase extends PluginBase implements Sa
    * @return array
    *   An array of dependencies grouped by type (config, content, module,
    *   theme). For example:
-   *   @code
+   * @code
    *   array(
    *     'config' => array('user.role.anonymous', 'user.role.authenticated'),
    *     'content' => array('node:article:f0a189e6-55fb-47fb-8005-5bef81c44d6d'),
    *     'module' => array('node', 'user'),
    *     'theme' => array('seven'),
    *   );
-   *   @endcode
+   * @endcode
    *
    * @see \Drupal\Core\Config\Entity\ConfigDependencyManager
    * @see \Drupal\Core\Entity\EntityInterface::getConfigDependencyName()
@@ -437,25 +427,25 @@ abstract class SalesforceMappingFieldPluginBase extends PluginBase implements Sa
 
   /**
    * @return bool
-   *  Whether or not this field should be pushed to Salesforce.
+   *   Whether or not this field should be pushed to Salesforce.
    * @TODO This needs a better name. Could be mistaken for a verb.
    */
   public function push() {
     return in_array($this->config('direction'), [
       MappingConstants::SALESFORCE_MAPPING_DIRECTION_DRUPAL_SF,
-      MappingConstants::SALESFORCE_MAPPING_DIRECTION_SYNC
+      MappingConstants::SALESFORCE_MAPPING_DIRECTION_SYNC,
     ]);
   }
 
   /**
    * @return bool
-   *  Whether or not this field should be pulled from Salesforce to Drupal.
+   *   Whether or not this field should be pulled from Salesforce to Drupal.
    * @TODO This needs a better name. Could be mistaken for a verb.
    */
   public function pull() {
     return in_array($this->config('direction'), [
       MappingConstants::SALESFORCE_MAPPING_DIRECTION_SYNC,
-      MappingConstants::SALESFORCE_MAPPING_DIRECTION_SF_DRUPAL
+      MappingConstants::SALESFORCE_MAPPING_DIRECTION_SF_DRUPAL,
     ]);
   }
 
@@ -472,7 +462,7 @@ abstract class SalesforceMappingFieldPluginBase extends PluginBase implements Sa
   protected function get_salesforce_field_options($sfobject_name) {
     // Static cache since this function is called frequently across many
     // different object instances.
-    $options = &drupal_static(__CLASS__.__FUNCTION__, []);
+    $options = &drupal_static(__CLASS__ . __FUNCTION__, []);
     if (empty($options[$sfobject_name])) {
       $describe = $this->salesforceClient->objectDescribe($sfobject_name);
       $options[$sfobject_name] = $describe->getFieldOptions();
diff --git a/modules/salesforce_mapping/src/SalesforceMappingFieldPluginInterface.php b/modules/salesforce_mapping/src/SalesforceMappingFieldPluginInterface.php
index b8d63601..b2cc0375 100644
--- a/modules/salesforce_mapping/src/SalesforceMappingFieldPluginInterface.php
+++ b/modules/salesforce_mapping/src/SalesforceMappingFieldPluginInterface.php
@@ -43,6 +43,7 @@ interface SalesforceMappingFieldPluginInterface {
 
   /**
    * Given a Drupal entity, return the outbound value.
+   *
    * @param $entity
    *   The entity being mapped.
    * @param $mapping
@@ -55,8 +56,9 @@ interface SalesforceMappingFieldPluginInterface {
    * validation against Salesforce field types to protect against basic data
    * errors.
    *
-   * @param EntityInterface $entity
-   * @param SalesforceMappingInterface $mapping
+   * @param \Drupal\Core\Entity\EntityInterface $entity
+   * @param \Drupal\salesforce_mapping\Entity\SalesforceMappingInterface $mapping
+   *
    * @return mixed
    */
   public function pushValue(EntityInterface $entity, SalesforceMappingInterface $mapping);
@@ -66,9 +68,10 @@ interface SalesforceMappingFieldPluginInterface {
    * validation against Drupal field types to protect against basic data
    * errors.
    *
-   * @param SObject $sf_object
-   * @param EntityInterface $entity
-   * @param SalesforceMappingInterface $mapping
+   * @param \Drupal\salesforce\SObject $sf_object
+   * @param \Drupal\Core\Entity\EntityInterface $entity
+   * @param \Drupal\salesforce_mapping\Entity\SalesforceMappingInterface $mapping
+   *
    * @return mixed
    */
   public function pullValue(SObject $sf_object, EntityInterface $entity, SalesforceMappingInterface $mapping);
@@ -77,7 +80,7 @@ interface SalesforceMappingFieldPluginInterface {
    * Given a SF Mapping, return TRUE or FALSE whether this field plugin can be
    * added via UI. Not used for validation or any other constraints.
    *
-   * @param SalesforceMappingInterface $mapping
+   * @param \Drupal\salesforce_mapping\Entity\SalesforceMappingInterface $mapping
    *
    * @return bool
    *
@@ -94,24 +97,26 @@ interface SalesforceMappingFieldPluginInterface {
   public function config($key = NULL, $value = NULL);
 
   /**
-   * Whether this plugin supports "push" operations
+   * Whether this plugin supports "push" operations.
    *
    * @return bool
    */
   public function push();
 
   /**
-   * Whether this plugin supports "pull" operations
+   * Whether this plugin supports "pull" operations.
    *
    * @return bool
    */
   public function pull();
 
   /**
-   * Return an array of dependencies, compatible with \Drupal\Component\Plugin\DependentPluginInterface::calculateDependencies
+   * Return an array of dependencies, compatible with \Drupal\Component\Plugin\DependentPluginInterface::calculateDependencies.
    *
    * @return array
+   *
    * @see \Drupal\Component\Plugin\DependentPluginInterface::calculateDependencies
    */
   public function getDependencies(SalesforceMappingInterface $mapping);
+
 }
diff --git a/modules/salesforce_mapping/src/SalesforceMappingFieldPluginManager.php b/modules/salesforce_mapping/src/SalesforceMappingFieldPluginManager.php
index 9aa27f63..548a3cf6 100644
--- a/modules/salesforce_mapping/src/SalesforceMappingFieldPluginManager.php
+++ b/modules/salesforce_mapping/src/SalesforceMappingFieldPluginManager.php
@@ -29,7 +29,10 @@ class SalesforceMappingFieldPluginManager extends DefaultPluginManager implement
     $this->setCacheBackend($cache_backend, 'salesforce_mapping_field', ['salesforce_mapping_plugins']);
   }
 
-  public function getFallbackPluginId($plugin_id, array $configuration = array()) {
+  /**
+   *
+   */
+  public function getFallbackPluginId($plugin_id, array $configuration = []) {
     return 'broken';
   }
 
diff --git a/modules/salesforce_mapping/src/SalesforceMappingStorage.php b/modules/salesforce_mapping/src/SalesforceMappingStorage.php
index 4c861faa..3499cb25 100644
--- a/modules/salesforce_mapping/src/SalesforceMappingStorage.php
+++ b/modules/salesforce_mapping/src/SalesforceMappingStorage.php
@@ -68,7 +68,7 @@ class SalesforceMappingStorage extends ConfigEntityStorage {
   }
 
   /**
-   * pass-through for loadMultipleMapping()
+   * Pass-through for loadMultipleMapping()
    */
   public function loadByDrupal($entity_type_id) {
     return $this->loadByProperties(["drupal_entity_type" => $entity_type_id]);
@@ -123,7 +123,7 @@ class SalesforceMappingStorage extends ConfigEntityStorage {
     if (empty($push_mappings)) {
       return [];
     }
-    return $push_mappings;    
+    return $push_mappings;
   }
 
   /**
@@ -168,6 +168,7 @@ class SalesforceMappingStorage extends ConfigEntityStorage {
 
   /**
    * Return a unique list of mapped Salesforce object types.
+   *
    * @see loadMultipleMapping()
    */
   public function getMappedSobjectTypes() {
diff --git a/modules/salesforce_mapping/src/SalesforcePullEntityValueEvent.php b/modules/salesforce_mapping/src/SalesforcePullEntityValueEvent.php
index 94b3bc03..cced13f8 100644
--- a/modules/salesforce_mapping/src/SalesforcePullEntityValueEvent.php
+++ b/modules/salesforce_mapping/src/SalesforcePullEntityValueEvent.php
@@ -11,6 +11,9 @@ use Drupal\salesforce_mapping\Event\SalesforcePullEntityValueEvent as ParentSale
  */
 class SalesforcePullEntityValueEvent extends ParentSalesforcePullEntityValueEvent {
 
+  /**
+   *
+   */
   public function __construct() {
     @trigger_error(__CLASS__ . ' is deprecated. Use the parent class in the Drupal\salesforce_mapping\Event namespace.', E_USER_DEPRECATED);
     $args = func_get_args();
diff --git a/modules/salesforce_mapping/src/SalesforcePullEvent.php b/modules/salesforce_mapping/src/SalesforcePullEvent.php
index eb9be640..4b1a0517 100644
--- a/modules/salesforce_mapping/src/SalesforcePullEvent.php
+++ b/modules/salesforce_mapping/src/SalesforcePullEvent.php
@@ -11,6 +11,9 @@ use Drupal\salesforce_mapping\Event\SalesforcePullEvent as ParentSalesforcePullE
  */
 class SalesforcePullEvent extends ParentSalesforcePullEvent {
 
+  /**
+   *
+   */
   public function __construct() {
     @trigger_error(__CLASS__ . ' is deprecated. Use the parent class in the Drupal\salesforce_mapping\Event namespace.', E_USER_DEPRECATED);
     $args = func_get_args();
diff --git a/modules/salesforce_mapping/src/SalesforcePushEvent.php b/modules/salesforce_mapping/src/SalesforcePushEvent.php
index 1670f378..b33debd0 100644
--- a/modules/salesforce_mapping/src/SalesforcePushEvent.php
+++ b/modules/salesforce_mapping/src/SalesforcePushEvent.php
@@ -11,6 +11,9 @@ use Drupal\salesforce_mapping\Event\SalesforcePushEvent as ParentSalesforcePushE
  */
 abstract class SalesforcePushEvent extends ParentSalesforcePushEvent {
 
+  /**
+   *
+   */
   public function __construct() {
     @trigger_error(__CLASS__ . ' is deprecated. Use the parent class in the Drupal\salesforce_mapping\Event namespace.', E_USER_DEPRECATED);
     $args = func_get_args();
diff --git a/modules/salesforce_mapping/src/SalesforcePushOpEvent.php b/modules/salesforce_mapping/src/SalesforcePushOpEvent.php
index f0bc92b8..e7571d22 100644
--- a/modules/salesforce_mapping/src/SalesforcePushOpEvent.php
+++ b/modules/salesforce_mapping/src/SalesforcePushOpEvent.php
@@ -11,6 +11,9 @@ use Drupal\salesforce_mapping\Event\SalesforcePushOpEvent as ParentSalesforcePus
  */
 class SalesforcePushOpEvent extends ParentSalesforcePushOpEvent {
 
+  /**
+   *
+   */
   public function __construct() {
     @trigger_error(__CLASS__ . ' is deprecated. Use the parent class in the Drupal\salesforce_mapping\Event namespace.', E_USER_DEPRECATED);
     $args = func_get_args();
diff --git a/modules/salesforce_mapping/src/SalesforcePushParamsEvent.php b/modules/salesforce_mapping/src/SalesforcePushParamsEvent.php
index 38f5c4ce..7c4b334a 100644
--- a/modules/salesforce_mapping/src/SalesforcePushParamsEvent.php
+++ b/modules/salesforce_mapping/src/SalesforcePushParamsEvent.php
@@ -11,6 +11,9 @@ use Drupal\salesforce_mapping\Event\SalesforcePushParamsEvent as ParentSalesforc
  */
 class SalesforcePushParamsEvent extends ParentSalesforcePushParamsEvent {
 
+  /**
+   *
+   */
   public function __construct() {
     @trigger_error(__CLASS__ . ' is deprecated. Use the parent class in the Drupal\salesforce_mapping\Event namespace.', E_USER_DEPRECATED);
     $args = func_get_args();
diff --git a/modules/salesforce_mapping/src/SalesforceQueryEvent.php b/modules/salesforce_mapping/src/SalesforceQueryEvent.php
index eb62ce23..3e4a419a 100644
--- a/modules/salesforce_mapping/src/SalesforceQueryEvent.php
+++ b/modules/salesforce_mapping/src/SalesforceQueryEvent.php
@@ -11,6 +11,9 @@ use Drupal\salesforce_mapping\Event\SalesforceQueryEvent as ParentSalesforceQuer
  */
 class SalesforceQueryEvent extends ParentSalesforceQueryEvent {
 
+  /**
+   *
+   */
   public function __construct() {
     @trigger_error(__CLASS__ . ' is deprecated. Use the parent class in the Drupal\salesforce_mapping\Event namespace.', E_USER_DEPRECATED);
     $args = func_get_args();
diff --git a/modules/salesforce_mapping/src/Tests/SalesforceMappingCrudFormTest.php b/modules/salesforce_mapping/src/Tests/SalesforceMappingCrudFormTest.php
index f3314030..0e8db91f 100644
--- a/modules/salesforce_mapping/src/Tests/SalesforceMappingCrudFormTest.php
+++ b/modules/salesforce_mapping/src/Tests/SalesforceMappingCrudFormTest.php
@@ -47,7 +47,7 @@ class SalesforceMappingCrudFormTest extends WebTestBase {
     $this->drupalLogin($this->adminSalesforceUser);
 
     /* Salesforce Mapping Add Form */
-    $mapping_name = 'mapping' . rand(100,10000);
+    $mapping_name = 'mapping' . rand(100, 10000);
     $post = [
       'id' => $mapping_name,
       'label' => $mapping_name,
@@ -66,7 +66,7 @@ class SalesforceMappingCrudFormTest extends WebTestBase {
     $this->assertEqual($mapping->label(), $mapping_name);
 
     /* Salesforce Mapping Edit Form */
-    // Need to rebuild caches before proceeding to edit link
+    // Need to rebuild caches before proceeding to edit link.
     drupal_flush_all_caches();
     $post = [
       'label' => $this->randomMachineName(),
@@ -95,7 +95,6 @@ class SalesforceMappingCrudFormTest extends WebTestBase {
       }
     }
 
-
   }
 
 }
diff --git a/modules/salesforce_mapping/src/Tests/TestMappedObjectList.php b/modules/salesforce_mapping/src/Tests/TestMappedObjectList.php
index b2ecb51b..c3e8f6e5 100644
--- a/modules/salesforce_mapping/src/Tests/TestMappedObjectList.php
+++ b/modules/salesforce_mapping/src/Tests/TestMappedObjectList.php
@@ -5,8 +5,16 @@ namespace Drupal\salesforce_mapping\Tests;
 use Drupal\salesforce_mapping\MappedObjectList;
 use Drupal\Core\Entity\EntityInterface;
 
+/**
+ *
+ */
 class TestMappedObjectList extends MappedObjectList {
+
+  /**
+   *
+   */
   public function buildOperations(EntityInterface $entity) {
-    return array();
+    return [];
   }
-}
\ No newline at end of file
+
+}
diff --git a/modules/salesforce_mapping/tests/src/Unit/MappedObjectTest.php b/modules/salesforce_mapping/tests/src/Unit/MappedObjectTest.php
index 6fc9bebe..26ab5f36 100644
--- a/modules/salesforce_mapping/tests/src/Unit/MappedObjectTest.php
+++ b/modules/salesforce_mapping/tests/src/Unit/MappedObjectTest.php
@@ -3,24 +3,20 @@
 namespace Drupal\Tests\salesforce_mapping\Unit;
 
 use Drupal\Core\DependencyInjection\ContainerBuilder;
-use Drupal\Core\Field\BaseFieldDefinition;
-use Drupal\Core\Utility\Error;
 use Drupal\salesforce_mapping\Entity\MappedObject;
 use Drupal\salesforce_mapping\Entity\SalesforceMappingInterface;
-use Drupal\salesforce_mapping\MappingConstants;
 use Drupal\salesforce\Rest\RestClientInterface;
 use Drupal\salesforce\SFID;
 use Drupal\salesforce\SObject;
 use Drupal\Tests\UnitTestCase;
-use Psr\Log\LogLevel;
 use Drupal\Component\Datetime\TimeInterface;
 
 /**
- * Test Mapped Object instantitation
+ * Test Mapped Object instantitation.
+ *
  * @coversDefaultClass \Drupal\salesforce_mapping\Entity\MappedObject
  * @group salesforce_mapping
  */
-
 class MappedObjectTest extends UnitTestCase {
   static $modules = ['salesforce_mapping'];
 
@@ -55,7 +51,7 @@ class MappedObjectTest extends UnitTestCase {
       ->will($this->returnValue([
         'id' => 'id',
         'uuid' => 'uuid',
-    ]));
+      ]));
 
     $this->entityManager = $this->getMock('\Drupal\Core\Entity\EntityManagerInterface');
     $this->entityManager->expects($this->any())
@@ -69,8 +65,8 @@ class MappedObjectTest extends UnitTestCase {
       ->will($this->returnValue([
         'id' => 'id',
         'entity_id' => 'entity_id',
-        'salesforce_id' => 'salesforce_id'
-    ]));
+        'salesforce_id' => 'salesforce_id',
+      ]));
 
     $this->entityManager = $this->getMock('\Drupal\Core\Entity\EntityManagerInterface');
     $this->entityManager->expects($this->any())
@@ -87,17 +83,17 @@ class MappedObjectTest extends UnitTestCase {
       ->getMock();
     $this->fieldTypePluginManager->expects($this->any())
       ->method('getDefaultStorageSettings')
-      ->will($this->returnValue(array()));
+      ->will($this->returnValue([]));
     $this->fieldTypePluginManager->expects($this->any())
       ->method('getDefaultFieldSettings')
-      ->will($this->returnValue(array()));
+      ->will($this->returnValue([]));
     $this->fieldTypePluginManager->expects($this->any())
       ->method('createFieldItemList')
       ->will($this->returnValue(
         $this->getMock('Drupal\Core\Field\FieldItemListInterface')));
 
     $this->time = $this->getMock(TimeInterface::CLASS);
-    
+
     $container = new ContainerBuilder();
     $container->set('entity.manager', $this->entityManager);
     $container->set('salesforce.client', $this->client);
@@ -123,14 +119,12 @@ class MappedObjectTest extends UnitTestCase {
     //   'entity_type_id' => BaseFieldDefinition::create('string'),
     //   'salesforce_id' => BaseFieldDefinition::create('string'),
     //   'salesforce_mapping' => BaseFieldDefinition::create('entity_reference'),
-    // );
-
+    // );.
     // $this->entityManager->expects($this->any())
     //   ->method('getFieldDefinitions')
     //   ->with('salesforce_mapped_object', 'salesforce_mapped_object')
-    //   ->will($this->returnValue($this->fieldDefinitions));
-
-    // mock salesforce mapping
+    //   ->will($this->returnValue($this->fieldDefinitions));.
+    // Mock salesforce mapping.
     $this->mapping = $this->getMock(SalesforceMappingInterface::CLASS);
     $this->mapping
       ->expects($this->any())
@@ -170,7 +164,7 @@ class MappedObjectTest extends UnitTestCase {
    * @covers ::push
    */
   public function testPushUpsert() {
-    // First pass: test upsert
+    // First pass: test upsert.
     $this->mapping->expects($this->any())
       ->method('hasKey')
       ->will($this->returnValue(TRUE));
@@ -184,7 +178,7 @@ class MappedObjectTest extends UnitTestCase {
    * @covers ::push
    */
   public function testPushUpdate() {
-    // Second pass: test update
+    // Second pass: test update.
     $this->mapping->expects($this->once())
       ->method('hasKey')
       ->willReturn(FALSE);
@@ -201,7 +195,7 @@ class MappedObjectTest extends UnitTestCase {
    * @covers ::push
    */
   public function testPushCreate() {
-    // Third pass: test create
+    // Third pass: test create.
     $this->mapping->expects($this->once())
       ->method('hasKey')
       ->will($this->returnValue(FALSE));
@@ -214,7 +208,7 @@ class MappedObjectTest extends UnitTestCase {
 
     $result = $this->mapped_object->push();
     $this->assertTrue($result instanceof SFID);
-    $this->assertEquals($this->salesforce_id, (string)$result);
+    $this->assertEquals($this->salesforce_id, (string) $result);
   }
 
   /**
@@ -267,7 +261,6 @@ class MappedObjectTest extends UnitTestCase {
     $this->mapped_object->setSalesforceRecord($this->sf_object);
     // $this->event_dispatcher->expects($this->once())
     //   ->method('dispatch');
-
     $this->assertEquals($this->mapped_object, $this->mapped_object->pull());
   }
 
diff --git a/modules/salesforce_mapping/tests/src/Unit/SalesforceMappingStorageTest.php b/modules/salesforce_mapping/tests/src/Unit/SalesforceMappingStorageTest.php
index 06d3e25f..069a922d 100644
--- a/modules/salesforce_mapping/tests/src/Unit/SalesforceMappingStorageTest.php
+++ b/modules/salesforce_mapping/tests/src/Unit/SalesforceMappingStorageTest.php
@@ -65,7 +65,6 @@ class SalesforceMappingStorageTest extends UnitTestCase {
     //   ->setMethods(['__construct'])
     //   ->disableOriginalConstructor()
     //   ->getMock();
-
     $this->entity_type = new ConfigEntityType([
       'id' => $this->entityTypeId,
       'class' => SalesforceMapping::class,
diff --git a/modules/salesforce_mapping/tests/src/Unit/SalesforceMappingTest.php b/modules/salesforce_mapping/tests/src/Unit/SalesforceMappingTest.php
index 13c28cce..05831403 100644
--- a/modules/salesforce_mapping/tests/src/Unit/SalesforceMappingTest.php
+++ b/modules/salesforce_mapping/tests/src/Unit/SalesforceMappingTest.php
@@ -1,4 +1,5 @@
 <?php
+
 namespace Drupal\Tests\salesforce_mapping\Unit;
 
 use Drupal\Core\Config\Entity\ConfigEntityTypeInterface;
@@ -12,13 +13,11 @@ use Drupal\salesforce_mapping\Plugin\SalesforceMappingField\Properties;
 use Drupal\salesforce_mapping\SalesforceMappingFieldPluginManager;
 use Prophecy\Argument;
 
-
 /**
- * Test Object instantitation
+ * Test Object instantitation.
  *
  * @group salesforce_mapping
  */
-
 class SalesforceMappingTest extends UnitTestCase {
   static $modules = ['salesforce_mapping'];
 
@@ -32,7 +31,7 @@ class SalesforceMappingTest extends UnitTestCase {
     $this->saleforceObjectType = $this->randomMachineName();
     $this->drupalEntityTypeId = $this->randomMachineName();
     $this->drupalBundleId = $this->randomMachineName();
-    $this->values = array(
+    $this->values = [
       'id' => $this->id,
       'langcode' => 'en',
       'uuid' => '3bb9ee60-bea5-4622-b89b-a63319d10b3a',
@@ -72,9 +71,9 @@ class SalesforceMappingTest extends UnitTestCase {
           'direction' => 'sync',
         ],
       ],
-    );
+    ];
 
-    // mock EntityType Definition
+    // Mock EntityType Definition.
     $this->entityTypeId = $this->randomMachineName();
     $this->provider = $this->randomMachineName();
     $prophecy = $this->prophesize(ConfigEntityTypeInterface::CLASS);
@@ -83,29 +82,30 @@ class SalesforceMappingTest extends UnitTestCase {
       ->willReturn('test_provider.' . $this->entityTypeId);
     $this->entityDefinition = $prophecy->reveal();
 
-    // mock EntityTypeManagerInterface
+    // Mock EntityTypeManagerInterface.
     $prophecy = $this->prophesize(EntityTypeManagerInterface::CLASS);
     $prophecy->getDefinition($this->entityTypeId)->willReturn($this->entityDefinition);
     $this->etm = $prophecy->reveal();
 
-    // mock Properties SalesforceMappingField
+    // Mock Properties SalesforceMappingField.
     $prophecy = $this->prophesize(Properties::CLASS);
-    $prophecy->pull()->willReturn(true);
+    $prophecy->pull()->willReturn(TRUE);
     $sf_mapping_field = $prophecy->reveal();
 
-    // mode field plugin manager
+    // Mode field plugin manager.
     $prophecy = $this->prophesize(SalesforceMappingFieldPluginManager::CLASS);
     $prophecy->createInstance(Argument::any(), Argument::any())->willReturn($sf_mapping_field);
     $field_manager = $prophecy->reveal();
 
-
-    // mock state
+    // Mock state.
     $prophecy = $this->prophesize(StateInterface::CLASS);
     $prophecy->get('salesforce.mapping_pull_info', Argument::any())->willReturn([]);
-    $prophecy->get('salesforce.mapping_push_info', Argument::any())->willReturn([$this->id => [
-      'last_timestamp' => 0,
-    ]]);
-    $prophecy->set('salesforce.mapping_push_info', Argument::any())->willReturn(null);
+    $prophecy->get('salesforce.mapping_push_info', Argument::any())->willReturn([
+      $this->id => [
+        'last_timestamp' => 0,
+      ],
+    ]);
+    $prophecy->set('salesforce.mapping_push_info', Argument::any())->willReturn(NULL);
     $this->state = $prophecy->reveal();
 
     $container = new ContainerBuilder();
@@ -122,16 +122,16 @@ class SalesforceMappingTest extends UnitTestCase {
   }
 
   /**
-   * Test object instantiation
+   * Test object instantiation.
    */
   public function testObject() {
     $this->assertTrue($this->mapping instanceof SalesforceMapping);
     $this->assertEquals($this->id, $this->mapping->id());
   }
 
-    /**
-     * Test getPullFields()
-     */
+  /**
+   * Test getPullFields()
+   */
   public function testGetPullFields() {
     $fields_array = $this->mapping->getPullFields();
     $this->assertTrue(is_array($fields_array));
@@ -144,8 +144,9 @@ class SalesforceMappingTest extends UnitTestCase {
   public function testCheckTriggers() {
     $triggers = $this->mapping->checkTriggers([
       MappingConstants::SALESFORCE_MAPPING_SYNC_DRUPAL_CREATE,
-      MappingConstants::SALESFORCE_MAPPING_SYNC_DRUPAL_UPDATE
+      MappingConstants::SALESFORCE_MAPPING_SYNC_DRUPAL_UPDATE,
     ]);
     $this->assertTrue($triggers);
   }
+
 }
diff --git a/modules/salesforce_pull/salesforce_pull.drush.inc b/modules/salesforce_pull/salesforce_pull.drush.inc
index d704b2a6..c54cb052 100644
--- a/modules/salesforce_pull/salesforce_pull.drush.inc
+++ b/modules/salesforce_pull/salesforce_pull.drush.inc
@@ -1,9 +1,12 @@
 <?php
 
+/**
+ * @file
+ */
+
 use Drupal\salesforce\SFID;
 use Drupal\salesforce\Event\SalesforceEvents;
 use Drupal\salesforce_mapping\Event\SalesforceQueryEvent;
-use Drupal\salesforce_mapping\Entity\SalesforceMappingInterface;
 
 /**
  * Implements hook_drush_command().
@@ -87,7 +90,7 @@ function drush_salesforce_pull_sf_pull_query($name) {
     $stop = strtotime($stop);
   }
   $where = drush_get_option('where');
-  
+
   if (!($soql = $mapping->getPullQuery([], $start, $stop))) {
     drush_log(dt('!mapping: Unable to generate pull query. Does this mapping have any Salesforce Action Triggers enabled?', ['!mapping' => $mapping->id()]), 'error');
     return;
@@ -102,7 +105,7 @@ function drush_salesforce_pull_sf_pull_query($name) {
     new SalesforceQueryEvent($mapping, $soql)
   );
 
-  drush_log(dt('!mapping: Issuing pull query: !query', ['!query' => (string)$soql, '!mapping' => $mapping->id()]), 'notice');
+  drush_log(dt('!mapping: Issuing pull query: !query', ['!query' => (string) $soql, '!mapping' => $mapping->id()]), 'notice');
   $results = \Drupal::service('salesforce.client')->query($soql);
 
   if (empty($results)) {
@@ -163,7 +166,7 @@ function drush_salesforce_pull_sf_pull_file($file, $name = NULL) {
     // Reset our base query:
     $soql = $mapping->getPullQuery([], 1, 0);
 
-    // Now add all the IDs to it
+    // Now add all the IDs to it.
     $sfids = [];
     foreach ($chunk as $j => $row) {
       if (empty($row) || empty($row[0])) {
@@ -172,7 +175,7 @@ function drush_salesforce_pull_sf_pull_file($file, $name = NULL) {
       }
       try {
         $sfid = new SFID($row[0]);
-        // Sanity check to make sure the key-prefix is correct. 
+        // Sanity check to make sure the key-prefix is correct.
         // If so, this is probably a good SFID.
         // If not, it is definitely not a good SFID.
         if ($mapping->getSalesforceObjectType() != $sf->getObjectTypeName($sfid)) {
@@ -183,7 +186,7 @@ function drush_salesforce_pull_sf_pull_file($file, $name = NULL) {
         drush_log(dt('Skipping row !n, no SFID found.', ['!n' => $base + $j + 1]), 'warning');
         continue;
       }
-      $sfid = (string)$sfid;
+      $sfid = (string) $sfid;
       if (empty($sfids[$sfid])) {
         $sfids[] = $sfid;
         $seen[$sfid] = $sfid;
@@ -206,7 +209,7 @@ function drush_salesforce_pull_sf_pull_file($file, $name = NULL) {
       new SalesforceQueryEvent($mapping, $soql)
     );
 
-    drush_log(dt('Issuing pull query: !query', ['!query' => (string)$soql]));
+    drush_log(dt('Issuing pull query: !query', ['!query' => (string) $soql]));
 
     $results = \Drupal::service('salesforce.client')->query($soql);
 
@@ -222,6 +225,9 @@ function drush_salesforce_pull_sf_pull_file($file, $name = NULL) {
 
 }
 
+/**
+ *
+ */
 function _salesforce_pull_load_single_mapping_array_or_all_pull_mappings($name = NULL) {
   if ($name != NULL) {
     $mapping = _salesforce_drush_get_mapping($name);
@@ -238,9 +244,11 @@ function _salesforce_pull_load_single_mapping_array_or_all_pull_mappings($name =
       ->getStorage('salesforce_mapping')
       ->loadPullMappings();
   }
-} 
+}
 
-// @TODO allow caller to specify query start window
+/**
+ * @TODO allow caller to specify query start window
+ */
 function drush_salesforce_pull_sf_pull_queue($name = NULL) {
 
   $queue_handler = \Drupal::service('salesforce_pull.queue_handler');
@@ -251,6 +259,9 @@ function drush_salesforce_pull_sf_pull_queue($name = NULL) {
   drush_queue_run('cron_salesforce_pull');
 }
 
+/**
+ *
+ */
 function drush_salesforce_pull_sf_pull_reset($name = NULL) {
   $mappings = _salesforce_pull_load_single_mapping_array_or_all_pull_mappings($name);
   if (empty($mappings)) {
@@ -263,4 +274,3 @@ function drush_salesforce_pull_sf_pull_reset($name = NULL) {
       ->setForcePull($mapping);
   }
 }
-
diff --git a/modules/salesforce_pull/salesforce_pull.install b/modules/salesforce_pull/salesforce_pull.install
index 05e807bf..07139224 100644
--- a/modules/salesforce_pull/salesforce_pull.install
+++ b/modules/salesforce_pull/salesforce_pull.install
@@ -5,8 +5,6 @@
  * Install/uninstall tasks for the Salesforce Pull module.
  */
 
-use Drupal\salesforce_pull\QueueHandler;
-
 /**
  * Implements hook_uninstall().
  */
@@ -41,7 +39,7 @@ function salesforce_pull_update_8002() {
 }
 
 /**
- * Convert salesforce_pull_last* timestamps key-values into arrays
+ * Convert salesforce_pull_last* timestamps key-values into arrays.
  */
 function salesforce_pull_update_8001() {
   $kv = db_query("SELECT name, value FROM key_value WHERE name like 'salesforce_pull_last%'")->fetchAllKeyed();
@@ -64,7 +62,7 @@ function salesforce_pull_update_8001() {
 }
 
 /**
- * Moves global pull limit out of state into config
+ * Moves global pull limit out of state into config.
  */
 function salesforce_pull_update_8003() {
   $config = \Drupal::configFactory()->getEditable('salesforce.settings');
@@ -92,4 +90,3 @@ function salesforce_pull_update_8004() {
   \Drupal::state()->set('salesforce.mapping_pull_info', $mapping_pull_info);
   \Drupal::state()->delete('salesforce.sobject_pull_info');
 }
-
diff --git a/modules/salesforce_pull/salesforce_pull.module b/modules/salesforce_pull/salesforce_pull.module
index 18772426..5904fe4e 100644
--- a/modules/salesforce_pull/salesforce_pull.module
+++ b/modules/salesforce_pull/salesforce_pull.module
@@ -5,7 +5,6 @@
  * Pull updates from Salesforce when a Salesforce object is updated.
  */
 
-
 /**
  * Implements hook_cron().
  */
diff --git a/modules/salesforce_pull/src/DeleteHandler.php b/modules/salesforce_pull/src/DeleteHandler.php
index 53b2e8c3..1e399000 100644
--- a/modules/salesforce_pull/src/DeleteHandler.php
+++ b/modules/salesforce_pull/src/DeleteHandler.php
@@ -13,7 +13,6 @@ use Drupal\salesforce\SFID;
 use Drupal\salesforce_mapping\MappedObjectStorage;
 use Drupal\salesforce_mapping\MappingConstants;
 use Symfony\Component\EventDispatcher\EventDispatcherInterface;
-use Drupal\Component\Datetime\TimeInterface;
 
 /**
  * Handles pull cron deletion of Drupal entities based onSF mapping settings.
@@ -76,7 +75,7 @@ class DeleteHandler {
    * @param \Drupal\Core\State\StateInterface $state
    *   State service.
    */
-    public function __construct(RestClientInterface $sfapi, EntityTypeManagerInterface $entity_type_manager, StateInterface $state, EventDispatcherInterface $event_dispatcher) {
+  public function __construct(RestClientInterface $sfapi, EntityTypeManagerInterface $entity_type_manager, StateInterface $state, EventDispatcherInterface $event_dispatcher) {
     $this->sfapi = $sfapi;
     $this->etm = $entity_type_manager;
     $this->mappingStorage = $this->etm->getStorage('salesforce_mapping');
diff --git a/modules/salesforce_pull/src/Plugin/QueueWorker/PullBase.php b/modules/salesforce_pull/src/Plugin/QueueWorker/PullBase.php
index 91d40624..5ef06579 100644
--- a/modules/salesforce_pull/src/Plugin/QueueWorker/PullBase.php
+++ b/modules/salesforce_pull/src/Plugin/QueueWorker/PullBase.php
@@ -120,11 +120,11 @@ abstract class PullBase extends QueueWorkerBase implements ContainerFactoryPlugi
   /**
    * Update an existing Drupal entity.
    *
-   * @param SalesforceMappingInterface $mapping
+   * @param \Drupal\salesforce_mapping\Entity\SalesforceMappingInterface $mapping
    *   Object of field maps.
-   * @param MappedObjectInterface $mapped_object
+   * @param \Drupal\salesforce_mapping\Entity\MappedObjectInterface $mapped_object
    *   SF Mmapped object.
-   * @param SObject $sf_object
+   * @param \Drupal\salesforce\SObject $sf_object
    *   Current Salesforce record array.
    * @param bool $force
    */
@@ -208,9 +208,9 @@ abstract class PullBase extends QueueWorkerBase implements ContainerFactoryPlugi
   /**
    * Create a Drupal entity and mapped object.
    *
-   * @param SalesforceMappingInterface $mapping
+   * @param \Drupal\salesforce_mapping\Entity\SalesforceMappingInterface $mapping
    *   Object of field maps.
-   * @param SObject $sf_object
+   * @param \Drupal\salesforce\SObject $sf_object
    *   Current Salesforce record array.
    * @param bool $force_pull
    */
@@ -258,9 +258,9 @@ abstract class PullBase extends QueueWorkerBase implements ContainerFactoryPlugi
 
       // Push upsert ID to SF object, if allowed and not already set.
       if ($mapping->hasKey() && $mapping->checkTriggers([
-          MappingConstants::SALESFORCE_MAPPING_SYNC_DRUPAL_CREATE,
-          MappingConstants::SALESFORCE_MAPPING_SYNC_DRUPAL_UPDATE,
-        ]) && $sf_object->field($mapping->getKeyField()) === NULL) {
+        MappingConstants::SALESFORCE_MAPPING_SYNC_DRUPAL_CREATE,
+        MappingConstants::SALESFORCE_MAPPING_SYNC_DRUPAL_UPDATE,
+      ]) && $sf_object->field($mapping->getKeyField()) === NULL) {
         $params = new PushParams($mapping, $entity);
         $this->eventDispatcher->dispatch(
           SalesforceEvents::PUSH_PARAMS,
@@ -316,4 +316,4 @@ abstract class PullBase extends QueueWorkerBase implements ContainerFactoryPlugi
     }
   }
 
-}
\ No newline at end of file
+}
diff --git a/modules/salesforce_pull/src/PullQueueItem.php b/modules/salesforce_pull/src/PullQueueItem.php
index 2fa0db6b..016475b9 100644
--- a/modules/salesforce_pull/src/PullQueueItem.php
+++ b/modules/salesforce_pull/src/PullQueueItem.php
@@ -5,6 +5,9 @@ namespace Drupal\salesforce_pull;
 use Drupal\salesforce\SObject;
 use Drupal\salesforce_mapping\Entity\SalesforceMappingInterface;
 
+/**
+ *
+ */
 class PullQueueItem {
 
   /**
@@ -25,8 +28,8 @@ class PullQueueItem {
   public $force_pull;
 
   /**
-   * @param SObject $sobject
-   * @param SalesforceMappingInterface $mapping
+   * @param \Drupal\salesforce\SObject $sobject
+   * @param \Drupal\salesforce_mapping\Entity\SalesforceMappingInterface $mapping
    * @param bool $force_pull
    */
   public function __construct(SObject $sobject, SalesforceMappingInterface $mapping, $force_pull = FALSE) {
diff --git a/modules/salesforce_pull/src/QueueHandler.php b/modules/salesforce_pull/src/QueueHandler.php
index 0791ea6a..6d5fec89 100644
--- a/modules/salesforce_pull/src/QueueHandler.php
+++ b/modules/salesforce_pull/src/QueueHandler.php
@@ -11,7 +11,6 @@ use Drupal\salesforce\Event\SalesforceEvents;
 use Drupal\salesforce\Event\SalesforceNoticeEvent;
 use Drupal\salesforce\Rest\RestClientInterface;
 use Drupal\salesforce\SObject;
-use Drupal\salesforce\SelectQuery;
 use Drupal\salesforce\SelectQueryResult;
 use Drupal\salesforce_mapping\Entity\SalesforceMappingInterface;
 use Drupal\salesforce_mapping\Event\SalesforceQueryEvent;
@@ -38,7 +37,7 @@ class QueueHandler {
   protected $queue;
 
   /**
-   * @var array of \Drupal\salesforce_mapping\Entity\SalesforceMapping
+   * @var arrayof\Drupal\salesforce_mapping\Entity\SalesforceMapping
    */
   protected $mappings;
 
@@ -58,12 +57,11 @@ class QueueHandler {
   protected $eventDispatcher;
 
   /**
-   * @param RestClientInterface $sfapi
+   * @param \Drupal\salesforce\Rest\RestClientInterface $sfapi
    * @param QueueInterface $queue
    * @param StateInterface $state
-   * @param EventDispatcherInterface $event_dispatcher
+   * @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
    */
-
   public function __construct(RestClientInterface $sfapi, EntityTypeManagerInterface $entity_type_manager, QueueDatabaseFactory $queue_factory, ConfigFactoryInterface $config, EventDispatcherInterface $event_dispatcher, TimeInterface $time) {
     $this->sfapi = $sfapi;
     $this->queue = $queue_factory->get('cron_salesforce_pull');
@@ -87,8 +85,8 @@ class QueueHandler {
    *   Timestamp of starting window from which to pull records. If omitted, use
    *   ::getLastPullTime().
    * @param int $stop
-   *   Timestamp of ending window from which to pull records. If omitted, use 
-   *   "now"
+   *   Timestamp of ending window from which to pull records. If omitted, use
+   *   "now".
    *
    * @return bool
    *   TRUE if there was room to add items, FALSE otherwise.
@@ -118,7 +116,7 @@ class QueueHandler {
    * Given a mapping and optional timeframe, perform an API query for updated
    * records and enqueue them into the pull queue.
    *
-   * @param SalesforceMappingInterface $mapping
+   * @param \Drupal\salesforce_mapping\Entity\SalesforceMappingInterface $mapping
    *   The salesforce mapping for which to query.
    * @param bool $force_pull
    *   Whether to force the queried records to be pulled.
@@ -126,8 +124,8 @@ class QueueHandler {
    *   Timestamp of starting window from which to pull records. If omitted, use
    *   ::getLastPullTime().
    * @param int $stop
-   *   Timestamp of ending window from which to pull records. If omitted, use 
-   *   "now"
+   *   Timestamp of ending window from which to pull records. If omitted, use
+   *   "now".
    *
    * @return FALSE | int
    *   Return the number of records fetched by the pull query, or FALSE no
@@ -158,18 +156,18 @@ class QueueHandler {
   /**
    * Perform the SFO Query for a mapping and its mapped fields.
    *
-   * @param SalesforceMappingInterface $mapping
-   *   Mapping for which to execute pull
+   * @param \Drupal\salesforce_mapping\Entity\SalesforceMappingInterface $mapping
+   *   Mapping for which to execute pull.
    * @param array $mapped_fields
    *   Fetch only these fields, if given, otherwise fetch all mapped fields.
    * @param int $start
    *   Timestamp of starting window from which to pull records. If omitted, use
    *   ::getLastPullTime().
    * @param int $stop
-   *   Timestamp of ending window from which to pull records. If omitted, use 
-   *   "now"
+   *   Timestamp of ending window from which to pull records. If omitted, use
+   *   "now".
    *
-   * @return SelectQueryResult
+   * @return \Drupal\salesforce\SelectQueryResult
    *   returned result object from Salesforce
    *
    * @see SalesforceMappingInterface
@@ -196,8 +194,8 @@ class QueueHandler {
    * Iterates over an entire result set, calling nextRecordsUrl when necessary,
    * and inserts the records into pull queue.
    *
-   * @param SalesforceMappingInterface $mapping
-   * @param SelectQueryResult $results
+   * @param \Drupal\salesforce_mapping\Entity\SalesforceMappingInterface $mapping
+   * @param \Drupal\salesforce\SelectQueryResult $results
    * @param bool $force_pull
    */
   public function enqueueAllResults(SalesforceMappingInterface $mapping, SelectQueryResult $results, $force_pull = FALSE) {
@@ -218,10 +216,10 @@ class QueueHandler {
   /**
    * Enqueue a set of results into pull queue.
    *
-   * @param SalesforceMappingInterface $mapping
-   *   Mapping object currently being processed
-   * @param SelectQueryResult $results
-   *   Result record set
+   * @param \Drupal\salesforce_mapping\Entity\SalesforceMappingInterface $mapping
+   *   Mapping object currently being processed.
+   * @param \Drupal\salesforce\SelectQueryResult $results
+   *   Result record set.
    * @param bool $force_pull
    *   Whether to force pull for enqueued items.
    *
@@ -247,8 +245,8 @@ class QueueHandler {
   /**
    * Enqueue a single record for pull.
    *
-   * @param SalesforceMappingInterface $mapping
-   * @param SObject $record
+   * @param \Drupal\salesforce_mapping\Entity\SalesforceMappingInterface $mapping
+   * @param \Drupal\salesforce\SObject $record
    * @param bool $foce
    */
   public function enqueueRecord(SalesforceMappingInterface $mapping, SObject $record, $force_pull = FALSE) {
diff --git a/modules/salesforce_pull/tests/src/Unit/DeleteHandlerTest.php b/modules/salesforce_pull/tests/src/Unit/DeleteHandlerTest.php
index ba935741..5a33700d 100644
--- a/modules/salesforce_pull/tests/src/Unit/DeleteHandlerTest.php
+++ b/modules/salesforce_pull/tests/src/Unit/DeleteHandlerTest.php
@@ -1,4 +1,5 @@
 <?php
+
 namespace Drupal\Tests\salesforce_pull\Unit;
 
 use Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher;
@@ -35,10 +36,10 @@ class DeleteHandlerTest extends UnitTestCase {
       'deletedRecords' => [
         [
           'id' => '1234567890abcde',
-          'attributes' => ['type' => 'dummy',],
+          'attributes' => ['type' => 'dummy'],
           'name' => 'Example',
         ],
-      ]
+      ],
     ];
 
     $prophecy = $this->prophesize(RestClientInterface::CLASS);
@@ -104,7 +105,7 @@ class DeleteHandlerTest extends UnitTestCase {
     $prophecy->loadByProperties(Argument::any())->willReturn([$this->mapping]);
     $prophecy->load(Argument::any())->willReturn($this->mapping);
     $prophecy->loadMultiple()->willReturn([
-      $this->mapping
+      $this->mapping,
     ]);
     $this->configStorage = $prophecy->reveal();
 
@@ -131,10 +132,10 @@ class DeleteHandlerTest extends UnitTestCase {
     // Mock state.
     $prophecy = $this->prophesize(StateInterface::CLASS);
     $prophecy->get('salesforce.mapping_pull_info', Argument::any())->willReturn([1 => ['last_delete_timestamp' => '1485787434']]);
-    $prophecy->set('salesforce.mapping_pull_info', Argument::any())->willReturn(null);
+    $prophecy->set('salesforce.mapping_pull_info', Argument::any())->willReturn(NULL);
     $this->state = $prophecy->reveal();
 
-   // mock event dispatcher
+    // Mock event dispatcher.
     $prophecy = $this->prophesize(ContainerAwareEventDispatcher::CLASS);
     $prophecy->dispatch(Argument::any(), Argument::any())->willReturn();
     $this->ed = $prophecy->reveal();
diff --git a/modules/salesforce_pull/tests/src/Unit/PullBaseTest.php b/modules/salesforce_pull/tests/src/Unit/PullBaseTest.php
index 6ee649e4..355ed548 100644
--- a/modules/salesforce_pull/tests/src/Unit/PullBaseTest.php
+++ b/modules/salesforce_pull/tests/src/Unit/PullBaseTest.php
@@ -38,25 +38,25 @@ class PullBaseTest extends UnitTestCase {
 
     $this->salesforce_id = '1234567890abcde';
 
-    // mock SFID
+    // Mock SFID.
     $prophecy = $this->prophesize(SFID::CLASS);
     $prophecy
       ->__toString(Argument::any())
       ->willReturn($this->salesforce_id);
     $this->sfid = $prophecy->reveal();
 
-    // mock StringItem for mock Entity
+    // Mock StringItem for mock Entity.
     $changed_value = $this->getMockBuilder(StringItem::CLASS)
       ->setMethods(['__get'])
       ->disableOriginalConstructor()
-      //->setConstructorArgs([$ddi,null,null])
+      // ->setConstructorArgs([$ddi,null,null])
       ->getMock();
     $changed_value->expects($this->any())
       ->method('__get')
       ->with($this->equalTo('value'))
       ->willReturn('999999');
 
-    // mock content entity
+    // Mock content entity.
     $this->entity = $this->getMockBuilder(ContentEntityBase::CLASS)
       ->setMethods(['__construct', '__get', '__set', 'label', 'id', '__isset'])
       ->disableOriginalConstructor()
@@ -71,9 +71,9 @@ class PullBaseTest extends UnitTestCase {
     $this->entity->expects($this->any())
       ->method('__isset')
       ->with($this->equalTo('changed'))
-      ->willReturn(true);
+      ->willReturn(TRUE);
 
-    // mock mapping object
+    // Mock mapping object.
     $this->mapping = $this->getMock(SalesforceMappingInterface::CLASS);
     $this->mapping->expects($this->any())
       ->method('__get')
@@ -81,7 +81,7 @@ class PullBaseTest extends UnitTestCase {
       ->willReturn(1);
     $this->mapping->expects($this->any())
       ->method('checkTriggers')
-      ->willReturn(true);
+      ->willReturn(TRUE);
     $this->mapping->method('getPullTriggerDate')
       ->willReturn('pull_trigger_date');
     $this->mapping->method('getDrupalEntityType')
@@ -94,7 +94,7 @@ class PullBaseTest extends UnitTestCase {
     $this->mapping->method('getFieldMappings')
       ->willReturn([]);
 
-    // mock mapped object
+    // Mock mapped object.
     $this->mappedObject = $this->getMock(MappedObjectInterface::CLASS);
     $this->mappedObject->expects($this->any())
       ->method('getChanged')
@@ -115,12 +115,12 @@ class PullBaseTest extends UnitTestCase {
       ->method('getMappedEntity')
       ->willReturn($this->entity);
 
-    // mock mapping ConfigEntityStorage object
+    // Mock mapping ConfigEntityStorage object.
     $prophecy = $this->prophesize(ConfigEntityStorage::CLASS);
     $prophecy->load(Argument::any())->willReturn($this->mapping);
     $this->salesforceMappingStorage = $prophecy->reveal();
 
-    // mock mapped object EntityStorage object
+    // Mock mapped object EntityStorage object.
     $prophecy = $this->prophesize(EntityStorageBase::CLASS);
     $prophecy
       ->loadByProperties(Argument::any())
@@ -130,7 +130,7 @@ class PullBaseTest extends UnitTestCase {
       ->willReturn($this->mappedObject);
     $this->mappedObjectStorage = $prophecy->reveal();
 
-    // mock new Drupal entity EntityStorage object
+    // Mock new Drupal entity EntityStorage object.
     $prophecy = $this->prophesize(EntityStorageBase::CLASS);
     $prophecy
       ->load(Argument::any())
@@ -140,7 +140,7 @@ class PullBaseTest extends UnitTestCase {
       ->willReturn($this->entity);
     $this->drupalEntityStorage = $prophecy->reveal();
 
-    // mock EntityType Definition
+    // Mock EntityType Definition.
     $prophecy = $this->prophesize(EntityTypeInterface::CLASS);
     $prophecy->getKeys(Argument::any())->willReturn([
       'bundle' => 'test',
@@ -148,7 +148,7 @@ class PullBaseTest extends UnitTestCase {
     $prophecy->id = 'test';
     $this->entityDefinition = $prophecy->reveal();
 
-    // mock EntityTypeManagerInterface
+    // Mock EntityTypeManagerInterface.
     $prophecy = $this->prophesize(EntityTypeManagerInterface::CLASS);
     $prophecy
       ->getStorage('salesforce_mapping')
@@ -164,21 +164,21 @@ class PullBaseTest extends UnitTestCase {
       ->willReturn($this->entityDefinition);
     $this->etm = $prophecy->reveal();
 
-    // SelectQueryResult for rest client call
+    // SelectQueryResult for rest client call.
     $result = [
       'totalSize' => 1,
-      'done' => true,
+      'done' => TRUE,
       'records' => [
         [
           'Id' => $this->salesforce_id,
-          'attributes' => ['type' => 'test',],
+          'attributes' => ['type' => 'test'],
           'name' => 'Example',
         ],
-      ]
+      ],
     ];
     $this->sqr = new SelectQueryResult($result);
 
-    // mock rest cient
+    // Mock rest cient.
     $this->sfapi = $this->getMock(RestClientInterface::CLASS);
     $this->sfapi
       ->expects($this->any())
@@ -193,7 +193,7 @@ class PullBaseTest extends UnitTestCase {
       ->method('objectCreate')
       ->willReturn($this->sfid);
 
-    // mock event dispatcher
+    // Mock event dispatcher.
     $this->ed = $this->getMock('\Symfony\Component\EventDispatcher\EventDispatcherInterface');
     $this->ed
       ->expects($this->any())
@@ -213,30 +213,30 @@ class PullBaseTest extends UnitTestCase {
   }
 
   /**
-   * Test object instantiation
+   * Test object instantiation.
    */
   public function testObject() {
     $this->assertTrue($this->pullWorker instanceof PullBase);
   }
 
   /**
-   * Test handler operation, update with good data
+   * Test handler operation, update with good data.
    */
   public function testProcessItemUpdate() {
     $sobject = new SObject([
       'id' => $this->salesforce_id,
-      'attributes' => ['type' => 'test',],
-      'pull_trigger_date' => 'now'
+      'attributes' => ['type' => 'test'],
+      'pull_trigger_date' => 'now',
     ]);
     $item = new PullQueueItem($sobject, $this->mapping);
     $this->assertEquals(MappingConstants::SALESFORCE_MAPPING_SYNC_SF_UPDATE, $this->pullWorker->processItem($item));
   }
 
   /**
-   * Test handler operation, create with good data
+   * Test handler operation, create with good data.
    */
   public function testProcessItemCreate() {
-    // mock mapped object EntityStorage object
+    // Mock mapped object EntityStorage object.
     $prophecy = $this->prophesize(EntityStorageBase::CLASS);
     $prophecy
       ->loadByProperties(Argument::any())
@@ -246,7 +246,7 @@ class PullBaseTest extends UnitTestCase {
       ->willReturn($this->mappedObject);
     $entityStorage = $prophecy->reveal();
 
-    // mock EntityTypeManagerInterface
+    // Mock EntityTypeManagerInterface
     // (with special MappedObjectStorage mock above)
     $prophecy = $this->prophesize(EntityTypeManagerInterface::CLASS);
     $prophecy
@@ -268,9 +268,9 @@ class PullBaseTest extends UnitTestCase {
       ->setMethods(['salesforcePullEvent'])
       ->getMockForAbstractClass();
     $this->pullWorker->method('salesforcePullEvent')
-      ->willReturn(null);
+      ->willReturn(NULL);
 
-    $sobject = new SObject(['id' => $this->salesforce_id, 'attributes' => ['type' => 'test',]]);
+    $sobject = new SObject(['id' => $this->salesforce_id, 'attributes' => ['type' => 'test']]);
     $item = new PullQueueItem($sobject, $this->mapping);
 
     $this->assertEquals(MappingConstants::SALESFORCE_MAPPING_SYNC_SF_CREATE, $this->pullWorker->processItem($item));
@@ -279,4 +279,5 @@ class PullBaseTest extends UnitTestCase {
       ->loadByProperties(['name' => 'test_test'])
     );
   }
+
 }
diff --git a/modules/salesforce_pull/tests/src/Unit/PullQueueItemTest.php b/modules/salesforce_pull/tests/src/Unit/PullQueueItemTest.php
index 937dbe36..171960b9 100644
--- a/modules/salesforce_pull/tests/src/Unit/PullQueueItemTest.php
+++ b/modules/salesforce_pull/tests/src/Unit/PullQueueItemTest.php
@@ -26,7 +26,7 @@ class PullQueueItemTest extends UnitTestCase {
    * Test object instantiation.
    */
   public function testObject() {
-    $sobject = new SObject(['id' => '1234567890abcde', 'attributes' => ['type' => 'dummy',]]);
+    $sobject = new SObject(['id' => '1234567890abcde', 'attributes' => ['type' => 'dummy']]);
     // OF COURSE Prophesy doesn't do magic methods well.
     $mapping = $this->getMock(SalesforceMappingInterface::CLASS);
     $mapping->expects($this->any())
diff --git a/modules/salesforce_pull/tests/src/Unit/QueueHandlerTest.php b/modules/salesforce_pull/tests/src/Unit/QueueHandlerTest.php
index 57fce186..974ebf81 100644
--- a/modules/salesforce_pull/tests/src/Unit/QueueHandlerTest.php
+++ b/modules/salesforce_pull/tests/src/Unit/QueueHandlerTest.php
@@ -1,4 +1,5 @@
 <?php
+
 namespace Drupal\Tests\salesforce_pull\Unit;
 
 use Drupal\Component\Datetime\TimeInterface;
@@ -19,11 +20,10 @@ use Prophecy\Argument;
 use Symfony\Component\EventDispatcher\EventDispatcherInterface;
 
 /**
- * Test Object instantitation
+ * Test Object instantitation.
  *
  * @group salesforce_pull
  */
-
 class QueueHandlerTest extends UnitTestCase {
   static $modules = ['salesforce_pull'];
 
@@ -95,8 +95,7 @@ class QueueHandlerTest extends UnitTestCase {
     $prophecy->getStorage('salesforce_mapping')->willReturn($this->mappingStorage);
     $this->etm = $prophecy->reveal();
 
-
-    // mock config
+    // Mock config.
     $prophecy = $this->prophesize(Config::CLASS);
     $prophecy->get('pull_max_queue_size', Argument::any())->willReturn(QueueHandler::PULL_MAX_QUEUE_SIZE);
     $config = $prophecy->reveal();
@@ -105,13 +104,13 @@ class QueueHandlerTest extends UnitTestCase {
     $prophecy->get('salesforce.settings')->willReturn($config);
     $this->configFactory = $prophecy->reveal();
 
-    // mock state
+    // Mock state.
     $prophecy = $this->prophesize(StateInterface::CLASS);
     $prophecy->get('salesforce.mapping_pull_info', Argument::any())->willReturn([1 => ['last_pull_timestamp' => '0']]);
-    $prophecy->set('salesforce.mapping_pull_info', Argument::any())->willReturn(null);
+    $prophecy->set('salesforce.mapping_pull_info', Argument::any())->willReturn(NULL);
     $this->state = $prophecy->reveal();
 
-    // mock event dispatcher
+    // Mock event dispatcher.
     $prophecy = $this->prophesize(EventDispatcherInterface::CLASS);
     $prophecy->dispatch(Argument::any(), Argument::any())->willReturn();
     $this->ed = $prophecy->reveal();
@@ -128,14 +127,14 @@ class QueueHandlerTest extends UnitTestCase {
   }
 
   /**
-   * Test object instantiation
+   * Test object instantiation.
    */
   public function testObject() {
     $this->assertTrue($this->qh instanceof QueueHandler);
   }
 
   /**
-   * Test handler operation, good data
+   * Test handler operation, good data.
    */
   public function testGetUpdatedRecords() {
     $result = $this->qh->getUpdatedRecords();
@@ -143,10 +142,10 @@ class QueueHandlerTest extends UnitTestCase {
   }
 
   /**
-   * Test handler operation, too many queue items
+   * Test handler operation, too many queue items.
    */
   public function testTooManyQueueItems() {
-    // initialize with queue size > 100000 (default)
+    // Initialize with queue size > 100000 (default)
     $prophecy = $this->prophesize(QueueInterface::CLASS);
     $prophecy->createItem()->willReturn(1);
     $prophecy->numberOfItems()->willReturn(QueueHandler::PULL_MAX_QUEUE_SIZE + 1);
diff --git a/modules/salesforce_push/salesforce_push.drush.inc b/modules/salesforce_push/salesforce_push.drush.inc
index c3d5f5e0..7169a506 100644
--- a/modules/salesforce_push/salesforce_push.drush.inc
+++ b/modules/salesforce_push/salesforce_push.drush.inc
@@ -27,17 +27,20 @@ function salesforce_push_drush_command() {
   return $items;
 }
 
+/**
+ *
+ */
 function drush_salesforce_push_sf_push_queue($name = NULL) {
   $queue = \Drupal::service('queue.salesforce_push');
   if ($name !== NULL) {
     if (!($mapping = _salesforce_drush_get_mapping($name))) {
       return;
     }
-    // Process one mapping queue
+    // Process one mapping queue.
     $queue->processQueue($mapping);
   }
   else {
-    // Process all queues
+    // Process all queues.
     $queue->processQueues();
   }
-}
\ No newline at end of file
+}
diff --git a/modules/salesforce_push/salesforce_push.install b/modules/salesforce_push/salesforce_push.install
index 51f98cb6..d30202b4 100644
--- a/modules/salesforce_push/salesforce_push.install
+++ b/modules/salesforce_push/salesforce_push.install
@@ -1,5 +1,9 @@
 <?php
 
+/**
+ * @file
+ */
+
 use Drupal\salesforce_push\PushQueue;
 
 /**
@@ -26,9 +30,10 @@ function salesforce_push_uninstall() {
 }
 
 /**
- * Set default variables
+ * Set default variables.
  *
  * @return void
+ *
  * @author Aaron Bauman
  */
 function salesforce_push_update_1() {
@@ -54,4 +59,4 @@ function salesforce_push_update_3() {
     ->set('global_push_limit', \Drupal::state()->get('salesforce.global_push_limit'))
     ->save();
   \Drupal::state()->delete('salesforce.global_push_limit');
-}
\ No newline at end of file
+}
diff --git a/modules/salesforce_push/salesforce_push.module b/modules/salesforce_push/salesforce_push.module
index d53df7ae..8d744f4e 100644
--- a/modules/salesforce_push/salesforce_push.module
+++ b/modules/salesforce_push/salesforce_push.module
@@ -38,11 +38,12 @@ function salesforce_push_entity_delete(EntityInterface $entity) {
 /**
  * Push entities to Salesforce.
  *
- * @param EntityInterface $entity
+ * @param \Drupal\Core\Entity\EntityInterface $entity
  *   The entity object.
  * @param string $op
  *   The trigger being responded to.
  *   One of push_create, push_update, push_delete.
+ *
  * @TODO
  *   at some point all these hook_entity_* implementations will go away. We'll
  *   create an event subscriber class to respond to entity events and delegate
@@ -81,9 +82,10 @@ function salesforce_push_entity_crud(EntityInterface $entity, $op) {
 /**
  * Helper method for salesforce_push_entity_crud()
  *
- * @param EntityInterface $entity
+ * @param \Drupal\Core\Entity\EntityInterface $entity
  * @param string $op
- * @param SalesforceMappingInterface $mapping
+ * @param \Drupal\salesforce_mapping\Entity\SalesforceMappingInterface $mapping
+ *
  * @return void
  */
 function salesforce_push_entity_crud_mapping(EntityInterface $entity, $op, SalesforceMappingInterface $mapping) {
@@ -183,8 +185,9 @@ function salesforce_push_entity_crud_mapping(EntityInterface $entity, $op, Sales
 /**
  * Worker function to insert a new queue item into the async push queue for the
  * given mapping.
- * @param EntityInterface $entity
- * @param SalesforceMappingInterface $mapping
+ *
+ * @param \Drupal\Core\Entity\EntityInterface $entity
+ * @param \Drupal\salesforce_mapping\Entity\SalesforceMappingInterface $mapping
  * @param string $op
  */
 function salesforce_push_enqueue_async(EntityInterface $entity, SalesforceMappingInterface $mapping, MappedObjectInterface $mapped_object = NULL, $op) {
diff --git a/modules/salesforce_push/src/Plugin/SalesforcePushQueueProcessor/Rest.php b/modules/salesforce_push/src/Plugin/SalesforcePushQueueProcessor/Rest.php
index af3b6982..9fe726af 100644
--- a/modules/salesforce_push/src/Plugin/SalesforcePushQueueProcessor/Rest.php
+++ b/modules/salesforce_push/src/Plugin/SalesforcePushQueueProcessor/Rest.php
@@ -2,7 +2,6 @@
 
 namespace Drupal\salesforce_push\Plugin\SalesforcePushQueueProcessor;
 
-use Drupal\Component\EventDispatcher\ContainerAwareEventDispatcherInterface;
 use Symfony\Component\EventDispatcher\EventDispatcherInterface;
 use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Core\Plugin\PluginBase;
@@ -31,22 +30,25 @@ class Rest extends PluginBase implements PushQueueProcessorInterface {
   protected $client;
 
   /**
-   * Storage handler for SF mappings
+   * Storage handler for SF mappings.
    *
    * @var SalesforceMappingStorage
    */
   protected $mapping_storage;
 
   /**
-   * Storage handler for Mapped Objects
+   * Storage handler for Mapped Objects.
    *
-   * @var MappedObjectStorage
+   * @var \Drupal\salesforce_mapping\Entity\MappedObjectStorage
    */
   protected $mapped_object_storage;
   protected $event_dispatcher;
   protected $etm;
 
-  public function __construct(array $configuration, $plugin_id, array $plugin_definition, PushQueueInterface $queue, RestClientInterface $client,  EntityTypeManagerInterface $etm, EventDispatcherInterface $event_dispatcher) {
+  /**
+   *
+   */
+  public function __construct(array $configuration, $plugin_id, array $plugin_definition, PushQueueInterface $queue, RestClientInterface $client, EntityTypeManagerInterface $etm, EventDispatcherInterface $event_dispatcher) {
     $this->queue = $queue;
     $this->client = $client;
     $this->etm = $etm;
@@ -67,6 +69,9 @@ class Rest extends PluginBase implements PushQueueProcessorInterface {
     );
   }
 
+  /**
+   *
+   */
   public function process(array $items) {
     if (!$this->client->isAuthorized()) {
       throw new SuspendQueueException('Salesforce client not authorized.');
@@ -82,6 +87,9 @@ class Rest extends PluginBase implements PushQueueProcessorInterface {
     }
   }
 
+  /**
+   *
+   */
   public function processItem(\stdClass $item) {
     // Allow exceptions to bubble up for PushQueue to sort things out.
     $mapping = $this->mapping_storage->load($item->name);
@@ -109,7 +117,7 @@ class Rest extends PluginBase implements PushQueueProcessorInterface {
           ->getStorage($mapping->drupal_entity_type)
           ->load($item->entity_id);
         if ($entity === NULL) {
-          // Bubble this up also
+          // Bubble this up also.
           throw new EntityNotFoundException($item->entity_id, $mapping->drupal_entity_type);
         }
 
@@ -141,9 +149,10 @@ class Rest extends PluginBase implements PushQueueProcessorInterface {
   /**
    * Return the mapped object given a queue item and mapping.
    *
-   * @param stdClass $item
-   * @param SalesforceMappingInterface $mapping
-   * @return MappedObject
+   * @param object $item
+   * @param \Drupal\salesforce_mapping\Entity\SalesforceMappingInterface $mapping
+   *
+   * @return \Drupal\salesforce_mapping\Entity\MappedObject
    */
   protected function getMappedObject(\stdClass $item, SalesforceMappingInterface $mapping) {
     $mapped_object = FALSE;
@@ -165,7 +174,7 @@ class Rest extends PluginBase implements PushQueueProcessorInterface {
           'drupal_entity__target_type' => $mapping->drupal_entity_type,
           'drupal_entity__target_id' => $item->entity_id,
           'salesforce_mapping' => $mapping->id(),
-          ]);
+        ]);
     }
     if ($mapped_object) {
       if (is_array($mapped_object)) {
@@ -180,8 +189,8 @@ class Rest extends PluginBase implements PushQueueProcessorInterface {
   /**
    * Helper method to generate a new MappedObject during push procesing.
    *
-   * @param stdClass $item 
-   * @param SalesforceMappingInterface $mapping 
+   * @param object $item
+   * @param \Drupal\salesforce_mapping\Entity\SalesforceMappingInterface $mapping
    */
   protected function createMappedObject(\stdClass $item, SalesforceMappingInterface $mapping) {
     return new MappedObject([
diff --git a/modules/salesforce_push/src/PushController.php b/modules/salesforce_push/src/PushController.php
index 950e2497..11fd46a8 100644
--- a/modules/salesforce_push/src/PushController.php
+++ b/modules/salesforce_push/src/PushController.php
@@ -7,12 +7,18 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\HttpFoundation\Response;
 use Drupal\Core\Entity\EntityManagerInterface;
 use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
-  
+
+/**
+ *
+ */
 class PushController extends ControllerBase {
 
   protected $pushQueue;
   protected $mappingStorage;
 
+  /**
+   *
+   */
   public function __construct(PushQueue $pushQueue, EntityManagerInterface $entity_manager) {
     $this->pushQueue = $pushQueue;
     $this->mappingStorage = $entity_manager->getStorage('salesforce_mapping');
@@ -55,4 +61,4 @@ class PushController extends ControllerBase {
     return new Response('', 204);
   }
 
-}
\ No newline at end of file
+}
diff --git a/modules/salesforce_push/src/PushQueue.php b/modules/salesforce_push/src/PushQueue.php
index 340ba205..f5927233 100644
--- a/modules/salesforce_push/src/PushQueue.php
+++ b/modules/salesforce_push/src/PushQueue.php
@@ -53,14 +53,14 @@ class PushQueue extends DatabaseQueue implements PushQueueInterface {
   protected $garbageCollected;
 
   /**
-   * Storage handler for SF mappings
+   * Storage handler for SF mappings.
    *
    * @var SalesforceMappingStorage
    */
   protected $mapping_storage;
 
   /**
-   * Storage handler for Mapped Objects
+   * Storage handler for Mapped Objects.
    *
    * @var MappedObjectStorage
    */
@@ -104,6 +104,9 @@ class PushQueue extends DatabaseQueue implements PushQueueInterface {
     $this->garbageCollected = FALSE;
   }
 
+  /**
+   *
+   */
   public static function create(ContainerInterface $container) {
     return new static(
       $container->get('database'),
@@ -162,15 +165,15 @@ class PushQueue extends DatabaseQueue implements PushQueueInterface {
       'op' => $data['op'],
       'updated' => $time,
       'failures' => empty($data['failures'])
-        ? 0
-        : $data['failures'],
+      ? 0
+      : $data['failures'],
       'mapped_object_id' => empty($data['mapped_object_id'])
-        ? 0
-        : $data['mapped_object_id'],
+      ? 0
+      : $data['mapped_object_id'],
     ];
 
     $query = $this->connection->merge(static::TABLE_NAME)
-      ->key(array('name' => $this->name, 'entity_id' => $data['entity_id']))
+      ->key(['name' => $this->name, 'entity_id' => $data['entity_id']])
       ->fields($fields);
 
     // Return Merge::STATUS_INSERT or Merge::STATUS_UPDATE.
@@ -180,7 +183,7 @@ class PushQueue extends DatabaseQueue implements PushQueueInterface {
     // 9 years.
     if ($ret == Merge::STATUS_INSERT) {
       $this->connection->merge(static::TABLE_NAME)
-        ->key(array('name' => $this->name, 'entity_id' => $data['entity_id']))
+        ->key(['name' => $this->name, 'entity_id' => $data['entity_id']])
         ->fields(['created' => $time])
         ->execute();
     }
@@ -199,7 +202,7 @@ class PushQueue extends DatabaseQueue implements PushQueueInterface {
         }
         // @TODO: convert items to content entities.
         // @see \Drupal::entityQuery()
-        $items = $this->connection->queryRange('SELECT * FROM {' . static::TABLE_NAME . '} q WHERE expire = 0 AND name = :name AND failures < :fail_limit ORDER BY created, item_id ASC', 0, $n, array(':name' => $this->name, ':fail_limit' => $fail_limit))->fetchAllAssoc('item_id');
+        $items = $this->connection->queryRange('SELECT * FROM {' . static::TABLE_NAME . '} q WHERE expire = 0 AND name = :name AND failures < :fail_limit ORDER BY created, item_id ASC', 0, $n, [':name' => $this->name, ':fail_limit' => $fail_limit])->fetchAllAssoc('item_id');
       }
       catch (\Exception $e) {
         $this->catchException($e);
@@ -215,9 +218,9 @@ class PushQueue extends DatabaseQueue implements PushQueueInterface {
         // time from the lease, and will tend to reset items before the lease
         // should really expire.
         $update = $this->connection->update(static::TABLE_NAME)
-          ->fields(array(
+          ->fields([
             'expire' => $this->time->getRequestTime() + $lease_time,
-          ))
+          ])
           ->condition('item_id', array_keys($items), 'IN')
           ->condition('expire', 0);
         // If there are affected rows, this update succeeded.
@@ -269,7 +272,7 @@ class PushQueue extends DatabaseQueue implements PushQueueInterface {
           'type' => 'int',
           'not null' => TRUE,
           'default' => 0,
-          'description' => 'Foreign key for salesforce_mapped_object table.'
+          'description' => 'Foreign key for salesforce_mapped_object table.',
         ],
         'op' => [
           'type' => 'varchar_ascii',
@@ -467,9 +470,9 @@ class PushQueue extends DatabaseQueue implements PushQueueInterface {
   public function releaseItems(array $items) {
     try {
       $update = $this->connection->update(static::TABLE_NAME)
-        ->fields(array(
+        ->fields([
           'expire' => 0,
-        ))
+        ])
         ->condition('item_id', array_keys($items), 'IN');
       return $update->execute();
     }
@@ -481,6 +484,9 @@ class PushQueue extends DatabaseQueue implements PushQueueInterface {
     }
   }
 
+  /**
+   *
+   */
   public function deleteItemByEntity(EntityInterface $entity) {
     try {
       $this->connection->delete(static::TABLE_NAME)
diff --git a/modules/salesforce_push/src/PushQueueInterface.php b/modules/salesforce_push/src/PushQueueInterface.php
index 712636ac..b0c44387 100644
--- a/modules/salesforce_push/src/PushQueueInterface.php
+++ b/modules/salesforce_push/src/PushQueueInterface.php
@@ -4,6 +4,9 @@ namespace Drupal\salesforce_push;
 
 use Drupal\Core\Queue\ReliableQueueInterface;
 
+/**
+ *
+ */
 interface PushQueueInterface extends ReliableQueueInterface {
 
   /**
@@ -32,7 +35,7 @@ interface PushQueueInterface extends ReliableQueueInterface {
    * @throws \Exception
    *   Whenever called.
    */
-  public function claimItem($lease_time = NULL);  
+  public function claimItem($lease_time = NULL);
 
   /**
    * Failed item handler.
@@ -41,10 +44,8 @@ interface PushQueueInterface extends ReliableQueueInterface {
    * happens when a queue item fails.
    *
    * @param Exception $e
-   * @param stdClass $item
+   * @param object $item
    */
   public function failItem(\Exception $e, \stdClass $item);
 
-
 }
-
diff --git a/modules/salesforce_push/src/PushQueueProcessorInterface.php b/modules/salesforce_push/src/PushQueueProcessorInterface.php
index cab7e4f9..44fce96e 100644
--- a/modules/salesforce_push/src/PushQueueProcessorInterface.php
+++ b/modules/salesforce_push/src/PushQueueProcessorInterface.php
@@ -35,7 +35,6 @@ interface PushQueueProcessorInterface extends ContainerFactoryPluginInterface {
    * @throws \Exception
    *   Indicate any other condition. Processing for this queue should continue.
    *   Items should not be released.
-   *   
    */
   public function process(array $items);
 
diff --git a/modules/salesforce_push/src/PushQueueProcessorPluginManager.php b/modules/salesforce_push/src/PushQueueProcessorPluginManager.php
index 53de8744..c63e0946 100644
--- a/modules/salesforce_push/src/PushQueueProcessorPluginManager.php
+++ b/modules/salesforce_push/src/PushQueueProcessorPluginManager.php
@@ -7,13 +7,17 @@ use Drupal\Core\Extension\ModuleHandlerInterface;
 use Drupal\Core\Plugin\DefaultPluginManager;
 
 /**
- * Plugin type manager for SF push queue processors
+ * Plugin type manager for SF push queue processors.
  */
 class PushQueueProcessorPluginManager extends DefaultPluginManager {
 
+  /**
+   *
+   */
   public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
     parent::__construct('Plugin/SalesforcePushQueueProcessor', $namespaces, $module_handler);
 
     $this->setCacheBackend($cache_backend, 'salesforce_push_queue_processor');
   }
+
 }
diff --git a/modules/salesforce_push/tests/src/Unit/PushQueueTest.php b/modules/salesforce_push/tests/src/Unit/PushQueueTest.php
index 10ba2eb0..d96f4df8 100644
--- a/modules/salesforce_push/tests/src/Unit/PushQueueTest.php
+++ b/modules/salesforce_push/tests/src/Unit/PushQueueTest.php
@@ -73,7 +73,7 @@ class PushQueueTest extends UnitTestCase {
       ->with($this->equalTo('salesforce_mapped_object'))
       ->willReturn($this->mapped_object_storage);
 
-    // mock config
+    // Mock config.
     $prophecy = $this->prophesize(Config::CLASS);
     $prophecy->get('global_push_limit', Argument::any())->willReturn(PushQueue::DEFAULT_GLOBAL_LIMIT);
     $config = $prophecy->reveal();
@@ -186,6 +186,5 @@ class PushQueueTest extends UnitTestCase {
   // Not sure best way to test this yet.
   // public function testFailItem() {
   //   // Test failed item gets its "fail" property incremented by 1.
-  // }
-
+  // }.
 }
diff --git a/modules/salesforce_push/tests/src/Unit/SalesforcePushQueueProcessorRestTest.php b/modules/salesforce_push/tests/src/Unit/SalesforcePushQueueProcessorRestTest.php
index 7fb3a92f..f66fc612 100644
--- a/modules/salesforce_push/tests/src/Unit/SalesforcePushQueueProcessorRestTest.php
+++ b/modules/salesforce_push/tests/src/Unit/SalesforcePushQueueProcessorRestTest.php
@@ -17,16 +17,14 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\StringTranslation\TranslationInterface;
 use Drupal\Core\Entity\EntityManagerInterface;
-use Prophecy\Argument;
 
 /**
- * Test SalesforcePushQueueProcessor plugin Rest
+ * Test SalesforcePushQueueProcessor plugin Rest.
  *
  * @coversDefaultClass \Drupal\salesforce_push\Plugin\SalesforcePushQueueProcessor\Rest
  *
  * @group salesforce_pull
  */
-
 class SalesforcePushQueueProcessorRestTest extends UnitTestCase {
   static $modules = ['salesforce_pull'];
 
@@ -91,7 +89,7 @@ class SalesforcePushQueueProcessorRestTest extends UnitTestCase {
       ->method('isAuthorized')
       ->willReturn(TRUE);
 
-    // test suspend queue if not authorized
+    // Test suspend queue if not authorized.
     $this->client->expects($this->at(1))
       ->method('isAuthorized')
       ->willReturn(FALSE);
@@ -100,13 +98,13 @@ class SalesforcePushQueueProcessorRestTest extends UnitTestCase {
       ->method('processItem')
       ->willReturn(NULL);
 
-    // test delete item after successful processItem()
+    // Test delete item after successful processItem()
     $this->queue->expects($this->once())
       ->method('deleteItem')
       ->willReturn(NULL);
 
-    $this->handler->process([(object)[1]]);
-    $this->handler->process([(object)[2]]);
+    $this->handler->process([(object) [1]]);
+    $this->handler->process([(object) [2]]);
   }
 
   /**
@@ -127,18 +125,18 @@ class SalesforcePushQueueProcessorRestTest extends UnitTestCase {
       ->method('getMappedObject')
       ->willReturn($mappedObject);
 
-    $this->handler->processItem((object)['op' => MappingConstants::SALESFORCE_MAPPING_SYNC_DRUPAL_DELETE, 'mapped_object_id' => 'foo', 'name' => 'bar']);
+    $this->handler->processItem((object) ['op' => MappingConstants::SALESFORCE_MAPPING_SYNC_DRUPAL_DELETE, 'mapped_object_id' => 'foo', 'name' => 'bar']);
   }
 
   /**
    * @covers ::processItem
    */
   public function testProcessItemDelete() {
-    // test push delete for op == delete
-    $this->queueItem = (object)[
+    // Test push delete for op == delete.
+    $this->queueItem = (object) [
       'op' => MappingConstants::SALESFORCE_MAPPING_SYNC_DRUPAL_DELETE,
       'mapped_object_id' => 'foo',
-      'name' => 'bar'
+      'name' => 'bar',
     ];
 
     $this->mappedObject = $this->getMock(MappedObjectInterface::class);
@@ -152,10 +150,9 @@ class SalesforcePushQueueProcessorRestTest extends UnitTestCase {
       ->method('getMappedObject')
       ->willReturn($this->mappedObject);
 
-    // test skip item on missing mapped object and op == delete
+    // Test skip item on missing mapped object and op == delete
     // test push on op == insert / update
-    // test throwing exception on drupal entity not found
-
+    // test throwing exception on drupal entity not found.
     $this->handler->processItem($this->queueItem);
   }
 
@@ -163,9 +160,9 @@ class SalesforcePushQueueProcessorRestTest extends UnitTestCase {
    * @covers ::processItem
    */
   public function testProcessItemPush() {
-    // test push on op == insert / update
+    // Test push on op == insert / update.
     $this->mappedObject = $this->getMock(MappedObjectInterface::class);
-    $this->queueItem = (object)[
+    $this->queueItem = (object) [
       'entity_id' => 'foo',
       'op' => NULL,
       'mapped_object_id' => NULL,
@@ -200,7 +197,7 @@ class SalesforcePushQueueProcessorRestTest extends UnitTestCase {
       ->willReturn($this->mappedObject);
 
     $this->handler->processItem($this->queueItem);
-        
+
   }
 
   /**
@@ -209,8 +206,8 @@ class SalesforcePushQueueProcessorRestTest extends UnitTestCase {
    * @expectedException \Drupal\salesforce\EntityNotFoundException
    */
   public function testProcessItemEntityNotFound() {
-    // test throwing exception on drupal entity not found
-    $this->queueItem = (object)[
+    // Test throwing exception on drupal entity not found.
+    $this->queueItem = (object) [
       'op' => '',
       'mapped_object_id' => 'foo',
       'name' => 'bar',
@@ -245,4 +242,3 @@ class SalesforcePushQueueProcessorRestTest extends UnitTestCase {
   }
 
 }
-
diff --git a/salesforce.api.php b/salesforce.api.php
index 73d3acdf..b27c99e8 100644
--- a/salesforce.api.php
+++ b/salesforce.api.php
@@ -19,88 +19,103 @@
 
 /**
  * Use the SalesforceMappingField plugin system.
+ *
  * @see Drupal\salesforce_mapping\Plugin\SalesforceMappingField\Properties
  */
-function hook_salesforce_mapping_fieldmap_type() {}
+function hook_salesforce_mapping_fieldmap_type() {
+}
 
 /**
  * Use a Plugin API alter.
+ *
  * @see https://api.drupal.org/api/drupal/core%21core.api.php/group/plugin_api/8.2.x
  */
-function hook_salesforce_mapping_fieldmap_type_alter() {}
+function hook_salesforce_mapping_fieldmap_type_alter() {
+}
 
 /**
  * Implement an EventSubscriber on
- * Drupal\salesforce\Event\SalesforceEvents::PULL_QUERY
+ * Drupal\salesforce\Event\SalesforceEvents::PULL_QUERY.
  */
-function hook_salesforce_pull_select_query_alter() {}
+function hook_salesforce_pull_select_query_alter() {
+}
 
 /**
  * Implement an EventSubscriber on
- * Drupal\salesforce\Event\SalesforceEvents::PULL_PREPULL
+ * Drupal\salesforce\Event\SalesforceEvents::PULL_PREPULL.
  */
-function hook_salesforce_pull_mapping_object_alter() {}
+function hook_salesforce_pull_mapping_object_alter() {
+}
 
 /**
  * Implement an EventSubscriber on
- * Drupal\salesforce\Event\SalesforceEvents::PULL_ENTITY_VALUE
+ * Drupal\salesforce\Event\SalesforceEvents::PULL_ENTITY_VALUE.
  */
-function hook_salesforce_pull_entity_value_alter() {}
+function hook_salesforce_pull_entity_value_alter() {
+}
 
 /**
  * Implement an EventSubscriber on
- * Drupal\salesforce\Event\SalesforceEvents::PULL_PRESAVE
+ * Drupal\salesforce\Event\SalesforceEvents::PULL_PRESAVE.
  */
-function hook_salesforce_pull_entity_presave() {}
+function hook_salesforce_pull_entity_presave() {
+}
 
 /**
- * Use hook_entity_update or hook_mapped_object_insert
+ * Use hook_entity_update or hook_mapped_object_insert.
  */
-function hook_salesforce_pull_entity_insert() {}
+function hook_salesforce_pull_entity_insert() {
+}
 
 /**
- * Use hook_entity_update or hook_mapped_object_update
+ * Use hook_entity_update or hook_mapped_object_update.
  */
-function hook_salesforce_pull_entity_update() {}
+function hook_salesforce_pull_entity_update() {
+}
 
 /**
  * Implement an EventSubscriber on
  * Drupal\salesforce\Event\SalesforceEvents::PUSH_ALLOWED
- * Throw an exception to indicate that push is not allowed
+ * Throw an exception to indicate that push is not allowed.
  */
-function hook_salesforce_push_entity_allowed() {}
+function hook_salesforce_push_entity_allowed() {
+}
 
 /**
  * Implement an EventSubscriber on
- * Drupal\salesforce\Event\SalesforceEvents::PUSH_MAPPING_OBJECT
+ * Drupal\salesforce\Event\SalesforceEvents::PUSH_MAPPING_OBJECT.
  */
-function hook_salesforce_push_mapping_object_alter() {}
+function hook_salesforce_push_mapping_object_alter() {
+}
 
 /**
  * Implement an EventSubscriber on
- * Drupal\salesforce\Event\SalesforceEvents::PUSH_PARAMS
+ * Drupal\salesforce\Event\SalesforceEvents::PUSH_PARAMS.
  */
-function hook_salesforce_push_params_alter() {}
+function hook_salesforce_push_params_alter() {
+}
 
 /**
  * Implement an EventSubscriber on
- * Drupal\salesforce\Event\SalesforceEvents::PUSH_SUCCESS
+ * Drupal\salesforce\Event\SalesforceEvents::PUSH_SUCCESS.
  */
-function hook_salesforce_push_success() {}
+function hook_salesforce_push_success() {
+}
 
 /**
  * Implement an EventSubscriber on
- * Drupal\salesforce\Event\SalesforceEvents::PUSH_FAIL
+ * Drupal\salesforce\Event\SalesforceEvents::PUSH_FAIL.
  */
-function hook_salesforce_push_fail() {}
+function hook_salesforce_push_fail() {
+}
 
 /**
  * No replacement. Entities must implement proper URIs to take advantage of
  * Salesforce mapping dynamic routing.
  */
-function hook_salesforce_mapping_entity_uris_alter() {}
+function hook_salesforce_mapping_entity_uris_alter() {
+}
 
 /**
  * @} salesforce_deprecated
  */
-
diff --git a/salesforce.drush.inc b/salesforce.drush.inc
index 23ddfd12..06c62c37 100644
--- a/salesforce.drush.inc
+++ b/salesforce.drush.inc
@@ -34,14 +34,14 @@ Options are:
 info: (default) Display metadata about an object
 fields: Display information about fields that are part of the object
 field-data FIELDNAME: Display information about a specific field that is part of an object
-raw: Display the complete, raw describe response."
+raw: Display the complete, raw describe response.",
     ],
     'examples' => [
       'drush sfdo Contact' => 'Show metadata about Contact SObject type.',
       'drush sfdo Contact --output=fields' => 'Show addtional metadata about Contact fields.',
       'drush sfdo Contact --output=field --field=Email' => 'Show full metadata about Contact.Email field.',
-      'drush sfdo Contact --output=raw' => 'Display the full metadata for Contact SObject type.'
-    ]
+      'drush sfdo Contact --output=raw' => 'Display the full metadata for Contact SObject type.',
+    ],
   ];
 
   $items['sf-list-resources'] = [
@@ -49,68 +49,68 @@ raw: Display the complete, raw describe response."
     'aliases' => ['sflr'],
   ];
 
-  $items['sf-read-object'] = array(
+  $items['sf-read-object'] = [
     'description' => 'Retrieve all the data for an object with a specific ID.',
-    'aliases' => array('sfro'),
-    'arguments' => array(
+    'aliases' => ['sfro'],
+    'arguments' => [
       'id' => 'The object ID in Salesforce.',
-    ),
-    'options' => array(
-      'format' => array(
+    ],
+    'options' => [
+      'format' => [
         'description' => 'Format to output the object. Use "print_r" for print_r (default), "export" for var_export, and "json" for JSON.',
         'example-value' => 'export',
-      ),
-    ),
-  );
+      ],
+    ],
+  ];
 
-  $items['sf-create-object'] = array(
+  $items['sf-create-object'] = [
     'description' => 'Create an object with specified data.',
-    'aliases' => array('sfco'),
-    'arguments' => array(
+    'aliases' => ['sfco'],
+    'arguments' => [
       'object' => 'The object type name in Salesforce (e.g. Account).',
       'data' => 'The data to use when creating the object (default is JSON format). Use \'-\' to read the data from STDIN.',
-    ),
-    'options' => array(
-      'format' => array(
+    ],
+    'options' => [
+      'format' => [
         'description' => 'Format to parse the object. Use  "json" for JSON (default) or "query" for data formatted like a query string, e.g. \'Company=Foo&LastName=Bar\'.',
         'example-value' => 'json',
-      ),
-    ),
-  );
+      ],
+    ],
+  ];
 
-  $items['sf-query-object'] = array(
+  $items['sf-query-object'] = [
     'description' => 'Query an object using SOQL with specified conditions.',
-    'aliases' => array('sfqo'),
-    'arguments' => array(
+    'aliases' => ['sfqo'],
+    'arguments' => [
       'object' => 'The object type name in Salesforce (e.g. Account).',
-    ),
-    'options' => array(
-      'format' => array(
+    ],
+    'options' => [
+      'format' => [
         'description' => 'Format to output the objects. Use "print_r" for print_r (default), "export" for var_export, and "json" for JSON.',
         'example-value' => 'export',
-      ),
-      'where' =>array(
+      ],
+      'where' => [
         'description' => 'A WHERE clause to add to the SOQL query',
-      ),
-      'fields' =>array(
+      ],
+      'fields' => [
         'description' => 'A comma-separated list fields to select in the SOQL query. If absent, an API call is used to find all fields',
-      ),
+      ],
       'limit' => [
         'description' => 'Integer limit on the number of results to return for the query.',
       ],
       'order' => [
         'description' => 'Comma-separated fields by which to sort results. Make sure to enclose in quotes for any whitespace.',
       ],
-    ),
-  );
+    ],
+  ];
 
-  $items['sf-execute-query'] = array(
+  $items['sf-execute-query'] = [
     'description' => 'Execute a SOQL query.',
-    'aliases' => array('sfeq', 'soql'),
-    'arguments' => array(
+    'aliases' => ['sfeq', 'soql'],
+    'arguments' => [
       'query' => 'The query to execute.',
-    ),
-  );
+    ],
+  ];
 
   $items['sf-pull-query'] = [
     'description' => 'Given a mapping, enqueue records for pull from Salesforce, ignoring modification timestamp. This command is useful, for example, when seeding content for a Drupal site prior to deployment.',
@@ -191,6 +191,7 @@ function drush_salesforce_sf_describe_object($object_name = NULL) {
     case 'raw':
       drush_print_r($object->data);
       return;
+
     case 'fields':
       $rows = [['Name', 'Type', 'Label']];
       foreach ($object->fields as $field) {
@@ -198,6 +199,7 @@ function drush_salesforce_sf_describe_object($object_name = NULL) {
       }
       drush_print_table($rows, TRUE);
       return;
+
     case 'field':
       $fieldname = drush_get_option('field');
       if (empty($fieldname)) {
@@ -303,7 +305,7 @@ function drush_salesforce_sf_read_object($id) {
     if ($object = $salesforce->objectRead($name, $id)) {
       drush_print(dt('!type with id !id:', [
         '!type' => $object->type(),
-        '!id' => $object->id()
+        '!id' => $object->id(),
       ]));
       drush_print(drush_format($object->fields()));
     }
@@ -327,14 +329,16 @@ function drush_salesforce_sf_create_object($name, $data) {
     $data = stream_get_contents(STDIN);
   }
   $format = drush_get_option('format', 'json');
-  $params = array();
+  $params = [];
   switch ($format) {
     case 'query':
       parse_str($data, $params);
       break;
+
     case 'json':
       $params = json_decode($data, TRUE);
       break;
+
     default:
       drush_log(dt('Invalid format'), 'error');
       return;
@@ -396,7 +400,7 @@ function drush_salesforce_sf_query_object($name) {
   foreach ($result->records() as $sfid => $record) {
     drush_print(drush_format([$sfid => $record->fields()]));
   }
-  $pretty_query = str_replace('+', ' ', (string)$query);
+  $pretty_query = str_replace('+', ' ', (string) $query);
   if (!$fields) {
     $fields = implode(',', $query->fields);
     $pretty_query = str_replace($fields, ' * ', $pretty_query);
@@ -404,7 +408,7 @@ function drush_salesforce_sf_query_object($name) {
   drush_print(dt("Showing !size of !total records for query:\n!query", [
     '!size' => count($result->records()),
     '!total' => $result->size(),
-    '!query' => $pretty_query
+    '!query' => $pretty_query,
   ]));
 
 }
@@ -430,10 +434,11 @@ function drush_salesforce_sf_execute_query($query = NULL) {
 }
 
 /**
- * Helper method to get a mapping from the given name, or from user input if 
+ * Helper method to get a mapping from the given name, or from user input if
  * name is empty.
  *
  * @param string $name
+ *
  * @return SalesforceMappingInterface
  */
 function _salesforce_drush_get_mapping($name = NULL) {
@@ -459,4 +464,3 @@ function _salesforce_drush_get_mapping($name = NULL) {
   }
   return $mapping;
 }
-
diff --git a/salesforce.info.yml b/salesforce.info.yml
index c149c6f7..0e3ba3af 100644
--- a/salesforce.info.yml
+++ b/salesforce.info.yml
@@ -3,4 +3,4 @@ type: module
 description: Modules to integrate Drupal and Salesforce
 package: Salesforce
 core: 8.x
-configure: salesforce.config_index
\ No newline at end of file
+configure: salesforce.config_index
diff --git a/salesforce.install b/salesforce.install
index 6fa095cf..09a1f356 100644
--- a/salesforce.install
+++ b/salesforce.install
@@ -1,9 +1,13 @@
 <?php
 
+/**
+ * @file
+ */
+
 use Drupal\Component\Serialization\Json;
 
 /**
- * Purge Salesforce module state variables
+ * Purge Salesforce module state variables.
  */
 function salesforce_uninstall() {
   $delete = [
@@ -21,12 +25,15 @@ function salesforce_uninstall() {
   \Drupal::state()->deleteMultiple($delete);
 }
 
+/**
+ *
+ */
 function salesforce_requirements($phase) {
   if ($phase != 'runtime') {
     return [];
   }
 
-  // Check requirements once per 24 hours
+  // Check requirements once per 24 hours.
   $last = \Drupal::state()->get('salesforce.last_requirements_check', 0);
 
   $requirements['salesforce_usage'] = salesforce_get_usage_requirements();
@@ -40,6 +47,9 @@ function salesforce_requirements($phase) {
   return $requirements;
 }
 
+/**
+ *
+ */
 function salesforce_fetch_new_tls() {
   $response = FALSE;
   try {
@@ -55,12 +65,15 @@ function salesforce_fetch_new_tls() {
     }
   }
   catch (Exception $e) {
-    // noop
+    // Noop.
   }
   \Drupal::state()->set('salesforce.tls_status', $response);
   return $response;
 }
 
+/**
+ *
+ */
 function salesforce_get_tls_requirements() {
   $response = \Drupal::state()->get('salesforce.tls_status', FALSE);
   $last = \Drupal::state()->get('salesforce.last_requirements_check', 0);
@@ -99,6 +112,9 @@ function salesforce_get_tls_requirements() {
   return $requirements;
 }
 
+/**
+ *
+ */
 function salesforce_get_usage_requirements() {
   $requirements = [
     'title' => t('Salesforce usage'),
@@ -110,7 +126,7 @@ function salesforce_get_usage_requirements() {
     $usage = \Drupal::service('salesforce.client')->getApiUsage();
   }
   catch (Exception $e) {
-    // noop
+    // Noop.
   }
 
   if (empty($usage)) {
@@ -130,7 +146,7 @@ function salesforce_get_usage_requirements() {
     $args = [
       '%usage' => number_format($usage),
       '%limit' => number_format($limit),
-      '%pct' => number_format($pct, 2) . '%'
+      '%pct' => number_format($pct, 2) . '%',
     ];
     $requirements += [
       'description' => t('Usage: %usage requests of %limit limit (%pct) in the past 24 hours.', $args),
@@ -141,8 +157,6 @@ function salesforce_get_usage_requirements() {
   return $requirements;
 }
 
-
-
 /**
  * Install new "Use Latest API version" boolean; defaults to TRUE.
  */
diff --git a/salesforce.libraries.yml b/salesforce.libraries.yml
index 042c110a..d6bfa74b 100644
--- a/salesforce.libraries.yml
+++ b/salesforce.libraries.yml
@@ -3,4 +3,3 @@ admin:
   css:
     layout:
       css/salesforce.css: {}
-
diff --git a/salesforce.module b/salesforce.module
index e5944f9c..d734e7e5 100644
--- a/salesforce.module
+++ b/salesforce.module
@@ -44,20 +44,20 @@ function salesforce_help($route_name, RouteMatchInterface $route_match) {
       $output .= '<li>' . t('You will need to create a remote application/connected app for authorization.') . '</li>';
       $output .= '<ul>';
       $output .= '<li>' . t('In Salesforce go to Your Name > Setup > Create > Apps then create a new Connected App. (Depending on your Salesforce instance, you may need to go to Your Name > Setup > Develop > Remote Access.)') . '</li>';
-      $output .= '<li>' . t('Set the callback URL to: :url (SSL is required)', 
+      $output .= '<li>' . t('Set the callback URL to: :url (SSL is required)',
       [':url' => str_replace('http:', 'https:', (new Url('salesforce.oauth_callback', [], ['absolute' => TRUE]))->toString())]) . '</li>';
       $output .= '<li>' . t('Select at least "Perform requests on your behalf at any time" for OAuth Scope
   as well as the appropriate other scopes for your application. Note that "Full access" does not include the "Perform requests on your behalf at any time" scope! <a href=":url">Additional Information</a>.', [':url' => 'https://help.salesforce.com/help/doc/en/remoteaccess_about.htm']) . '</li>';
-      $output .= '<li>' . t('For more help see <a href=":url">the salesforce.com documentation</a>.', [':url' =>  'https://www.salesforce.com/us/developer/docs/api_rest/Content/quickstart_oauth.htm']) . '</li>';
+      $output .= '<li>' . t('For more help see <a href=":url">the salesforce.com documentation</a>.', [':url' => 'https://www.salesforce.com/us/developer/docs/api_rest/Content/quickstart_oauth.htm']) . '</li>';
       $output .= '</ul>';
       $output .= '<li>' . t('Your site needs to be SSL enabled to authorize the remote application using OAUTH.') . '</li>';
-      // $output .= '<li>' . t('If using the SOAP API, PHP must be compiled with <a href=":soap">SOAP web services</a> and <a href=":ssl">OpenSSL support</a>.', [':soap' =>  'http://php.net/soap', ':ssl' => 'http://php.net/openssl']) . '</li>';
+      // $output .= '<li>' . t('If using the SOAP API, PHP must be compiled with <a href=":soap">SOAP web services</a> and <a href=":ssl">OpenSSL support</a>.', [':soap' =>  'http://php.net/soap', ':ssl' => 'http://php.net/openssl']) . '</li>';.
       $output .= '</ol>';
       // $output .= '<h4>' . t('Required modules') . '</h4>';
       // $output .= '<ul>';
       // $output .= '<li>' . l(t('Entity API'), 'http://drupal.org/project/entity') . '</li>';
       // $output .= '<li>' . l(t('Libraries, only for SOAP API'), 'http://drupal.org/project/libraries') . '</li>';
-      // $output .= '</ul>';
+      // $output .= '</ul>';.
       $output .= '<h3>' . t('Modules') . '</h3>';
       $output .= '<h4>' . t('Salesforce (salesforce)') . '</h4>';
       $output .= '<p>' . t('OAUTH2 authorization and wrapper around the Salesforce REST API.') . '</p>';
@@ -69,11 +69,11 @@ function salesforce_help($route_name, RouteMatchInterface $route_match) {
       $output .= '<p>' . t('Pull Salesforce object updates into Drupal on cron run. (Salesforce Outbound Notifications are not supported.)') . '</p>';
       // $output .= '<h4>' . t('Salesforce Soap (salesforce_soap)') . '</h4>';
       // $output .= '<p>' . t('Lightweight wrapper around the SOAP API, using the OAUTH access token, to fill in functional gaps missing in the REST API. Requires the Salesforce PHP Toolkit.') . '</p>';
-      // $output .= '<p>' . t('Example installation of the Salesforce PHP Toolkit using the provided Drush Make file:') . ' <code>drush make /path/to/salesforce/modules/salesforce_soap/salesforce_soap.make.example --no-core -y</code>' . '</p>';
+      // $output .= '<p>' . t('Example installation of the Salesforce PHP Toolkit using the provided Drush Make file:') . ' <code>drush make /path/to/salesforce/modules/salesforce_soap/salesforce_soap.make.example --no-core -y</code>' . '</p>';.
       return $output;
 
     case 'salesforce.authorize':
-      return '<p>' . t('Visit <a href=":help">the Salesforce module help page</a> if you need help obtaining a consumer key and secret.', [':help' => (new Url('help.page', array('name' => 'salesforce')))->toString()]) . '</p>';
+      return '<p>' . t('Visit <a href=":help">the Salesforce module help page</a> if you need help obtaining a consumer key and secret.', [':help' => (new Url('help.page', ['name' => 'salesforce']))->toString()]) . '</p>';
   }
 }
 
diff --git a/salesforce.permissions.yml b/salesforce.permissions.yml
index c133698c..3de400a5 100644
--- a/salesforce.permissions.yml
+++ b/salesforce.permissions.yml
@@ -5,4 +5,4 @@ administer salesforce:
 
 authorize salesforce:
   title: 'authorize salesforce'
-  description: 'Access Salesforce OAuth consumer key, secret, and identify information'
\ No newline at end of file
+  description: 'Access Salesforce OAuth consumer key, secret, and identify information'
diff --git a/src/Controller/SalesforceController.php b/src/Controller/SalesforceController.php
index 2079de32..e94e601b 100644
--- a/src/Controller/SalesforceController.php
+++ b/src/Controller/SalesforceController.php
@@ -18,6 +18,7 @@ class SalesforceController extends ControllerBase {
 
   protected $client;
   protected $http_client;
+
   /**
    * {@inheritdoc}
    */
@@ -38,10 +39,16 @@ class SalesforceController extends ControllerBase {
     );
   }
 
+  /**
+   *
+   */
   protected function request() {
     return \Drupal::request();
   }
 
+  /**
+   *
+   */
   protected function successMessage() {
     drupal_set_message(t('Successfully connected to %endpoint', ['%endpoint' => $this->client->getInstanceUrl()]));
   }
@@ -77,7 +84,7 @@ class SalesforceController extends ControllerBase {
 
     $this->successMessage();
 
-    return new RedirectResponse($this->url_generator->generateFromRoute('salesforce.authorize', [], ["absolute" => true], false));
+    return new RedirectResponse($this->url_generator->generateFromRoute('salesforce.authorize', [], ["absolute" => TRUE], FALSE));
   }
 
 }
diff --git a/src/EntityNotFoundException.php b/src/EntityNotFoundException.php
index 5d9a173c..d3f1b036 100644
--- a/src/EntityNotFoundException.php
+++ b/src/EntityNotFoundException.php
@@ -17,21 +17,34 @@ class EntityNotFoundException extends \RuntimeException {
 
   protected $entity_type_id;
 
+  /**
+   *
+   */
   public function __construct($entity_properties, $entity_type_id, Throwable $previous = NULL) {
     parent::__construct($this->t('Entity not found. type: %type properties: %props', ['%type' => $entity_type_id, '%props' => var_export($entity_properties, TRUE)]), 0, $previous);
     $this->entity_properties = $entity_properties;
     $this->entity_type_id = $entity_type_id;
   }
 
+  /**
+   *
+   */
   public function getEntityProperties() {
     return $this->entity_properties;
   }
 
+  /**
+   *
+   */
   public function getEntityTypeId() {
     return $this->entity_type_id;
   }
 
+  /**
+   *
+   */
   public function getFormattableMessage() {
     return new FormattableMarkup('Entity not found. type: %type properties: %props', ['%type' => $this->entity_type_id, '%props' => var_export($this->entity_properties, TRUE)]);
   }
+
 }
diff --git a/src/Event/SalesforceBaseEvent.php b/src/Event/SalesforceBaseEvent.php
index 3ce97a1c..e002bd3d 100644
--- a/src/Event/SalesforceBaseEvent.php
+++ b/src/Event/SalesforceBaseEvent.php
@@ -9,4 +9,4 @@ use Symfony\Component\EventDispatcher\Event;
  */
 abstract class SalesforceBaseEvent extends Event {
 
-}
\ No newline at end of file
+}
diff --git a/src/Event/SalesforceEvents.php b/src/Event/SalesforceEvents.php
index c0ce44bc..396b9bb7 100644
--- a/src/Event/SalesforceEvents.php
+++ b/src/Event/SalesforceEvents.php
@@ -71,9 +71,9 @@ class SalesforceEvents {
   const PUSH_FAIL = 'salesforce.push_fail';
 
   /**
-   * Previously hook_salesforce_pull_select_query_alter
+   * Previously hook_salesforce_pull_select_query_alter.
    *
-   * Subscribers receive a Drupal\salesforce_mapping\Event\SalesforcePullEvent 
+   * Subscribers receive a Drupal\salesforce_mapping\Event\SalesforcePullEvent
    * instance, via which Drupal\salesforce\SelectQuery may be altered before
    * building Salesforce Drupal\salesforce_pull\PullQueueItem items.
    *
@@ -85,7 +85,7 @@ class SalesforceEvents {
 
   /**
    * Previously hook_salesforce_pull_mapping_object_alter.
-   * Subscribers receive a Drupal\salesforce_mapping\Event\SalesforcePullEvent 
+   * Subscribers receive a Drupal\salesforce_mapping\Event\SalesforcePullEvent
    * instance.
    *
    * Invoked prior to mapping entity fields for a pull. Can be used, for
@@ -102,7 +102,7 @@ class SalesforceEvents {
 
   /**
    * Previously hook_salesforce_pull_entity_value_alter
-   * Subscribers receive a Drupal\salesforce_mapping\Event\SalesforcePullEvent 
+   * Subscribers receive a Drupal\salesforce_mapping\Event\SalesforcePullEvent
    * instance in order to modify pull field values or entities.
    * Analogous to PUSH_PARAMS.
    *
@@ -114,11 +114,11 @@ class SalesforceEvents {
 
   /**
    * Previously hook_salesforce_pull_entity_presave.
-   * Subscribers receive a Drupal\salesforce_mapping\Event\SalesforcePullEvent 
-   * instance
+   * Subscribers receive a Drupal\salesforce_mapping\Event\SalesforcePullEvent
+   * instance.
    *
    * Invoked immediately prior to saving the pulled Drupal entity, after all
-   * fields have been mapped and values assigned. Can be used, for example, to 
+   * fields have been mapped and values assigned. Can be used, for example, to
    * override mapping fields or implement data transformations. Final chance
    * for subscribers to prevent creation or alter a Drupal entity during pull.
    *
@@ -135,6 +135,7 @@ class SalesforceEvents {
    * Dispatched when Salesforce encounters a loggable, non-fatal error.
    *
    * Subscribers receive a Drupal\salesforce\SalesforceErrorEvent instance.
+   *
    * @Event
    *
    * @var string
@@ -145,6 +146,7 @@ class SalesforceEvents {
    * Dispatched when Salesforce encounters a concerning, but non-error event.
    *
    * Subscribers receive a Drupal\salesforce\SalesforceWarningEvent instance.
+   *
    * @Event
    *
    * @var string
@@ -155,6 +157,7 @@ class SalesforceEvents {
    * Dispatched when Salesforce encounters a basic loggable event.
    *
    * Subscribers receive a Drupal\salesforce\SalesforceNoticeEvent instance.
+   *
    * @Event
    *
    * @var string
diff --git a/src/Event/SalesforceExceptionEvent.php b/src/Event/SalesforceExceptionEvent.php
index d1a9a0c6..1065bef0 100644
--- a/src/Event/SalesforceExceptionEvent.php
+++ b/src/Event/SalesforceExceptionEvent.php
@@ -2,7 +2,6 @@
 
 namespace Drupal\salesforce\Event;
 
-
 /**
  *
  */
diff --git a/src/Event/SalesforceExceptionEventInterface.php b/src/Event/SalesforceExceptionEventInterface.php
index 692ae81e..e588a20a 100644
--- a/src/Event/SalesforceExceptionEventInterface.php
+++ b/src/Event/SalesforceExceptionEventInterface.php
@@ -2,7 +2,6 @@
 
 namespace Drupal\salesforce\Event;
 
-
 /**
  *
  */
@@ -16,7 +15,7 @@ interface SalesforceExceptionEventInterface {
 
   /**
    * @return mixed Log Level
-   *   Severity level for the event. Probably a Drupal\Core\Logger\RfcLogLevel 
+   *   Severity level for the event. Probably a Drupal\Core\Logger\RfcLogLevel
    *   or Psr\Log\LogLevel value.
    */
   public function getLevel();
@@ -24,7 +23,7 @@ interface SalesforceExceptionEventInterface {
   /**
    * @return string
    *   The formatted message for this event. (Note: to get the Exception
-   *   message, use ::getExceptionMessage()). If no message was given, 
+   *   message, use ::getExceptionMessage()). If no message was given,
    *   FormattableMarkup will be an empty string.
    */
   public function getMessage();
diff --git a/src/Form/AuthorizeForm.php b/src/Form/AuthorizeForm.php
index 65b2134c..92936c14 100644
--- a/src/Form/AuthorizeForm.php
+++ b/src/Form/AuthorizeForm.php
@@ -168,6 +168,9 @@ class AuthorizeForm extends ConfigFormBase {
     return UrlHelper::isValid($url, TRUE);
   }
 
+  /**
+   *
+   */
   public function validateForm(array &$form, FormStateInterface $form_state) {
     if (!self::validEndpoint($form_state->getValue('login_url'))) {
       $form_state->setErrorByName('login_url', t('Please enter a valid Salesforce login URL.'));
diff --git a/src/Rest/RestClient.php b/src/Rest/RestClient.php
index eb0ae8c9..264cc999 100644
--- a/src/Rest/RestClient.php
+++ b/src/Rest/RestClient.php
@@ -262,7 +262,7 @@ class RestClient implements RestClientInterface {
   /**
    * Extract normalized error information from a RequestException.
    *
-   * @param RequestException $e
+   * @param \GuzzleHttp\Exception\RequestException $e
    *   Exception object.
    *
    * @return array
@@ -306,7 +306,7 @@ class RestClient implements RestClientInterface {
   }
 
   /**
-   * Wrapper for config rest_api_version.version
+   * Wrapper for config rest_api_version.version.
    */
   public function getApiVersion() {
     if ($this->config->get('use_latest')) {
@@ -318,7 +318,7 @@ class RestClient implements RestClientInterface {
   }
 
   /**
-   * Setter for config salesforce.settings rest_api_version and use_latest
+   * Setter for config salesforce.settings rest_api_version and use_latest.
    *
    * @param bool $use_latest
    * @param int $version
@@ -339,14 +339,14 @@ class RestClient implements RestClientInterface {
   }
 
   /**
-   * Getter for consumer_key
+   * Getter for consumer_key.
    */
   public function getConsumerKey() {
     return $this->state->get('salesforce.consumer_key');
   }
 
   /**
-   * Setter for consumer_key
+   * Setter for consumer_key.
    */
   public function setConsumerKey($value) {
     return $this->state->set('salesforce.consumer_key', $value);
@@ -603,10 +603,10 @@ class RestClient implements RestClientInterface {
   }
 
   /**
-   * Helper method to extract API Usage info from response header and write to 
+   * Helper method to extract API Usage info from response header and write to
    * stateful variable.
    *
-   * @param RestResponse $response 
+   * @param RestResponse $response
    */
   protected function updateApiUsage(RestResponse $response) {
     if ($limit_info = $response->getHeader('Sforce-Limit-Info')) {
@@ -661,10 +661,10 @@ class RestClient implements RestClientInterface {
   /**
    * Use SOQL to get objects based on query string.
    *
-   * @param SelectQuery $query
+   * @param \Drupal\salesforce\SelectQuery $query
    *   The constructed SOQL query.
    *
-   * @return SelectQueryResult
+   * @return \Drupal\salesforce\SelectQueryResult
    *   Query result object.
    *
    * @addtogroup salesforce_apicalls
@@ -678,9 +678,10 @@ class RestClient implements RestClientInterface {
   /**
    * Given a select query result, fetch the next results set, if it exists.
    *
-   * @param SelectQueryResult $results
-   *   The query result which potentially has more records
-   * @return SelectQueryResult
+   * @param \Drupal\salesforce\SelectQueryResult $results
+   *   The query result which potentially has more records.
+   *
+   * @return \Drupal\salesforce\SelectQueryResult
    *   If there are no more results, $results->records will be empty.
    */
   public function queryMore(SelectQueryResult $results) {
@@ -811,7 +812,7 @@ class RestClient implements RestClientInterface {
    * @param string $id
    *   Salesforce id of the object.
    *
-   * @return SObject
+   * @return \Drupal\salesforce\SObject
    *   Object of the requested Salesforce object.
    *
    * @addtogroup salesforce_apicalls
@@ -830,7 +831,7 @@ class RestClient implements RestClientInterface {
    * @param string $value
    *   Value of external id.
    *
-   * @return SObject
+   * @return \Drupal\salesforce\SObject
    *   Object of the requested Salesforce object.
    *
    * @addtogroup salesforce_apicalls
@@ -877,6 +878,7 @@ class RestClient implements RestClientInterface {
    *   Start date to check for deleted objects (in ISO 8601 format).
    * @param string $endDate
    *   End date to check for deleted objects (in ISO 8601 format).
+   *
    * @return GetDeletedResult
    */
   public function getDeleted($type, $startDate, $endDate) {
@@ -949,9 +951,9 @@ class RestClient implements RestClientInterface {
     }
     else {
       $query = new SelectQuery('RecordType');
-      $query->fields = array('Id', 'Name', 'DeveloperName', 'SobjectType');
+      $query->fields = ['Id', 'Name', 'DeveloperName', 'SobjectType'];
       $result = $this->query($query);
-      $record_types = array();
+      $record_types = [];
       foreach ($result->records() as $rt) {
         $record_types[$rt->field('SobjectType')][$rt->field('DeveloperName')] = $rt;
       }
@@ -976,7 +978,8 @@ class RestClient implements RestClientInterface {
    *   Object type name, E.g., Contact, Account.
    * @param string $devname
    *   RecordType DeveloperName, e.g. Donation, Membership, etc.
-   * @return SFID
+   *
+   * @return \Drupal\salesforce\SFID
    *   The Salesforce ID of the given Record Type, or null.
    *
    * @throws Exception if record type not found
@@ -992,7 +995,7 @@ class RestClient implements RestClientInterface {
   /**
    * Utility function to determine object type for given SFID.
    *
-   * @param SFID $id
+   * @param \Drupal\salesforce\SFID $id
    *   Salesforce object ID.
    *
    * @return string
@@ -1002,7 +1005,7 @@ class RestClient implements RestClientInterface {
    *   If SFID doesn't match any object type.
    */
   public function getObjectTypeName(SFID $id) {
-    $prefix = substr((string)$id, 0, 3);
+    $prefix = substr((string) $id, 0, 3);
     $describe = $this->objects();
     foreach ($describe as $object) {
       if ($prefix == $object['keyPrefix']) {
diff --git a/src/Rest/RestClientInterface.php b/src/Rest/RestClientInterface.php
index e3ac0f15..c99a9263 100644
--- a/src/Rest/RestClientInterface.php
+++ b/src/Rest/RestClientInterface.php
@@ -48,37 +48,41 @@ interface RestClientInterface {
    */
   public function apiCall($path, array $params = [], $method = 'GET', $returnObject = FALSE);
 
-
   /**
    * Set options for Guzzle HTTP client.
+   *
    * @see http://docs.guzzlephp.org/en/latest/request-options.html
    *
    * @param array $options
+   *
    * @return $this
    */
   public function setHttpClientOptions(array $options);
 
   /**
    * Set a single Guzzle HTTP client option.
+   *
    * @see setHttpClientOptions
    *
-   * @param string $option_name 
-   * @param mixed $option_value 
+   * @param string $option_name
+   * @param mixed $option_value
+   *
    * @return $this
    */
   public function setHttpClientOption($option_name, $option_value);
 
   /**
-   * Getter for HTTP client options
+   * Getter for HTTP client options.
    *
    * @return mixed
    */
   public function getHttpClientOptions();
 
   /**
-   * Getter for a single, named HTTP client option
+   * Getter for a single, named HTTP client option.
    *
    * @param string $option_name
+   *
    * @return mixed
    */
   public function getHttpClientOption($option_name);
@@ -236,10 +240,10 @@ interface RestClientInterface {
   /**
    * Use SOQL to get objects based on query string.
    *
-   * @param SelectQuery $query
+   * @param \Drupal\salesforce\SelectQuery $query
    *   The constructed SOQL query.
    *
-   * @return SelectQueryResult
+   * @return \Drupal\salesforce\SelectQueryResult
    *
    * @addtogroup salesforce_apicalls
    */
@@ -248,10 +252,10 @@ interface RestClientInterface {
   /**
    * Given a select query result, fetch the next results set, if it exists.
    *
-   * @param SelectQueryResult $results
+   * @param \Drupal\salesforce\SelectQueryResult $results
    *   The query result which potentially has more records.
    *
-   * @return SelectQueryResult
+   * @return \Drupal\salesforce\SelectQueryResult
    *   If there are no more results, $results->records will be empty.
    */
   public function queryMore(SelectQueryResult $results);
@@ -363,6 +367,7 @@ interface RestClientInterface {
    *   Object type name, E.g., Contact, Account.
    * @param string $id
    *   Salesforce id of the object.
+   *
    * @pararm bool $throw_exception
    *   (optional) If TRUE, 404 response code will cause RequestException to be
    *   thrown. Otherwise, hide those errors. Default is FALSE.
@@ -384,6 +389,7 @@ interface RestClientInterface {
    *   Start date to check for deleted objects (in ISO 8601 format).
    * @param string $endDate
    *   End date to check for deleted objects (in ISO 8601 format).
+   *
    * @return GetDeletedResult
    */
   public function getDeleted($type, $startDate, $endDate);
@@ -410,7 +416,7 @@ interface RestClientInterface {
    *
    * @param int $end
    *   unix timestamp for end of timeframe for updates.
-   *   Defaults to now if empty
+   *   Defaults to now if empty.
    *
    * @return array
    *   return array has 2 indexes:
@@ -423,7 +429,7 @@ interface RestClientInterface {
    *
    * @addtogroup salesforce_apicalls
    */
-  public function getUpdated($name, $start = null, $end = null);
+  public function getUpdated($name, $start = NULL, $end = NULL);
 
   /**
    * Retrieve all record types for this org. If $name is provided, retrieve
@@ -449,7 +455,7 @@ interface RestClientInterface {
    * @param string $devname
    *   RecordType DeveloperName, e.g. Donation, Membership, etc.
    *
-   * @return SFID
+   * @return \Drupal\salesforce\SFID
    *   The Salesforce ID of the given Record Type, or null.
    *
    * @throws Exception if record type not found
@@ -457,10 +463,12 @@ interface RestClientInterface {
   public function getRecordTypeIdByDeveloperName($name, $devname, $reset = FALSE);
 
   /**
-   * Utility function to determine object type for given SFID
+   * Utility function to determine object type for given SFID.
+   *
+   * @param \Drupal\salesforce\SFID $id
    *
-   * @param SFID $id
    * @return string
+   *
    * @throws Exception if SFID doesn't match any object type
    */
   public function getObjectTypeName(SFID $id);
diff --git a/src/Rest/RestException.php b/src/Rest/RestException.php
index 07b55244..cf60b3a5 100644
--- a/src/Rest/RestException.php
+++ b/src/Rest/RestException.php
@@ -21,10 +21,16 @@ class RestException extends \RuntimeException implements ExceptionInterface {
     parent::__construct($message, $code, $previous);
   }
 
+  /**
+   *
+   */
   public function getResponse() {
     return $this->response;
   }
 
+  /**
+   *
+   */
   public function getResponseBody() {
     if (!$this->response) {
       return;
diff --git a/src/Rest/RestResponse.php b/src/Rest/RestResponse.php
index 1a418643..8630677c 100644
--- a/src/Rest/RestResponse.php
+++ b/src/Rest/RestResponse.php
@@ -11,15 +11,15 @@ use GuzzleHttp\Psr7\Response;
 class RestResponse extends Response {
 
   /**
-   * The original Response used to build this object
+   * The original Response used to build this object.
    *
-   * @var GuzzleHttp\Psr7\Response;
+   * @var GuzzleHttp\Psr7\Response
    * @see __get()
    */
   protected $response;
 
   /**
-   * The json-decoded response body
+   * The json-decoded response body.
    *
    * @var mixed
    * @see __get()
@@ -41,10 +41,12 @@ class RestResponse extends Response {
    * Magic getter method to return the given property.
    *
    * @param string $key
+   *
    * @return mixed
+   *
    * @throws Exception if $key is not a property
    */
-  function __get($key) {
+  public function __get($key) {
     if (!property_exists($this, $key)) {
       throw new \Exception("Undefined property $key");
     }
diff --git a/src/Rest/RestResponse_Describe.php b/src/Rest/RestResponse_Describe.php
index f5dc733e..82131fb9 100644
--- a/src/Rest/RestResponse_Describe.php
+++ b/src/Rest/RestResponse_Describe.php
@@ -2,6 +2,9 @@
 
 namespace Drupal\salesforce\Rest;
 
+/**
+ *
+ */
 class RestResponse_Describe extends RestResponse {
 
   /**
@@ -10,23 +13,23 @@ class RestResponse_Describe extends RestResponse {
    * @var array
    */
   protected $fields;
-  
+
   /**
-   * The name of this SObject type, e.g. "Contact", "Account", "Opportunity"
+   * The name of this SObject type, e.g. "Contact", "Account", "Opportunity".
    *
    * @var string
    */
   protected $name;
 
   /**
-   * Flattened fields mapping field name => field label
+   * Flattened fields mapping field name => field label.
    *
    * @var array
    */
   private $field_options;
 
   /**
-   * See https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_sobject_describe.htm
+   * See https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_sobject_describe.htm.
    *
    * @param RestResponse $response
    */
@@ -49,12 +52,15 @@ class RestResponse_Describe extends RestResponse {
     $this->data = $response->data;
   }
 
+  /**
+   *
+   */
   public function getName() {
     return $this->name;
   }
 
   /**
-   * getter
+   * Getter.
    */
   public function getFields() {
     return $this->fields;
@@ -114,12 +120,14 @@ class RestResponse_Describe extends RestResponse {
    *    type
    *    unique
    *    updateable
-   *    writeRequiresMasterRead
+   *    writeRequiresMasterRead.
    *
-   * for more information @see https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_fields_describe.htm
+   * For more information @see https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_fields_describe.htm.
    *
    * @param string $field_name
+   *
    * @return array field definition
+   *
    * @throws Exception if field_name is not defined for this SObject type
    */
   public function getField($field_name) {
@@ -130,7 +138,7 @@ class RestResponse_Describe extends RestResponse {
   }
 
   /**
-   * Return a one-dimensional array of field names => field labels
+   * Return a one-dimensional array of field names => field labels.
    *
    * @return array
    */
diff --git a/src/Rest/RestResponse_Resources.php b/src/Rest/RestResponse_Resources.php
index 92fd6ab0..a6d14de8 100644
--- a/src/Rest/RestResponse_Resources.php
+++ b/src/Rest/RestResponse_Resources.php
@@ -2,6 +2,9 @@
 
 namespace Drupal\salesforce\Rest;
 
+/**
+ *
+ */
 class RestResponse_Resources extends RestResponse {
 
   /**
@@ -12,14 +15,15 @@ class RestResponse_Resources extends RestResponse {
   protected $resources;
 
   /**
-   * See https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_discoveryresource.htm
+   * See https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_discoveryresource.htm.
    *
-   * @param RestResponse $response 
+   * @param RestResponse $response
    */
-  function __construct(RestResponse $response) {
+  public function __construct(RestResponse $response) {
     parent::__construct($response->response);
     foreach ($response->data as $key => $path) {
       $this->resources[$key] = $path;
     }
   }
+
 }
diff --git a/src/SFID.php b/src/SFID.php
index f348f71e..d77f887c 100644
--- a/src/SFID.php
+++ b/src/SFID.php
@@ -2,11 +2,17 @@
 
 namespace Drupal\salesforce;
 
+/**
+ *
+ */
 class SFID {
 
   protected $id;
   const MAX_LENGTH = 18;
 
+  /**
+   *
+   */
   public function __construct($id) {
     if (strlen($id) != 15 && strlen($id) != self::MAX_LENGTH) {
       throw new \Exception('Invalid sfid ' . strlen($id));
@@ -17,6 +23,9 @@ class SFID {
     }
   }
 
+  /**
+   *
+   */
   public function __toString() {
     return (string) $this->id;
   }
diff --git a/src/SObject.php b/src/SObject.php
index 121e83f6..6f4ccb1d 100644
--- a/src/SObject.php
+++ b/src/SObject.php
@@ -2,11 +2,17 @@
 
 namespace Drupal\salesforce;
 
+/**
+ *
+ */
 class SObject {
   protected $type;
   protected $fields;
   protected $id;
 
+  /**
+   *
+   */
   public function __construct(array $data = []) {
     if (!isset($data['id']) && !isset($data['Id'])) {
       throw new \Exception('Refused to instantiate SObject without ID');
@@ -29,23 +35,32 @@ class SObject {
     foreach ($data as $key => $value) {
       $this->fields[$key] = $value;
     }
-    $this->fields['Id'] = (string)$this->id;
+    $this->fields['Id'] = (string) $this->id;
   }
 
+  /**
+   *
+   */
   public function id() {
     return $this->id;
   }
 
+  /**
+   *
+   */
   public function type() {
     return $this->type;
   }
 
+  /**
+   *
+   */
   public function fields() {
     return $this->fields;
   }
 
   /**
-   * Given $key, return corresponding field value
+   * Given $key, return corresponding field value.
    *
    * @throws Exception if $key is not found
    */
diff --git a/src/SalesforceEvents.php b/src/SalesforceEvents.php
index 2cdffb7a..764329f3 100644
--- a/src/SalesforceEvents.php
+++ b/src/SalesforceEvents.php
@@ -7,8 +7,8 @@ use Drupal\salesforce\Event\SalesforceEvents as ParentSalesforceEvents;
 /**
  * @deprecated Will be removed before Salesforce 8.x-3.0
  *
- * The file has been moved to Drupal\salesforce\Event namespace (in src\Event 
- * directory). Implementations should use the same class name with the new 
+ * The file has been moved to Drupal\salesforce\Event namespace (in src\Event
+ * directory). Implementations should use the same class name with the new
  * namespace.
  */
 class SalesforceEvents extends ParentSalesforceEvents {
diff --git a/src/SelectQueryResult.php b/src/SelectQueryResult.php
index 1c828330..dff9986b 100644
--- a/src/SelectQueryResult.php
+++ b/src/SelectQueryResult.php
@@ -1,18 +1,20 @@
 <?php
-/**
- * @file
- * Class representing a Salesforce SELECT SOQL query.
- */
 
 namespace Drupal\salesforce;
 
+/**
+ *
+ */
 class SelectQueryResult {
-  
+
   protected $totalSize;
   protected $done;
   protected $records;
   protected $nextRecordsUrl;
 
+  /**
+   *
+   */
   public function __construct(array $results) {
     $this->totalSize = $results['totalSize'];
     $this->done = $results['done'];
@@ -25,27 +27,42 @@ class SelectQueryResult {
     }
   }
 
+  /**
+   *
+   */
   public function nextRecordsUrl() {
     return $this->nextRecordsUrl;
   }
 
+  /**
+   *
+   */
   public function size() {
     return $this->totalSize;
   }
 
+  /**
+   *
+   */
   public function done() {
     return $this->done;
   }
 
+  /**
+   *
+   */
   public function records() {
     return $this->records;
   }
 
+  /**
+   *
+   */
   public function record(SFID $id) {
-    if (!isset($this->records[(string)$id])) {
+    if (!isset($this->records[(string) $id])) {
       throw new \Exception('No record found');
     }
-    return $this->records[(string)$id];
+    return $this->records[(string) $id];
   }
 
-}
\ No newline at end of file
+}
diff --git a/src/Tests/SalesforceAdminSettingsTest.php b/src/Tests/SalesforceAdminSettingsTest.php
index 3d7c9f40..c11646c8 100644
--- a/src/Tests/SalesforceAdminSettingsTest.php
+++ b/src/Tests/SalesforceAdminSettingsTest.php
@@ -19,7 +19,7 @@ class SalesforceAdminSettingsTest extends WebTestBase {
   protected static $modules = [
     'salesforce',
     'user',
-    'salesforce_test_rest_client'
+    'salesforce_test_rest_client',
   ];
 
   protected $normalUser;
@@ -52,14 +52,14 @@ class SalesforceAdminSettingsTest extends WebTestBase {
     $secret = rand(100000, 10000000);
     $url = 'https://login.salesforce.com';
     $post = [
-        'consumer_key' => $key,
-        'consumer_secret' => $secret,
-        'login_url' => $url,
-      ];
+      'consumer_key' => $key,
+      'consumer_secret' => $secret,
+      'login_url' => $url,
+    ];
     $this->drupalPostForm('admin/config/salesforce/authorize', $post, t('Save configuration'));
 
     $newurl = parse_url($this->getUrl());
-    
+
     $query = [];
     parse_str($newurl['query'], $query);
 
@@ -75,6 +75,9 @@ class SalesforceAdminSettingsTest extends WebTestBase {
 
   }
 
+  /**
+   *
+   */
   public function testOauthCallback() {
     $this->drupalLogin($this->adminSalesforceUser);
 
diff --git a/src/Tests/TestHttpClient.php b/src/Tests/TestHttpClient.php
index 265c7a44..af015ba5 100644
--- a/src/Tests/TestHttpClient.php
+++ b/src/Tests/TestHttpClient.php
@@ -9,8 +9,12 @@ use GuzzleHttp\Psr7\Response;
  * @see tests/modules/salesforce_test_rest_client
  */
 class TestHttpClient extends Client {
-  // We need to override the post() method in order to fake our OAuth process
+
+  /**
+   * We need to override the post() method in order to fake our OAuth process.
+   */
   public function post($url, $headers) {
     return new Response();
   }
+
 }
diff --git a/src/Tests/TestHttpClientFactory.php b/src/Tests/TestHttpClientFactory.php
index b0b60af1..0604e130 100644
--- a/src/Tests/TestHttpClientFactory.php
+++ b/src/Tests/TestHttpClientFactory.php
@@ -40,7 +40,7 @@ class TestHttpClientFactory extends ClientFactory {
         'http' => NULL,
         'https' => NULL,
         'no' => [],
-      ]
+      ],
     ];
 
     $config = NestedArray::mergeDeep($default_config, Settings::get('http_client_config', []), $config);
diff --git a/tests/modules/salesforce_test_rest_client/src/SalesforceTestRestClientServiceProvider.php b/tests/modules/salesforce_test_rest_client/src/SalesforceTestRestClientServiceProvider.php
index 6215d44e..bc6526fd 100644
--- a/tests/modules/salesforce_test_rest_client/src/SalesforceTestRestClientServiceProvider.php
+++ b/tests/modules/salesforce_test_rest_client/src/SalesforceTestRestClientServiceProvider.php
@@ -23,4 +23,5 @@ class SalesforceTestRestClientServiceProvider extends ServiceProviderBase {
       ->setClass(TestRestClient::class);
 
   }
+
 }
diff --git a/tests/salesforce.test b/tests/salesforce.test
index 691aaf61..1ac678eb 100644
--- a/tests/salesforce.test
+++ b/tests/salesforce.test
@@ -2,7 +2,7 @@
 
 /**
  * @file
- * Simple tests for salesforce
+ * Simple tests for salesforce.
  */
 
 /**
@@ -85,4 +85,5 @@ class SalesforceTestCase extends DrupalWebTestCase {
 
     return $sfapi;
   }
+
 }
diff --git a/tests/src/Unit/AuthorizeFormTest.php b/tests/src/Unit/AuthorizeFormTest.php
index b5be6e22..5e4ee703 100644
--- a/tests/src/Unit/AuthorizeFormTest.php
+++ b/tests/src/Unit/AuthorizeFormTest.php
@@ -39,8 +39,6 @@ class AuthorizeFormTest extends UnitTestCase {
     $this->unrouted_url_assembler = new UnroutedUrlAssembler($this->request_stack->reveal(), $this->obpath->reveal());
     $this->event_dispatcher = $this->getMock('\Symfony\Component\EventDispatcher\EventDispatcherInterface');
 
-    
-
     $this->client->getAuthCallbackUrl()->willReturn($this->example_url);
     $this->client->getAuthEndpointUrl()->willReturn($this->example_url);
 
diff --git a/tests/src/Unit/RestClientTest.php b/tests/src/Unit/RestClientTest.php
index 5248ee91..2e796dc8 100644
--- a/tests/src/Unit/RestClientTest.php
+++ b/tests/src/Unit/RestClientTest.php
@@ -107,7 +107,7 @@ class RestClientTest extends UnitTestCase {
     $this->initClient();
 
     // Test that an apiCall returns a json-decoded value.
-    $body = array('foo' => 'bar');
+    $body = ['foo' => 'bar'];
     $response = new GuzzleResponse(200, [], json_encode($body));
 
     $this->client->expects($this->any())
@@ -125,7 +125,7 @@ class RestClientTest extends UnitTestCase {
   public function testExceptionApiCall() {
     $this->initClient();
 
-    // Test that SF client throws an exception for non-200 response
+    // Test that SF client throws an exception for non-200 response.
     $response = new GuzzleResponse(456);
 
     $this->client->expects($this->any())
@@ -141,7 +141,7 @@ class RestClientTest extends UnitTestCase {
   public function testReauthApiCall() {
     $this->initClient();
 
-    // Test that apiCall does auto-re-auth after 401 response
+    // Test that apiCall does auto-re-auth after 401 response.
     $response_401 = new GuzzleResponse(401);
     $response_200 = new GuzzleResponse(200);
 
@@ -157,7 +157,6 @@ class RestClientTest extends UnitTestCase {
     $result = $this->client->apiCall('');
   }
 
-
   /**
    * @covers ::objects
    */
@@ -170,7 +169,7 @@ class RestClientTest extends UnitTestCase {
         ],
         'NonUpdateable' => [
           'updateable' => FALSE,
-        ]
+        ],
       ],
     ];
     $cache = (object) [
@@ -203,12 +202,12 @@ class RestClientTest extends UnitTestCase {
     $this->initClient(array_merge($this->methods, ['apiCall']));
     $rawQueryResult = [
       'totalSize' => 1,
-      'done' => true,
+      'done' => TRUE,
       'records' => [
         0 => [
           'attributes' => [
             'type' => 'Foo',
-            'url' => 'Bar'
+            'url' => 'Bar',
           ],
           'Id' => $this->salesforce_id,
         ],
@@ -242,7 +241,7 @@ class RestClientTest extends UnitTestCase {
             $this->randomMachineName() => $this->randomMachineName(),
             $this->randomMachineName() => [
               $this->randomMachineName() => $this->randomMachineName(),
-              $this->randomMachineName() => $this->randomMachineName()
+              $this->randomMachineName() => $this->randomMachineName(),
             ],
           ],
           [
@@ -264,9 +263,9 @@ class RestClientTest extends UnitTestCase {
     // Test that cache gets set correctly:
     $this->cache->expects($this->any())
       ->method('get')
-      ->willReturn((object)[
+      ->willReturn((object) [
         'data' => $expected,
-        'created' => time()
+        'created' => time(),
       ]);
 
     // Test that we hit cache when we call again.
@@ -275,7 +274,6 @@ class RestClientTest extends UnitTestCase {
 
     // @TODO what happens when we provide a name for non-existent SF table?
     // 404 exception?
-
     // Test that we throw an exception if name is not provided.
     $this->client->objectDescribe('');
   }
@@ -287,8 +285,8 @@ class RestClientTest extends UnitTestCase {
     $this->initClient(array_merge($this->methods, ['apiCall']));
     $restResponse = new RestResponse(
       new GuzzleResponse('200', [], json_encode([
-        'id' => $this->salesforce_id
-        ]))
+        'id' => $this->salesforce_id,
+      ]))
       );
 
     $sfid = new SFID($this->salesforce_id);
@@ -398,7 +396,7 @@ class RestClientTest extends UnitTestCase {
     // 3 tests for objectDelete:
     // 1. test that a successful delete returns null
     // 2. test that a 404 response gets eaten
-    // 3. test that any other error response percolates
+    // 3. test that any other error response percolates.
     $this->client->expects($this->exactly(3))
       ->method('apiCall');
 
@@ -451,12 +449,12 @@ class RestClientTest extends UnitTestCase {
 
     $rawQueryResult = [
       'totalSize' => 1,
-      'done' => true,
+      'done' => TRUE,
       'records' => [
         0 => [
           'attributes' => [
             'type' => 'Foo',
-            'url' => 'Bar'
+            'url' => 'Bar',
           ],
           'SobjectType' => $SobjectType,
           'DeveloperName' => $DeveloperName,
@@ -467,10 +465,10 @@ class RestClientTest extends UnitTestCase {
     $recordTypes = [
       $SobjectType => [
         $DeveloperName =>
-          new SObject($rawQueryResult['records'][0])
+        new SObject($rawQueryResult['records'][0]),
       ],
     ];
-    $cache = (object)[
+    $cache = (object) [
       'created' => time(),
       'data' => $recordTypes,
     ];
@@ -485,8 +483,8 @@ class RestClientTest extends UnitTestCase {
       ->method('get')
       ->willReturn($cache);
     $this->client->expects($this->once())
-     ->method('query')
-     ->willReturn(new SelectQueryResult($rawQueryResult));
+      ->method('query')
+      ->willReturn(new SelectQueryResult($rawQueryResult));
 
     $this->assertEquals($recordTypes, $this->client->getRecordTypes());
 
diff --git a/tests/src/Unit/SFIDTest.php b/tests/src/Unit/SFIDTest.php
index 9854532a..6949b506 100644
--- a/tests/src/Unit/SFIDTest.php
+++ b/tests/src/Unit/SFIDTest.php
@@ -1,15 +1,15 @@
 <?php
+
 namespace Drupal\Tests\salesforce\Unit;
 
 use Drupal\Tests\UnitTestCase;
 use Drupal\salesforce\SFID;
 
 /**
- * Test Object instantitation
+ * Test Object instantitation.
  *
  * @group salesforce_pull
  */
-
 class SFIDTest extends UnitTestCase {
   static $modules = ['salesforce'];
 
@@ -21,7 +21,7 @@ class SFIDTest extends UnitTestCase {
   }
 
   /**
-   * Test object instantiation with good ID
+   * Test object instantiation with good ID.
    */
   public function testGoodID() {
     $sfid = new SFID('1234567890abcde');
@@ -29,7 +29,8 @@ class SFIDTest extends UnitTestCase {
   }
 
   /**
-   * Test object instantiation with bad ID
+   * Test object instantiation with bad ID.
+   *
    * @expectedException Exception
    */
   public function testBadID() {
@@ -37,10 +38,11 @@ class SFIDTest extends UnitTestCase {
   }
 
   /**
-   * Test object instantiation with bad ID
+   * Test object instantiation with bad ID.
    */
   public function testConvertId() {
     $sfid = new SFID('1234567890adcde');
     $this->assertEquals('1234567890adcdeAAA', $sfid);
   }
+
 }
diff --git a/tests/src/Unit/SObjectTest.php b/tests/src/Unit/SObjectTest.php
index 0aa03351..1de05bf4 100644
--- a/tests/src/Unit/SObjectTest.php
+++ b/tests/src/Unit/SObjectTest.php
@@ -1,15 +1,15 @@
 <?php
+
 namespace Drupal\Tests\salesforce\Unit;
 
 use Drupal\Tests\UnitTestCase;
 use Drupal\salesforce\SObject;
 
 /**
- * Test Object instantitation
+ * Test Object instantitation.
  *
  * @group salesforce_pull
  */
-
 class SObjectTest extends UnitTestCase {
   static $modules = ['salesforce'];
 
@@ -21,32 +21,35 @@ class SObjectTest extends UnitTestCase {
   }
 
   /**
-   * Test object instantiation
+   * Test object instantiation.
    */
   public function testObject() {
-    $sobject = new SObject(['id' => '1234567890abcde', 'attributes' => ['type' => 'dummy',]]);
+    $sobject = new SObject(['id' => '1234567890abcde', 'attributes' => ['type' => 'dummy']]);
     $this->assertTrue($sobject instanceof SObject);
     $this->assertEquals('1234567890abcdeAAA', $sobject->id());
   }
 
   /**
-   * Test object instantiation wth no ID
+   * Test object instantiation wth no ID.
+   *
    * @expectedException Exception
    */
   public function testObjectNoID() {
-    $sobject = new SObject(['attributes' => ['type' => 'dummy',]]);
+    $sobject = new SObject(['attributes' => ['type' => 'dummy']]);
   }
 
   /**
-   * Test object instantiation with bad ID
+   * Test object instantiation with bad ID.
+   *
    * @expectedException Exception
    */
   public function testObjectBadID() {
-    $sobject = new SObject(['id' => '1234567890', 'attributes' => ['type' => 'dummy',]]);
+    $sobject = new SObject(['id' => '1234567890', 'attributes' => ['type' => 'dummy']]);
   }
 
   /**
-   * Test object instantiation with no type
+   * Test object instantiation with no type.
+   *
    * @expectedException Exception
    */
   public function testObjectNoType() {
@@ -54,24 +57,25 @@ class SObjectTest extends UnitTestCase {
   }
 
   /**
-   * Test invalid field call
+   * Test invalid field call.
+   *
    * @expectedException Exception
    */
   public function testFieldNotExists() {
-    $sobject = new SObject(['id' => '1234567890abcde', 'attributes' => ['type' => 'dummy',]]);
+    $sobject = new SObject(['id' => '1234567890abcde', 'attributes' => ['type' => 'dummy']]);
     $field = $sobject->field('key');
   }
 
   /**
-   * Test valid field call
+   * Test valid field call.
    */
   public function testFieldExists() {
     $sobject = new SObject([
       'id' => '1234567890abcde',
-      'attributes' => ['type' => 'dummy',],
+      'attributes' => ['type' => 'dummy'],
       'name' => 'Example',
     ]);
-    $this->assertEquals('Example',$sobject->field('name'));
+    $this->assertEquals('Example', $sobject->field('name'));
   }
 
 }
diff --git a/tests/src/Unit/SelectQueryResultTest.php b/tests/src/Unit/SelectQueryResultTest.php
index eff6b284..2d485a78 100644
--- a/tests/src/Unit/SelectQueryResultTest.php
+++ b/tests/src/Unit/SelectQueryResultTest.php
@@ -1,4 +1,5 @@
 <?php
+
 namespace Drupal\Tests\salesforce\Unit;
 
 use Drupal\Tests\UnitTestCase;
@@ -6,11 +7,10 @@ use Drupal\salesforce\SFID;
 use Drupal\salesforce\SelectQueryResult;
 
 /**
- * Test Object instantitation
+ * Test Object instantitation.
  *
  * @group salesforce_pull
  */
-
 class SelectQueryResultTest extends UnitTestCase {
   static $modules = ['salesforce'];
 
@@ -21,32 +21,33 @@ class SelectQueryResultTest extends UnitTestCase {
     parent::setUp();
     $result = [
       'totalSize' => 2,
-      'done' => true,
+      'done' => TRUE,
       'records' => [
         [
           'Id' => '1234567890abcde',
-          'attributes' => ['type' => 'dummy',],
+          'attributes' => ['type' => 'dummy'],
           'name' => 'Example',
         ],
         [
           'Id' => '1234567890abcdf',
-          'attributes' => ['type' => 'dummy',],
+          'attributes' => ['type' => 'dummy'],
           'name' => 'Example2',
         ],
-      ]
+      ],
     ];
     $this->sqr = new SelectQueryResult($result);
   }
 
   /**
-   * Test object instantiation with good resultd
+   * Test object instantiation with good resultd.
    */
   public function testGoodID() {
     $this->assertTrue($this->sqr instanceof SelectQueryResult);
   }
 
   /**
-   * Test object instantiation with no ID
+   * Test object instantiation with no ID.
+   *
    * @expectedException Exception
    */
   public function testNoID() {
-- 
GitLab