diff --git a/ROADMAP.txt b/ROADMAP.txt
index 403afe77b2f6f67a554171c77141b4be8d51fa4f..baba71bf002b1bb7818a2863e994242e6055674c 100644
--- a/ROADMAP.txt
+++ b/ROADMAP.txt
@@ -21,167 +21,140 @@ Additional major goals:
   -- wait for dust to settle on mapping object schema
 
 List of @TODO tags from code:
-modules/salesforce_logger/src/EventSubscriber/SalesforceLoggerSubscriber.php
-45:    // @TODO configure log levels; only log if configured level >= error level
-
-modules/salesforce_mapping/salesforce_mapping.routing.yml
-74:# @TODO: make enable/disable work like views:
-75:# @TODO: remove it from tabs and make it a checkbox on the properties form
-
-modules/salesforce_mapping/salesforce_mapping.module
-54:  // @TODO: these don't actually show up on the entity view. Have to implement hook_entity_view as well?
-
-modules/salesforce_mapping/src/Entity/SalesforceMapping.php
-111:   * @TODO what does "locked" mean?
-165:   * @TODO documentation
-195:    // @TODO This should probably be delegated to a field plugin bag?
-236:    // @TODO #fieldMappingField
-270:    // @TODO #fieldMappingField
-
-modules/salesforce_mapping/src/Entity/MappedObject.php
-80:    // @TODO: Revisit this language stuff
-158:    // @TODO make this work with Drupal\salesforce\SFID (?)
-254:    // @TODO this doesn't work
-279:    // @TODO dependency injection here:
-296:    // @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.
-300:    // @TODO Convert to $this->drupal_entity
-310:    // @TODO is this the right place for this logic to live?
-347:    // @TODO: catch EntityStorageException ? Others ?
-352:    // @TODO setNewRevision not chainable, per https://www.drupal.org/node/2839075
-446:    // @TODO better way to handle push/pull:
-449:      // @TODO: The field plugin should be in charge of setting its value on an entity, we should not assume the field plugin's logic as we're doing here.
-491:    // @TODO: Event dispatching and entity saving should not be happening in this context, but inside a controller. This class needs to be more model-like.
-517:    // @TODO Replace this with a better implementation when available,
-
-modules/salesforce_mapping/src/Controller/MappedObjectController.php
-26:   * @TODO find a more specific exception class
-51:    // @TODO this probably belongs in a service
-60:    // @TODO change this to allow one-to-many mapping support.
-109:    // @TODO add validation for fieldmap options
-110:    // @TODO add validation of SFID input
-111:    // @TODO create a new field / data type for SFID (?)
-
-modules/salesforce_mapping/src/Entity/SalesforceMappingInterface.php
-13:  // @TODO figure out what to abstract out of SalesforceMapping
-
-modules/salesforce_mapping/src/Form/MappedObjectForm.php
-180:    // @TODO: more verbose feedback for successful push.
-211:    // @TODO: more verbose feedback for successful pull.
-226:   * @TODO this should move to the Salesforce service
-244:   * @TODO: There must be a better way to do this.
-248:    // @TODO what if there's more than one entity in route params?
-
-modules/salesforce_mapping/src/Form/SalesforceMappingFieldsForm.php
-21:    // @TODO add a header with Fieldmap Property information.
-67:      // @TODO there's probably a better way to tie ajax callbacks to this element than by hard-coding an HTML DOM ID here.
-99:      // @TODO add validation to field_add_callback()
-133:    // @TODO input does not contain the clicked button, have to go to values for
-199:    // @TODO implement "lock/unlock" logic here:
-200:    // @TODO convert these to AJAX operations
-251:      // @TODO what does "locked" even mean?
-
-modules/salesforce_mapping/src/Form/SalesforceMappingFormBase.php
-61:   * @TODO this should move to the Salesforce service
-
-modules/salesforce_mapping/src/MappedObjectStorage.php
-32:    // @TODO the $entity_type needs to be in the constructor and not
-
-modules/salesforce_mapping/src/Form/SalesforceMappingFormCrudBase.php
-29:   * @TODO this function is almost 200 lines. Look into leveraging core Entity
-138:      // @TODO figure out best way to alert admins about this, or AJAX-ify it.
-149:    // @TODO either change sync_triggers to human readable values, or make them work as hex flags again.
-226:      // @TODO replace with Dependency Injection
-
-modules/salesforce_mapping/src/Plugin/SalesforceMappingField/Constant.php
-33:    // @TODO: "Constant" as it's implemented now should only be allowed to be set to "Push". In the future: create "Pull" logic for constant, which pulls a constant value to a Drupal field. Probably a separate mapping field plugin.
-58:  // @TODO add validation handler (?)
-
-modules/salesforce_mapping/src/Plugin/SalesforceMappingField/Properties.php
-25:    // @TODO inspecting the form and form_state feels wrong, but haven't found a good way to get the entity from config before the config is saved.
-83:      // @TODO: is this type still a thing even?
-
-modules/salesforce_mapping/src/Plugin/SalesforceMappingField/RecordType.php
-94:   * @TODO figure out what it means to pull Record Type
-
-modules/salesforce_mapping/src/Plugin/SalesforceMappingField/RelatedIDs.php
-27:    // @TODO inspecting the form and form_state feels wrong, but haven't found a good way to get the entity from config before the config is saved.
-71:    // @TODO this procedural call will go away when sf mapping object becomes a service or field
-92:      // @TODO exclude config entities?
-
-modules/salesforce_mapping/src/Plugin/SalesforceMappingField/RelatedProperties.php
-29:    // @TODO inspecting the form and form_state feels wrong, but haven't found a good way to get the entity from config before the config is saved.
-84:      // @TODO something about this exception
-118:      // @TODO replace this with EntityFieldManagerInterface::getFieldMapByFieldType
-145:        // @TODO is there a better way to exclude non-fieldables?
-
-modules/salesforce_mapping/src/Plugin/SalesforceMappingField/Token.php
-57:    // @TODO expose token options on mapping form: clear, callback, sanitize
-58:    // @TODO expose token tree / selector
-59:    // @TODO add token validation
-66:    // @TODO: "Constant" as it's implemented now should only be allowed to be set to "Push". In the future: create "Pull" logic for constant, which pulls a constant value to a Drupal field. Probably a separate mapping field plugin.
-
-modules/salesforce_mapping/src/SalesforceMappingFieldPluginBase.php
-170:      // @TODO MULTIPLE SF FIELDS FOR ONE MAPPING FIELD NOT IN USE:
-208:   * @TODO: this implementation from ConfigurablePluginInterface
-259:   * @TODO This needs a better name. Could be mistaken for a verb.
-271:   * @TODO This needs a better name. Could be mistaken for a verb.
-
-modules/salesforce_mapping/src/SalesforceMappingList.php
-41:    // @TODO rename old "Status" field
-
-modules/salesforce_mapping/tests/salesforce_mapping.test
-284:            // @TODO Ajax commands can target any jQuery selector, but these are
-
-modules/salesforce_mapping/tests/src/Unit/MappedObjectTest.php
-285:      // @TODO better way to handle push/pull:
-289:        // @TODO: The field plugin should be in charge of setting its value on an entity, we should not assume the field plugin's logic as we're doing here.
-329:      // @TODO: Event dispatching and entity saving should not be happening in this context, but inside a controller. This class needs to be more model-like.
-
-modules/salesforce_pull/src/Plugin/QueueWorker/CronPull.php
-7: * @TODO how to make cron time configurable to admin, or at least via settings?
-
-modules/salesforce_pull/src/DeleteHandler.php
-64:    // @TODO Add back in SOAP, and use autoloading techniques
-126:      // @TODO should we delete a mapped object whose parent mapping no longer exists? Feels like someone else's job.
-
-modules/salesforce_pull/src/QueueHandler.php
-89:          // @TODO Replace this with a better implementation when available,
-121:    // @TODO figure out the new way to build the query.
-
-modules/salesforce_pull/src/Plugin/QueueWorker/PullBase.php
-110:    // @TODO one-to-many: this is a blocker for OTM support:
-165:      // @TODO allow some means for contrib to force pull regardless
-228:      // @TODO make this optional / configurable
-
-modules/salesforce_pull/tests/src/Unit/PullBaseTest.php
-96:    // @TODO testing a mapping with no fields is of questionable value:
-
-modules/salesforce_push/salesforce_push.module
-50: * @TODO
-144:    // @TODO this doesn't really seem distinct from PUSH_ALLOWED anymore. Do we still have a use case for this event?
-
-modules/salesforce_push/src/Plugin/SalesforcePushQueueProcessor/Rest.php
-104:    // @TODO: the following is nearly identical to the end of salesforce_push_entity_crud(). Can we DRY it? Do we care?
-
-modules/salesforce_push/src/PushQueue.php
-112:   * @TODO convert $data to a proper class and make sure that's what we get for this argument.
-166:        // @TODO: convert items to content entities.
-298:    // @TODO push queue processor could be set globally, or per-mapping. Exposing some UI setting would probably be better than this:
-337:          // @TODO: this is how Cron.php queue works, but I don't really understand why it doesn't get re-queued.
-
-salesforce.drush.inc
-116:  // @TODO add remaining field objects?
-163: * @TODO implement this function
-
-src/Rest/RestClient.php
-107:   * @TODO: Consider making a test API call.
-
-src/Rest/RestClientInterface.php
-29:   * @TODO: Consider making a test API call.
-
-tests/src/Unit/RestClientTest.php
-143:    // @TODO this is extremely brittle, exposes complexity in underlying client. Refactor this.
-216:    // @TODO this doesn't seem like a very good test.
-228:    // @TODO this is fugly, do we need a refactor on RestResponse?
-270:    // @TODO what happens when we provide a name for non-existent SF table?
-293:    // @TODO this doesn't seem like a very good test.
+./modules/salesforce_mapping/salesforce_mapping.module:63:
+ @TODO: these don't actually show up on the entity view. Have to implement ...
+./modules/salesforce_mapping/src/Controller/MappedObjectController.php:53:
+ @TODO find a more specific exception class
+./modules/salesforce_mapping/src/Controller/MappedObjectController.php:79:  
+ @TODO this probably belongs in a service
+./modules/salesforce_mapping/src/Entity/MappedObject.php:95:  
+ @TODO: Revisit this language stuff
+./modules/salesforce_mapping/src/Entity/MappedObject.php:214:  
+ @TODO make this work with Drupal\salesforce\SFID (?)
+./modules/salesforce_mapping/src/Entity/MappedObject.php:366:  
+ @TODO need error handling, logging, and hook invocations within this ...
+./modules/salesforce_mapping/src/Entity/MappedObject.php:379:  
+ @TODO is this the right place for this logic to live?
+./modules/salesforce_mapping/src/Entity/MappedObject.php:417:  
+ @TODO: catch EntityStorageException ? Others ?
+./modules/salesforce_mapping/src/Entity/MappedObject.php:422:  
+ @TODO setNewRevision not chainable, per https://www.drupal.org/node/2839075
+./modules/salesforce_mapping/src/Entity/MappedObject.php:512:  
+ @TODO better way to handle push/pull:
+./modules/salesforce_mapping/src/Entity/MappedObject.php:557:  
+ @TODO: Event dispatching and entity saving should not be happening in this ...
+./modules/salesforce_mapping/src/Entity/SalesforceMapping.php:333:  
+ @TODO This should probably be delegated to a field plugin bag?
+./modules/salesforce_mapping/src/Entity/SalesforceMapping.php:374:  
+ @TODO #fieldMappingField
+./modules/salesforce_mapping/src/Entity/SalesforceMapping.php:408:  
+ @TODO #fieldMappingField
+./modules/salesforce_mapping/src/Form/MappedObjectForm.php:122:  
+ @TODO #states for entity-type + salesforce mapping dependency
+./modules/salesforce_mapping/src/Form/MappedObjectForm.php:206:  
+ @TODO: more verbose feedback for successful push.
+./modules/salesforce_mapping/src/Form/MappedObjectForm.php:248:  
+ @TODO: more verbose feedback for successful pull.
+./modules/salesforce_mapping/src/Form/MappedObjectForm.php:267:  
+ @TODO what if there's more than one entity in route params?
+./modules/salesforce_mapping/src/Form/SalesforceMappingFieldsForm.php:21:  
+ @TODO add a header with Fieldmap Property information.
+./modules/salesforce_mapping/src/Form/SalesforceMappingFieldsForm.php:73:    
+ @TODO there's probably a better way to tie ajax callbacks to this element ...
+./modules/salesforce_mapping/src/Form/SalesforceMappingFieldsForm.php:138:  
+ @TODO input does not contain the clicked button, have to go to values for
+./modules/salesforce_mapping/src/Form/SalesforceMappingFieldsForm.php:197:  
+ @TODO implement "lock/unlock" logic here:
+./modules/salesforce_mapping/src/Form/SalesforceMappingFieldsForm.php:198:  
+ @TODO convert these to AJAX operations
+./modules/salesforce_mapping/src/Form/SalesforceMappingFormBase.php:83:
+ @TODO this should move to the Salesforce service
+./modules/salesforce_mapping/src/Form/SalesforceMappingFormCrudBase.php:148:  
+ @TODO either change sync_triggers to human readable values, or make them ...
+./modules/salesforce_mapping/src/Form/SalesforceMappingFormCrudBase.php:173:    
+ @TODO should push and pull settings get moved into push and pull modules?
+./modules/salesforce_mapping/src/Form/SalesforceMappingFormCrudBase.php:215:      
+ @TODO figure out best way to alert admins about this, or AJAX-ify it.
+./modules/salesforce_mapping/src/MappedObjectStorage.php:42:  
+ @TODO the $entity_type needs to be in the constructor and not
+./modules/salesforce_mapping/src/Plugin/Field/ComputedItemList.php:45:
+ @todo This will no longer be necessary once #2392845 is fixed.
+./modules/salesforce_mapping/src/Plugin/Menu/LocalAction/SalesforceMappedObjectAddLocalAction.php:19:  
+ @TODO unclear how to translate this, but needs to be translated:
+./modules/salesforce_mapping/src/Plugin/SalesforceMappingField/Constant.php:33:  
+ @TODO: "Constant" as it's implemented now should only be allowed to be set ...
+./modules/salesforce_mapping/src/Plugin/SalesforceMappingField/Properties.php:25:  
+ @TODO inspecting the form and form_state feels wrong, but haven't found a ...
+./modules/salesforce_mapping/src/Plugin/SalesforceMappingField/RecordType.php:95:
+ @TODO figure out what it means to pull Record Type
+./modules/salesforce_mapping/src/Plugin/SalesforceMappingField/RelatedIDs.php:30:  
+ @TODO inspecting the form and form_state feels wrong, but haven't found ...
+./modules/salesforce_mapping/src/Plugin/SalesforceMappingField/RelatedIDs.php:74:  
+ @TODO this procedural call will go away when sf mapping object becomes a ...
+./modules/salesforce_mapping/src/Plugin/SalesforceMappingField/RelatedIDs.php:130:    
+ @TODO exclude config entities?
+./modules/salesforce_mapping/src/Plugin/SalesforceMappingField/RelatedProperties.php:27:  
+ @TODO inspecting the form and form_state feels wrong, but haven't found a ...
+./modules/salesforce_mapping/src/Plugin/SalesforceMappingField/RelatedProperties.php:138:      
+ @TODO is there a better way to exclude non-fieldables?
+./modules/salesforce_mapping/src/Plugin/SalesforceMappingField/Token.php:73:  
+ @TODO expose token options on mapping form: clear, callback, sanitize
+./modules/salesforce_mapping/src/Plugin/SalesforceMappingField/Token.php:74:  
+ @TODO add token validation
+./modules/salesforce_mapping/src/Plugin/SalesforceMappingField/Token.php:93:  
+ @TODO: "Constant" as it's implemented now should only be allowed to be set ...
+./modules/salesforce_mapping/src/SalesforceMappingFieldPluginBase.php:168:  
+ @TODO to provide for better extensibility, this would be better implemented ...
+./modules/salesforce_mapping/src/SalesforceMappingFieldPluginBase.php:252:  
+ @TODO to provide for better extensibility, this would be better implemented ...
+./modules/salesforce_mapping/src/SalesforceMappingFieldPluginBase.php:271:  
+ @TODO this will need to be rewritten for https://www.drupal.org/node/2899460
+./modules/salesforce_pull/src/DeleteHandler.php:99:  
+ @TODO Add back in SOAP, and use autoloading techniques
+./modules/salesforce_pull/src/DeleteHandler.php:105:    
+ @TODO add some accommodation to handle deleted records per-mapping.
+./modules/salesforce_pull/src/DeleteHandler.php:189:      
+ @TODO should we delete a mapped object whose parent mapping no longer exists?
+./modules/salesforce_pull/src/Plugin/QueueWorker/CronPull.php:8:
+ @TODO how to make cron time configurable to admin, or at least via settings?
+./modules/salesforce_pull/src/Plugin/QueueWorker/PullBase.php:116:  
+ @TODO one-to-many: this is a blocker for OTM support:
+./modules/salesforce_pull/src/PullQueueItem.php:68:  
+ @TODO remove for 8.x-3.3
+./modules/salesforce_pull/src/PullQueueItem.php:83:  
+ @TODO remove for 8.x-3.3
+./modules/salesforce_pull/src/QueueHandler.php:200:  
+ @TODO figure out the new way to build the query.
+./modules/salesforce_pull/src/QueueHandler.php:236:      
+ @TODO do we really want to eat this exception here?
+./modules/salesforce_pull/src/QueueHandler.php:261:      
+ @TODO? Pull Queue Enqueue Event
+./modules/salesforce_pull/tests/src/Unit/PullBaseTest.php:93:  
+ @TODO testing a mapping with no fields is of questionable value:
+./modules/salesforce_push/salesforce_push.module:48: * @TODO
+./modules/salesforce_push/src/Plugin/SalesforcePushQueueProcessor/Rest.php:153:  
+ @TODO: the following is nearly identical to the end of ...
+./modules/salesforce_push/src/PushQueue.php:229:
+ @TODO convert $data to a proper class and make sure that's what we get for ...
+./modules/salesforce_push/src/PushQueue.php:280:      
+ @TODO: convert items to content entities.
+./modules/salesforce_push/src/PushQueue.php:443:    
+ @TODO push queue processor could be set globally, or per-mapping. ...
+./modules/salesforce_push/src/PushQueue.php:487:      
+ @TODO: this is how Cron.php queue works, but I don't really understand ...
+./src/Commands/SalesforceCommands.php:185:
+ @todo create a proper StructuredData return value for this.
+./src/Commands/SalesforceCommands.php:457:
+ @todo create a proper StructuredData return value
+./src/Rest/RestClientInterface.php:18:
+ @TODO: Consider making a test API call.
+./tests/src/Unit/RestClientTest.php:156:  
+ @TODO this is extremely brittle, exposes complexity in underlying client.
+./tests/src/Unit/RestClientTest.php:230:  
+ @TODO this doesn't seem like a very good test.
+./tests/src/Unit/RestClientTest.php:242:  
+ @TODO this is fugly, do we need a refactor on RestResponse?
+./tests/src/Unit/RestClientTest.php:284:  
+ @TODO what happens when we provide a name for non-existent SF table?
+./tests/src/Unit/RestClientTest.php:306:  
+ @TODO this doesn't seem like a very good test.
diff --git a/modules/salesforce_encrypt/README.md b/modules/salesforce_encrypt/README.md
index ee7c2ad18063dd9b0dee8c0ecb0241d0c2687bb8..3a475212d39a8b8df5f12a6ffc02ededf640c07f 100644
--- a/modules/salesforce_encrypt/README.md
+++ b/modules/salesforce_encrypt/README.md
@@ -1,10 +1,13 @@
 #Salesforce Encrypt
