From f157740d34fc952a073bacd35c49d7bf757f1364 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Wed, 10 Apr 2019 10:48:27 +1000 Subject: [PATCH] (NFC) Update CRM/Badge CRM/Campaign CRM/Case to be up to date with a newer coder --- CRM/Badge/BAO/Layout.php | 2 +- CRM/Badge/Page/AJAX.php | 1 + CRM/Campaign/BAO/Petition.php | 5 +++-- CRM/Campaign/BAO/Query.php | 7 +++--- CRM/Campaign/BAO/Survey.php | 2 +- CRM/Campaign/Form/Petition.php | 2 -- CRM/Campaign/Form/Search.php | 1 + CRM/Campaign/Form/Survey/Delete.php | 1 - CRM/Campaign/Form/Survey/Main.php | 5 ++++- CRM/Campaign/Form/Survey/Questions.php | 1 - CRM/Campaign/Form/Survey/Results.php | 5 ++++- CRM/Campaign/Form/Task/Interview.php | 1 + CRM/Campaign/Info.php | 3 +-- CRM/Campaign/Page/Petition.php | 1 + CRM/Campaign/Page/Petition/Confirm.php | 1 + CRM/Campaign/Page/Petition/ThankYou.php | 1 + CRM/Campaign/Page/SurveyType.php | 2 +- CRM/Campaign/PseudoConstant.php | 1 + CRM/Campaign/Selector/Search.php | 8 +++---- CRM/Campaign/Task.php | 9 ++++++-- CRM/Case/BAO/Case.php | 3 ++- CRM/Case/BAO/CaseType.php | 3 +-- CRM/Case/Form/Activity/LinkCases.php | 1 + CRM/Case/Form/Case.php | 8 +++++++ CRM/Case/Form/EditClient.php | 1 - CRM/Case/Form/Report.php | 24 +++++++++++---------- CRM/Case/Form/Search.php | 3 +++ CRM/Case/Form/Task.php | 14 ++++++++---- CRM/Case/Form/Task/Batch.php | 14 ++++++++---- CRM/Case/Form/Task/PickProfile.php | 4 ++-- CRM/Case/Form/Task/Print.php | 23 ++++++++++---------- CRM/Case/Form/Task/Result.php | 13 ++++++----- CRM/Case/Form/Task/SearchTaskHookSample.php | 13 ++++++----- CRM/Case/Info.php | 1 + CRM/Case/Page/AJAX.php | 4 ++-- CRM/Case/Page/Tab.php | 4 ++-- CRM/Case/PseudoConstant.php | 2 +- CRM/Case/Selector/Search.php | 8 +++---- CRM/Case/Task.php | 12 +++++++---- CRM/Case/XMLProcessor/Process.php | 6 +++--- CRM/Case/XMLProcessor/Report.php | 6 +++--- 41 files changed, 134 insertions(+), 92 deletions(-) diff --git a/CRM/Badge/BAO/Layout.php b/CRM/Badge/BAO/Layout.php index fc60633e23..8ad8ca1dad 100644 --- a/CRM/Badge/BAO/Layout.php +++ b/CRM/Badge/BAO/Layout.php @@ -177,7 +177,7 @@ class CRM_Badge_BAO_Layout extends CRM_Core_DAO_PrintLabel { * @return array * associated array of decoded elements */ - static public function getDecodedData($jsonData) { + public static function getDecodedData($jsonData) { return json_decode($jsonData, TRUE); } diff --git a/CRM/Badge/Page/AJAX.php b/CRM/Badge/Page/AJAX.php index 2918f14deb..4e0af60ad6 100644 --- a/CRM/Badge/Page/AJAX.php +++ b/CRM/Badge/Page/AJAX.php @@ -32,6 +32,7 @@ * */ class CRM_Badge_Page_AJAX { + public static function getImageProp() { $img = $_GET['img']; list($w, $h) = CRM_Badge_BAO_Badge::getImageProperties($img); diff --git a/CRM/Campaign/BAO/Petition.php b/CRM/Campaign/BAO/Petition.php index 82573024e6..a9159061a0 100644 --- a/CRM/Campaign/BAO/Petition.php +++ b/CRM/Campaign/BAO/Petition.php @@ -31,6 +31,7 @@ * @copyright CiviCRM LLC (c) 2004-2019 */ class CRM_Campaign_BAO_Petition extends CRM_Campaign_BAO_Survey { + /** * Class constructor. */ @@ -176,7 +177,8 @@ SELECT petition.id as id, * @param array $params * (reference ) an assoc array of name/value pairs. * - * @return CRM_Campaign_BAO_Petition + * @return mixed + * CRM_Campaign_BAO_Petition or NULl or void */ public function createSignature(&$params) { if (empty($params)) { @@ -355,7 +357,6 @@ AND tag_id = ( SELECT id FROM civicrm_tag WHERE name = %2 )"; return $statusTotal; } - /** * @param int $surveyId * diff --git a/CRM/Campaign/BAO/Query.php b/CRM/Campaign/BAO/Query.php index 86391e8348..d44e128009 100644 --- a/CRM/Campaign/BAO/Query.php +++ b/CRM/Campaign/BAO/Query.php @@ -42,9 +42,9 @@ class CRM_Campaign_BAO_Query { * * @var array */ - static $_campaignFields = NULL; + public static $_campaignFields = NULL; - static $_applySurveyClause = FALSE; + public static $_applySurveyClause = FALSE; /** * Function get the fields for campaign. @@ -444,12 +444,13 @@ INNER JOIN civicrm_custom_group grp on fld.custom_group_id = grp.id * An array. * @return $voterClause as a string */ + /** * @param array $params * * @return array */ - static public function voterClause($params) { + public static function voterClause($params) { $voterClause = []; $fromClause = $whereClause = NULL; if (!is_array($params) || empty($params)) { diff --git a/CRM/Campaign/BAO/Survey.php b/CRM/Campaign/BAO/Survey.php index 63c9244890..4333c01118 100644 --- a/CRM/Campaign/BAO/Survey.php +++ b/CRM/Campaign/BAO/Survey.php @@ -314,7 +314,7 @@ SELECT survey.id as id, * @param string $returnColumn * @param bool $includePetitionActivityType * - * @return string + * @return mixed */ public static function getSurveyActivityType($returnColumn = 'label', $includePetitionActivityType = FALSE) { static $activityTypes; diff --git a/CRM/Campaign/Form/Petition.php b/CRM/Campaign/Form/Petition.php index 30e9349ff4..f203c3d88f 100644 --- a/CRM/Campaign/Form/Petition.php +++ b/CRM/Campaign/Form/Petition.php @@ -160,7 +160,6 @@ class CRM_Campaign_Form_Petition extends CRM_Core_Form { return $defaults; } - public function buildQuickForm() { if ($this->_action & CRM_Core_Action::DELETE) { @@ -300,7 +299,6 @@ WHERE $whereClause return empty($errors) ? TRUE : $errors; } - public function postProcess() { // store the submitted values in an array $params = $this->controller->exportValues($this->_name); diff --git a/CRM/Campaign/Form/Search.php b/CRM/Campaign/Form/Search.php index 43b0c707ba..ab7569d01e 100644 --- a/CRM/Campaign/Form/Search.php +++ b/CRM/Campaign/Form/Search.php @@ -59,6 +59,7 @@ class CRM_Campaign_Form_Search extends CRM_Core_Form_Search { /** * Prefix for the controller. + * @var string */ protected $_prefix = "survey_"; diff --git a/CRM/Campaign/Form/Survey/Delete.php b/CRM/Campaign/Form/Survey/Delete.php index 2f473c9632..0567a598e4 100644 --- a/CRM/Campaign/Form/Survey/Delete.php +++ b/CRM/Campaign/Form/Survey/Delete.php @@ -50,7 +50,6 @@ class CRM_Campaign_Form_Survey_Delete extends CRM_Core_Form { */ protected $_surveyTitle; - /** * Set variables up before form is built. */ diff --git a/CRM/Campaign/Form/Survey/Main.php b/CRM/Campaign/Form/Survey/Main.php index 24aae308b4..68f074ec19 100644 --- a/CRM/Campaign/Form/Survey/Main.php +++ b/CRM/Campaign/Form/Survey/Main.php @@ -36,11 +36,14 @@ */ class CRM_Campaign_Form_Survey_Main extends CRM_Campaign_Form_Survey { - /* values + /** + * values * * @var array + * */ + public $_values; /** diff --git a/CRM/Campaign/Form/Survey/Questions.php b/CRM/Campaign/Form/Survey/Questions.php index c7154ceb37..4a20450668 100644 --- a/CRM/Campaign/Form/Survey/Questions.php +++ b/CRM/Campaign/Form/Survey/Questions.php @@ -96,7 +96,6 @@ class CRM_Campaign_Form_Survey_Questions extends CRM_Campaign_Form_Survey { parent::buildQuickForm(); } - /** * Process the form. */ diff --git a/CRM/Campaign/Form/Survey/Results.php b/CRM/Campaign/Form/Survey/Results.php index 20475c05aa..56560418d1 100644 --- a/CRM/Campaign/Form/Survey/Results.php +++ b/CRM/Campaign/Form/Survey/Results.php @@ -40,10 +40,13 @@ class CRM_Campaign_Form_Survey_Results extends CRM_Campaign_Form_Survey { protected $_reportTitle; - /* values + /** + * values * * @var array + * */ + public $_values; const NUM_OPTION = 11; diff --git a/CRM/Campaign/Form/Task/Interview.php b/CRM/Campaign/Form/Task/Interview.php index 1bffb99f9a..a1668fdb98 100644 --- a/CRM/Campaign/Form/Task/Interview.php +++ b/CRM/Campaign/Form/Task/Interview.php @@ -45,6 +45,7 @@ class CRM_Campaign_Form_Task_Interview extends CRM_Campaign_Form_Task { /** * Variable to store redirect path + * @var string */ private $_userContext; diff --git a/CRM/Campaign/Info.php b/CRM/Campaign/Info.php index 07b5373ff3..9543c059d5 100644 --- a/CRM/Campaign/Info.php +++ b/CRM/Campaign/Info.php @@ -36,6 +36,7 @@ class CRM_Campaign_Info extends CRM_Core_Component_Info { /** + * @var string * @inheritDoc */ protected $keyword = 'campaign'; @@ -54,7 +55,6 @@ class CRM_Campaign_Info extends CRM_Core_Component_Info { ]; } - /** * @inheritDoc * @param bool $getAllUnconditionally @@ -103,7 +103,6 @@ class CRM_Campaign_Info extends CRM_Core_Component_Info { return $permissions; } - /** * @inheritDoc * @return null diff --git a/CRM/Campaign/Page/Petition.php b/CRM/Campaign/Page/Petition.php index caf264277b..c526df7f0e 100644 --- a/CRM/Campaign/Page/Petition.php +++ b/CRM/Campaign/Page/Petition.php @@ -35,6 +35,7 @@ * Page for displaying Petition Signatures. */ class CRM_Campaign_Page_Petition extends CRM_Core_Page { + public function browse() { //get the survey id diff --git a/CRM/Campaign/Page/Petition/Confirm.php b/CRM/Campaign/Page/Petition/Confirm.php index 4d6548f6ab..ec341bfa8a 100644 --- a/CRM/Campaign/Page/Petition/Confirm.php +++ b/CRM/Campaign/Page/Petition/Confirm.php @@ -31,6 +31,7 @@ * @copyright CiviCRM LLC (c) 2004-2019 */ class CRM_Campaign_Page_Petition_Confirm extends CRM_Core_Page { + /** * @return string * @throws Exception diff --git a/CRM/Campaign/Page/Petition/ThankYou.php b/CRM/Campaign/Page/Petition/ThankYou.php index 88eae02f3f..ac4d8d4b83 100644 --- a/CRM/Campaign/Page/Petition/ThankYou.php +++ b/CRM/Campaign/Page/Petition/ThankYou.php @@ -31,6 +31,7 @@ * @copyright CiviCRM LLC (c) 2004-2019 */ class CRM_Campaign_Page_Petition_ThankYou extends CRM_Core_Page { + /** * Run page. * diff --git a/CRM/Campaign/Page/SurveyType.php b/CRM/Campaign/Page/SurveyType.php index 7303571c3f..bfe7e4cd90 100644 --- a/CRM/Campaign/Page/SurveyType.php +++ b/CRM/Campaign/Page/SurveyType.php @@ -43,7 +43,7 @@ class CRM_Campaign_Page_SurveyType extends CRM_Core_Page_Basic { * * @var array */ - static $_links = NULL; + public static $_links = NULL; /** * The option group name. diff --git a/CRM/Campaign/PseudoConstant.php b/CRM/Campaign/PseudoConstant.php index c9838d310b..e121a86d5b 100644 --- a/CRM/Campaign/PseudoConstant.php +++ b/CRM/Campaign/PseudoConstant.php @@ -57,6 +57,7 @@ class CRM_Campaign_PseudoConstant extends CRM_Core_PseudoConstant { /** * Engagement Level + * @var int */ private static $engagementLevel; diff --git a/CRM/Campaign/Selector/Search.php b/CRM/Campaign/Selector/Search.php index 5840333917..1dc5c177b3 100644 --- a/CRM/Campaign/Selector/Search.php +++ b/CRM/Campaign/Selector/Search.php @@ -41,20 +41,20 @@ class CRM_Campaign_Selector_Search extends CRM_Core_Selector_Base implements CRM * * @var array */ - static $_links = NULL; + public static $_links = NULL; /** * We use desc to remind us what that column is, name is used in the tpl * * @var array */ - static $_columnHeaders; + public static $_columnHeaders; /** * Properties of contact we're interested in displaying * @var array */ - static $_properties = [ + public static $_properties = [ 'contact_id', 'sort_name', 'street_unit', @@ -178,7 +178,7 @@ class CRM_Campaign_Selector_Search extends CRM_Core_Selector_Base implements CRM * * @return array */ - static public function &links() { + public static function &links() { return self::$_links = []; } diff --git a/CRM/Campaign/Task.php b/CRM/Campaign/Task.php index 13682c1a44..6e4367b0a6 100644 --- a/CRM/Campaign/Task.php +++ b/CRM/Campaign/Task.php @@ -38,13 +38,18 @@ */ class CRM_Campaign_Task extends CRM_Core_Task { + /** + * Campaign tasks + */ const - // Campaign tasks INTERVIEW = 601, RESERVE = 602, RELEASE = 603; - static $objectType = 'campaign'; + /** + * @var string + */ + public static $objectType = 'campaign'; /** * These tasks are the core set of tasks that the user can perform diff --git a/CRM/Case/BAO/Case.php b/CRM/Case/BAO/Case.php index db2d1ca90c..091b4e9f04 100644 --- a/CRM/Case/BAO/Case.php +++ b/CRM/Case/BAO/Case.php @@ -41,7 +41,7 @@ class CRM_Case_BAO_Case extends CRM_Case_DAO_Case { * * @var array */ - static $_exportableFields = NULL; + public static $_exportableFields = NULL; /** * Class constructor. @@ -416,6 +416,7 @@ WHERE cc.contact_id = %1 AND civicrm_case_type.name = '{$caseType}'"; * @param int $userID * @param string $condition * @param string $limit + * @param string $order * * @return string */ diff --git a/CRM/Case/BAO/CaseType.php b/CRM/Case/BAO/CaseType.php index d798576114..2127b92e37 100644 --- a/CRM/Case/BAO/CaseType.php +++ b/CRM/Case/BAO/CaseType.php @@ -41,7 +41,7 @@ class CRM_Case_BAO_CaseType extends CRM_Case_DAO_CaseType { * * @var array */ - static $_exportableFields = NULL; + public static $_exportableFields = NULL; /** * Takes an associative array and creates a Case Type object. @@ -102,7 +102,6 @@ class CRM_Case_BAO_CaseType extends CRM_Case_DAO_CaseType { } } - /** * Format / convert submitted array to xml for case type definition * diff --git a/CRM/Case/Form/Activity/LinkCases.php b/CRM/Case/Form/Activity/LinkCases.php index 516647c3f4..322225c52b 100644 --- a/CRM/Case/Form/Activity/LinkCases.php +++ b/CRM/Case/Form/Activity/LinkCases.php @@ -35,6 +35,7 @@ * This class generates form components for LinkCase Activity. */ class CRM_Case_Form_Activity_LinkCases { + /** * @param CRM_Core_Form $form * diff --git a/CRM/Case/Form/Case.php b/CRM/Case/Form/Case.php index f988aba145..685ce79553 100644 --- a/CRM/Case/Form/Case.php +++ b/CRM/Case/Form/Case.php @@ -45,41 +45,49 @@ class CRM_Case_Form_Case extends CRM_Core_Form { /** * Case Id + * @var int */ public $_caseId = NULL; /** * Client Id + * @var int */ public $_currentlyViewedContactId = NULL; /** * Activity Type File + * @var int */ public $_activityTypeFile = NULL; /** * Logged in contact Id + * @var int */ public $_currentUserId = NULL; /** * Activity type Id + * @var int */ public $_activityTypeId = NULL; /** * Activity type Id + * @var int */ public $_activityId = NULL; /** * Action + * @var int */ public $_action; /** * Case type id + * @var int */ public $_caseTypeId = NULL; diff --git a/CRM/Case/Form/EditClient.php b/CRM/Case/Form/EditClient.php index 30c354a668..6c38dd0928 100644 --- a/CRM/Case/Form/EditClient.php +++ b/CRM/Case/Form/EditClient.php @@ -91,7 +91,6 @@ class CRM_Case_Form_EditClient extends CRM_Core_Form { $this->preventAjaxSubmit(); } - public function addRules() { $this->addFormRule([get_class($this), 'formRule'], $this); } diff --git a/CRM/Case/Form/Report.php b/CRM/Case/Form/Report.php index 5cb501fe19..0c926c66bf 100644 --- a/CRM/Case/Form/Report.php +++ b/CRM/Case/Form/Report.php @@ -38,16 +38,19 @@ class CRM_Case_Form_Report extends CRM_Core_Form { /** * Case Id + * @var int */ public $_caseID = NULL; /** * Client Id + * @var int */ public $_clientID = NULL; /** * Activity set name + * @var string */ public $_activitySetName = NULL; @@ -98,17 +101,16 @@ class CRM_Case_Form_Report extends CRM_Core_Form { ); $this->addButtons([ - [ - 'type' => 'refresh', - 'name' => ts('Generate Report'), - 'isDefault' => TRUE, - ], - [ - 'type' => 'cancel', - 'name' => ts('Cancel'), - ], - ] - ); + [ + 'type' => 'refresh', + 'name' => ts('Generate Report'), + 'isDefault' => TRUE, + ], + [ + 'type' => 'cancel', + 'name' => ts('Cancel'), + ], + ]); // We want this form to redirect to a full page $this->preventAjaxSubmit(); } diff --git a/CRM/Case/Form/Search.php b/CRM/Case/Form/Search.php index 894e0059e3..7aabdfe489 100644 --- a/CRM/Case/Form/Search.php +++ b/CRM/Case/Form/Search.php @@ -59,6 +59,7 @@ class CRM_Case_Form_Search extends CRM_Core_Form_Search { /** * Prefix for the controller + * @var sting */ protected $_prefix = 'case_'; @@ -298,6 +299,8 @@ class CRM_Case_Form_Search extends CRM_Core_Form_Search { * * @param array $fields * Posted values of the form. + * @param array $files + * @param object $form * * @return array|bool */ diff --git a/CRM/Case/Form/Task.php b/CRM/Case/Form/Task.php index ee7644925b..43d77f1ced 100644 --- a/CRM/Case/Form/Task.php +++ b/CRM/Case/Form/Task.php @@ -35,10 +35,16 @@ */ class CRM_Case_Form_Task extends CRM_Core_Form_Task { - // Must be set to entity table name (eg. civicrm_participant) by child class - static $tableName = 'civicrm_case'; - // Must be set to entity shortname (eg. event) - static $entityShortname = 'case'; + /** + * Must be set to entity table name (eg. civicrm_participant) by child class + * @var string + */ + public static $tableName = 'civicrm_case'; + /** + * Must be set to entity shortname (eg. event) + * @var string + */ + public static $entityShortname = 'case'; /** * @inheritDoc diff --git a/CRM/Case/Form/Task/Batch.php b/CRM/Case/Form/Task/Batch.php index 5d28b97617..c7960774ff 100644 --- a/CRM/Case/Form/Task/Batch.php +++ b/CRM/Case/Form/Task/Batch.php @@ -35,10 +35,16 @@ */ class CRM_Case_Form_Task_Batch extends CRM_Core_Form_Task_Batch { - // Must be set to entity table name (eg. civicrm_participant) by child class - static $tableName = 'civicrm_case'; - // Must be set to entity shortname (eg. event) - static $entityShortname = 'case'; + /** + * Must be set to entity table name (eg. civicrm_participant) by child class + * @var string + */ + public static $tableName = 'civicrm_case'; + /** + * Must be set to entity shortname (eg. event) + * @var string + */ + public static $entityShortname = 'case'; /** * Process the form after the input has been submitted and validated. diff --git a/CRM/Case/Form/Task/PickProfile.php b/CRM/Case/Form/Task/PickProfile.php index f7609a89ab..c03d48df1e 100644 --- a/CRM/Case/Form/Task/PickProfile.php +++ b/CRM/Case/Form/Task/PickProfile.php @@ -40,13 +40,13 @@ class CRM_Case_Form_Task_PickProfile extends CRM_Core_Form_Task_PickProfile { * * @var string */ - static $tableName = 'civicrm_case'; + public static $tableName = 'civicrm_case'; /** * Must be set to entity shortname (eg. event) * * @var string */ - static $entityShortname = 'case'; + public static $entityShortname = 'case'; } diff --git a/CRM/Case/Form/Task/Print.php b/CRM/Case/Form/Task/Print.php index 09e0085768..9bb1167f8e 100644 --- a/CRM/Case/Form/Task/Print.php +++ b/CRM/Case/Form/Task/Print.php @@ -74,18 +74,17 @@ class CRM_Case_Form_Task_Print extends CRM_Case_Form_Task { // just need to add a javacript to popup the window for printing // $this->addButtons([ - [ - 'type' => 'next', - 'name' => ts('Print Case List'), - 'js' => ['onclick' => 'window.print()'], - 'isDefault' => TRUE, - ], - [ - 'type' => 'back', - 'name' => ts('Done'), - ], - ] - ); + [ + 'type' => 'next', + 'name' => ts('Print Case List'), + 'js' => ['onclick' => 'window.print()'], + 'isDefault' => TRUE, + ], + [ + 'type' => 'back', + 'name' => ts('Done'), + ], + ]); } /** diff --git a/CRM/Case/Form/Task/Result.php b/CRM/Case/Form/Task/Result.php index 49de632eba..d7a3a4678b 100644 --- a/CRM/Case/Form/Task/Result.php +++ b/CRM/Case/Form/Task/Result.php @@ -47,13 +47,12 @@ class CRM_Case_Form_Task_Result extends CRM_Case_Form_Task { */ public function buildQuickForm() { $this->addButtons([ - [ - 'type' => 'done', - 'name' => ts('Done'), - 'isDefault' => TRUE, - ], - ] - ); + [ + 'type' => 'done', + 'name' => ts('Done'), + 'isDefault' => TRUE, + ], + ]); } } diff --git a/CRM/Case/Form/Task/SearchTaskHookSample.php b/CRM/Case/Form/Task/SearchTaskHookSample.php index f9f9744234..ec17a006c2 100644 --- a/CRM/Case/Form/Task/SearchTaskHookSample.php +++ b/CRM/Case/Form/Task/SearchTaskHookSample.php @@ -73,13 +73,12 @@ WHERE cs.id IN ( {$caseIDs} )"; */ public function buildQuickForm() { $this->addButtons([ - [ - 'type' => 'done', - 'name' => ts('Done'), - 'isDefault' => TRUE, - ], - ] - ); + [ + 'type' => 'done', + 'name' => ts('Done'), + 'isDefault' => TRUE, + ], + ]); } } diff --git a/CRM/Case/Info.php b/CRM/Case/Info.php index cb5e7b8cbb..2a57400c68 100644 --- a/CRM/Case/Info.php +++ b/CRM/Case/Info.php @@ -37,6 +37,7 @@ class CRM_Case_Info extends CRM_Core_Component_Info { /** + * @var string * @inheritDoc */ protected $keyword = 'case'; diff --git a/CRM/Case/Page/AJAX.php b/CRM/Case/Page/AJAX.php index 764f1f7d13..4507d161a9 100644 --- a/CRM/Case/Page/AJAX.php +++ b/CRM/Case/Page/AJAX.php @@ -106,8 +106,8 @@ class CRM_Case_Page_AJAX { $case = civicrm_api3('Case', 'getsingle', [ 'id' => $caseId, 'check_permissions' => TRUE, - 'return' => ['subject', 'case_type_id', 'status_id', 'start_date', 'end_date']] - ); + 'return' => ['subject', 'case_type_id', 'status_id', 'start_date', 'end_date'], + ]); $caseStatuses = CRM_Case_PseudoConstant::caseStatus(); $caseTypes = CRM_Case_PseudoConstant::caseType('title', FALSE); diff --git a/CRM/Case/Page/Tab.php b/CRM/Case/Page/Tab.php index 36116498f4..d7c7055ca2 100644 --- a/CRM/Case/Page/Tab.php +++ b/CRM/Case/Page/Tab.php @@ -41,7 +41,7 @@ class CRM_Case_Page_Tab extends CRM_Core_Page { * * @var array */ - static $_links = NULL; + public static $_links = NULL; public $_permission = NULL; public $_contactId = NULL; @@ -216,7 +216,7 @@ class CRM_Case_Page_Tab extends CRM_Core_Page { * @return array * (reference) of action links */ - static public function &links() { + public static function &links() { $config = CRM_Core_Config::singleton(); if (!(self::$_links)) { diff --git a/CRM/Case/PseudoConstant.php b/CRM/Case/PseudoConstant.php index 3ee2236862..7cc943acfa 100644 --- a/CRM/Case/PseudoConstant.php +++ b/CRM/Case/PseudoConstant.php @@ -40,7 +40,7 @@ class CRM_Case_PseudoConstant extends CRM_Core_PseudoConstant { * Activity type * @var array */ - static $activityTypeList = []; + public static $activityTypeList = []; /** * Get all the case statues. diff --git a/CRM/Case/Selector/Search.php b/CRM/Case/Selector/Search.php index 5869a50fd2..55c396e60e 100644 --- a/CRM/Case/Selector/Search.php +++ b/CRM/Case/Selector/Search.php @@ -41,20 +41,20 @@ class CRM_Case_Selector_Search extends CRM_Core_Selector_Base { * * @var array */ - static $_links = NULL; + public static $_links = NULL; /** * We use desc to remind us what that column is, name is used in the tpl * * @var array */ - static $_columnHeaders; + public static $_columnHeaders; /** * Properties of contact we're interested in displaying * @var array */ - static $_properties = [ + public static $_properties = [ 'contact_id', 'contact_type', 'sort_name', @@ -180,7 +180,7 @@ class CRM_Case_Selector_Search extends CRM_Core_Selector_Base { * * @return array */ - static public function &links($isDeleted = FALSE, $key = NULL) { + public static function &links($isDeleted = FALSE, $key = NULL) { $extraParams = ($key) ? "&key={$key}" : NULL; if ($isDeleted) { diff --git a/CRM/Case/Task.php b/CRM/Case/Task.php index 6196aa6cf4..5907da813d 100644 --- a/CRM/Case/Task.php +++ b/CRM/Case/Task.php @@ -38,11 +38,15 @@ */ class CRM_Case_Task extends CRM_Core_Task { - const - // Case tasks - RESTORE_CASES = 501; + /** + * Case tasks + */ + const RESTORE_CASES = 501; - static $objectType = 'case'; + /** + * @var string + */ + public static $objectType = 'case'; /** * These tasks are the core set of tasks that the user can perform diff --git a/CRM/Case/XMLProcessor/Process.php b/CRM/Case/XMLProcessor/Process.php index 338ae20fad..b83e11cce6 100644 --- a/CRM/Case/XMLProcessor/Process.php +++ b/CRM/Case/XMLProcessor/Process.php @@ -619,7 +619,7 @@ AND a.is_deleted = 0 $defaultAssigneeOptions = civicrm_api3('OptionValue', 'get', [ 'option_group_id' => 'activity_default_assignee', - 'options' => [ 'limit' => 0 ] + 'options' => ['limit' => 0], ]); foreach ($defaultAssigneeOptions['values'] as $option) { @@ -686,7 +686,7 @@ AND a.is_deleted = 0 protected function isBidirectionalRelationshipType($relationshipTypeId) { $relationshipTypeResult = civicrm_api3('RelationshipType', 'get', [ 'id' => $relationshipTypeId, - 'options' => ['limit' => 1] + 'options' => ['limit' => 1], ]); if ($relationshipTypeResult['count'] === 0) { @@ -712,7 +712,7 @@ AND a.is_deleted = 0 } $contact = civicrm_api3('Contact', 'get', [ - 'id' => $activityTypeXML->default_assignee_contact + 'id' => $activityTypeXML->default_assignee_contact, ]); if ($contact['count'] == 1) { diff --git a/CRM/Case/XMLProcessor/Report.php b/CRM/Case/XMLProcessor/Report.php index aa0b6c0b52..8224e22c1d 100644 --- a/CRM/Case/XMLProcessor/Report.php +++ b/CRM/Case/XMLProcessor/Report.php @@ -65,9 +65,9 @@ class CRM_Case_XMLProcessor_Report extends CRM_Case_XMLProcessor { public function getRedactionRules() { foreach (array( - 'redactionStringRules', - 'redactionRegexRules', - ) as $key => $rule) { + 'redactionStringRules', + 'redactionRegexRules', + ) as $key => $rule) { $$rule = CRM_Case_PseudoConstant::redactionRule($key); if (!empty($$rule)) { -- 2.25.1