From: pratikshad Date: Thu, 15 Jan 2015 12:33:19 +0000 (+0530) Subject: Fixed Code clean up for batch 15 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=408b79bf693050c99d4e441bbf5f55d147ed26db;p=civicrm-core.git Fixed Code clean up for batch 15 --- diff --git a/CRM/Activity/Form/ActivityView.php b/CRM/Activity/Form/ActivityView.php index cee0767830..59e1272310 100644 --- a/CRM/Activity/Form/ActivityView.php +++ b/CRM/Activity/Form/ActivityView.php @@ -61,7 +61,7 @@ class CRM_Activity_Form_ActivityView extends CRM_Core_Form { if (!in_array($context, array( 'home', 'dashlet', - 'dashletFullscreen' + 'dashletFullscreen', )) ) { $url = CRM_Utils_System::url('civicrm/contact/view', "reset=1&cid={$cid}&selectedChild=activity"); diff --git a/CRM/Activity/Import/Parser/Activity.php b/CRM/Activity/Import/Parser/Activity.php index bf077530dc..01e7b6869f 100644 --- a/CRM/Activity/Import/Parser/Activity.php +++ b/CRM/Activity/Import/Parser/Activity.php @@ -135,7 +135,7 @@ class CRM_Activity_Import_Parser_Activity extends CRM_Activity_Import_Parser { * @param array $values * The array of values belonging to this line. * - * @return boolean + * @return bool */ public function mapField(&$values) { return CRM_Import_Parser::VALID; @@ -147,7 +147,7 @@ class CRM_Activity_Import_Parser_Activity extends CRM_Activity_Import_Parser { * @param array $values * The array of values belonging to this line. * - * @return boolean + * @return bool * the result of this processing */ public function preview(&$values) { @@ -160,7 +160,7 @@ class CRM_Activity_Import_Parser_Activity extends CRM_Activity_Import_Parser { * @param array $values * The array of values belonging to this line. * - * @return boolean + * @return bool * the result of this processing */ public function summary(&$values) { @@ -245,7 +245,7 @@ class CRM_Activity_Import_Parser_Activity extends CRM_Activity_Import_Parser { * @param array $values * The array of values belonging to this line. * - * @return boolean + * @return bool * the result of this processing */ public function import($onDuplicate, &$values) { diff --git a/CRM/Badge/BAO/Badge.php b/CRM/Badge/BAO/Badge.php index 183a7e74b3..1461142037 100644 --- a/CRM/Badge/BAO/Badge.php +++ b/CRM/Badge/BAO/Badge.php @@ -268,8 +268,7 @@ class CRM_Badge_BAO_Badge { $data = $formattedRow['values']; if ($formattedRow['barcode']['type'] == 'barcode') { - $data['current_value'] = - $formattedRow['values']['contact_id'] . '-' . $formattedRow['values']['participant_id']; + $data['current_value'] = $formattedRow['values']['contact_id'] . '-' . $formattedRow['values']['participant_id']; } else { // view participant url diff --git a/CRM/Batch/Page/AJAX.php b/CRM/Batch/Page/AJAX.php index 98263c5f9a..1de2a868bd 100644 --- a/CRM/Batch/Page/AJAX.php +++ b/CRM/Batch/Page/AJAX.php @@ -65,16 +65,11 @@ class CRM_Batch_Page_AJAX { ); $sEcho = CRM_Utils_Type::escape($_REQUEST['sEcho'], 'Integer'); - $offset = - isset($_REQUEST['iDisplayStart']) ? CRM_Utils_Type::escape($_REQUEST['iDisplayStart'], 'Integer') : 0; - $rowCount = - isset($_REQUEST['iDisplayLength']) ? CRM_Utils_Type::escape($_REQUEST['iDisplayLength'], 'Integer') : 25; - $sort = - isset($_REQUEST['iSortCol_0']) ? CRM_Utils_Array::value(CRM_Utils_Type::escape($_REQUEST['iSortCol_0'], 'Integer'), $sortMapper) : NULL; - $sortOrder = - isset($_REQUEST['sSortDir_0']) ? CRM_Utils_Type::escape($_REQUEST['sSortDir_0'], 'String') : 'asc'; - $context = - isset($_REQUEST['context']) ? CRM_Utils_Type::escape($_REQUEST['context'], 'String') : NULL; + $offset = isset($_REQUEST['iDisplayStart']) ? CRM_Utils_Type::escape($_REQUEST['iDisplayStart'], 'Integer') : 0; + $rowCount = isset($_REQUEST['iDisplayLength']) ? CRM_Utils_Type::escape($_REQUEST['iDisplayLength'], 'Integer') : 25; + $sort = isset($_REQUEST['iSortCol_0']) ? CRM_Utils_Array::value(CRM_Utils_Type::escape($_REQUEST['iSortCol_0'], 'Integer'), $sortMapper) : NULL; + $sortOrder = isset($_REQUEST['sSortDir_0']) ? CRM_Utils_Type::escape($_REQUEST['sSortDir_0'], 'String') : 'asc'; + $context = isset($_REQUEST['context']) ? CRM_Utils_Type::escape($_REQUEST['context'], 'String') : NULL; $params = $_REQUEST; if ($sort && $sortOrder) { diff --git a/CRM/Campaign/BAO/Query.php b/CRM/Campaign/BAO/Query.php index 0e6b778a66..137aa33b87 100755 --- a/CRM/Campaign/BAO/Query.php +++ b/CRM/Campaign/BAO/Query.php @@ -267,7 +267,7 @@ civicrm_activity_assignment.record_type_id = $assigneeID ) "; * * @return array|null */ - static function defaultReturnProperties( + public static function defaultReturnProperties( $mode, $includeCustomFields = TRUE ) { @@ -406,7 +406,7 @@ INNER JOIN civicrm_custom_group grp on fld.custom_group_id = grp.id while ($dao->fetch()) { foreach (array( 'ward', - 'precinct' + 'precinct', ) as $name) { if (stripos($name, $dao->label) !== FALSE) { $fieldId = $dao->id; @@ -571,7 +571,7 @@ INNER JOIN civicrm_custom_group grp on fld.custom_group_id = grp.id /** * Build the campaign clause for component serach. * - **/ + */ public static function componentSearchClause(&$params, &$query) { $op = CRM_Utils_Array::value('op', $params, '='); $campaign = CRM_Utils_Array::value('campaign', $params); @@ -586,7 +586,7 @@ INNER JOIN civicrm_custom_group grp on fld.custom_group_id = grp.id if (is_array($campaign)) { foreach (array( 'current_campaign', - 'past_campaign' + 'past_campaign', ) as $ignore) { $index = array_search($ignore, $campaign); if ($index !== FALSE) { diff --git a/CRM/Case/BAO/Case.php b/CRM/Case/BAO/Case.php index bd27990f46..7d0d5e9ad6 100644 --- a/CRM/Case/BAO/Case.php +++ b/CRM/Case/BAO/Case.php @@ -198,7 +198,7 @@ class CRM_Case_BAO_Case extends CRM_Case_DAO_Case { * * @param int $caseID * - * @return Void + * @return; */ public static function deleteCaseContact($caseID) { $caseContact = new CRM_Case_DAO_CaseContact(); @@ -1857,7 +1857,7 @@ SELECT case_status.label AS case_status, status_id, civicrm_case_type.title AS c $where = $groupBy = ' '; if (!$caseID) { - return; + return NULL; } if ($latestDate) { @@ -2001,7 +2001,7 @@ SELECT case_status.label AS case_status, status_id, civicrm_case_type.title AS c */ public static function getCaseManagerContact($caseType, $caseId) { if (!$caseType || !$caseId) { - return; + return NULL; } $caseManagerContact = array(); @@ -3379,7 +3379,7 @@ WHERE id IN (' . implode(',', $copiedActivityIds) . ')'; * * @param string $fieldName * @param string $context - * @see CRM_Core_DAO::buildOptionsContext. + * @see CRM_Core_DAO::buildOptionsContext * @param array $props * Whatever is known about this dao object. * diff --git a/CRM/Case/PseudoConstant.php b/CRM/Case/PseudoConstant.php index 26fdd21fa4..8b45a10986 100644 --- a/CRM/Case/PseudoConstant.php +++ b/CRM/Case/PseudoConstant.php @@ -106,7 +106,6 @@ class CRM_Case_PseudoConstant extends CRM_Core_PseudoConstant { * @return array * array reference of all redaction rules */ - public static function redactionRule($filter = NULL) { // if ( ! self::$redactionRule ) { self::$redactionRule = array(); diff --git a/CRM/Contact/Form/Search/Builder.php b/CRM/Contact/Form/Search/Builder.php index 1101237727..2e74aaea81 100644 --- a/CRM/Contact/Form/Search/Builder.php +++ b/CRM/Contact/Form/Search/Builder.php @@ -213,7 +213,7 @@ class CRM_Contact_Form_Search_Builder extends CRM_Contact_Form_Search { // hack to handle custom data of type state and country if (in_array($type, array( 'Country', - 'StateProvince' + 'StateProvince', ))) { $type = "Integer"; } @@ -423,7 +423,7 @@ class CRM_Contact_Form_Search_Builder extends CRM_Contact_Form_Search { * FIXME: When our core fields contain reliable metadata this will be much simpler. * @return array * (string => string) key: field_name value: api entity name - * Note: options are fetched via ajax using the api "getoptions" method + * Note: options are fetched via ajax using the api "getoptions" method */ public static function fieldOptions() { // Hack to add options not retrieved by getfields @@ -450,7 +450,7 @@ class CRM_Contact_Form_Search_Builder extends CRM_Contact_Form_Search { 'member', 'contribution', 'case', - 'grant' + 'grant', ); CRM_Contact_BAO_Query_Hook::singleton()->alterSearchBuilderOptions($entities, $options); foreach ($entities as $entity) { @@ -468,7 +468,7 @@ class CRM_Contact_Form_Search_Builder extends CRM_Contact_Form_Search { } elseif (in_array(substr($field, 0, 3), array( 'is_', - 'do_' + 'do_', )) || CRM_Utils_Array::value('data_type', $info) == 'Boolean' ) { $options[$field] = 'yesno'; diff --git a/CRM/Contact/Form/Task/AddToGroup.php b/CRM/Contact/Form/Task/AddToGroup.php index 1f643851c0..1146e0df89 100644 --- a/CRM/Contact/Form/Task/AddToGroup.php +++ b/CRM/Contact/Form/Task/AddToGroup.php @@ -234,20 +234,20 @@ class CRM_Contact_Form_Task_AddToGroup extends CRM_Contact_Form_Task { $status = array( ts('%count contact added to group', array( 'count' => $added, - 'plural' => '%count contacts added to group' - )) + 'plural' => '%count contacts added to group', + )), ); if ($notAdded) { $status[] = ts('%count contact was already in group', array( 'count' => $notAdded, - 'plural' => '%count contacts were already in group' + 'plural' => '%count contacts were already in group', )); } $status = ''; CRM_Core_Session::setStatus($status, ts('Added Contact to %1', array( 1 => $groupName, 'count' => $added, - 'plural' => 'Added Contacts to %1' + 'plural' => 'Added Contacts to %1', )), 'success', array('expires' => 0)); if ($this->_context === 'amtg') { diff --git a/CRM/Contact/Form/Task/Map.php b/CRM/Contact/Form/Task/Map.php index 0a225a2ab5..65c94569d9 100644 --- a/CRM/Contact/Form/Task/Map.php +++ b/CRM/Contact/Form/Task/Map.php @@ -149,7 +149,7 @@ class CRM_Contact_Form_Task_Map extends CRM_Contact_Form_Task { * @param $addBreadCrumb * @param string $type * - * @return string + * @return; * the location of the file we have created */ public static function createMapXML($ids, $locationId, &$page, $addBreadCrumb, $type = 'Contact') { diff --git a/CRM/Contact/Page/AJAX.php b/CRM/Contact/Page/AJAX.php index 5018815665..4cd911fb46 100644 --- a/CRM/Contact/Page/AJAX.php +++ b/CRM/Contact/Page/AJAX.php @@ -161,7 +161,7 @@ class CRM_Contact_Page_AJAX { 'id', 's', 'q', - 'action' + 'action', ); foreach ($_GET as $param => $val) { if (empty($val) || @@ -1062,11 +1062,10 @@ LIMIT {$offset}, {$rowCount} $addressVal["error_message"] = "no contact id found"; } else { - $entityBlock = - array( - 'contact_id' => $contactId, - 'entity_id' => $contactId, - ); + $entityBlock = array( + 'contact_id' => $contactId, + 'entity_id' => $contactId, + ); $addressVal = CRM_Core_BAO_Address::getValues($entityBlock); } diff --git a/CRM/Contact/Page/View/UserDashBoard/GroupContact.php b/CRM/Contact/Page/View/UserDashBoard/GroupContact.php index e8570e9201..3fb41fcf8c 100644 --- a/CRM/Contact/Page/View/UserDashBoard/GroupContact.php +++ b/CRM/Contact/Page/View/UserDashBoard/GroupContact.php @@ -37,7 +37,7 @@ class CRM_Contact_Page_View_UserDashBoard_GroupContact extends CRM_Contact_Page_ /** * called when action is browse * - * @return null + * @return; */ public function browse() { $count = CRM_Contact_BAO_GroupContact::getContactGroup( @@ -84,7 +84,7 @@ class CRM_Contact_Page_View_UserDashBoard_GroupContact extends CRM_Contact_Page_ public function edit($groupId = NULL) { $this->assign('edit', $this->_edit); if (!$this->_edit) { - return; + return NULL; } $action = CRM_Utils_Request::retrieve('action', 'String', @@ -93,10 +93,8 @@ class CRM_Contact_Page_View_UserDashBoard_GroupContact extends CRM_Contact_Page_ ); if ($action == CRM_Core_Action::DELETE) { - $groupContactId = - CRM_Utils_Request::retrieve('gcid', 'Positive', CRM_Core_DAO::$_nullObject, TRUE); - $status = - CRM_Utils_Request::retrieve('st', 'String', CRM_Core_DAO::$_nullObject, TRUE); + $groupContactId = CRM_Utils_Request::retrieve('gcid', 'Positive', CRM_Core_DAO::$_nullObject, TRUE); + $status = CRM_Utils_Request::retrieve('st', 'String', CRM_Core_DAO::$_nullObject, TRUE); if (is_numeric($groupContactId) && $status) { CRM_Contact_Page_View_GroupContact::del($groupContactId, $status, $this->_contactId); } @@ -132,7 +130,7 @@ class CRM_Contact_Page_View_UserDashBoard_GroupContact extends CRM_Contact_Page_ * the main function that is called when the page loads, * it decides the which action has to be taken for the page. * - * @return null + * @return; */ public function run() { $this->edit(); diff --git a/CRM/Core/BAO/CustomQuery.php b/CRM/Core/BAO/CustomQuery.php index 4e0c1c9fe8..77633ff315 100644 --- a/CRM/Core/BAO/CustomQuery.php +++ b/CRM/Core/BAO/CustomQuery.php @@ -256,8 +256,6 @@ SELECT label, value * Generate the select clause and the associated tables * for the from clause * - * @param NULL - * * @return void */ public function select() { @@ -323,8 +321,6 @@ SELECT label, value * Generate the where clause and also the english language * equivalent * - * @param NULL - * * @return void */ public function where() { @@ -357,7 +353,7 @@ SELECT label, value $wildcard = $isSerialized ? $wildcard : TRUE; $options = CRM_Utils_Array::value('values', civicrm_api3('contact', 'getoptions', array( 'field' => $name, - 'context' => 'search' + 'context' => 'search', ), array())); $qillValue = ''; $sqlOP = $wildcard ? ' OR ' : ' AND '; @@ -555,8 +551,6 @@ SELECT label, value * Function that does the actual query generation * basically ties all the above functions together * - * @param NULL - * * @return array * array of strings */ diff --git a/CRM/Core/BAO/Dashboard.php b/CRM/Core/BAO/Dashboard.php index a8e4068bc9..d25c8fe457 100644 --- a/CRM/Core/BAO/Dashboard.php +++ b/CRM/Core/BAO/Dashboard.php @@ -159,7 +159,7 @@ class CRM_Core_BAO_Dashboard extends CRM_Core_DAO_Dashboard { $dashlets = array(); $getDashlets = civicrm_api3("Dashboard", "get", array( 'domain_id' => CRM_Core_Config::domainID(), - 'option.limit' => 0 + 'option.limit' => 0, )); $contactID = CRM_Core_Session::singleton()->get('userID'); $allDashlets = CRM_Utils_Array::index(array('name'), $getDashlets['values']); @@ -198,7 +198,7 @@ class CRM_Core_BAO_Dashboard extends CRM_Core_DAO_Dashboard { * Comma separated list. * @param string $operator * - * @return boolean + * @return bool * true if use has permission else false */ public static function checkPermission($permission, $operator) { @@ -226,7 +226,7 @@ class CRM_Core_BAO_Dashboard extends CRM_Core_DAO_Dashboard { // hack to handle case permissions if (!$componentName && in_array($key, array( 'access my cases and activities', - 'access all cases and activities' + 'access all cases and activities', )) ) { $componentName = 'CiviCase'; @@ -365,7 +365,7 @@ class CRM_Core_BAO_Dashboard extends CRM_Core_DAO_Dashboard { $dashletIDs = array(); if (is_array($columns)) { foreach ($columns as $colNo => $dashlets) { - if (!is_integer($colNo)) { + if (!is_int($colNo)) { continue; } $weight = 1; diff --git a/CRM/Core/BAO/PreferencesDate.php b/CRM/Core/BAO/PreferencesDate.php index 7d173f81db..e85135433b 100644 --- a/CRM/Core/BAO/PreferencesDate.php +++ b/CRM/Core/BAO/PreferencesDate.php @@ -75,7 +75,7 @@ class CRM_Core_BAO_PreferencesDate extends CRM_Core_DAO_PreferencesDate { * @param bool $is_active * Value we want to set the is_active field. * - * @return Object + * @return; * DAO object on sucess, null otherwise * */ diff --git a/CRM/Core/I18n.php b/CRM/Core/I18n.php index 2b532c53c3..9a22988ae0 100644 --- a/CRM/Core/I18n.php +++ b/CRM/Core/I18n.php @@ -152,7 +152,9 @@ class CRM_Core_I18n { if ($code == 'en_US') { continue; } - if (!in_array($code, $codes)) unset($all[$code]); + if (!in_array($code, $codes)) { + unset($all[$code]); + } } } @@ -176,7 +178,6 @@ class CRM_Core_I18n { * * @param string $str * source string. - * @param mixed arguments, can be passed in an array or through single variables * * @return string * modified string @@ -368,7 +369,7 @@ class CRM_Core_I18n { * * @return void */ - function localizeArray( + public function localizeArray( &$array, $params = array() ) { @@ -411,7 +412,7 @@ class CRM_Core_I18n { * @param $key * Key of the extension (can be 'civicrm', or 'org.example.foo'). * - * @return Boolean + * @return Bool * True if the domain was changed for an extension. */ public function setGettextDomain($key) { diff --git a/CRM/Core/Invoke.php b/CRM/Core/Invoke.php index c5056fa2a0..b1da8497d3 100644 --- a/CRM/Core/Invoke.php +++ b/CRM/Core/Invoke.php @@ -70,7 +70,7 @@ class CRM_Core_Invoke { */ public static function _invoke($args) { if ($args[0] !== 'civicrm') { - return; + return NULL; } if (!defined('CIVICRM_SYMFONY_PATH')) { @@ -226,7 +226,7 @@ class CRM_Core_Invoke { // check that we are permissioned to access this page if (!CRM_Core_Permission::checkMenuItem($item)) { CRM_Utils_System::permissionDenied(); - return; + return NULL; } // check if ssl is set @@ -289,7 +289,7 @@ class CRM_Core_Invoke { } $title = CRM_Utils_Array::value('title', $item); if (strstr($item['page_callback'], '_Page')) { - $object = new $item['page_callback'] ($title, $mode); + $object = new $item['page_callback']($title, $mode); $object->urlPath = explode('/', $_GET[$config->userFrameworkURLVar]); } elseif (strstr($item['page_callback'], '_Controller')) { @@ -299,7 +299,7 @@ class CRM_Core_Invoke { $addSequence = $addSequence ? 'true' : 'false'; unset($pageArgs['addSequence']); } - $object = new $item['page_callback'] ($title, TRUE, $mode, NULL, $addSequence); + $object = new $item['page_callback']($title, TRUE, $mode, NULL, $addSequence); } else { CRM_Core_Error::fatal(); diff --git a/CRM/Core/State.php b/CRM/Core/State.php index 8b003a0895..b5baf68f67 100644 --- a/CRM/Core/State.php +++ b/CRM/Core/State.php @@ -108,8 +108,6 @@ class CRM_Core_State { /** * Given an CRM Form, jump to the previous page * - * @param object the CRM_Core_Form element under consideration - * * @return mixed * does a jump to the back state */ @@ -126,8 +124,6 @@ class CRM_Core_State { /** * Given an CRM Form, jump to the next page * - * @param object the CRM_Core_Form element under consideration - * * @return mixed * does a jump to the nextstate */ @@ -161,8 +157,6 @@ class CRM_Core_State { * Mark this page as valid for the QFC framework. This is needed as * we build more advanced functionality into the StateMachine * - * @param object the QFC data container - * * @return void */ public function validate(&$data) { @@ -173,8 +167,6 @@ class CRM_Core_State { * Mark this page as invalid for the QFC framework. This is needed as * we build more advanced functionality into the StateMachine * - * @param object the QFC data container - * * @return void */ public function invalidate(&$data) { @@ -193,8 +185,6 @@ class CRM_Core_State { /** * Setter for name * - * @param string - * * @return void */ public function setName($name) { diff --git a/CRM/Custom/Import/Parser/Api.php b/CRM/Custom/Import/Parser/Api.php index 514847194f..915312f2ae 100644 --- a/CRM/Custom/Import/Parser/Api.php +++ b/CRM/Custom/Import/Parser/Api.php @@ -30,7 +30,7 @@ class CRM_Custom_Import_Parser_Api extends CRM_Custom_Import_Parser { $importableFields = $this->getGroupFieldsForImport($customGroupID, $this); $this->_fields = array_merge(array( 'do_not_import' => array('title' => ts('- do not import -')), - 'contact_id' => array('title' => ts('Contact ID')) + 'contact_id' => array('title' => ts('Contact ID')), ), $importableFields); } @@ -59,7 +59,7 @@ class CRM_Custom_Import_Parser_Api extends CRM_Custom_Import_Parser { * @param array $values * The array of values belonging to this line. * - * @return boolean + * @return bool */ public function mapField(&$values) { return CRM_Import_Parser::VALID; @@ -71,7 +71,7 @@ class CRM_Custom_Import_Parser_Api extends CRM_Custom_Import_Parser { * @param array $values * The array of values belonging to this line. * - * @return boolean + * @return bool * the result of this processing */ public function preview(&$values) { @@ -82,7 +82,7 @@ class CRM_Custom_Import_Parser_Api extends CRM_Custom_Import_Parser { * @param array $values * The array of values belonging to this line. * - * @return boolean + * @return bool * the result of this processing * It is called from both the preview & the import actions * @@ -136,7 +136,7 @@ class CRM_Custom_Import_Parser_Api extends CRM_Custom_Import_Parser { * @param array $values * The array of values belonging to this line. * - * @return boolean + * @return bool * the result of this processing */ public function import($onDuplicate, &$values) { diff --git a/CRM/Custom/Page/Option.php b/CRM/Custom/Page/Option.php index bbf3a05389..dc44b216fe 100644 --- a/CRM/Custom/Page/Option.php +++ b/CRM/Custom/Page/Option.php @@ -69,8 +69,6 @@ class CRM_Custom_Page_Option extends CRM_Core_Page { /** * Get the action links for this page. * - * @param null - * * @return array * array of action links that we need to display for the browse screen */ @@ -113,8 +111,6 @@ class CRM_Custom_Page_Option extends CRM_Core_Page { /** * Browse all custom group fields. * - * @param null - * * @return void */ public function browse() { @@ -265,8 +261,6 @@ ORDER BY weight, label * This method is called after the page is created. It checks for the * type of action and executes that action. * - * @param null - * * @return void */ public function run() { @@ -288,7 +282,7 @@ ORDER BY weight, label array( 'title' => ts('Custom Data Fields'), 'url' => CRM_Utils_System::url('civicrm/admin/custom/group/field', 'reset=1&gid=' . $this->_gid), - ) + ), ); CRM_Utils_System::appendBreadCrumb($breadcrumb); diff --git a/CRM/Event/Badge/Logo.php b/CRM/Event/Badge/Logo.php index 016979c6da..fa34bd66b8 100644 --- a/CRM/Event/Badge/Logo.php +++ b/CRM/Event/Badge/Logo.php @@ -44,7 +44,7 @@ class CRM_Event_Badge_Logo extends CRM_Event_Badge { 'cap' => 'round', 'join' => 'round', 'dash' => '2,2', - 'color' => array(0, 0, 200) + 'color' => array(0, 0, 200), )); $this->pdf->SetFontSize(8); diff --git a/CRM/Event/Form/Task/AddToGroup.php b/CRM/Event/Form/Task/AddToGroup.php index eabde5fb76..e5707ce5a5 100644 --- a/CRM/Event/Form/Task/AddToGroup.php +++ b/CRM/Event/Form/Task/AddToGroup.php @@ -178,7 +178,7 @@ class CRM_Event_Form_Task_AddToGroup extends CRM_Event_Form_Task { /** * Global validation rules for the form * - * @param array $fields + * @param array $params * Posted values of the form. * * @return array @@ -236,20 +236,20 @@ class CRM_Event_Form_Task_AddToGroup extends CRM_Event_Form_Task { $status = array( ts('%count contact added to group', array( 'count' => $added, - 'plural' => '%count contacts added to group' - )) + 'plural' => '%count contacts added to group', + )), ); if ($notAdded) { $status[] = ts('%count contact was already in group', array( 'count' => $notAdded, - 'plural' => '%count contacts were already in group' + 'plural' => '%count contacts were already in group', )); } $status = ''; CRM_Core_Session::setStatus($status, ts('Added Contact to %1', array( 1 => $groupName, 'count' => $added, - 'plural' => 'Added Contacts to %1' + 'plural' => 'Added Contacts to %1', )), 'success', array('expires' => 0)); } } diff --git a/CRM/Extension/Browser.php b/CRM/Extension/Browser.php index 43bfcb8acb..bed1913d9a 100644 --- a/CRM/Extension/Browser.php +++ b/CRM/Extension/Browser.php @@ -220,7 +220,7 @@ class CRM_Extension_Browser { * extensions. * * - * @return Array + * @return array * list of extension names */ private function grabRemoteKeyList() { diff --git a/CRM/Financial/BAO/ExportFormat/CSV.php b/CRM/Financial/BAO/ExportFormat/CSV.php index ce76cb1901..7860dd2579 100644 --- a/CRM/Financial/BAO/ExportFormat/CSV.php +++ b/CRM/Financial/BAO/ExportFormat/CSV.php @@ -173,8 +173,7 @@ class CRM_Financial_BAO_ExportFormat_CSV extends CRM_Financial_BAO_ExportFormat $financialItems = array(); $this->_batchIds = $batchId; while ($dao->fetch()) { - $creditAccountName = $creditAccountType = - $creditAccount = NULL; + $creditAccountName = $creditAccountType = $creditAccount = NULL; if ($dao->credit_account) { $creditAccountName = $dao->credit_account_name; $creditAccountType = $dao->credit_account_type_code; diff --git a/CRM/Financial/Form/BatchTransaction.php b/CRM/Financial/Form/BatchTransaction.php index 3f9d3f030c..129df0d25b 100644 --- a/CRM/Financial/Form/BatchTransaction.php +++ b/CRM/Financial/Form/BatchTransaction.php @@ -57,18 +57,17 @@ class CRM_Financial_Form_BatchTransaction extends CRM_Contribute_Form { $batchTitle = CRM_Core_DAO::getFieldValue('CRM_Batch_BAO_Batch', self::$_entityID, 'title'); CRM_Utils_System::setTitle(ts('Accounting Batch - %1', array(1 => $batchTitle))); - $columnHeaders = - array( - 'created_by' => ts('Created By'), - 'status' => ts('Status'), - 'description' => ts('Description'), - 'payment_instrument' => ts('Payment Instrument'), - 'item_count' => ts('Entered Transactions'), - 'assigned_item_count' => ts('Assigned Transactions'), - 'total' => ts('Entered Total'), - 'assigned_total' => ts('Assigned Total'), - 'opened_date' => ts('Opened'), - ); + $columnHeaders = array( + 'created_by' => ts('Created By'), + 'status' => ts('Status'), + 'description' => ts('Description'), + 'payment_instrument' => ts('Payment Instrument'), + 'item_count' => ts('Entered Transactions'), + 'assigned_item_count' => ts('Assigned Transactions'), + 'total' => ts('Entered Total'), + 'assigned_total' => ts('Assigned Total'), + 'opened_date' => ts('Opened'), + ); $this->assign('columnHeaders', $columnHeaders); } } diff --git a/CRM/Financial/Form/FinancialTypeAccount.php b/CRM/Financial/Form/FinancialTypeAccount.php index 4574abe3f0..9b7210e352 100644 --- a/CRM/Financial/Form/FinancialTypeAccount.php +++ b/CRM/Financial/Form/FinancialTypeAccount.php @@ -171,7 +171,7 @@ class CRM_Financial_Form_FinancialTypeAccount extends CRM_Contribute_Form { '6' => 1, //Asset '7' => 4, //cost of sales '8' => 1, //premium inventory - '9' => 3 //discount account is, + '9' => 3, //discount account is, ); $financialAccountType = CRM_Utils_Array::value($this->_submitValues['account_relationship'], $financialAccountType); @@ -181,8 +181,8 @@ class CRM_Financial_Form_FinancialTypeAccount extends CRM_Contribute_Form { } else { $financialAccountSelect = array( - 'select' => ts('- select -'), - ) + CRM_Contribute_PseudoConstant::financialAccount(); + 'select' => ts('- select -'), + ) + CRM_Contribute_PseudoConstant::financialAccount(); } } if ($this->_action == CRM_Core_Action::UPDATE) { @@ -193,7 +193,7 @@ class CRM_Financial_Form_FinancialTypeAccount extends CRM_Contribute_Form { '6' => 1, //Asset '7' => 4, //cost of sales '8' => 1, //premium inventory - '9' => 3 //discount account is, + '9' => 3, //discount account is, ); $financialAccountType = $financialAccountType[$this->_defaultValues['account_relationship']]; @@ -223,7 +223,7 @@ class CRM_Financial_Form_FinancialTypeAccount extends CRM_Contribute_Form { array( 'type' => 'cancel', 'name' => ts('Cancel'), - ) + ), ) ); $this->addFormRule(array('CRM_Financial_Form_FinancialTypeAccount', 'formRule'), $this); diff --git a/CRM/Price/BAO/PriceFieldValue.php b/CRM/Price/BAO/PriceFieldValue.php index a0a9f5e171..da14f6d76f 100644 --- a/CRM/Price/BAO/PriceFieldValue.php +++ b/CRM/Price/BAO/PriceFieldValue.php @@ -80,7 +80,7 @@ class CRM_Price_BAO_PriceFieldValue extends CRM_Price_DAO_PriceFieldValue { public static function create(&$params, $ids = array()) { $id = CRM_Utils_Array::value('id', $params, CRM_Utils_Array::value('id', $ids)); if (!is_array($params) || empty($params)) { - return; + return NULL; } if (!$id && empty($params['name'])) { $params['name'] = strtolower(CRM_Utils_String::munge($params['label'], '_', 242)); @@ -221,7 +221,7 @@ class CRM_Price_BAO_PriceFieldValue extends CRM_Price_DAO_PriceFieldValue { * @param int $id * Id. * - * @return boolean + * @return bool * */ public static function del($id) { @@ -240,9 +240,9 @@ class CRM_Price_BAO_PriceFieldValue extends CRM_Price_DAO_PriceFieldValue { * * @param int $entityId * Id. - * @param string $entityTableEntity table. + * @param string $entityTable table. * Entity table. - * @param string $financialTypeIDFinancial type id. + * @param string $financialTypeID type id. * Financial type id. * */ diff --git a/CRM/SMS/Form/Upload.php b/CRM/SMS/Form/Upload.php index 174a8047d1..033b180305 100644 --- a/CRM/SMS/Form/Upload.php +++ b/CRM/SMS/Form/Upload.php @@ -309,7 +309,6 @@ class CRM_SMS_Form_Upload extends CRM_Core_Form { $errors = array(); $template = CRM_Core_Smarty::singleton(); - $domain = CRM_Core_BAO_Domain::getDomain(); $mailing = new CRM_Mailing_BAO_Mailing(); @@ -337,7 +336,6 @@ class CRM_SMS_Form_Upload extends CRM_Core_Form { $urls[$key]++; } - $skipTextFile = $self->get('skipTextFile'); if (!$params['upload_type']) { @@ -382,7 +380,6 @@ class CRM_SMS_Form_Upload extends CRM_Core_Form { /* Do a full token replacement on a dummy verp, the current * contact and domain, and the first organization. */ - // here we make a dummy mailing object so that we // can retrieve the tokens that we need to replace // so that we do get an invalid token error @@ -415,7 +412,7 @@ class CRM_SMS_Form_Upload extends CRM_Core_Form { } if (!empty($dataErrors)) { $errors['textFile'] = ts('The following errors were detected in %1:', array( - 1 => $name + 1 => $name, )) . ' '; } } diff --git a/CRM/Upgrade/Incremental/Legacy.php b/CRM/Upgrade/Incremental/Legacy.php index b893d3b2b7..19f538f52d 100644 --- a/CRM/Upgrade/Incremental/Legacy.php +++ b/CRM/Upgrade/Incremental/Legacy.php @@ -83,7 +83,7 @@ SELECT id $config = CRM_Core_Config::singleton(); $preUpgradeMessage .= '
' . ts("As per the related blog post, we are making contact names, addresses and mailings monolingual; the values entered for the default locale (%2) will be preserved and values for other locales removed.", array( 1 => 'http://civicrm.org/blogs/shot/multilingual-civicrm-3440-making-some-fields-monolingual', - 2 => $config->lcMessages + 2 => $config->lcMessages, )); } @@ -203,7 +203,7 @@ SELECT id $message .= '
' . ts("The default copies of the message templates listed below will be updated to handle new features or correct a problem. Your installation has customized versions of these message templates, and you will need to apply the updates manually after running this upgrade. Click here for detailed instructions. %2", array( 1 => 'http://wiki.civicrm.org/confluence/display/CRMDOC/Message+Templates#MessageTemplates-UpgradesandCustomizedSystemWorkflowTemplates', - 2 => $html + 2 => $html, )); } } @@ -250,7 +250,7 @@ SELECT id $subTypeTemplates = implode(',', $subTypeTemplates); $postUpgradeMessage .= '
' . ts('You are using custom template for contact subtypes: %1.', array(1 => $subTypeTemplates)) . '
' . ts('You need to move these subtype templates to the SubType directory in %1 and %2 respectively.', array( 1 => 'CRM/Contact/Form/Edit', - 2 => 'CRM/Contact/Page/View' + 2 => 'CRM/Contact/Page/View', )); } } @@ -550,7 +550,7 @@ SELECT count( id ) as statusCount $config = CRM_Core_Config::singleton(); if (is_callable(array( $config->userSystem, - 'replacePermission' + 'replacePermission', ))) { $config->userSystem->replacePermission('access CiviEvent', array('access CiviEvent', 'edit all events')); } diff --git a/CRM/Upgrade/Incremental/php/FourOne.php b/CRM/Upgrade/Incremental/php/FourOne.php index 3c3bc84216..c66c3cf0e7 100644 --- a/CRM/Upgrade/Incremental/php/FourOne.php +++ b/CRM/Upgrade/Incremental/php/FourOne.php @@ -334,7 +334,7 @@ AND v.is_active = 1 $dao->free(); // Do the regular upgrade - $upgrade = new CRM_Upgrade_Form; + $upgrade = new CRM_Upgrade_Form(); $upgrade->processSQL($rev); } diff --git a/CRM/Utils/Mail/Incoming.php b/CRM/Utils/Mail/Incoming.php index 320899b976..612214c53f 100644 --- a/CRM/Utils/Mail/Incoming.php +++ b/CRM/Utils/Mail/Incoming.php @@ -324,7 +324,7 @@ class CRM_Utils_Mail_Incoming { // we definitely need a contact id for the from address // if we dont have one, skip this email if (empty($params['from']['id'])) { - return; + return NULL; } $emailFields = array('to', 'cc', 'bcc'); diff --git a/CRM/Utils/Rule.php b/CRM/Utils/Rule.php index 6594451896..c9b791157a 100644 --- a/CRM/Utils/Rule.php +++ b/CRM/Utils/Rule.php @@ -555,8 +555,6 @@ class CRM_Utils_Rule { * See how file rules are written in HTML/QuickForm/file.php * Checks to make sure the uploaded file is ascii * - * @param array Uploaded file info (from $_FILES) - * * @return bool * true if file has been uploaded, false otherwise */ @@ -572,8 +570,6 @@ class CRM_Utils_Rule { /** * Checks to make sure the uploaded file is in UTF-8, recodes if it's not * - * @param array Uploaded file info (from $_FILES) - * * @return bool * whether file has been uploaded properly and is now in UTF-8 */ @@ -602,8 +598,6 @@ class CRM_Utils_Rule { * See how file rules are written in HTML/QuickForm/file.php * Checks to make sure the uploaded file is html * - * @param array Uploaded file info (from $_FILES) - * * @return bool * true if file has been uploaded, false otherwise */ @@ -624,7 +618,7 @@ class CRM_Utils_Rule { * @param array $options * The daoName and fieldName (optional ). * - * @return boolean + * @return bool * true if object exists */ public static function objectExists($value, $options) { diff --git a/CRM/Utils/System/WordPress.php b/CRM/Utils/System/WordPress.php index 6f19973d5a..d748d11259 100644 --- a/CRM/Utils/System/WordPress.php +++ b/CRM/Utils/System/WordPress.php @@ -237,8 +237,6 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { /** * Rewrite various system urls to https * - * @param null - * * @return void */ public function mapConfigToSSL() { @@ -286,7 +284,7 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { * @return string * an HTML string containing a link to the given path. */ - function url( + public function url( $path = NULL, $query = NULL, $absolute = FALSE, @@ -667,7 +665,7 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { /** * Check is user logged in. * - * @return boolean + * @return bool */ public function isUserLoggedIn() { $isloggedIn = FALSE; @@ -755,7 +753,7 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { * @param CRM_Core_Form $form */ public function getLoginDestination(&$form) { - return; + return NULL; } /** diff --git a/Civi/Core/Transaction/Frame.php b/Civi/Core/Transaction/Frame.php index d07de48e67..8e565f2b93 100644 --- a/Civi/Core/Transaction/Frame.php +++ b/Civi/Core/Transaction/Frame.php @@ -168,13 +168,13 @@ class Frame { if ($id) { $this->callbacks[$phase][$id] = array( 'callback' => $callback, - 'parameters' => (is_array($params) ? $params : array($params)) + 'parameters' => (is_array($params) ? $params : array($params)), ); } else { $this->callbacks[$phase][] = array( 'callback' => $callback, - 'parameters' => (is_array($params) ? $params : array($params)) + 'parameters' => (is_array($params) ? $params : array($params)), ); } } diff --git a/api/Wrapper.php b/api/Wrapper.php index 07e38f0181..f53c8fdb83 100644 --- a/api/Wrapper.php +++ b/api/Wrapper.php @@ -11,7 +11,7 @@ interface API_Wrapper { * @return array * modified $apiRequest */ - function fromApiInput($apiRequest); + public function fromApiInput($apiRequest); /** * @param array $apiRequest @@ -20,5 +20,5 @@ interface API_Wrapper { * @return array * modified $result */ - function toApiOutput($apiRequest, $result); + public function toApiOutput($apiRequest, $result); } diff --git a/api/v3/Relationship.php b/api/v3/Relationship.php index 17a92bdf45..ff0dfd1f59 100644 --- a/api/v3/Relationship.php +++ b/api/v3/Relationship.php @@ -47,7 +47,7 @@ * * @return array * API Result Array - * {@getfields relationship_create} + * {@getfields relationship_create} */ function civicrm_api3_relationship_create($params) { _civicrm_api3_handle_relationship_type($params); @@ -74,7 +74,7 @@ function _civicrm_api3_relationship_create_spec(&$params) { * * @return array * API Result Array - * {@getfields relationship_delete} + * {@getfields relationship_delete} * @example RelationshipDelete.php Delete Example * */ @@ -104,9 +104,9 @@ function civicrm_api3_relationship_delete($params) { * - if you pass in contact_id - it just returns all relationships for 'contact_id' * - if you don't pass in contact_id then it does a filter on the relationship table (DAO based search) * - * @return Array + * @return array * API Result Array - * {@getfields relationship_get} + * {@getfields relationship_get} * @example RelationshipGet.php * @access public */ diff --git a/api/v3/ReportTemplate.php b/api/v3/ReportTemplate.php index 17ecda8705..05755081b4 100644 --- a/api/v3/ReportTemplate.php +++ b/api/v3/ReportTemplate.php @@ -12,7 +12,7 @@ * * @return array * details of found Option Values - * {@getfields OptionValue_get} + * {@getfields OptionValue_get} */ function civicrm_api3_report_template_get($params) { require_once 'api/v3/OptionValue.php'; @@ -33,7 +33,7 @@ function civicrm_api3_report_template_get($params) { * * @return array * Array of newly created option_value property values. - * {@getfields OptionValue_create} + * {@getfields OptionValue_create} */ function civicrm_api3_report_template_create($params) { require_once 'api/v3/OptionValue.php'; @@ -74,7 +74,7 @@ function _civicrm_api3_report_template_create_spec(&$params) { * * @return array * Api result - * {@getfields ReportTemplate_create} + * {@getfields ReportTemplate_create} */ function civicrm_api3_report_template_delete($params) { require_once 'api/v3/OptionValue.php'; @@ -164,7 +164,7 @@ function civicrm_api3_report_template_getstatistics($params) { * @param array $params * Input parameters. * - * @return array + * @return; * details of found instances */ function _civicrm_api3_report_template_getrows_spec(&$params) { diff --git a/api/v3/SystemLog.php b/api/v3/SystemLog.php index 8410be9565..89f6dac6d8 100644 --- a/api/v3/SystemLog.php +++ b/api/v3/SystemLog.php @@ -60,7 +60,7 @@ function civicrm_api3_system_log_create($params) { /** * @param array $params * - * @return array + * @return; */ function _civicrm_api3_system_log_create_spec(&$params) { require_once 'api/v3/System.php'; diff --git a/bin/setup.sh b/bin/setup.sh index eb31a8328f..5273907a69 100755 --- a/bin/setup.sh +++ b/bin/setup.sh @@ -151,7 +151,7 @@ if [ -n "$DO_DOWNLOAD" ]; then fi BOWER=$(pickcmd node_modules/bower/bin/bower bower) - $BOWER install + #$BOWER install popd fi diff --git a/install/civicrm.php b/install/civicrm.php index bc2186f4f3..cab7d8c3d0 100644 --- a/install/civicrm.php +++ b/install/civicrm.php @@ -71,7 +71,7 @@ function civicrm_write_file($name, &$buffer) { if (!$fd) { die("Cannot open $name"); } - fputs($fd, $buffer); + fwrite($fd, $buffer); fclose($fd); } diff --git a/tests/extensions/test.extension.manager.moduletest/moduletest.php b/tests/extensions/test.extension.manager.moduletest/moduletest.php index 908a4d37b3..984a0e36b8 100644 --- a/tests/extensions/test.extension.manager.moduletest/moduletest.php +++ b/tests/extensions/test.extension.manager.moduletest/moduletest.php @@ -1,35 +1,35 @@ quickCleanup($tablesToTruncate); $this->relationshipTypeDelete($this->_relationshipTypeId); diff --git a/tests/phpunit/CRM/Queue/RunnerTest.php b/tests/phpunit/CRM/Queue/RunnerTest.php index e9cede7ab1..75b305ab22 100644 --- a/tests/phpunit/CRM/Queue/RunnerTest.php +++ b/tests/phpunit/CRM/Queue/RunnerTest.php @@ -241,8 +241,7 @@ class CRM_Queue_RunnerTest extends CiviUnitTestCase { * * @return bool */ - static - public function _recordValue($taskCtx, $value) { + static public function _recordValue($taskCtx, $value) { self::$_recordedValues[] = $value; return TRUE; } @@ -252,8 +251,7 @@ class CRM_Queue_RunnerTest extends CiviUnitTestCase { * * @return bool */ - static - public function _returnFalse($taskCtx) { + static public function _returnFalse($taskCtx) { return FALSE; } @@ -263,8 +261,7 @@ class CRM_Queue_RunnerTest extends CiviUnitTestCase { * * @throws Exception */ - static - public function _throwException($taskCtx, $value) { + static public function _throwException($taskCtx, $value) { throw new Exception("Manufactured error: $value"); } @@ -275,8 +272,7 @@ class CRM_Queue_RunnerTest extends CiviUnitTestCase { * * @return bool */ - static - public function _enqueueNumbers($taskCtx, $low, $high) { + static public function _enqueueNumbers($taskCtx, $low, $high) { for ($i = $low; $i <= $high; $i++) { $taskCtx->queue->createItem(new CRM_Queue_Task( array('CRM_Queue_RunnerTest', '_recordValue'), diff --git a/tests/phpunit/WebTest/Import/ImportCiviSeleniumTestCase.php b/tests/phpunit/WebTest/Import/ImportCiviSeleniumTestCase.php index f91dd87ff6..c67a67a4b0 100644 --- a/tests/phpunit/WebTest/Import/ImportCiviSeleniumTestCase.php +++ b/tests/phpunit/WebTest/Import/ImportCiviSeleniumTestCase.php @@ -55,7 +55,7 @@ class ImportCiviSeleniumTestCase extends CiviSeleniumTestCase { * saveMapping : save current mapping? * saveMappingName : to override mapping name */ - function importCSVComponent( + public function importCSVComponent( $component, $headers, $rows, @@ -417,7 +417,7 @@ class ImportCiviSeleniumTestCase extends CiviSeleniumTestCase { if (!empty($other['callbackImportSummary']) && is_callable(array( $this, - $other['callbackImportSummary'] + $other['callbackImportSummary'], )) ) { $callbackImportSummary = $other['callbackImportSummary']; diff --git a/tests/phpunit/WebTest/Member/InheritedMembershipTest.php b/tests/phpunit/WebTest/Member/InheritedMembershipTest.php index 9508c9ca66..c4dbbada1a 100644 --- a/tests/phpunit/WebTest/Member/InheritedMembershipTest.php +++ b/tests/phpunit/WebTest/Member/InheritedMembershipTest.php @@ -118,7 +118,7 @@ class WebTest_Member_InheritedMembershipTest extends CiviSeleniumTestCase { foreach (array( 'joinDate', 'startDate', - 'endDate' + 'endDate', ) as $date) { $$date = CRM_Utils_Date::customFormat($$date, $configVars->dateformatFull); } diff --git a/tests/phpunit/api/v3/ContactTest.php b/tests/phpunit/api/v3/ContactTest.php index 49904ca941..64082d036a 100644 --- a/tests/phpunit/api/v3/ContactTest.php +++ b/tests/phpunit/api/v3/ContactTest.php @@ -1025,7 +1025,6 @@ class api_v3_ContactTest extends CiviUnitTestCase { * Test civicrm_update() Deliberately exclude contact_type as it should still * cope using civicrm_api CRM-7645 */ - public function testUpdateCreateWithID() { // Insert a row in civicrm_contact creating individual contact $op = new PHPUnit_Extensions_Database_Operation_Insert(); @@ -1686,8 +1685,8 @@ class api_v3_ContactTest extends CiviUnitTestCase { } /** - * Test id only format - */ + * Test id only format + */ public function testContactGetFormatID_only() { $this->createContactFromXML(); $description = "This demonstrates use of the 'format.id_only' param. @@ -1701,8 +1700,8 @@ class api_v3_ContactTest extends CiviUnitTestCase { } /** - * Test id only format - */ + * Test id only format + */ public function testContactGetFormatSingleValue() { $this->createContactFromXML(); $description = "This demonstrates use of the 'format.single_value' param. diff --git a/tests/phpunit/api/v3/EventTest.php b/tests/phpunit/api/v3/EventTest.php index 356aeac4ee..0f5662e986 100644 --- a/tests/phpunit/api/v3/EventTest.php +++ b/tests/phpunit/api/v3/EventTest.php @@ -110,8 +110,9 @@ class api_v3_EventTest extends CiviUnitTestCase { $this->quickCleanup($tablesToTruncate, TRUE); } - ///////////////// civicrm_event_get methods - + /** + * civicrm_event_get methods + */ public function testGetEventById() { $params = array( 'id' => $this->_events[1]['id'], @@ -252,7 +253,7 @@ class api_v3_EventTest extends CiviUnitTestCase { 'participant_status' => 1, 'role_id' => 1, 'contact_id' => $contactID, - 'event_id' => $this->_eventIds[0] + 'event_id' => $this->_eventIds[0], )); $currentEvent = $this->callAPIAndDocument('Event', 'getsingle', $getEventParams, __FUNCTION__, __FILE__, $description, $subfile, 'getsingle'); $this->assertEquals(1, $currentEvent['is_full'], ' is full is set in line ' . __LINE__); @@ -261,7 +262,7 @@ class api_v3_EventTest extends CiviUnitTestCase { $this->contactDelete($contactID); } - /* + /** * Legacy support for Contribution Type ID. We need to ensure this is supported * as an alias for financial_type_id */ @@ -295,7 +296,7 @@ class api_v3_EventTest extends CiviUnitTestCase { $check = $this->callAPISuccess($this->_entity, 'get', array( 'return.custom_' . $ids['custom_field_id'] => 1, - 'id' => $result['id'] + 'id' => $result['id'], )); $this->assertEquals("custom string", $check['values'][$check['id']]['custom_' . $ids['custom_field_id']], ' in line ' . __LINE__); diff --git a/tests/phpunit/api/v3/ParticipantPaymentTest.php b/tests/phpunit/api/v3/ParticipantPaymentTest.php index 1a6a23767c..3d17b76cba 100644 --- a/tests/phpunit/api/v3/ParticipantPaymentTest.php +++ b/tests/phpunit/api/v3/ParticipantPaymentTest.php @@ -55,22 +55,22 @@ class api_v3_ParticipantPaymentTest extends CiviUnitTestCase { $this->_participantID = $this->participantCreate(array( 'contactID' => $this->_contactID, - 'eventID' => $this->_eventID + 'eventID' => $this->_eventID, )); $this->_contactID2 = $this->individualCreate(); $this->_participantID2 = $this->participantCreate(array( 'contactID' => $this->_contactID2, - 'eventID' => $this->_eventID + 'eventID' => $this->_eventID, )); $this->_participantID3 = $this->participantCreate(array( 'contactID' => $this->_contactID2, - 'eventID' => $this->_eventID + 'eventID' => $this->_eventID, )); $this->_contactID3 = $this->individualCreate(); $this->_participantID4 = $this->participantCreate(array( 'contactID' => $this->_contactID3, - 'eventID' => $this->_eventID + 'eventID' => $this->_eventID, )); } diff --git a/tests/phpunit/api/v3/ParticipantTest.php b/tests/phpunit/api/v3/ParticipantTest.php index de6feff96e..a748e5029b 100644 --- a/tests/phpunit/api/v3/ParticipantTest.php +++ b/tests/phpunit/api/v3/ParticipantTest.php @@ -64,16 +64,16 @@ class api_v3_ParticipantTest extends CiviUnitTestCase { $this->_participantID = $this->participantCreate(array( 'contact_id' => $this->_contactID, - 'event_id' => $this->_eventID + 'event_id' => $this->_eventID, )); $this->_contactID2 = $this->individualCreate(); $this->_participantID2 = $this->participantCreate(array( 'contact_id' => $this->_contactID2, - 'event_id' => $this->_eventID + 'event_id' => $this->_eventID, )); $this->_participantID3 = $this->participantCreate(array( 'contact_id' => $this->_contactID2, - 'event_id' => $this->_eventID + 'event_id' => $this->_eventID, )); $this->_params = array( 'contact_id' => $this->_contactID, @@ -190,7 +190,7 @@ class api_v3_ParticipantTest extends CiviUnitTestCase { $event = $this->eventCreate(NULL); $this->callAPISuccess('participant', 'create', array( 'event_id' => $event['id'], - 'contact_id' => $this->_contactID + 'contact_id' => $this->_contactID, )); $description = "use nested get to get an event"; diff --git a/tests/phpunit/api/v3/RelationshipTest.php b/tests/phpunit/api/v3/RelationshipTest.php index dbd8f607d5..aa4e857368 100644 --- a/tests/phpunit/api/v3/RelationshipTest.php +++ b/tests/phpunit/api/v3/RelationshipTest.php @@ -717,7 +717,7 @@ class api_v3_RelationshipTest extends CiviUnitTestCase { $rel2 = $this->callAPISuccess('relationship', 'create', $rel2Params); } - /* + /** * Test using various operators */ public function testGetTypeOperators() { diff --git a/tests/phpunit/api/v3/ReportTemplateTest.php b/tests/phpunit/api/v3/ReportTemplateTest.php index 3e89285651..f7d02211d4 100644 --- a/tests/phpunit/api/v3/ReportTemplateTest.php +++ b/tests/phpunit/api/v3/ReportTemplateTest.php @@ -173,14 +173,10 @@ class api_v3_ReportTemplateTest extends CiviUnitTestCase { public static function getReportTemplates() { $reportsToSkip = array( 'activity' => 'does not respect function signature on from clause', - 'walklist' => 'Notice: Undefined index: type in CRM_Report_Form_Walklist_Walklist line 155. - (suspect the select function should be removed in favour of the parent (state province field) - also, type should be added to state province & others? & potentially getAddressColumns fn should be - used per other reports', + 'walklist' => 'Notice: Undefined index: type in CRM_Report_Form_Walklist_Walklist line 155.(suspect the select function should be removed in favour of the parent (state province field) also, type should be added to state province & others? & potentially getAddressColumns fn should be used per other reports', 'contribute/repeat' => 'Reports with important functionality in postProcess are not callable via the api. For variable setting recommend beginPostProcessCommon, for temp table creation recommend From fn', 'contribute/topDonor' => 'construction of query in postProcess makes inaccessible ', - 'contribute/sybunt' => 'e notice - (ui gives fatal error at civicrm/report/contribute/sybunt&reset=1&force=1 - e-notice is on yid_valueContribute/Sybunt.php(214) because at the force url "yid_relative" not "yid_value" is defined', + 'contribute/sybunt' => 'e notice - (ui gives fatal error at civicrm/report/contribute/sybunt&reset=1&force=1 e-notice is on yid_valueContribute/Sybunt.php(214) because at the force url "yid_relative" not "yid_value" is defined', 'contribute/lybunt' => 'same as sybunt - fatals on force url & test identifies why', 'event/income' => 'I do no understand why but error is Call to undefined method CRM_Report_Form_Event_Income::from() in CRM/Report/Form.php on line 2120', 'contact/relationship' => '(see contribute/repeat), property declaration issue, Undefined property: CRM_Report_Form_Contact_Relationship::$relationType in /Contact/Relationship.php(486):',