From 1afc557a91657e52c45e0b06ed0a0fe0abde72fc Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Tue, 6 Jan 2015 13:21:21 -0800 Subject: [PATCH] INFRA-132 - CRM/Grant - phpcbf --- CRM/Grant/BAO/Grant.php | 6 ++++-- CRM/Grant/BAO/Query.php | 6 ++++-- CRM/Grant/Form/GrantView.php | 1 - CRM/Grant/Form/Search.php | 1 - CRM/Grant/Form/Task.php | 2 +- CRM/Grant/Info.php | 9 ++++++--- CRM/Grant/Selector/Search.php | 18 +++++++++--------- CRM/Grant/Task.php | 3 ++- 8 files changed, 26 insertions(+), 20 deletions(-) diff --git a/CRM/Grant/BAO/Grant.php b/CRM/Grant/BAO/Grant.php index f34a1817f0..b3b33763e7 100644 --- a/CRM/Grant/BAO/Grant.php +++ b/CRM/Grant/BAO/Grant.php @@ -225,7 +225,7 @@ class CRM_Grant_BAO_Grant extends CRM_Grant_DAO_Grant { ); } - // add the recently created Grant + // add the recently created Grant CRM_Utils_Recent::add($title, $url, $grant->id, @@ -401,7 +401,9 @@ class CRM_Grant_BAO_Grant extends CRM_Grant_DAO_Grant { ); $fields = CRM_Grant_DAO_Grant::export(); - $grantNote = array('grant_note' => array('title' => ts('Grant Note'), + $grantNote = array( + 'grant_note' => array( + 'title' => ts('Grant Note'), 'name' => 'grant_note', 'data_type' => CRM_Utils_Type::T_TEXT, )); diff --git a/CRM/Grant/BAO/Query.php b/CRM/Grant/BAO/Query.php index 453d92033f..34901e4faa 100644 --- a/CRM/Grant/BAO/Query.php +++ b/CRM/Grant/BAO/Query.php @@ -423,10 +423,12 @@ class CRM_Grant_BAO_Query { * @param $row * @param int $id */ - public static function searchAction(&$row, $id) {} + public static function searchAction(&$row, $id) { + } /** * @param $tables */ - public static function tableNames(&$tables) {} + public static function tableNames(&$tables) { + } } diff --git a/CRM/Grant/Form/GrantView.php b/CRM/Grant/Form/GrantView.php index 6f44a83a7a..0dfa32303d 100644 --- a/CRM/Grant/Form/GrantView.php +++ b/CRM/Grant/Form/GrantView.php @@ -80,7 +80,6 @@ class CRM_Grant_Form_GrantView extends CRM_Core_Form { $this->assign('note', CRM_Core_DAO::getFieldValue('CRM_Core_DAO_Note', $this->_noteId, 'note')); } - // add Grant to Recent Items $url = CRM_Utils_System::url('civicrm/contact/view/grant', "action=view&reset=1&id={$values['id']}&cid={$values['contact_id']}&context=home" diff --git a/CRM/Grant/Form/Search.php b/CRM/Grant/Form/Search.php index 964695f8b2..e522718b0e 100644 --- a/CRM/Grant/Form/Search.php +++ b/CRM/Grant/Form/Search.php @@ -236,7 +236,6 @@ class CRM_Grant_Form_Search extends CRM_Core_Form_Search { ); } - $selector = new CRM_Grant_Selector_Search($this->_queryParams, $this->_action, NULL, diff --git a/CRM/Grant/Form/Task.php b/CRM/Grant/Form/Task.php index 47229a25b5..a0fd862c4a 100644 --- a/CRM/Grant/Form/Task.php +++ b/CRM/Grant/Form/Task.php @@ -101,7 +101,7 @@ class CRM_Grant_Form_Task extends CRM_Core_Form { } else { $queryParams = $form->get('queryParams'); - $sortOrder = null; + $sortOrder = NULL; if ( $form->get( CRM_Utils_Sort::SORT_ORDER ) ) { $sortOrder = $form->get( CRM_Utils_Sort::SORT_ORDER ); } diff --git a/CRM/Grant/Info.php b/CRM/Grant/Info.php index 010354d29d..127456278d 100644 --- a/CRM/Grant/Info.php +++ b/CRM/Grant/Info.php @@ -93,7 +93,8 @@ class CRM_Grant_Info extends CRM_Core_Component_Info { * @return array */ public function registerTab() { - return array('title' => ts('Grants'), + return array( + 'title' => ts('Grants'), 'url' => 'grant', 'weight' => 50, ); @@ -104,7 +105,8 @@ class CRM_Grant_Info extends CRM_Core_Component_Info { * @return array */ public function registerAdvancedSearchPane() { - return array('title' => ts('Grants'), + return array( + 'title' => ts('Grants'), 'weight' => 50, ); } @@ -126,7 +128,8 @@ class CRM_Grant_Info extends CRM_Core_Component_Info { CRM_Core_Permission::check('edit grants') ) { $shortCuts = array_merge($shortCuts, array( - array('path' => 'civicrm/grant/add', + array( + 'path' => 'civicrm/grant/add', 'query' => "reset=1&action=add&context=standalone", 'ref' => 'new-grant', 'title' => ts('Grant'), diff --git a/CRM/Grant/Selector/Search.php b/CRM/Grant/Selector/Search.php index c6d4abcdab..57b39d017f 100644 --- a/CRM/Grant/Selector/Search.php +++ b/CRM/Grant/Selector/Search.php @@ -148,16 +148,15 @@ class CRM_Grant_Selector_Search extends CRM_Core_Selector_Base implements CRM_Co @access public */ function __construct(&$queryParams, - $action = CRM_Core_Action::NONE, + $action = CRM_Core_Action::NONE, $grantClause = NULL, - $single = FALSE, - $limit = NULL, - $context = 'search' + $single = FALSE, + $limit = NULL, + $context = 'search' ) { // submitted form values $this->_queryParams = &$queryParams; - $this->_single = $single; $this->_limit = $limit; $this->_context = $context; @@ -207,7 +206,8 @@ class CRM_Grant_Selector_Search extends CRM_Core_Selector_Base implements CRM_Co if ($cid) { $delLink = array( - CRM_Core_Action::DELETE => array('name' => ts('Delete'), + CRM_Core_Action::DELETE => array( + 'name' => ts('Delete'), 'url' => 'civicrm/contact/view/grant', 'qs' => 'action=delete&reset=1&cid=%%cid%%&id=%%id%%&selectedChild=grant' . $extraParams, 'title' => ts('Delete Grant'), @@ -320,8 +320,7 @@ class CRM_Grant_Selector_Search extends CRM_Core_Selector_Base implements CRM_Co $result->grant_id ); - $row['contact_type'] = CRM_Contact_BAO_Contact_Utils::getImage($result->contact_sub_type ? - $result->contact_sub_type : $result->contact_type, FALSE, $result->contact_id + $row['contact_type'] = CRM_Contact_BAO_Contact_Utils::getImage($result->contact_sub_type ? $result->contact_sub_type : $result->contact_type, FALSE, $result->contact_id ); $rows[] = $row; @@ -354,7 +353,8 @@ class CRM_Grant_Selector_Search extends CRM_Core_Selector_Base implements CRM_Co public function &getColumnHeaders($action = NULL, $output = NULL) { if (!isset(self::$_columnHeaders)) { self::$_columnHeaders = array( - array('name' => ts('Status'), + array( + 'name' => ts('Status'), 'sort' => 'grant_status', 'direction' => CRM_Utils_Sort::DONTCARE, ), diff --git a/CRM/Grant/Task.php b/CRM/Grant/Task.php index c44e872ffe..8ea92e0542 100644 --- a/CRM/Grant/Task.php +++ b/CRM/Grant/Task.php @@ -66,7 +66,8 @@ class CRM_Grant_Task { */ public static function &tasks() { if (!(self::$_tasks)) { - self::$_tasks = array(1 => array( + self::$_tasks = array( + 1 => array( 'title' => ts('Delete Grants'), 'class' => 'CRM_Grant_Form_Task_Delete', 'result' => FALSE, -- 2.25.1