-Salesforce Encrypt relies on [Encrypt](http://drupal.org/project/encrypt) to obfuscate sensitive stateful information stored by Salesforce module: OAuth Access and Refresh Tokens, as well as Salesforce Identity.
+Salesforce Encrypt relies on [Encrypt](http://drupal.org/project/encrypt) to 
+obfuscate sensitive stateful information stored by Salesforce module: OAuth 
+Access and Refresh Tokens, as well as Salesforce Identity.
 
 # Dependencies
 - http://drupal.org/project/encrypt
 - http://drupal.org/project/key
-- https://www.drupal.org/project/real_aes (or encryption method provider of your choice)
+- https://www.drupal.org/project/real_aes (or encryption method provider of your 
+  choice)
 
 # Install
 - Enable Encrypt, Key, and an encryption method provider like Real AES
@@ -16,4 +19,5 @@ Salesforce Encrypt relies on [Encrypt](http://drupal.org/project/encrypt) to obf
 That's it - your tokens and identity are now encrypted.
 
 # Note
-As long as this module is enabled and encryption is not enabled, you'll get a runtime requirement error on admin/reports/status.
+As long as this module is enabled and encryption is not enabled, you'll get a 
+runtime requirement error on admin/reports/status.
diff --git a/modules/salesforce_encrypt/salesforce_encrypt.install b/modules/salesforce_encrypt/salesforce_encrypt.install
index a83ed71499dfdb421305f9aa81e473b8fc56895f..9f84836ed48954bc00196b295aac1c462e72410b 100644
--- a/modules/salesforce_encrypt/salesforce_encrypt.install
+++ b/modules/salesforce_encrypt/salesforce_encrypt.install
@@ -44,7 +44,9 @@ function salesforce_encrypt_requirements($phase) {
 }
 
 /**
- * Implements hook_uninstall to decrypt and purge our data.
+ * Implements hook_uninstall().
+ *
+ * Decrypt and purge our data.
  */
 function salesforce_encrypt_uninstall() {
   \Drupal::service('salesforce.client')->disableEncryption();
diff --git a/modules/salesforce_encrypt/src/Form/SettingsForm.php b/modules/salesforce_encrypt/src/Form/SettingsForm.php
index 3177d1076391293c2ec3b9f5bc59bcafa78e7401..a5595042f663f9a9320429ac12635ec0c7cbc9d3 100644
--- a/modules/salesforce_encrypt/src/Form/SettingsForm.php
+++ b/modules/salesforce_encrypt/src/Form/SettingsForm.php
@@ -98,13 +98,6 @@ class SettingsForm extends FormBase {
     return $form;
   }
 
-  /**
-   * {@inheritdoc}
-   */
-  public function validateForm(array &$form, FormStateInterface $form_state) {
-    parent::validateForm($form, $form_state);
-  }
-
   /**
    * {@inheritdoc}
    */
diff --git a/modules/salesforce_encrypt/src/Rest/EncryptedRestClientInterface.php b/modules/salesforce_encrypt/src/Rest/EncryptedRestClientInterface.php
index 49e1aa6475b876e9a89c5f16559ffe111cb1fcbd..e6a08f84fe798673e0df6d0a00eadccf73f6d61c 100644
--- a/modules/salesforce_encrypt/src/Rest/EncryptedRestClientInterface.php
+++ b/modules/salesforce_encrypt/src/Rest/EncryptedRestClientInterface.php
@@ -61,24 +61,24 @@ interface EncryptedRestClientInterface extends RestClientInterface {
   public function hookEncryptionProfileDelete(EncryptionProfileInterface $profile);
 
   /**
-   * Encrypts a value using the encryption profile given by salesforce_encrypt.profile.
+   * Encrypts a value using the active encryption profile, or return plaintext.
    *
    * @param string $value
    *   The value to encrypt.
    *
    * @return string
-   *   The encrypted value.
+   *   The encrypted value, or plaintext if no active profile.
    */
   public function encrypt($value);
 
   /**
-   * Decrypts a value using the encryption profile given by salesforce_encrypt.profile.
+   * Decrypts a value using active encryption profile, or return the same value.
    *
    * @param string $value
    *   The value to decrypt.
    *
    * @return string
-   *   The decrypted value.
+   *   The decrypted value, or the unchanged value if no active profile.
    */
   public function decrypt($value);
 
diff --git a/modules/salesforce_encrypt/src/Rest/RestClient.php b/modules/salesforce_encrypt/src/Rest/RestClient.php
index 2faa6ceede5900d2dd10e345da9e31397072e20b..307336ec3e3eec36ff6f91beb3b4f5efd1f9557b 100644
--- a/modules/salesforce_encrypt/src/Rest/RestClient.php
+++ b/modules/salesforce_encrypt/src/Rest/RestClient.php
@@ -3,7 +3,6 @@
 namespace Drupal\salesforce_encrypt\Rest;
 
 use Drupal\Component\Serialization\Json;
-use Drupal\Component\Utility\Unicode;
 use Drupal\Core\Cache\CacheBackendInterface;
 use Drupal\Core\Config\ConfigFactoryInterface;
 use Drupal\Core\Lock\LockBackendInterface;
diff --git a/modules/salesforce_encrypt/tests/src/Unit/RestClientTest.php b/modules/salesforce_encrypt/tests/src/Unit/RestClientTest.php
index e64cb8505c889e36f4a291ae89f399ed207cd362..d457d3237612ffb402db62c0a28927a3a4e9f50a 100644
--- a/modules/salesforce_encrypt/tests/src/Unit/RestClientTest.php
+++ b/modules/salesforce_encrypt/tests/src/Unit/RestClientTest.php
@@ -67,16 +67,16 @@ class RestClientTest extends UnitTestCase {
     $this->client = $this->getMockBuilder(RestClient::CLASS)
       ->setMethods(['doGetEncryptionProfile'])
       ->setConstructorArgs([
-          $this->httpClient,
-          $this->configFactory,
-          $this->state,
-          $this->cache,
-          $this->json,
-          $this->time,
-          $this->encryption,
-          $this->profileManager,
-          $this->lock
-        ])
+        $this->httpClient,
+        $this->configFactory,
+        $this->state,
+        $this->cache,
+        $this->json,
+        $this->time,
+        $this->encryption,
+        $this->profileManager,
+        $this->lock,
+      ])
       ->getMock();
   }
 
diff --git a/modules/salesforce_example/salesforce_example.module b/modules/salesforce_example/salesforce_example.module
index 2053ec71eb84d394382e2f9ea71f2aef97057d31..900f99e59b3e8a416d7857c9f321172033383b79 100644
--- a/modules/salesforce_example/salesforce_example.module
+++ b/modules/salesforce_example/salesforce_example.module
@@ -26,7 +26,7 @@ function salesforce_example_help($route_name, RouteMatchInterface $route_match)
 }
 
 /**
- * Implementation of hook_entity_insert()
+ * Implements 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.
@@ -36,7 +36,7 @@ function salesforce_example_entity_insert(EntityInterface $entity) {
 }
 
 /**
- * Implementation of hook_entity_update()
+ * Implements 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.
@@ -46,7 +46,7 @@ function salesforce_example_entity_update(EntityInterface $entity) {
 }
 
 /**
- * Implementation of hook_entity_delete()
+ * Implements 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.
@@ -64,13 +64,15 @@ function salesforce_example_entity_delete(EntityInterface $entity) {
  * - salesforce_example_entity_delete (hook_entity_delete)
  *
  * In this example we are doing some work with Drupal Commerce entities,
- * specifically products (commerce_product) and product variations (commerce_product_variation)
+ * specifically products (commerce_product) and product variations
+ * (commerce_product_variation)
  *
- * If you're not familiar with Drupal Commerce object relationships, all you need to know is
- * that Products are umbrella entities around Product Variations.  Products have Product Variatinos.
- * So if you have a Drupal T-Shirt in sizes S,M,L,XL, the Product is "Drupal T-Shirt" and you
- * will have four Product Variations, one for each size.  The Product object will have entity references
- * to each Product Variation.
+ * If you're not familiar with Drupal Commerce object relationships, all you
+ * need to know is that Products are umbrella entities around Product
+ * Variations.  Products have Product Variatinos. So if you have a Drupal
+ * T-Shirt in sizes S,M,L,XL, the Product is "Drupal T-Shirt" and you will have
+ * four Product Variations, one for each size.  The Product object will have
+ * entity references to each Product Variation.
  */
 function _salesforce_example_entity_manage(EntityInterface &$entity, $op) {
 
@@ -82,10 +84,12 @@ function _salesforce_example_entity_manage(EntityInterface &$entity, $op) {
       ->getStorage('salesforce_mapped_object');
   }
 
-  // We're performing a check to see if we're dealing with a Salesforce Mapped Object.  The reason
-  // we do this instead of just checking to see if we're dealing with a Commerce Product Variation is that
-  // 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.
+  // We're performing a check to see if we're dealing with a Salesforce Mapped
+  // Object.  The reason we do this instead of just checking to see if we're
+  // dealing with a Commerce Product Variation is that 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') {
 
     /** @var \Drupal\salesforce_mapping\Entity\MappedObject $entity */
@@ -94,7 +98,8 @@ function _salesforce_example_entity_manage(EntityInterface &$entity, $op) {
       return;
     }
 
-    // Here we check to see if the entity that the SFDC Mapping Object dealt with was a Commerce Product
+    // Here we check to see if the entity that the SFDC Mapping Object dealt
+    // with was a Commerce Product
     // Variation.
     if ($mapped_entity->getEntityTypeId() == 'commerce_product_variation') {
       /** @var \Drupal\salesforce\SObject $sf */
@@ -102,24 +107,27 @@ function _salesforce_example_entity_manage(EntityInterface &$entity, $op) {
 
       if ($sf != NULL) {
 
-        // We are operating under the assumption that the parent Commerce Product object is also being
-        // managed by the SFDC integration.  Therefore we will be able to load the object by leveraging
-        // 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,
-        // conveniently mirroring the Drupal Commerce model)
+        // We are operating under the assumption that the parent Commerce
+        // Product object is also being managed by the SFDC integration.
+        // Therefore we will be able to load the object by leveraging 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,  conveniently mirroring the Drupal
+        // Commerce model).
         $course_sfdc_id = $sf->field('Parent_Product__c');
 
         // 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 prodct object
-          // and that it will be the first item in the returned array.
+          // We are lazily assuming that there will only be one corresponding
+          // prodct 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 */
@@ -130,13 +138,14 @@ function _salesforce_example_entity_manage(EntityInterface &$entity, $op) {
           /** @var \Drupal\commerce_product\Entity\Product $product */
           $product = $mgr->load($course->id());
 
-          // If this is a deletion of a Product Variation, we need to remove the reference to the variation
-          // from the Commerce Product.
+          // If this is a deletion of a Product Variation, we need to remove the
+          // reference to the variation  from the Commerce Product.
           if ($op == 'delete') {
             $product->removeVariation($mapped_entity);
           }
 
-          // Otherwise we need to add the reference to the Product Variation that was just inserted or updated.
+          // Otherwise we need to add the reference to the Product Variation
+          // that was just inserted or updated.
           else {
             $product->addVariation($mapped_entity);
           }
diff --git a/modules/salesforce_example/src/EventSubscriber/SalesforceExampleSubscriber.php b/modules/salesforce_example/src/EventSubscriber/SalesforceExampleSubscriber.php
index 8bb22ba36f8a98f2b8a94914f68a64434fde1a68..c8389b57c8f5147fdb41e27bdaec7a5d31d01ed6 100644
--- a/modules/salesforce_example/src/EventSubscriber/SalesforceExampleSubscriber.php
+++ b/modules/salesforce_example/src/EventSubscriber/SalesforceExampleSubscriber.php
@@ -98,7 +98,8 @@ class SalesforceExampleSubscriber implements EventSubscriberInterface {
     $mapping = $event->getMapping();
     switch ($mapping->id()) {
       case 'contact':
-        // Add attachments to the Contact pull mapping so that we can save profile pics. See also ::pullPresave.
+        // Add attachments to the Contact pull mapping so that we can save
+        // profile pics. See also ::pullPresave.
         $query = $event->getQuery();
         // Add a subquery:
         $query->fields[] = "(SELECT Id FROM Attachments WHERE Name = 'example.jpg' LIMIT 1)";
diff --git a/modules/salesforce_logger/src/EventSubscriber/SalesforceLoggerSubscriber.php b/modules/salesforce_logger/src/EventSubscriber/SalesforceLoggerSubscriber.php
index de819637aee887c7be0e63222c11ddda90c0d2a3..e8b23b985d9453e8d964f933e82e85b4843e437f 100644
--- a/modules/salesforce_logger/src/EventSubscriber/SalesforceLoggerSubscriber.php
+++ b/modules/salesforce_logger/src/EventSubscriber/SalesforceLoggerSubscriber.php
@@ -50,7 +50,8 @@ class SalesforceLoggerSubscriber implements EventSubscriberInterface {
   public function salesforceException(SalesforceExceptionEventInterface $event) {
     $log_level_setting = \Drupal::configFactory()->get('salesforce_logger.settings')->get('log_level');
     $event_level = $event->getLevel();
-    // Only log events whose log level is greater or equal to min log level setting.
+    // Only log events whose log level is greater or equal to min log level
+    // setting.
     if ($log_level_setting != SalesforceEvents::NOTICE) {
       if ($log_level_setting == SalesforceEvents::ERROR && $event_level != SalesforceEvents::ERROR) {
         return;
diff --git a/modules/salesforce_logger/src/Form/SettingsForm.php b/modules/salesforce_logger/src/Form/SettingsForm.php
index c6f73ed492f3e9b7574ce17329ad1d3decfd61f4..076ece83c54d01a79d329df3bcdcc99a9fc8c1d6 100644
--- a/modules/salesforce_logger/src/Form/SettingsForm.php
+++ b/modules/salesforce_logger/src/Form/SettingsForm.php
@@ -41,7 +41,7 @@ class SettingsForm extends ConfigFormBase {
         SalesforceEvents::WARNING => $this->t('Log warnings and errors'),
         SalesforceEvents::NOTICE => $this->t('Log all salesforce events'),
       ],
-      '#default_value' => $config->get('log_level')
+      '#default_value' => $config->get('log_level'),
     ];
 
     $form = parent::buildForm($form, $form_state);
diff --git a/modules/salesforce_mapping/salesforce_mapping.drush.inc b/modules/salesforce_mapping/salesforce_mapping.drush.inc
index 60658c3b640a26a0815b9e0865009aca7c963794..22b7a7a56f8fee9a49300df94228a7bb830ddeb8 100644
--- a/modules/salesforce_mapping/salesforce_mapping.drush.inc
+++ b/modules/salesforce_mapping/salesforce_mapping.drush.inc
@@ -21,28 +21,28 @@ function salesforce_mapping_drush_command() {
     'description' => 'Clean up Mapped Objects table by deleting any records which reference missing Drupal entities.',
     'aliases' => ['sfpd'],
     'options' => [
-      'mapping' => 'Given a mapping id, limit purge to only those referenced.'
+      'mapping' => 'Given a mapping id, limit purge to only those referenced.',
     ],
   ];
   $items['sf-purge-salesforce'] = [
     'description' => 'Clean up Mapped Objects table by deleting any records which reference missing Salesforce records.',
     'aliases' => ['sfpsf'],
     'options' => [
-      'mapping' => 'Given a mapping id, limit purge to only those referenced.'
+      'mapping' => 'Given a mapping id, limit purge to only those referenced.',
     ],
   ];
   $items['sf-purge-mapping'] = [
     'description' => 'Clean up Mapped Objects table by deleting any records which reference missing Mappings.',
     'aliases' => ['sfpmap'],
     'options' => [
-      'mapping' => 'Given a mapping id, limit purge to only those referenced.'
+      'mapping' => 'Given a mapping id, limit purge to only those referenced.',
     ],
   ];
   $items['sf-purge-all'] = [
     'description' => 'Clean up Mapped Objects table by deleting any records which reference missing Mappings, Entities, or Salesforce records.',
     'aliases' => ['sfpall'],
     'options' => [
-      'mapping' => 'Given a mapping id, limit purge to only those referenced.'
+      'mapping' => 'Given a mapping id, limit purge to only those referenced.',
     ],
   ];
   return $items;
diff --git a/modules/salesforce_mapping/salesforce_mapping.install b/modules/salesforce_mapping/salesforce_mapping.install
index 5806aedb666a8f7ea322ed01886ea6cac77f7255..3a843dacecbb364c081ff8bf31e4182ec9fc88fa 100644
--- a/modules/salesforce_mapping/salesforce_mapping.install
+++ b/modules/salesforce_mapping/salesforce_mapping.install
@@ -75,7 +75,7 @@ function salesforce_mapping_update_8002() {
 }
 
 /**
- * Add new "always_upsert" field to all existing mappings which have an upsert key, to preserve old behavior.
+ * Add new "always_upsert" field to all existing mappings.
  */
 function salesforce_mapping_update_8003() {
   foreach (SalesforceMapping::loadMultiple() as $mapping) {
diff --git a/modules/salesforce_mapping/src/Commands/SalesforceMappingCommands.php b/modules/salesforce_mapping/src/Commands/SalesforceMappingCommands.php
index 4bb541d871f2bc020036d61b6316ed0ab90d3b0c..288af9a0c96c9eb5a791100c3b1edf5276e29266 100644
--- a/modules/salesforce_mapping/src/Commands/SalesforceMappingCommands.php
+++ b/modules/salesforce_mapping/src/Commands/SalesforceMappingCommands.php
@@ -156,7 +156,7 @@ class SalesforceMappingCommands extends SalesforceCommandsBase {
   }
 
   /**
-   * Clean up Mapped Objects table by deleting any records which reference missing Drupal entities.
+   * Clean up Mapped Objects referencing missing Drupal entities.
    *
    * @param string $name
    *   Id of the salesforce mapping whose mapped objects should be purged.
@@ -239,7 +239,7 @@ class SalesforceMappingCommands extends SalesforceCommandsBase {
   }
 
   /**
-   * Clean up Mapped Objects table by deleting any records which reference missing Salesforce records.
+   * Clean up Mapped Objects by deleting records referencing missing records.
    *
    * @param string $name
    *   Id of the salesforce mapping whose mapped objects should be purged.
@@ -312,7 +312,7 @@ class SalesforceMappingCommands extends SalesforceCommandsBase {
   }
 
   /**
-   * Clean up Mapped Objects table by deleting any records which reference missing Mappings.
+   * Clean up Mapped Objects by deleting records referencing missing Mappings.
    *
    * @param string $name
    *   Mapping id.
diff --git a/modules/salesforce_mapping/src/Controller/MappedObjectController.php b/modules/salesforce_mapping/src/Controller/MappedObjectController.php
index 03bc2e9640cc1c413d7976dc4a81aad577dc00fb..57c85969cdf3ea0e67566a8d7bb540e5d1ce60fd 100644
--- a/modules/salesforce_mapping/src/Controller/MappedObjectController.php
+++ b/modules/salesforce_mapping/src/Controller/MappedObjectController.php
@@ -39,7 +39,7 @@ class MappedObjectController extends ControllerBase {
   }
 
   /**
-   * Helper function to get entity from router path e.g. get User from user/1/salesforce.
+   * Helper function to get entity from router path.
    *
    * @param \Drupal\Core\Routing\RouteMatchInterface $route_match
    *   The route match service.
@@ -47,7 +47,7 @@ class MappedObjectController extends ControllerBase {
    * @return \Drupal\Core\Entity\EntityInterface
    *   The Drupal entity mapped by the given mapped object.
    *
-   * @throws Exception
+   * @throws \Exception
    *   If an EntityInterface is not found at the given route.
    *
    * @TODO find a more specific exception class
diff --git a/modules/salesforce_mapping/src/Entity/MappedObject.php b/modules/salesforce_mapping/src/Entity/MappedObject.php
index 11880ebae187b41c39b66c3b00e727f58d6f7d07..269eb9fb87c25994730cc786b824f6f7a56c4144 100644
--- a/modules/salesforce_mapping/src/Entity/MappedObject.php
+++ b/modules/salesforce_mapping/src/Entity/MappedObject.php
@@ -378,7 +378,8 @@ class MappedObject extends RevisionableContentEntityBase implements MappedObject
 
     // @TODO is this the right place for this logic to live?
     // Cases:
-    // 1. Already mapped to an existing Salesforce object + always_upsert not set?  Update.
+    // 1. Already mapped to an existing Salesforce object + always_upsert not
+    //    set?  Update.
     // 2. Not mapped, but upsert key is defined?  Upsert.
     // 3. Not mapped & no upsert key?  Create.
     $result = FALSE;
diff --git a/modules/salesforce_mapping/src/Event/SalesforceQueryEvent.php b/modules/salesforce_mapping/src/Event/SalesforceQueryEvent.php
index 0c9f1abf02709cfba67569716481221b8497fd74..10231dd382f3a4b34c6f26675fe55e2058a15c85 100644
--- a/modules/salesforce_mapping/src/Event/SalesforceQueryEvent.php
+++ b/modules/salesforce_mapping/src/Event/SalesforceQueryEvent.php
@@ -2,7 +2,6 @@
 
 namespace Drupal\salesforce_mapping\Event;
 
-use Drupal\salesforce\SelectQuery;
 use Drupal\salesforce\SelectQueryInterface;
 use Drupal\salesforce_mapping\Entity\SalesforceMappingInterface;
 use Drupal\salesforce\Event\SalesforceBaseEvent;
diff --git a/modules/salesforce_mapping/src/Form/MappedObjectForm.php b/modules/salesforce_mapping/src/Form/MappedObjectForm.php
index e3ded26c11dd8b88f369fa91579a043e41dca63e..c75199f83766a57724260ba6fbd84f335ac6edb1 100644
--- a/modules/salesforce_mapping/src/Form/MappedObjectForm.php
+++ b/modules/salesforce_mapping/src/Form/MappedObjectForm.php
@@ -180,7 +180,7 @@ class MappedObjectForm extends ContentEntityForm {
     $mapped_object
       ->set('drupal_entity', $drupal_entity_array)
       ->set('salesforce_mapping', $form_state->getValue([
-        'salesforce_mapping', 0, 'target_id'
+        'salesforce_mapping', 0, 'target_id',
       ]));
 
     if ($sfid = $form_state->getValue(['salesforce_id', 0, 'value'], FALSE)) {
diff --git a/modules/salesforce_mapping/src/Form/SalesforceMappingFieldsForm.php b/modules/salesforce_mapping/src/Form/SalesforceMappingFieldsForm.php
index 995b2ad8eeec542a9432098c2347fad4ae55f966..c9b8e0f27e0501e3989bbd1c0a9e2f2f14dbf299 100644
--- a/modules/salesforce_mapping/src/Form/SalesforceMappingFieldsForm.php
+++ b/modules/salesforce_mapping/src/Form/SalesforceMappingFieldsForm.php
@@ -258,7 +258,8 @@ class SalesforceMappingFieldsForm extends SalesforceMappingFormBase {
    * 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.
+    // Need to transform the schema slightly to remove the "config" dereference.
+    // Also trigger submit handlers on plugins.
     $form_state->unsetValue(['field_type', 'ops']);
 
     $values = &$form_state->getValues();
diff --git a/modules/salesforce_mapping/src/Form/SalesforceMappingFormCrudBase.php b/modules/salesforce_mapping/src/Form/SalesforceMappingFormCrudBase.php
index f1a7c052d755f867a639e6df2e7c9a87d30e913e..7a3531c86f6d82a6e98039971af88edb22e064ee 100644
--- a/modules/salesforce_mapping/src/Form/SalesforceMappingFormCrudBase.php
+++ b/modules/salesforce_mapping/src/Form/SalesforceMappingFormCrudBase.php
@@ -2,8 +2,6 @@
 
 namespace Drupal\salesforce_mapping\Form;
 
-use Drupal\Core\Ajax\AjaxResponse;
-use Drupal\Core\Ajax\ReplaceCommand;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\salesforce_mapping\MappingConstants;
 use Drupal\Core\Url;
@@ -26,7 +24,8 @@ abstract class SalesforceMappingFormCrudBase extends SalesforceMappingFormBase {
    * {@inheritdoc}
    */
   public function buildForm(array $form, FormStateInterface $form_state) {
-    // Perform our salesforce queries first, so that if we can't connect we don't waste time on the rest of the form.
+    // Perform our salesforce queries first, so that if we can't connect we
+    // don't waste time on the rest of the form.
     try {
       $object_type_options = $this->getSalesforceObjectTypeOptions();
     }
@@ -175,7 +174,7 @@ abstract class SalesforceMappingFormCrudBase extends SalesforceMappingFormBase {
       $form['pull'] = [
         '#title' => t('Pull Settings'),
         '#type' => 'details',
-        '#description' => t(''),
+        '#description' => '',
         '#open' => TRUE,
         '#tree' => FALSE,
         '#states' => [
@@ -212,8 +211,6 @@ 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'] = [
diff --git a/modules/salesforce_mapping/src/MappedObjectStorage.php b/modules/salesforce_mapping/src/MappedObjectStorage.php
index c197eb7b300b62fc609e4d404be8026b41d2baa2..a644f25b56c6dbe6dff3d09542c7b027e0e08257 100644
--- a/modules/salesforce_mapping/src/MappedObjectStorage.php
+++ b/modules/salesforce_mapping/src/MappedObjectStorage.php
@@ -117,7 +117,7 @@ class MappedObjectStorage extends SqlContentEntityStorage {
     $result = $this->loadByProperties([
       'drupal_entity__target_type' => $entity->getEntityTypeId(),
       'drupal_entity__target_id' => $entity->id(),
-      'salesforce_mapping' => $mapping->id()
+      'salesforce_mapping' => $mapping->id(),
     ]);
     return empty($result) ? NULL : reset($result);
   }
diff --git a/modules/salesforce_mapping/src/Plugin/Field/FieldType/SalesforceLinkItem.php b/modules/salesforce_mapping/src/Plugin/Field/FieldType/SalesforceLinkItem.php
index 314a38d7c7be80cf2bc04ac03d0d69570f7a24bb..5d9ad6fa32bca6c74fc229580476edd84b027467 100644
--- a/modules/salesforce_mapping/src/Plugin/Field/FieldType/SalesforceLinkItem.php
+++ b/modules/salesforce_mapping/src/Plugin/Field/FieldType/SalesforceLinkItem.php
@@ -13,7 +13,12 @@ use Drupal\salesforce_mapping\Plugin\Field\CalculatedLinkItemBase;
  *   description = @Translation("A link to the salesforce record."),
  *   default_widget = "link_default",
  *   default_formatter = "link",
- *   constraints = {"LinkType" = {}, "LinkAccess" = {}, "LinkExternalProtocols" = {}, "LinkNotExistingInternal" = {}}
+ *   constraints = {
+ *     "LinkType" = {},
+ *     "LinkAccess" = {},
+ *     "LinkExternalProtocols" = {},
+ *     "LinkNotExistingInternal" = {}
+ *   }
  * )
  */
 class SalesforceLinkItem extends CalculatedLinkItemBase {
diff --git a/modules/salesforce_mapping/src/Plugin/SalesforceMappingField/Broken.php b/modules/salesforce_mapping/src/Plugin/SalesforceMappingField/Broken.php
index 3f4234db92b78d5cb79f8560ec0787cc5d23f413..d220178ca493419fa71370640757d6dbddb99176 100644
--- a/modules/salesforce_mapping/src/Plugin/SalesforceMappingField/Broken.php
+++ b/modules/salesforce_mapping/src/Plugin/SalesforceMappingField/Broken.php
@@ -50,7 +50,7 @@ class Broken extends SalesforceMappingFieldPluginBase {
    * {@inheritdoc}
    */
   public function value(EntityInterface $entity, SalesforceMappingInterface $mapping) {
-    return;
+
   }
 
   /**
diff --git a/modules/salesforce_mapping/src/Plugin/SalesforceMappingField/RelatedIDs.php b/modules/salesforce_mapping/src/Plugin/SalesforceMappingField/RelatedIDs.php
index 72db3ec3134b0e5f9316e1c49c7f192fbd92b54e..144b0d2f626c26139f96020f4858d5b449aff7c4 100644
--- a/modules/salesforce_mapping/src/Plugin/SalesforceMappingField/RelatedIDs.php
+++ b/modules/salesforce_mapping/src/Plugin/SalesforceMappingField/RelatedIDs.php
@@ -64,7 +64,8 @@ class RelatedIDs extends SalesforceMappingFieldPluginBase {
 
     $field = $entity->get($field_name);
     if (empty($field->getValue()) || is_null($field->entity)) {
-      // This reference field is blank or the referenced entity no longer exists.
+      // This reference field is blank or the referenced entity no longer
+      // exists.
       return;
     }
 
diff --git a/modules/salesforce_mapping/src/Plugin/Validation/Constraint/MappingEntityConstraint.php b/modules/salesforce_mapping/src/Plugin/Validation/Constraint/MappingEntityConstraint.php
index cbdf5934a6dbcc11679fe90f6da670cd74d44ecb..25dd5014c5fb9b920aaf997f68d7c3db1b1269b9 100644
--- a/modules/salesforce_mapping/src/Plugin/Validation/Constraint/MappingEntityConstraint.php
+++ b/modules/salesforce_mapping/src/Plugin/Validation/Constraint/MappingEntityConstraint.php
@@ -18,12 +18,12 @@ class MappingEntityConstraint extends UniqueFieldsConstraint {
    */
   public function __construct($options = NULL) {
     $options = [
-    'fields' => [
-      "drupal_entity.target_type",
-      "drupal_entity.target_id",
-      "salesforce_mapping"
-    ]
-];
+      'fields' => [
+        "drupal_entity.target_type",
+        "drupal_entity.target_id",
+        "salesforce_mapping",
+      ],
+    ];
     parent::__construct($options);
   }
 
diff --git a/modules/salesforce_mapping/src/Routing/RouteSubscriber.php b/modules/salesforce_mapping/src/Routing/RouteSubscriber.php
index 3d79c28f2250af2ac6ce716853c4eae4a31c158a..967027b3b2608f9c496415d5714416979e6efbd0 100644
--- a/modules/salesforce_mapping/src/Routing/RouteSubscriber.php
+++ b/modules/salesforce_mapping/src/Routing/RouteSubscriber.php
@@ -7,7 +7,6 @@ use Drupal\Core\Routing\RouteSubscriberBase;
 use Drupal\Core\Routing\RoutingEvents;
 use Symfony\Component\Routing\Route;
 use Symfony\Component\Routing\RouteCollection;
-use Drupal\salesforce_mapping\SalesforceMappableEntityTypesInterface;
 
 /**
  * Listens to the dynamic route events.
@@ -42,12 +41,14 @@ class RouteSubscriber extends RouteSubscriberBase {
    */
   protected function alterRoutes(RouteCollection $collection) {
     foreach ($this->entityTypeManager->getDefinitions() as $entity_type_id => $entity_type) {
-      // If the entity didn't get a salesforce link template added by hook_entity_types_alter, skip it.
+      // If the entity didn't get a salesforce link template added by
+      // hook_entity_types_alter(), skip it.
       if (!($path = $entity_type->getLinkTemplate('salesforce'))) {
         continue;
       }
 
-      // Create the "listing" route to show all the mapped objects for this entity.
+      // Create the "listing" route to show all the mapped objects for this
+      // entity.
       $route = new Route($path);
       $route
         ->addDefaults([
diff --git a/modules/salesforce_mapping/src/SalesforceMappingFieldPluginBase.php b/modules/salesforce_mapping/src/SalesforceMappingFieldPluginBase.php
index 86bb1b9aae9898d90bf75b1cfc8fc2d86d47634f..60880e8ecfe199be8d4536c40a7e1990491a1ce3 100644
--- a/modules/salesforce_mapping/src/SalesforceMappingFieldPluginBase.php
+++ b/modules/salesforce_mapping/src/SalesforceMappingFieldPluginBase.php
@@ -28,8 +28,8 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface;
 /**
  * Defines a base Salesforce Mapping Field Plugin implementation.
  *
- * Extenders need to implement SalesforceMappingFieldPluginInterface::value() and
- * PluginFormInterface::buildConfigurationForm().
+ * Extenders need to implement SalesforceMappingFieldPluginInterface::value()
+ * and PluginFormInterface::buildConfigurationForm().
  *
  * @see \Drupal\salesforce_mapping\SalesforceMappingFieldPluginInterface
  * @see \Drupal\Core\Plugin\PluginFormInterface
@@ -393,8 +393,6 @@ abstract class SalesforceMappingFieldPluginBase extends PluginBase implements Sa
       '#title' => t('Salesforce field'),
       '#type' => 'select',
       '#description' => t('Select a Salesforce field to map.'),
-      // @TODO MULTIPLE SF FIELDS FOR ONE MAPPING FIELD NOT IN USE:
-      // '#multiple' => (isset($drupal_field_type['salesforce_multiple_fields']) && $drupal_field_type['salesforce_multiple_fields']) ? TRUE : FALSE,
       '#options' => $this->getSalesforceFieldOptions($form['#entity']->getSalesforceObjectType()),
       '#default_value' => $this->config('salesforce_field'),
       '#empty_option' => $this->t('- Select -'),
diff --git a/modules/salesforce_mapping/src/SalesforceMappingFieldPluginInterface.php b/modules/salesforce_mapping/src/SalesforceMappingFieldPluginInterface.php
index 6df403be8bc7871a0a129f23fcb4e70b1608fefc..5221c2f14e10ca75c550de87b328b0e9a7593dd7 100644
--- a/modules/salesforce_mapping/src/SalesforceMappingFieldPluginInterface.php
+++ b/modules/salesforce_mapping/src/SalesforceMappingFieldPluginInterface.php
@@ -131,7 +131,9 @@ interface SalesforceMappingFieldPluginInterface {
   public function pull();
 
   /**
-   * Return an array of dependencies, compatible with \Drupal\Component\Plugin\DependentPluginInterface::calculateDependencies.
+   * Return an array of dependencies.
+   *
+   * Compatible with DependentPluginInterface::calculateDependencies().
    *
    * @return array
    *   Depdencies.
diff --git a/modules/salesforce_mapping/src/SalesforceMappingList.php b/modules/salesforce_mapping/src/SalesforceMappingList.php
index 4480377342578e6270fd3607423b4eab8719f4b7..09ea98d0f147212b8ea7720f56a8c70572b7084c 100644
--- a/modules/salesforce_mapping/src/SalesforceMappingList.php
+++ b/modules/salesforce_mapping/src/SalesforceMappingList.php
@@ -40,7 +40,7 @@ class SalesforceMappingList extends DraggableListBuilder {
     $properties = [
       'drupal_entity_type',
       'drupal_bundle',
-      'salesforce_object_type'
+      'salesforce_object_type',
     ];
     foreach ($properties as $property) {
       $row[$property] = ['#markup' => $entity->get($property)];
diff --git a/modules/salesforce_mapping/src/Tests/SalesforceMappingCrudFormTest.php b/modules/salesforce_mapping/src/Tests/SalesforceMappingCrudFormTest.php
index 9e8a0c55b0f3b587bf230678956b82143856a277..6d172a3bc12a016e4e4cf76de69e22d1ca1e89ee 100644
--- a/modules/salesforce_mapping/src/Tests/SalesforceMappingCrudFormTest.php
+++ b/modules/salesforce_mapping/src/Tests/SalesforceMappingCrudFormTest.php
@@ -58,7 +58,8 @@ class SalesforceMappingCrudFormTest extends WebTestBase {
     $this->drupalPostForm('admin/structure/salesforce/mappings/add', $post, t('Save'));
     $newurl = parse_url($this->getUrl());
 
-    // Make sure the redirect was correct (and therefore form was submitted successfully)
+    // Make sure the redirect was correct (and therefore form was submitted
+    // successfully).
     $this->assertEqual($newurl['path'], $base_path . 'admin/structure/salesforce/mappings/manage/' . $mapping_name . '/fields');
     $mapping = $mappingStorage->load($mapping_name);
     // Make sure mapping was saved correctly.
@@ -77,9 +78,9 @@ class SalesforceMappingCrudFormTest extends WebTestBase {
     $this->drupalPostForm('admin/structure/salesforce/mappings/manage/' . $mapping_name, $post, t('Save'));
     $this->assertFieldByName('label', $post['label']);
 
-    /* Salesforce Mapping Fields Form */
-    // Test simply adding a field plugin of every possible type.
-    // This is not great coverage, but will at least make sure our plugin definitions don't cause fatal errors.
+    // Test simply adding a field plugin of every possible type. This is not
+    // great coverage, but will at least make sure our plugin definitions don't
+    // cause fatal errors.
     $mappingFieldsPluginManager = \Drupal::service('plugin.manager.salesforce_mapping_field');
     $field_plugins = $mappingFieldsPluginManager->getDefinitions();
     foreach ($field_plugins as $definition) {
diff --git a/modules/salesforce_mapping/tests/src/Unit/ClassesNotTested.txt b/modules/salesforce_mapping/tests/src/Unit/ClassesNotTested.txt
index 340a46a9e6ab679aea0603dc5b9addc61485d5ce..7f533a6cb06173da4f1180d6a8056038293c7c93 100644
--- a/modules/salesforce_mapping/tests/src/Unit/ClassesNotTested.txt
+++ b/modules/salesforce_mapping/tests/src/Unit/ClassesNotTested.txt
@@ -1,5 +1,6 @@
 MappedObjectAccessControlHandler - no significant logic
-MappedObjectStorageSchema - no significant logic (MappedObjectStorageSchema::getEntitySchema decorates tested parent method)
+MappedObjectStorageSchema - no significant logic
+  (MappedObjectStorageSchema::getEntitySchema decorates tested parent method)
 MappingConstants - nothing but constants - nothing to test
 PushParams - no significant logic (all get methods)
 SalesforceCrudEvent - no significant logic (all get methods)
diff --git a/modules/salesforce_mapping/tests/src/Unit/SalesforceMappingStorageTest.php b/modules/salesforce_mapping/tests/src/Unit/SalesforceMappingStorageTest.php
index f3032694dd50323ef314c6ca9d3aa4d08c30a58e..83c44d28710a521648298067137d02c8cbb01b7c 100644
--- a/modules/salesforce_mapping/tests/src/Unit/SalesforceMappingStorageTest.php
+++ b/modules/salesforce_mapping/tests/src/Unit/SalesforceMappingStorageTest.php
@@ -5,9 +5,7 @@ namespace Drupal\Tests\salesforce_mapping\Unit;
 use Drupal\Component\Uuid\UuidInterface;
 use Drupal\Core\Config\ConfigFactoryInterface;
 use Drupal\Core\Config\Entity\ConfigEntityType;
-use Drupal\Core\DependencyInjection\ContainerBuilder;
 use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\EntityManagerInterface;
 use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Core\Language\LanguageManagerInterface;
 use Drupal\salesforce_mapping\Entity\SalesforceMapping;
diff --git a/modules/salesforce_pull/src/Commands/SalesforcePullCommands.php b/modules/salesforce_pull/src/Commands/SalesforcePullCommands.php
index 7d795b0a72192a7658342777354dce647704e66f..2b180bbbbbd4f422d5eee8d0c78a5615405a8113 100644
--- a/modules/salesforce_pull/src/Commands/SalesforcePullCommands.php
+++ b/modules/salesforce_pull/src/Commands/SalesforcePullCommands.php
@@ -115,26 +115,37 @@ class SalesforcePullCommands extends SalesforceCommandsBase {
    * @param string $name
    *   Machine name of the Salesforce Mapping for which to queue pull records.
    * @param array $options
-   *   An associative array of options whose values come from cli, aliases, config, etc.
+   *   An associative array of options whose values come from cli, aliases,
+   *   config, etc.
    *
    * @option where
-   *   A WHERE clause to add to the SOQL pull query. Default behavior is to query and pull all records.
+   *   A WHERE clause to add to the SOQL pull query. Default behavior is to
+   *   query and pull all records.
    * @option start
-   *   strtotime()able string for the start timeframe over which to pull, e.g. "-5 hours". If omitted, use the value given by the mapping's pull timestamp. Must be in the past.
+   *   strtotime()able string for the start timeframe over which to pull, e.g.
+   *   "-5 hours". If omitted, use the value given by the mapping's pull
+   *   timestamp. Must be in the past.
    * @option stop
-   *   strtotime()able string for the end timeframe over which to pull, e.g. "-5 hours". If omitted, defaults to "now". Must be "now" or earlier
+   *   strtotime()able string for the end timeframe over which to pull, e.g.
+   *   "-5 hours". If omitted, defaults to "now". Must be "now" or earlier.
    * @option force-pull
-   *   if given, force all queried records to be pulled regardless of updated timestamps. If omitted, only Salesforce records which are newer than linked Drupal records will be pulled.
+   *   if given, force all queried records to be pulled regardless of updated
+   *   timestamps. If omitted, only Salesforce records which are newer than
+   *   linked Drupal records will be pulled.
    * @usage drush sfpq user
    *   Query and queue all records for "user" Salesforce mapping.
-   * @usage drush sfpq user --where="Email like '%foo%' AND (LastName = 'bar' OR FirstName = 'bar')"
-   *   Query and queue all records for "user" Salesforce mapping with Email field containing the string "foo" and First or Last name equal to "bar"
+   * @usage drush sfpq user --where="Email like '%foo%' AND (LastName = 'bar'
+   *   OR FirstName = 'bar')"
+   *   Query and queue all records for "user" Salesforce mapping with Email
+   *   field containing the string "foo" and First or Last name equal to "bar"
    * @usage drush sfpq
    *   Fetch and process all pull queue items
    * @usage drush sfpq --start="-25 minutes" --stop="-5 minutes"
-   *   Fetch updated records for all mappings between 25 minutes and 5 minutes old, and process them.
+   *   Fetch updated records for all mappings between 25 minutes and 5 minutes
+   *   old, and process them.
    * @usage drush sfpq foo --start="-25 minutes" --stop="-5 minutes"
-   *   Fetch updated records for mapping "foo" between 25 minutes and 5 minutes old, and process them.
+   *   Fetch updated records for mapping "foo" between 25 minutes and 5 minutes
+   *   old, and process them.
    *
    * @command salesforce_pull:pull-query
    * @aliases sfpq,sfiq,sf-pull-query,salesforce_pull:query
@@ -170,7 +181,7 @@ class SalesforcePullCommands extends SalesforceCommandsBase {
 
       $this->logger()->info(dt('!mapping: Issuing pull query: !query', [
         '!query' => (string) $soql,
-        '!mapping' => $mapping->id()
+        '!mapping' => $mapping->id(),
       ]));
       $results = $this->client->query($soql);
 
@@ -183,13 +194,16 @@ class SalesforcePullCommands extends SalesforceCommandsBase {
 
       $this->logger()->info(dt('!mapping: Queued !count items for pull.', [
         '!count' => $results->size(),
-        '!mapping' => $mapping->id()
+        '!mapping' => $mapping->id(),
       ]));
     }
   }
 
   /**
-   * Given a mapping, enqueue a list of object IDs to be pulled from a CSV file, e.g. a Salesforce report. The first column of the CSV file must be SFIDs. Additional columns will be ignored.
+   * Given a mapping, enqueue a list of object IDs to be pulled from CSV file.
+   *
+   * E.g. a Salesforce report. The first column of the CSV file must be SFIDs.
+   * Additional columns will be ignored.
    *
    * @param string $file
    *   CSV file name of 15- or 18-character Salesforce ids to be pulled.
@@ -218,10 +232,10 @@ class SalesforcePullCommands extends SalesforceCommandsBase {
     // Track IDs to avoid duplicates.
     $seen = [];
 
-    // Max length for SOQL query is 20,000 characters. Chunk the IDs into smaller
-    // units to avoid this limit. 1000 IDs per query * 18 chars per ID = up to
-    // 18000 characters per query, plus up to 2000 for fields, where condition,
-    // etc.
+    // Max length for SOQL query is 20,000 characters. Chunk the IDs into
+    // smaller units to avoid this limit. 1000 IDs per query * 18 chars per ID,
+    // up to 18000 characters per query, plus up to 2000 for fields, where
+    // condition, etc.
     $queries = [];
     foreach (array_chunk($rows, 1000) as $i => $chunk) {
       $base = $i * 1000;
@@ -288,12 +302,13 @@ class SalesforcePullCommands extends SalesforceCommandsBase {
   }
 
   /**
-   * Reset pull timestamps for one or all Salesforce Mappings, and set all mapped objects to be force-pulled.
+   * Reset pull timestamps for one or all Salesforce Mappings.
    *
    * @param string $name
    *   Mapping id.
    * @param array $options
-   *   An associative array of options whose values come from cli, aliases, config, etc.
+   *   An associative array of options whose values come from cli, aliases,
+   *   config, etc.
    *
    * @option delete
    *   Reset delete date timestamp (instead of pull date timestamp)
@@ -326,7 +341,7 @@ class SalesforcePullCommands extends SalesforceCommandsBase {
   }
 
   /**
-   * Set pull timestamp on a single Salesforce Mappings to a specific point in history (or now).
+   * Set a specific pull timestamp on a single Salesforce Mapping.
    *
    * @param string $name
    *   Mapping id.
diff --git a/modules/salesforce_pull/src/DeleteHandler.php b/modules/salesforce_pull/src/DeleteHandler.php
index dda74d3616826199a77b3997830ceb97864ac679..97b51940d5646329c308d55d3013bd29807fcbca 100644
--- a/modules/salesforce_pull/src/DeleteHandler.php
+++ b/modules/salesforce_pull/src/DeleteHandler.php
@@ -210,7 +210,8 @@ class DeleteHandler {
       }
       catch (\Exception $e) {
         $this->eventDispatcher->dispatch(SalesforceEvents::ERROR, new SalesforceErrorEvent($e));
-        // If mapped entity couldn't be deleted, do not delete the mapped object.
+        // If mapped entity couldn't be deleted, do not delete the mapped
+        // object.
         return;
       }
 
diff --git a/modules/salesforce_pull/tests/src/Unit/PullQueueItemTest.php b/modules/salesforce_pull/tests/src/Unit/PullQueueItemTest.php
index 707eef8ff478062a95a395200a2f43bd72320406..7c53d4fad2d0d84f202688afc9d715a51b6b17ad 100644
--- a/modules/salesforce_pull/tests/src/Unit/PullQueueItemTest.php
+++ b/modules/salesforce_pull/tests/src/Unit/PullQueueItemTest.php
@@ -15,13 +15,6 @@ use Drupal\salesforce_pull\PullQueueItem;
 class PullQueueItemTest extends UnitTestCase {
   public static $modules = ['salesforce_pull'];
 
-  /**
-   * {@inheritdoc}
-   */
-  protected function setUp() {
-    parent::setUp();
-  }
-
   /**
    * Test object instantiation.
    */
diff --git a/modules/salesforce_push/salesforce_push.module b/modules/salesforce_push/salesforce_push.module
index 80b82daa77f624db81660294ea88ec0753e9f634..aa67b52b48dc8f79f87910f2539e9d672f97b0fe 100644
--- a/modules/salesforce_push/salesforce_push.module
+++ b/modules/salesforce_push/salesforce_push.module
@@ -117,7 +117,8 @@ function salesforce_push_entity_crud_mapping(EntityInterface $entity, $op, Sales
   if (empty($mapped_objects)) {
     // No mappings found.
     if ($op == MappingConstants::SALESFORCE_MAPPING_SYNC_DRUPAL_DELETE) {
-      // If no existing mapping, and this is a delete, purge any entries from push queue and we're done.
+      // If no existing mapping, and this is a delete, purge any entries from
+      // push queue and we're done.
       \Drupal::service('queue.salesforce_push')
         ->setName($mapping->id())
         ->deleteItemByEntity($entity);
diff --git a/modules/salesforce_push/src/Commands/SalesforcePushCommands.php b/modules/salesforce_push/src/Commands/SalesforcePushCommands.php
index 2af7dedad31dcce88b7f4df4999ce1502e297a1d..829ddfee073c92c3965f8cb7b0b12416bfa94298 100644
--- a/modules/salesforce_push/src/Commands/SalesforcePushCommands.php
+++ b/modules/salesforce_push/src/Commands/SalesforcePushCommands.php
@@ -77,10 +77,10 @@ class SalesforcePushCommands extends SalesforceCommandsBase {
   }
 
   /**
-   * Process push queues (as though during cron) for one or all Salesforce Mappings.
+   * Process push queues for one or all Salesforce Mappings.
    *
    * @param string $name
-   *   Array.
+   *   Mapping name.
    *
    * @usage drush sfpushq
    *   Process all push queue items.
@@ -100,12 +100,13 @@ class SalesforcePushCommands extends SalesforceCommandsBase {
   }
 
   /**
-   * Attempt to push entities of a mapped type that are not linked to Salesforce Objects.
+   * Push entities of a mapped type that are not linked to Salesforce Objects.
    *
    * @param string $name
    *   The Drupal machine name of the mapping for the entities.
    * @param array $options
-   *   An associative array of options whose values come from cli, aliases, config, etc.
+   *   An associative array of options whose values come from cli, aliases,
+   *   config, etc.
    *
    * @option count
    *   The number of entities to try to sync. (Default is 50).
diff --git a/modules/salesforce_push/src/Plugin/SalesforcePushQueueProcessor/Rest.php b/modules/salesforce_push/src/Plugin/SalesforcePushQueueProcessor/Rest.php
index be813b97ae335dbc4092522179c48a69cf9680b1..ee9e7c294a4b009834db0f00fbe0eb916ca3de02 100644
--- a/modules/salesforce_push/src/Plugin/SalesforcePushQueueProcessor/Rest.php
+++ b/modules/salesforce_push/src/Plugin/SalesforcePushQueueProcessor/Rest.php
@@ -145,7 +145,8 @@ class Rest extends PluginBase implements PushQueueProcessorInterface {
 
     if ($mapped_object->isNew()
     && $item->op == MappingConstants::SALESFORCE_MAPPING_SYNC_DRUPAL_DELETE) {
-      // If mapped object doesn't exist or fails to load for this delete, this item can be considered successfully processed.
+      // If mapped object doesn't exist or fails to load for this delete, this
+      // item can be considered successfully processed.
       return;
     }
 
diff --git a/modules/salesforce_push/src/PushQueue.php b/modules/salesforce_push/src/PushQueue.php
index 84e865f6703dd87633c7be7b9de83154a421fb09..a21f73344df6638ff4060da26e437810e200284e 100644
--- a/modules/salesforce_push/src/PushQueue.php
+++ b/modules/salesforce_push/src/PushQueue.php
@@ -219,9 +219,10 @@ class PushQueue extends DatabaseQueue implements PushQueueInterface {
    *   * 'entity_id': the entity id being mapped / pushed
    *   * 'op': the operation which triggered this push.
    *
-   * @return \Drupal\Core\Database\Query\MergeSTATUS_INSERT|Drupal\Core\Database\Query\MergeSTATUS_UPDATE
-   *   On success, STATUS_INSERT or STATUS_UPDATE whether item was inserted or
-   *   updated.
+   * @return int
+   *   On success, \Drupal\Core\Database\Query\Merge::STATUS_INSERT or
+   *   Drupal\Core\Database\Query\Merge::STATUS_UPDATE whether item was inserted
+   *   or updated.
    *
    * @throws \Exception
    *   If the required indexes are not provided.
@@ -453,7 +454,8 @@ class PushQueue extends DatabaseQueue implements PushQueueInterface {
     // the mapping limit, then move to the next queue. If we hit the global
     // limit, return immediately.
     while (TRUE) {
-      // Claim as many items as we can from this queue and advance our counter. If this queue is empty, move to the next mapping.
+      // Claim as many items as we can from this queue and advance our counter.
+      // If this queue is empty, move to the next mapping.
       $items = $this->claimItems($mapping->push_limit, $mapping->push_retries);
 
       if (empty($items)) {
@@ -487,7 +489,8 @@ class PushQueue extends DatabaseQueue implements PushQueueInterface {
         $this->eventDispatcher->dispatch(SalesforceEvents::ERROR, new SalesforceErrorEvent($e));
       }
       finally {
-        // If we've reached our limit, we're done. Otherwise, continue to next items.
+        // If we've reached our limit, we're done. Otherwise, continue to next
+        // items.
         $i += count($items);
         if ($i >= $this->globalLimit) {
           return $i;
diff --git a/salesforce.api.php b/salesforce.api.php
index 5d51a6444d83740e0f7c781ca513a23f0d95753e..8f25482284ca4b845bc2ab945582a7af29f9ef5d 100644
--- a/salesforce.api.php
+++ b/salesforce.api.php
@@ -4,7 +4,7 @@
  * @file
  * Legacy documentation, mapping of old hook system to new Events system.
  *
- * @see Drupal\salesforce\Event\SalesforceEvents.php
+ * @see SalesforceEvents.php
  * @see salesforce_example.module
  */
 
@@ -35,25 +35,25 @@ function hook_salesforce_mapping_fieldmap_type_alter() {
 }
 
 /**
- * Implement an EventSubscriber on Drupal\salesforce\Event\SalesforceEvents::PULL_QUERY.
+ * Implement an EventSubscriber on SalesforceEvents::PULL_QUERY.
  */
 function hook_salesforce_pull_select_query_alter() {
 }
 
 /**
- * Implement an EventSubscriber on Drupal\salesforce\Event\SalesforceEvents::PULL_PREPULL.
+ * Implement an EventSubscriber on SalesforceEvents::PULL_PREPULL.
  */
 function hook_salesforce_pull_mapping_object_alter() {
 }
 
 /**
- * Implement an EventSubscriber on Drupal\salesforce\Event\SalesforceEvents::PULL_ENTITY_VALUE.
+ * Implement an EventSubscriber on SalesforceEvents::PULL_ENTITY_VALUE.
  */
 function hook_salesforce_pull_entity_value_alter() {
 }
 
 /**
- * Implement an EventSubscriber on Drupal\salesforce\Event\SalesforceEvents::PULL_PRESAVE.
+ * Implement an EventSubscriber on SalesforceEvents::PULL_PRESAVE.
  */
 function hook_salesforce_pull_entity_presave() {
 }
@@ -71,7 +71,7 @@ function hook_salesforce_pull_entity_update() {
 }
 
 /**
- * Implement an EventSubscriber on Drupal\salesforce\Event\SalesforceEvents::PUSH_ALLOWED.
+ * Implement an EventSubscriber on SalesforceEvents::PUSH_ALLOWED.
  *
  * Throw an exception to indicate that push is not allowed.
  */
@@ -79,25 +79,25 @@ function hook_salesforce_push_entity_allowed() {
 }
 
 /**
- * Implement an EventSubscriber on  Drupal\salesforce\Event\SalesforceEvents::PUSH_MAPPING_OBJECT.
+ * Implement an EventSubscriber on  SalesforceEvents::PUSH_MAPPING_OBJECT.
  */
 function hook_salesforce_push_mapping_object_alter() {
 }
 
 /**
- * Implement an EventSubscriber on Drupal\salesforce\Event\SalesforceEvents::PUSH_PARAMS.
+ * Implement an EventSubscriber on SalesforceEvents::PUSH_PARAMS.
  */
 function hook_salesforce_push_params_alter() {
 }
 
 /**
- * Implement an EventSubscriber on Drupal\salesforce\Event\SalesforceEvents::PUSH_SUCCESS.
+ * Implement an EventSubscriber on SalesforceEvents::PUSH_SUCCESS.
  */
 function hook_salesforce_push_success() {
 }
 
 /**
- * Implement an EventSubscriber on Drupal\salesforce\Event\SalesforceEvents::PUSH_FAIL.
+ * Implement an EventSubscriber on SalesforceEvents::PUSH_FAIL.
  */
 function hook_salesforce_push_fail() {
 }
diff --git a/salesforce.install b/salesforce.install
index 3637358edaa8a669f94a6d76c07f7a07271c6e9e..306bfa67f472fc731c3a484e55d2bf22990866e1 100644
--- a/salesforce.install
+++ b/salesforce.install
@@ -53,7 +53,8 @@ function salesforce_requirements($phase) {
 function salesforce_fetch_new_tls() {
   $response = FALSE;
   try {
-    // Ping the howsmyssl web service to check TLS version support for this client.
+    // Ping the howsmyssl web service to check TLS version support for this
+    // client.
     \Drupal::state()->set('salesforce.last_requirements_check', REQUEST_TIME);
     $raw_response = \Drupal::service('http_client')->get('https://www.howsmyssl.com/a/check', ['json' => TRUE, 'timeout' => 5]);
     $body = $raw_response->getBody();
@@ -90,7 +91,8 @@ function salesforce_get_tls_requirements() {
     ];
   }
   else {
-    // If we got a good response, and this client doesn't support TLS1.1+, throw an error.
+    // If we got a good response, and this client doesn't support TLS1.1+, throw
+    // an error.
     switch ($response['tls_version']) {
       case 'TLS 1.1':
       case 'TLS 1.2':
diff --git a/salesforce.module b/salesforce.module
index f4d83aad1346f91e305c67e7701b1dadda1da44e..12bde9d8fd1cc016f4d9884ac166c858a643c781 100644
--- a/salesforce.module
+++ b/salesforce.module
@@ -52,13 +52,7 @@ function salesforce_help($route_name, RouteMatchInterface $route_match) {
       $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 .= '</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 .= '<h3>' . t('Modules') . '</h3>';
       $output .= '<h4>' . t('Salesforce (salesforce)') . '</h4>';
       $output .= '<p>' . t('OAUTH2 authorization and wrapper around the Salesforce REST API.') . '</p>';
@@ -68,9 +62,6 @@ function salesforce_help($route_name, RouteMatchInterface $route_match) {
       $output .= '<p>' . t('Push Drupal entity updates into Salesforce.') . '</p>';
       $output .= '<h4>' . t('Salesforce Pull (salesforce_pull)') . '</h4>';
       $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>';.
       return $output;
 
     case 'salesforce.authorize':
diff --git a/src/Commands/SalesforceCommands.php b/src/Commands/SalesforceCommands.php
index 79c32635ef9eda1d3862192d74967477ec384477..8ca48d6bdc4e2ad4c88fc95e0e29678fb51e80cd 100644
--- a/src/Commands/SalesforceCommands.php
+++ b/src/Commands/SalesforceCommands.php
@@ -9,7 +9,6 @@ use Drupal\salesforce\SelectQuery;
 use Drupal\salesforce\SelectQueryRaw;
 use Drupal\salesforce\SFID;
 use Drush\Exceptions\UserAbortException;
-use Symfony\Component\Console\Helper\Table;
 use Symfony\Component\Console\Helper\TableCell;
 use Symfony\Component\Console\Input\Input;
 use Symfony\Component\Console\Output\Output;
@@ -57,7 +56,7 @@ class SalesforceCommands extends SalesforceCommandsBase {
   }
 
   /**
-   * List the objects that are available in your organization and available to the logged-in user.
+   * List the objects that are available in your organization.
    *
    * @command salesforce:list-objects
    * @aliases sflo,sf-list-objects
@@ -148,19 +147,20 @@ class SalesforceCommands extends SalesforceCommandsBase {
   }
 
   /**
-   * Retrieve all the metadata for an object, including information about each field, URLs, and child relationships.
+   * Retrieve all the metadata for an object, including fields.
    *
    * @param string $object
    *   The object name in Salesforce.
    * @param array $options
-   *   An associative array of options whose values come from cli, aliases, config, etc.
+   *   An associative array of options whose values come from cli, aliases,
+   *   config, etc.
    *
    * @option output
    *   Specify an output type.
    *   Options are:
    *     info: (default) Display metadata about an object
    *     fields: Display information about fields that are part of the object
-   *     field: Display information about a specific field that is part of an object
+   *     field: Display information about a specific field of an object
    *     raw: Display the complete, raw describe response.
    * @option field
    *   For "field" output type, specify a fieldname.
@@ -174,9 +174,12 @@ class SalesforceCommands extends SalesforceCommandsBase {
    *   Display the full metadata for Contact SObject type.
    *
    * @command salesforce:describe-object-deprecated
-   * @deprecated Use describeFields, describeMetadata, describeRecordTypes, dumpObject
+   * @deprecated Use describeFields, describeMetadata, describeRecordTypes...
    */
-  public function describeObject($object, array $options = ['output' => NULL, 'field' => NULL]) {
+  public function describeObject($object, array $options = [
+    'output' => NULL,
+    'field' => NULL,
+  ]) {
     return $this->describeFields($object);
   }
 
@@ -191,7 +194,8 @@ class SalesforceCommands extends SalesforceCommandsBase {
   public function dumpObject($object) {
     $objectDescription = $this->client->objectDescribe($object);
     if (!is_object($objectDescription)) {
-      $this->logger()->error(dt('Could not load data for object !object', ['!object' => $object]));
+      $this->logger()
+        ->error(dt('Could not load data for object !object', ['!object' => $object]));
     }
     $this->output()->writeln(print_r($objectDescription->data, 1));
   }
@@ -223,7 +227,8 @@ class SalesforceCommands extends SalesforceCommandsBase {
   public function describeRecordTypes($object) {
     $objectDescription = $this->client->objectDescribe($object);
     if (!is_object($objectDescription)) {
-      $this->logger()->error(dt('Could not load data for object !object', ['!object' => $object]));
+      $this->logger()
+        ->error(dt('Could not load data for object !object', ['!object' => $object]));
       return;
     }
     $data = $objectDescription->data['recordTypeInfos'];
@@ -310,7 +315,7 @@ class SalesforceCommands extends SalesforceCommandsBase {
   }
 
   /**
-   * Retrieve all the metadata for an object, including information about each field, URLs, and child relationships.
+   * Retrieve all the metadata for an object.
    *
    * @param string $object
    *   The object name in Salesforce.
@@ -469,7 +474,6 @@ class SalesforceCommands extends SalesforceCommandsBase {
       ]));
       $this->output()->writeln(print_r($object->fields(), 1));
     }
-    return;
   }
 
   /**
@@ -518,12 +522,15 @@ class SalesforceCommands extends SalesforceCommandsBase {
    * @param string $object
    *   The object type name in Salesforce (e.g. Account).
    * @param mixed $data
-   *   The data to use when creating the object (default is JSON format). Use '-' to read the data from STDIN.
+   *   The data to use when creating the object (default is JSON format).
+   *   Use '-' to read the data from STDIN.
    * @param array $options
-   *   An associative array of options whose values come from cli, aliases, config, etc.
+   *   An associative array of options whose values come from cli, aliases,
+   *   config, etc.
    *
    * @option encoding
-   *   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'.
+   *   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'.
    *   Defaults to "query".
    *
    * @field-labels
@@ -571,16 +578,19 @@ class SalesforceCommands extends SalesforceCommandsBase {
    * @param string $object
    *   The object type name in Salesforce (e.g. Account).
    * @param array $options
-   *   An associative array of options whose values come from cli, aliases, config, etc.
+   *   An associative array of options whose values come from cli, aliases,
+   *   config, etc.
    *
    * @option where
    *   A WHERE clause to add to the SOQL query
    * @option fields
-   *   A comma-separated list fields to select in the SOQL query. If absent, an API call is used to find all fields
+   *   A comma-separated list fields to select in the SOQL query. If absent, an
+   *   API call is used to find all fields
    * @option limit
    *   Integer limit on the number of results to return for the query.
    * @option order
-   *   Comma-separated fields by which to sort results. Make sure to enclose in quotes for any whitespace.
+   *   Comma-separated fields by which to sort results. Make sure to enclose in
+   *   quotes for any whitespace.
    *
    * @return \Drupal\salesforce\Commands\QueryResult
    *   The query result.
@@ -593,7 +603,7 @@ class SalesforceCommands extends SalesforceCommandsBase {
     'where' => NULL,
     'fields' => NULL,
     'limit' => NULL,
-    'order' => NULL
+    'order' => NULL,
   ]) {
     $query = new SelectQuery($object);
 
diff --git a/src/Commands/SalesforceCommandsBase.php b/src/Commands/SalesforceCommandsBase.php
index 4d2753a98fbdbcd80158c039ccee561a7f6beaab..243e6814cda8e665445381b4da48bd8ecb54d5f1 100644
--- a/src/Commands/SalesforceCommandsBase.php
+++ b/src/Commands/SalesforceCommandsBase.php
@@ -4,7 +4,6 @@ namespace Drupal\salesforce\Commands;
 
 use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\salesforce\Rest\RestClient;
-use Drupal\salesforce_mapping\Entity\SalesforceMapping;
 use Drush\Commands\DrushCommands;
 use Drush\Drush;
 use Drush\Exceptions\UserAbortException;
diff --git a/src/EntityNotFoundException.php b/src/EntityNotFoundException.php
index f10f447e09b5b00a41b107b78ce9e93c3ff61d25..bc1b0e3477530d56515bbae03875f544e6407814 100644
--- a/src/EntityNotFoundException.php
+++ b/src/EntityNotFoundException.php
@@ -41,9 +41,9 @@ class EntityNotFoundException extends \RuntimeException {
    */
   public function __construct($entityProperties, $entityTypeId, Throwable $previous = NULL) {
     parent::__construct($this->t('Entity not found. type: %type properties: %props', [
-        '%type' => $entityTypeId,
-        '%props' => var_export($entityProperties, TRUE)
-      ]), 0, $previous);
+      '%type' => $entityTypeId,
+      '%props' => var_export($entityProperties, TRUE),
+    ]), 0, $previous);
     $this->entityProperties = $entityProperties;
     $this->entityTypeId = $entityTypeId;
   }
@@ -76,9 +76,9 @@ class EntityNotFoundException extends \RuntimeException {
    */
   public function getFormattableMessage() {
     return new FormattableMarkup('Entity not found. type: %type properties: %props', [
-        '%type' => $this->entityTypeId,
-        '%props' => var_export($this->entityProperties, TRUE)
-      ]);
+      '%type' => $this->entityTypeId,
+      '%props' => var_export($this->entityProperties, TRUE),
+    ]);
   }
 
 }
diff --git a/src/Form/AuthorizeForm.php b/src/Form/AuthorizeForm.php
index e2dc275a9a25b9a8c40791c0421e390e5a8b9980..36cb86a2a32874455734df54373f0befbffd5457 100644
--- a/src/Form/AuthorizeForm.php
+++ b/src/Form/AuthorizeForm.php
@@ -98,8 +98,8 @@ class AuthorizeForm extends ConfigFormBase {
     $encrypted = is_subclass_of($this->client, EncryptedRestClientInterface::class);
     $url = new Url('salesforce.oauth_callback', [], ['absolute' => TRUE]);
     drupal_set_message($this->t('Callback URL: :url', [
-        ':url' => str_replace('http:', 'https:', $url->toString())
-      ]));
+      ':url' => str_replace('http:', 'https:', $url->toString()),
+    ]));
 
     $form['creds'] = [
       '#title' => $this->t('API / OAuth Connection Settings'),
diff --git a/src/Rest/RestClient.php b/src/Rest/RestClient.php
index 5aede0abd973e38d667f6fce9cfef90d6052c3a6..7517ff113ad504e3ba44f76ca6ac032da9bf6231 100644
--- a/src/Rest/RestClient.php
+++ b/src/Rest/RestClient.php
@@ -4,7 +4,6 @@ namespace Drupal\salesforce\Rest;
 
 use Drupal\Component\Serialization\Json;
 use Drupal\Component\Utility\NestedArray;
-use Drupal\Component\Utility\Unicode;
 use Drupal\Component\Utility\UrlHelper;
 use Drupal\Core\Cache\CacheBackendInterface;
 use Drupal\Core\Config\ConfigFactoryInterface;
@@ -712,7 +711,8 @@ class RestClient implements RestClientInterface {
 
     $response = $this->apiCall("sobjects/{$name}/{$key}/{$value}", $params, 'PATCH', TRUE);
 
-    // On update, upsert method returns an empty body. Retreive object id, so that we can return a consistent response.
+    // On update, upsert method returns an empty body. Retreive object id, so
+    // that we can return a consistent response.
     if ($response->getStatusCode() == 204) {
       // We need a way to allow callers to distinguish updates and inserts. To
       // that end, cache the original response and reset it after fetching the
diff --git a/tests/src/Unit/SFIDTest.php b/tests/src/Unit/SFIDTest.php
index d155f931d7ea6ab09c12c5e9cee6f8bf50484284..f4d9e5e05b15431b225be67d52d9d1d07f6b625d 100644
--- a/tests/src/Unit/SFIDTest.php
+++ b/tests/src/Unit/SFIDTest.php
@@ -13,13 +13,6 @@ use Drupal\salesforce\SFID;
 class SFIDTest extends UnitTestCase {
   static public $modules = ['salesforce'];
 
-  /**
-   * {@inheritdoc}
-   */
-  protected function setUp() {
-    parent::setUp();
-  }
-
   /**
    * Test object instantiation with good ID.
    */
diff --git a/tests/src/Unit/SObjectTest.php b/tests/src/Unit/SObjectTest.php
index aadab9000e6eb9c9f92a2c2df7c623fbeb786eeb..5390e6c58e7ae99fffdee04ba4b1385a91029205 100644
--- a/tests/src/Unit/SObjectTest.php
+++ b/tests/src/Unit/SObjectTest.php
@@ -13,13 +13,6 @@ use Drupal\salesforce\SObject;
 class SObjectTest extends UnitTestCase {
   static public $modules = ['salesforce'];
 
-  /**
-   * {@inheritdoc}
-   */
-  protected function setUp() {
-    parent::setUp();
-  }
-
   /**
    * Test object instantiation.
    */