diff --git a/modules/salesforce_encrypt/salesforce_encrypt.install b/modules/salesforce_encrypt/salesforce_encrypt.install
index 90aeb7bef95ad76bdfc8efd9ee743698a3f83ce5..9f578b1cfc82798d7b6cb7f198693aa121166702 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 a7c3b98d0f829520d821ed863bf946127ace9f10..ec0966d3c61093f0944d9b374c8e166229a6ec38 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 a231acbfe4b7d0f2561773d4598a4455d0ca2803..b9fbd4c9fce3d49a9992bad9153869b1b94c522c 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 4ec0d5ec34c4f93a86d62eea02aa130b6a006f38..9542530a6545b543dc72bb94ce08b42562b0c635 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 cd2bb8b9fd896daa3f609a7a1c61c7c6b84ab533..09e82c3f4f6a647008c3190cd61ec46f1ba6a29d 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 cb1dd9dfd5202a6c366c8a2af919867c4b73f615..6146bfbd6cec9cb69dd11bd4a5afe7abb9827704 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 bb5d8b83227a5a3e9e766624a6a1175970da9502..c4e5aafa991a852458152b6b4a76cbe41bc3c0d5 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 1c6eda6abe3fda6129e4b8a639ef7f713cdbe923..fba0315b6fca77624bbee3c605aca620909fb7d1 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 3bc47ae7693fe1357b017047ad8421e2805c3efd..07ace121fbac97980b43d7d91bc099454a2dbc46 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 089da371ad75cb324d8e52d3eefe04c102e2bd67..03e5d72f72131bd3898baf7f45b5372883ce7be6 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 257b74a970e30d3eda95bc6fcc4a009c5e0fa4a3..439b2de601a4c9577b703e8009edb66777850d7e 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 e7ada97195f2ba615b61ff12c4e79655e363bc97..6f8f65090a5da08a0ccec9655930c24320c22fd8 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 07b82a8cb03cb1c665bf117fb44583a0fcf2f79a..ec5f3b02b552fba770f827c5e1d041124b50a6a8 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 6caa8eea6d275012a389d8234356d1549c37ae14..d5b159956bced68e2bff8ddfc97d2963103b9450 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 a9ebe2cb049c4852bb5c48e7f4d463d1de04834d..9a5ffb78b3eeace35c0f11793a6f93167b17945e 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 85ac9c374b7b7bf2dc4579568c7ecd256d163142..8803261098cbd227b22e99c75cc6e79820556686 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 66b884661a80ea901b5e7f02f9345ffdb6a7f42f..af56462bd19621efe5f3541d8fb045e7c5ac3dfa 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 6c7d79980732974b6b8d44baff5956a8dcbc6591..0004d432b7b1492b7811054bf5855d0069218172 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 a2042747415c57ea35443c2b980ba58942a872cd..c058f1b668252c3b22bc522004c0c2c44640b3e6 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 cfcc2b38f5c7238f4a3310af5b0970f95f14a558..70f7107a2fb7558ae327e733cc92658fe80b4f65 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 6f0e7486baf79a0d65d87f313b8f3f96c20c6e75..69931924214f2aed1d852df1cd8941c3aaf3526a 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 d6cc76b371869126311da506659561cd891825c7..a1d39b373972a3a3a8437dd70d94ccace48bc0ff 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 27cc56f611e95c4f5b8ac08be54010fcb8267147..780f77e70f848bc4478c0e57a864461f4228db07 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 8f2d53cb2a7fffe36bf160d186f85e0f871a290f..976c190417c0fa7d9c1b3e4d4689dcf8e8f4e2ef 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 6ee90537afe9d403eb91d0ee7049d5588de8ef9a..88e9745999860a37716e623453bfc8093a03a09e 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 a693ecb89c814ab4f750098c20c669f7b136cc3b..7c92093cf6ff6986ca6f13c31ae6c52ccab8446b 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 004cfa524228ea7b4e910542d76bcb9c29de472c..6988736d5847c66d1af67092a8db66a9753b07a3 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 42316f0950a34395002dc94b5f64e2a31eec8ee9..070f9806bda4199956e21c1f4e71e33b4ded4ff5 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 151baceb27479b1c6d6b903e114c022541df7f60..0e0f4df941542e4cdd5ec1127b2258a5009265e3 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 96a6e418f740be3ce1c8755a970aa2d37a64d327..615c1de7e1a87ef445b69a41af38e8828252fc94 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 b45a21c310c541e58d170322f1e14a50b27f86ec..c65347466e4defb4eac62f4c6602b917ef0e24cb 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 7ca2655111aad2ce84e72a1195b09a6c7480f2df..82ec38d00bde4f0d43cdd24022ded9c52bdef41a 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 9feff5d7f4db4a0458c55c9eca474b7f58c1a667..d80b6c75a6e729d7da92c6dc8418eaf44750489a 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 b8a8da66cbf385834e2060ec9861fdc95964a3e3..e60f57223780824885ed097c8d17c8886a9d2af3 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 29d99382231eb13791d57801519bc6244c9461a7..20bdad392f55f8ced11292133089cece20eb89e8 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 526d433dbd84bcaf440827dee574e4c9a3694806..687c0fd55959e58db54f86b0653d91a25ec6c5c5 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 0810c93721b4c127af8893c5a9faecd43fbb2ce0..359b4bd91172ea500444d957f2b3b4886bc61a53 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 8ece0fd43fcbbef48c0b9c8d26b7ba864a290c66..314a38d7c7be80cf2bc04ac03d0d69570f7a24bb 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 a16751e821f5560f581da433bc130d92f5834747..dca20a93b0ed86fc5e20025e7293a254f300864f 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 e7c43164dfc17964c5891d6aabeaefee076ed5ba..50a9997d0b61550c4bf5875f944acf51f3979c91 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 6386129696ec95b94e6aeffc4b97fc42908be118..e01137f4658426cd4c4904016c930219d18fd38d 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 7250fb8d05357052ceffdc4e3d2f3cf470e7025c..26d5dad5e47fc9c02721ce89a9722a85434599f0 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 868aa56d52d3aa9e27d42a764b5323f4a527d9dc..272aadf9fd4a0aa2dc1060173477895f8a524846 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 bb0b61d4b4d633eb7767e9472948fa0c7d46bd1f..01f3e721cacf2d49a3b262b08225a55d6ff274c7 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 a717f594e69d972471fc5b0905bb73d8a40bb31f..7a87ac74fca564eb908e44cc66111d607f23fcf0 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 9f4654b6c02b72d338f730b87e6e43b764189153..14b85451f3f8e0238d83ef6102131d9ad200bb8c 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 ff6d422cd4ca98e911a04972f09caec02d26ce01..8d05ca154d4348894a196d9b8ca9ac613a8644c4 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 bf0a3e82aa88d41da9e81bf24d747e904e67a18d..6260c8da444a95121c663a99b3f55263f8395995 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 b78d37d3aecbb28d28666361392731f8dacd0294..c9730d7df0956d232ba31bd0ea4caffbccff094b 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 c8fa184b73808d29801d2a39b0f4bca6d566035f..c208deb973aa4521313510b0bea08fb64cb21859 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 9d552ff4c9c764e56bc13a09622bf07499e68d82..e58333bc871585974282ac4c4eae345e60f1b9f5 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 daf7ead68d5ede92645bcb6437e73f3add198287..c2ce14db6f6002ca16b560f96a59524c1b5628e8 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 2b8c0f4b0c65dc70b5a8e50cc68b86247a00544c..cc5507780193f45992c4821077e6129a82865c16 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 3c7007988256b3275ad2d7f166cf1d9e6f1e6125..da6d80c90172200406ac6c3a2b6a8459ab728f5d 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 6add937adc7e673b112d653fe3f758922dae1a6c..2005bc8c953b82bf00e2eb5f854719f0c15e9e47 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 b8d636018e973db4526f441bf587b9435d17438f..b2cc0375e6f74115033cdbe2dce6c4f502ad526e 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 9aa27f63e1f7dc0620540305f1b2ec838ea7c21d..548a3cf63f4e9f480b6bc954764cca17c0162c67 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 4c861faab7f4e597da1595ed81806326d416db02..3499cb25d5f6dcdd9749f06272ffe086797b732a 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 94b3bc03a63c575aa5cbed6304d0d0ea366dafbb..cced13f8975328270d7f7d2ed011121281487c01 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 eb9be6403727ced3b0b19a03aad9012242ae58a3..4b1a051713fca67a21a4847ffeed1e4857cd2ee6 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 1670f378b21f13f1cfe17e5ae455a3a113bef974..b33debd07e7c3ed3bd416c6609eb3011cb47a6d0 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 f0bc92b8ff0f6719385b3b62f9f92ad625c9c770..e7571d222409d0152ab1f5c8441ab4b11ce03f1f 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 38f5c4cef2ed7a192b71d8708c4b3268a697180e..7c4b334a51743d3c82da10f8762d9cf6a4ee3978 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 eb62ce23331509a1addfb18dadd8ae7b557f31aa..3e4a419a2a2c0deb72a25d78e3c97eda44b1d72e 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 f33140309f03a6c26c7168677abfba1a8f2fa617..0e8db91fa45175bd17a12da838490ae886676a63 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 b2ecb51b8c5882bb5b76dcad63871bf07c0dd702..c3e8f6e5c5d65cf846f5ea634d7e056ddc2566c3 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 6fc9bebe14d6dc11f19c75d7fb558dc10e1a980e..26ab5f368e26d83627a5cad08645f54dda4a93d7 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 06d3e25f25eec3da5073bd0f76358d05e23c898a..069a922dd615a3bbd3b9a748948d5ed49ba6e9bb 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 13c28cce1d355ff3c585e29e847146bd7a6a641e..05831403b5951d89fcba735a0dc5b3ab1d4c800e 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 d704b2a6dab7fbe3cb3a2b15be6f1981193f2a30..c54cb052b93e779c3337644dcb9c3cefc0210da1 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 05e807bfa39643135e9c2fe49e18f4c7b60efca0..0713922434b8e0eb1b958828c2b291f1d49e1eb6 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 18772426295c72d50fc84921489e458a1403560b..5904fe4e746b6b41f77af026b7697eb98fbe9513 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 53b2e8c30cb45dd2f919e567d98438021e0559f9..1e3990009c96ba1dd50e6826cd53f69ec26548c6 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 91d40624d438011896f68852ef063f3c00d14cd0..5ef06579c3320fd84cc8470934de1e92164de144 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 2fa0db6b7dae8297098ba43c4b45fd6f0dae76ee..016475b9d3a566464fade42e9595aa149c998883 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 0791ea6a3e7e68a301823a520d0b5b6f3c41ab93..6d5fec89e007f3a282858906dffae894917b4353 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 ba93574131418f5a34793d48247ccf7dd1a4278d..5a33700d48bdeff1cdf308f4c726209d3655125b 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 6ee649e47f673c06fd103cabe90f841832873358..355ed5481d7f849ba844312512ec93a02cb6fb09 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 937dbe368c6c09285713b8dc8eb8e41d49d7b015..171960b96df599b7f74c0bc79219444102039684 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 57fce1868ee6fd8dfd247eefb48b28acff3fd60c..974ebf81d683bd3d94e0d10f3f6955d80c212965 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 c3d5f5e0854390fcdf9469a7a1b235a64e5ef991..7169a5063732fb41bfd0dd95490be12096723fbf 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 51f98cb6e3c272746320b68557260eb859a0be8f..d30202b47333f88f8530a99f136bc9e155c04916 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 d53df7aeb319ccd716e084f74a50d0837582ff5b..8d744f4e05021950b71c6b229490cd087e8bf130 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 af3b69821a08685f6485b7d3a793c93ebceaea0f..9fe726afce7aefe5b9b1a39e79f7fd78201113f5 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 950e249787cf86b041a4eb939f507270e732c425..11fd46a81eba75f03832c66d39a4d32d4c5df059 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 340ba2054cbe027512c70284e1279980d8f2f9fe..f59272338f96b2712ac4604854df11d65dfe11c8 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 712636ac115a4e438f42975804407ca2e632d58b..b0c44387d45538f1713e0f3f41b8ab40109fb994 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 cab7e4f97e21b6f7155f506d1f164bcf35678279..44fce96e71e0e81f155a4452a1b0aac4d0bb65b1 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 53de874426da356b44270f634c9cd20ec3909f90..c63e09467a8875991fc902682fa4920dda974395 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 10ba2eb06a577fb0c5a446bec0603908bbc5f3ff..d96f4df8b6d4c458e935a135c6f91fe1516e608f 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 7fb3a92ff64f2bcf91669ce55f30142244dc0153..f66fc6125ea503ee6ba0fe08dda859a5582b1ee1 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 73d3acdfd30af65dfa9d4ceec991d67f078b5629..b27c99e84403a775ee11bc230836a39b89ec6c4b 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 23ddfd12459ad6025bc6af5411cfed30c4beb308..06c62c3736ec708b39e55dd8a1cae4a64b932acd 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 c149c6f74ebdd4df065f422805e23541ae61e04e..0e3ba3afcf79194cf8a9e259b8a05c6809599a7c 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 6fa095cfa6e3958b7d3f8e7f499aa2b342bc8e97..09a1f35694cb4085b8dd842fec643c4238a20ea3 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 042c110ac06912fff473e716747c36a2837caac3..d6bfa74b216118271bba48f4bc926d31f503f41f 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 e5944f9cf947313abbbde005a9b44e50bcabd43f..d734e7e556481be046338f58c42a488e6fe6a173 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 c133698c08b7c5aa936add13ac0d7e773767fe88..3de400a507c041f9ea29db484af4045abb2bea2d 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 2079de32168792770018bd47022b0ebb71565e94..e94e601bd293502d78fb3cc8e09b358e702693f7 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 5d9a173c8c82b9419cf13b79e497642fb0eec12d..d3f1b036e6be011ab5102b2d52504f9e7d576cf4 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 3ce97a1ceff4f0804fbd9504b31692fe6238aec0..e002bd3d8eef7a6564a2fe8959899196969b33f8 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 c0ce44bc833467ce65ddcd6ed4b2664e0238ab53..396b9bb7ba55ab50a9a308bd99c0a1866243eea7 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 d1a9a0c6187c0f5fec3d4946d96dc88adabe0fef..1065bef0349d5f7792cf8fd384255d85dbabc6cf 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 692ae81e8c44af18b0db5784101ed93940c53c39..e588a20a90b9cff379d530c318814bfac0aa1d2a 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 65b2134c44c4b9217a83b5034e2cbfde7c8c6ea0..92936c14735f29f6e4af09060f9129e14bd5c31e 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 eb0ae8c9154f08b555dd28776b9059c4f266ecf4..264cc99910fd125b03b51a94f7aee2de1c672499 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 e3ac0f1529f2cd8264fc3bdc126ff7eb06d3ceac..c99a926365239cd516fc5a09d70e153952703bf0 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 07b55244be0d33629240beffcf791c76ee38a0df..cf60b3a5713b1ef8a20b9661fbc95ab2f477094f 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 1a4186431df475669de4ab9b8c5e16e35eac05a1..8630677ce1bb3b94c538a1b3c2af2aa39e4e8a64 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 f5dc733e437d444348cc25a6646fbeb1c75bee49..82131fb975f699b84faa1ebc11ac6207cb7848d1 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 92fd6ab0df5270b55600f4ec37a24761e9c9f737..a6d14de8686d2e075df061e5796bf3edb12ace34 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 f348f71e62cd6391a3db5a4d02814bd66605a474..d77f887c76ac90a2c1243fc92446cc2dfaab0e05 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 121e83f6e616e2fc65843109c703513d96b22e58..6f4ccb1d0a3443081532fba83456f2068129051e 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 2cdffb7a788d4d06f675f3120e27b82f5685dd00..764329f3e471ab62424c570bac017cdc8ba07e40 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 1c8283305825af64b3fa6e3dfab4554b6611073b..dff9986bc9711de6662281eac1a9dcfb66768859 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 3d7c9f40fdbe219d4e5ac6a3bd5cc9f63bcd3946..c11646c84d8f47afe8f9a7a3e02bf928e1ed0344 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 265c7a446cb72cedeae6f98f3cfaa6a2d7b18650..af015ba50cfde383147655d8554c77b22671956b 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 b0b60af1380632451a9701de5638622476a99c74..0604e130171d9514fe54851c4e24426861b37f83 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 6215d44ef2f5145b0ea9354e14c5ad2e75f8c0f5..bc6526fdd8e4ca8d50fa035c8f7b5dc399d69ade 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 691aaf61f429cde8c8d75679d3cb28e2d91b961a..1ac678ebbd67aab6e212a35575db9b0b3b173dfd 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 b5be6e22c6ca2ed9701a322b1316c273b09c1a5c..5e4ee703c617e09150a688a2d27ab79b49d7e22e 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 5248ee910418315680e778c0d2f3c1e30f355e58..2e796dc8e7cf70e5633d6709a3d709f7a757c334 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 9854532a2c1df24204018cde3101676ef4a7a6d8..6949b50652cb2368d7adac5da437d2bd7f9444aa 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 0aa0335116c0d98fa71156d77ee4aaba17e1d99a..1de05bf4a3f347e0075bafbd3a488fbaab239df2 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 eff6b284f2126c1d1c35851e7ab2eda4b918ae6f..2d485a787a5ba2cf3656e61ecc4c16534904f5ad 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() {