diff --git a/CRM/Dataprocessor/Upgrader/Base.php b/CRM/Dataprocessor/Upgrader/Base.php
index 701c574e405d5ea6c1a6bc37fd8060a22e5268a0..60af49405ec4fdb825a3726b3eaf714654177597 100644
--- a/CRM/Dataprocessor/Upgrader/Base.php
+++ b/CRM/Dataprocessor/Upgrader/Base.php
@@ -31,7 +31,7 @@ class CRM_Dataprocessor_Upgrader_Base {
   protected $extensionDir;
 
   /**
-   * @var revisionNumber[]
+   * @var array
    *   sorted numerically
    */
   private $revisions;
@@ -47,10 +47,9 @@ class CRM_Dataprocessor_Upgrader_Base {
    */
   public static function instance() {
     if (!self::$instance) {
-      // FIXME auto-generate
       self::$instance = new CRM_Dataprocessor_Upgrader(
         'dataprocessor',
-        realpath(__DIR__ . '/../../../')
+        E::path()
       );
     }
     return self::$instance;
diff --git a/CRM/DataprocessorSearch/Form/Search/Custom/DataprocessorSmartGroupIntegration.php b/CRM/DataprocessorSearch/Form/Search/Custom/DataprocessorSmartGroupIntegration.php
index 323f75b70b3c0abd105989e5d205e07a33cd4ed4..80ac07c75c64502d176e022a2aa77c0a984ba74a 100644
--- a/CRM/DataprocessorSearch/Form/Search/Custom/DataprocessorSmartGroupIntegration.php
+++ b/CRM/DataprocessorSearch/Form/Search/Custom/DataprocessorSmartGroupIntegration.php
@@ -44,7 +44,7 @@ class CRM_DataprocessorSearch_Form_Search_Custom_DataprocessorSmartGroupIntegrat
    * is saved.
    * @param \Civi\Core\DAO\Event\PostUpdate $event
    */
-  public function alterSavedSearch(\Civi\Core\DAO\Event\PostUpdate $event) {
+  public static function alterSavedSearch(\Civi\Core\DAO\Event\PostUpdate $event) {
     // Check whether we are saving saved search.
     // And check whether a data processor search has been run.
     if ($event->object instanceof \CRM_Contact_DAO_SavedSearch && self::$dataProcessorName) {
diff --git a/dataprocessor.civix.php b/dataprocessor.civix.php
index 950e7f5415c80ef17e43947ab242d6692791dccc..2bb1b9a37fd749f5f5ba390f83f6dc2b7a2b4079 100644
--- a/dataprocessor.civix.php
+++ b/dataprocessor.civix.php
@@ -7,9 +7,9 @@
  * extension.
  */
 class CRM_Dataprocessor_ExtensionUtil {
-  const SHORT_NAME = "dataprocessor";
-  const LONG_NAME = "dataprocessor";
-  const CLASS_PREFIX = "CRM_Dataprocessor";
+  const SHORT_NAME = 'dataprocessor';
+  const LONG_NAME = 'dataprocessor';
+  const CLASS_PREFIX = 'CRM_Dataprocessor';
 
   /**
    * Translate a string using the extension's domain.
@@ -193,8 +193,9 @@ function _dataprocessor_civix_civicrm_disable() {
  * @param $op string, the type of operation being performed; 'check' or 'enqueue'
  * @param $queue CRM_Queue_Queue, (for 'enqueue') the modifiable list of pending up upgrade tasks
  *
- * @return mixed  based on op. for 'check', returns array(boolean) (TRUE if upgrades are pending)
- *                for 'enqueue', returns void
+ * @return mixed
+ *   based on op. for 'check', returns array(boolean) (TRUE if upgrades are pending)
+ *   for 'enqueue', returns void
  *
  * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_upgrade
  */
@@ -225,7 +226,7 @@ function _dataprocessor_civix_upgrader() {
  * @param string $dir base dir
  * @param string $pattern , glob pattern, eg "*.txt"
  *
- * @return array(string)
+ * @return array
  */
 function _dataprocessor_civix_find_files($dir, $pattern) {
   if (is_callable(['CRM_Utils_File', 'findFiles'])) {
@@ -244,7 +245,7 @@ function _dataprocessor_civix_find_files($dir, $pattern) {
     if ($dh = opendir($subdir)) {
       while (FALSE !== ($entry = readdir($dh))) {
         $path = $subdir . DIRECTORY_SEPARATOR . $entry;
-        if ($entry{0} == '.') {
+        if ($entry[0] == '.') {
         }
         elseif (is_dir($path)) {
           $todos[] = $path;
@@ -255,6 +256,7 @@ function _dataprocessor_civix_find_files($dir, $pattern) {
   }
   return $result;
 }
+
 /**
  * (Delegated) Implements hook_civicrm_managed().
  *
@@ -362,7 +364,7 @@ function _dataprocessor_civix_civicrm_themes(&$themes) {
  * @link http://php.net/glob
  * @param string $pattern
  *
- * @return array, possibly empty
+ * @return array
  */
 function _dataprocessor_civix_glob($pattern) {
   $result = glob($pattern);
@@ -470,38 +472,32 @@ function _dataprocessor_civix_civicrm_alterSettingsFolders(&$metaDataFolders = N
  *
  * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_entityTypes
  */
-
 function _dataprocessor_civix_civicrm_entityTypes(&$entityTypes) {
-  $entityTypes = array_merge($entityTypes, array (
-    'CRM_Dataprocessor_DAO_DataProcessor' => 
-    array (
+  $entityTypes = array_merge($entityTypes, [
+    'CRM_Dataprocessor_DAO_DataProcessor' => [
       'name' => 'DataProcessor',
       'class' => 'CRM_Dataprocessor_DAO_DataProcessor',
       'table' => 'civicrm_data_processor',
-    ),
-    'CRM_Dataprocessor_DAO_DataProcessorField' => 
-    array (
+    ],
+    'CRM_Dataprocessor_DAO_DataProcessorField' => [
       'name' => 'DataProcessorField',
       'class' => 'CRM_Dataprocessor_DAO_DataProcessorField',
       'table' => 'civicrm_data_processor_field',
-    ),
-    'CRM_Dataprocessor_DAO_DataProcessorFilter' => 
-    array (
+    ],
+    'CRM_Dataprocessor_DAO_DataProcessorFilter' => [
       'name' => 'DataProcessorFilter',
       'class' => 'CRM_Dataprocessor_DAO_DataProcessorFilter',
       'table' => 'civicrm_data_processor_filter',
-    ),
-    'CRM_Dataprocessor_DAO_DataProcessorOutput' => 
-    array (
+    ],
+    'CRM_Dataprocessor_DAO_DataProcessorOutput' => [
       'name' => 'DataProcessorOutput',
       'class' => 'CRM_Dataprocessor_DAO_DataProcessorOutput',
       'table' => 'civicrm_data_processor_output',
-    ),
-    'CRM_Dataprocessor_DAO_DataProcessorSource' => 
-    array (
+    ],
+    'CRM_Dataprocessor_DAO_DataProcessorSource' => [
       'name' => 'DataProcessorSource',
       'class' => 'CRM_Dataprocessor_DAO_DataProcessorSource',
       'table' => 'civicrm_data_processor_source',
-    ),
-  ));
+    ],
+  ]);
 }