Remove some unused variables
authoreileen <emcnaughton@wikimedia.org>
Wed, 29 Jan 2020 04:18:46 +0000 (17:18 +1300)
committereileen <emcnaughton@wikimedia.org>
Wed, 29 Jan 2020 04:18:46 +0000 (17:18 +1300)
phpcs correctly found these

Eileens-MacBook-Pro:civicrm eileenmcnaughton$ phpcs --standard=DrupalPractice CRM/ACL

FILE: /Users/eileenmcnaughton/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/ACL/Form/WordPress/Permissions.php
---------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------
 197 | WARNING | Unused global variable .
---------------------------------------------------------------------------------------------------------------------

FILE: /Users/eileenmcnaughton/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/ACL/Form/ACL.php
---------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------
 97 | WARNING | Unused variable .
---------------------------------------------------------------------------------------------------

FILE: /Users/eileenmcnaughton/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/ACL/BAO/ACL.php
--------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
--------------------------------------------------------------------------------------------------
 171 | WARNING | Unused variable .
 172 | WARNING | Unused variable .
 296 | WARNING | Unused variable .
--------------------------------------------------------------------------------------------------

CRM/ACL/BAO/ACL.php
CRM/ACL/Form/ACL.php
CRM/ACL/Form/WordPress/Permissions.php

index 02e2b0db4fbace2f70d52d91aaa6c6c29b0241ba..29b1231940c5ec608ed9fc49b065cce67c7ae2aa 100644 (file)
@@ -168,8 +168,6 @@ class CRM_ACL_BAO_ACL extends CRM_ACL_DAO_ACL {
 
     $acl = self::getTableName();
     $contact = CRM_Contact_BAO_Contact::getTableName();
-    $c2g = CRM_Contact_BAO_GroupContact::getTableName();
-    $group = CRM_Contact_BAO_Group::getTableName();
 
     $query = " SELECT acl.*
      FROM $acl acl";
@@ -293,7 +291,6 @@ SELECT      acl.*
 
     $aclER = CRM_ACL_DAO_EntityRole::getTableName();
     $c2g = CRM_Contact_BAO_GroupContact::getTableName();
-    $group = CRM_Contact_BAO_Group::getTableName();
 
     $query = "   SELECT          acl.*
                         FROM            $acl acl
index 2ffa52e376cb2ed77c7dab8ad631d91351c3386c..de1665dcd4662305a8719393d8121c83f418d42c 100644 (file)
@@ -94,8 +94,6 @@ class CRM_ACL_Form_ACL extends CRM_Admin_Form {
       return;
     }
 
-    $attributes = CRM_Core_DAO::getAttribute('CRM_ACL_DAO_ACL');
-
     $this->add('text', 'name', ts('Description'), CRM_Core_DAO::getAttribute('CRM_ACL_DAO_ACL', 'name'), TRUE);
 
     $operations = ['' => ts('- select -')] + CRM_ACL_BAO_ACL::operation();
index f19ff16c6aaf5f9768660d92575f57b703faa689..4c5f1330066f4d03cf337d5ca1ac2ceba5c9d9ef 100644 (file)
@@ -194,7 +194,6 @@ class CRM_ACL_Form_WordPress_Permissions extends CRM_Core_Form {
    *   civicrm permissions
    */
   public static function getPermissionArray($descriptions = FALSE) {
-    global $civicrm_root;
 
     $permissions = CRM_Core_Permission::basicPermissions(FALSE, $descriptions);