(NFC) CRM/ - Update to pass new phpcs
authorTim Otten <totten@civicrm.org>
Fri, 5 Apr 2019 20:11:11 +0000 (13:11 -0700)
committerTim Otten <totten@civicrm.org>
Fri, 5 Apr 2019 20:11:34 +0000 (13:11 -0700)
CRM/Contact/BAO/Contact.php
CRM/Contact/Page/View/Summary.php
CRM/Contribute/Exception/CheckLineItemsException.php
CRM/Core/I18n/SchemaStructure.php
CRM/Dedupe/Merger.php

index f620157027d59263a5701d59d624507481842b98..4a8d50a5199ccbefc523c8bd1943846f041bf3d6 100644 (file)
@@ -2398,12 +2398,12 @@ ORDER BY civicrm_email.is_primary DESC";
                 'prefix_id',
                 'suffix_id',
               )) &&
-            ($value == '' || !isset($value)) &&
-            ($session->get('authSrc') & (CRM_Core_Permission::AUTH_SRC_CHECKSUM + CRM_Core_Permission::AUTH_SRC_LOGIN)) == 0 ||
-            ($key == 'current_employer' && empty($params['current_employer']))) {
-            // CRM-10128: if auth source is not checksum / login && $value is blank, do not fill $data with empty value
-            // to avoid update with empty values
-            continue;
+              ($value == '' || !isset($value)) &&
+              ($session->get('authSrc') & (CRM_Core_Permission::AUTH_SRC_CHECKSUM + CRM_Core_Permission::AUTH_SRC_LOGIN)) == 0 ||
+              ($key == 'current_employer' && empty($params['current_employer']))) {
+                // CRM-10128: if auth source is not checksum / login && $value is blank, do not fill $data with empty value
+                // to avoid update with empty values
+                continue;
           }
           else {
             $data[$key] = $value;
index 79f375ca81d28d1637da8b173b33cc80359211b8..f91a87480b61f067667326e21b2a7e905e00d1d9 100644 (file)
@@ -411,10 +411,7 @@ class CRM_Contact_Page_View_Summary extends CRM_Contact_Page_View {
       }
       elseif ($accessCiviCRM && !empty($this->_viewOptions[$tab['id']])) {
         $allTabs[] = $tab + [
-          'url' => CRM_Utils_System::url(
-            "civicrm/contact/view/{$tab['id']}",
-            "reset=1&cid={$this->_contactId}"
-          ),
+          'url' => CRM_Utils_System::url("civicrm/contact/view/{$tab['id']}", "reset=1&cid={$this->_contactId}"),
           'count' => CRM_Contact_BAO_Contact::getCountComponent($tab['id'], $this->_contactId),
         ];
         $weight = $tab['weight'] + 10;
index d14a3aec98f9685cb2807cbfc60a2aa3f2fdc0e0..c1c0d3a9142746b47f267c38e00c1f7196065a4e 100644 (file)
@@ -1,13 +1,13 @@
-<?php\r
-\r
-/**\r
- * Class CRM_Contribute_Exception_CheckLineItemsException\r
- */\r
-class CRM_Contribute_Exception_CheckLineItemsException extends API_Exception {\r
-  const LINE_ITEM_DIFFERRING_TOTAL_EXCEPTON_MSG = "Line item total doesn't match with total amount.";\r
-\r
-  public function __construct($message = self::LINE_ITEM_DIFFERRING_TOTAL_EXCEPTON_MSG, $error_code = 0, array $extraParams = [], $previous = NULL) {\r
-    parent::__construct($message, $error_code, $extraParams, $previous);\r
-  }\r
-\r
-}\r
+<?php
+
+/**
+ * Class CRM_Contribute_Exception_CheckLineItemsException
+ */
+class CRM_Contribute_Exception_CheckLineItemsException extends API_Exception {
+  const LINE_ITEM_DIFFERRING_TOTAL_EXCEPTON_MSG = "Line item total doesn't match with total amount.";
+
+  public function __construct($message = self::LINE_ITEM_DIFFERRING_TOTAL_EXCEPTON_MSG, $error_code = 0, array $extraParams = [], $previous = NULL) {
+    parent::__construct($message, $error_code, $extraParams, $previous);
+  }
+
+}
index bec6ec355eb7f215574e2dccaafd2dfaa5724084..1abf4abb7d9b4a981a2f8fce6be0f0a6ea0fe8f4 100644 (file)
@@ -23,7 +23,7 @@
 | GNU Affero General Public License or the licensing of CiviCRM,     |
 | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
 +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
@@ -42,7 +42,7 @@ class CRM_Core_I18n_SchemaStructure {
    *   A table-indexed array of translatable columns.
    */
   public static function &columns() {
-    static $result = null;
+    static $result = NULL;
     if (!$result) {
       $result = [
         'civicrm_location_type' => [
@@ -211,7 +211,7 @@ class CRM_Core_I18n_SchemaStructure {
    *   Indices for translatable fields.
    */
   public static function &indices() {
-    static $result = null;
+    static $result = NULL;
     if (!$result) {
       $result = [
         'civicrm_custom_group' => [
@@ -255,7 +255,7 @@ class CRM_Core_I18n_SchemaStructure {
    *   Array of names of tables with fields that can be translated.
    */
   static function &tables() {
-    static $result = null;
+    static $result = NULL;
     if (!$result) {
       $result = array_keys(self::columns());
     }
@@ -269,7 +269,7 @@ class CRM_Core_I18n_SchemaStructure {
    *   Array of the widgets for editing translatable fields.
    */
   static function &widgets() {
-    static $result = null;
+    static $result = NULL;
     if (!$result) {
       $result = [
         'civicrm_location_type' => [
index ca2f28d0a5f8efb64fe74f610946799d0a841507..3cab5581bbd1b5a8941d19c8ebbfa838d7aea72d 100644 (file)
@@ -472,7 +472,8 @@ INNER JOIN  civicrm_membership membership2 ON membership1.membership_type_id = m
               "return" => "id",
             ]
           )
-        ));
+        )
+      );
 
       if (!empty($membershipIDs)) {
         civicrm_api3("Membership", "get", [