From 46bcf5978e35c7f061b3ce70f98108df028eef1d Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 9 Jan 2015 19:51:41 -0800 Subject: [PATCH] INFRA-132 - Civi - PHPStorm cleanup --- Civi/API/Provider/AdhocProvider.php | 1 + Civi/API/Provider/ProviderInterface.php | 1 + Civi/API/Subscriber/ChainSubscriber.php | 1 + Civi/API/Subscriber/PermissionCheck.php | 1 + Civi/API/Subscriber/XDebugSubscriber.php | 1 + Civi/CCase/SequenceListener.php | 2 +- Civi/CiUtil/PHPUnitScanner.php | 1 + Civi/Core/Container.php | 6 +++++- Civi/Core/Transaction/Frame.php | 4 ++-- Civi/Core/Transaction/Manager.php | 3 +-- Civi/Install/Requirements.php | 2 +- Civi/Payment/System.php | 1 + 12 files changed, 17 insertions(+), 7 deletions(-) diff --git a/Civi/API/Provider/AdhocProvider.php b/Civi/API/Provider/AdhocProvider.php index c981ef21d3..7bb62be87f 100644 --- a/Civi/API/Provider/AdhocProvider.php +++ b/Civi/API/Provider/AdhocProvider.php @@ -26,6 +26,7 @@ */ namespace Civi\API\Provider; + use Civi\API\Events; use Symfony\Component\EventDispatcher\EventSubscriberInterface; diff --git a/Civi/API/Provider/ProviderInterface.php b/Civi/API/Provider/ProviderInterface.php index e17ca8c269..94432c66f7 100644 --- a/Civi/API/Provider/ProviderInterface.php +++ b/Civi/API/Provider/ProviderInterface.php @@ -26,6 +26,7 @@ */ namespace Civi\API\Provider; + use Civi\API\Events; use Symfony\Component\EventDispatcher\EventSubscriberInterface; diff --git a/Civi/API/Subscriber/ChainSubscriber.php b/Civi/API/Subscriber/ChainSubscriber.php index 93a2d34540..74488e2d91 100644 --- a/Civi/API/Subscriber/ChainSubscriber.php +++ b/Civi/API/Subscriber/ChainSubscriber.php @@ -26,6 +26,7 @@ */ namespace Civi\API\Subscriber; + use Civi\API\Events; use Symfony\Component\EventDispatcher\EventSubscriberInterface; diff --git a/Civi/API/Subscriber/PermissionCheck.php b/Civi/API/Subscriber/PermissionCheck.php index ebd080f56d..68485e301f 100644 --- a/Civi/API/Subscriber/PermissionCheck.php +++ b/Civi/API/Subscriber/PermissionCheck.php @@ -26,6 +26,7 @@ */ namespace Civi\API\Subscriber; + use Civi\API\Events; use Symfony\Component\EventDispatcher\EventSubscriberInterface; diff --git a/Civi/API/Subscriber/XDebugSubscriber.php b/Civi/API/Subscriber/XDebugSubscriber.php index 316a4650df..2dc1ba6a00 100644 --- a/Civi/API/Subscriber/XDebugSubscriber.php +++ b/Civi/API/Subscriber/XDebugSubscriber.php @@ -26,6 +26,7 @@ */ namespace Civi\API\Subscriber; + use Civi\API\Events; use Symfony\Component\EventDispatcher\EventSubscriberInterface; diff --git a/Civi/CCase/SequenceListener.php b/Civi/CCase/SequenceListener.php index 7b40e7fbc6..7f83ebb6fe 100644 --- a/Civi/CCase/SequenceListener.php +++ b/Civi/CCase/SequenceListener.php @@ -58,7 +58,7 @@ class SequenceListener implements CaseChangeListener { // OK, the activity has completed every step in the sequence! civicrm_api3('Case', 'create', array( - 'id' => $analyzer->getCaseId(), + 'id' => $analyzer->getCaseId(), 'status_id' => 'Closed', )); $analyzer->flush(); diff --git a/Civi/CiUtil/PHPUnitScanner.php b/Civi/CiUtil/PHPUnitScanner.php index 45751af58b..6b25edab37 100644 --- a/Civi/CiUtil/PHPUnitScanner.php +++ b/Civi/CiUtil/PHPUnitScanner.php @@ -1,5 +1,6 @@ addListener('DAO::post-insert', array('\CRM_Core_BAO_RecurringEntity', 'triggerInsert')); $dispatcher->addListener('DAO::post-update', array('\CRM_Core_BAO_RecurringEntity', 'triggerUpdate')); $dispatcher->addListener('DAO::post-delete', array('\CRM_Core_BAO_RecurringEntity', 'triggerDelete')); - $dispatcher->addListener('hook_civicrm_unhandled_exception', array('CRM_Core_LegacyErrorHandler', 'handleException')); + $dispatcher->addListener('hook_civicrm_unhandled_exception', array( + 'CRM_Core_LegacyErrorHandler', + 'handleException' + )); return $dispatcher; } diff --git a/Civi/Core/Transaction/Frame.php b/Civi/Core/Transaction/Frame.php index 0bc95c0527..ea0a8b9e7d 100644 --- a/Civi/Core/Transaction/Frame.php +++ b/Civi/Core/Transaction/Frame.php @@ -108,7 +108,7 @@ class Frame { } public function setRollbackOnly() { - $this->doCommit = false; + $this->doCommit = FALSE; } public function begin() { @@ -163,7 +163,7 @@ class Frame { * @param array|NULL $params Optional values to pass to callback. * See php manual call_user_func_array for details. */ - public function addCallback($phase, $callback, $params = null, $id = NULL) { + public function addCallback($phase, $callback, $params = NULL, $id = NULL) { if ($id) { $this->callbacks[$phase][$id] = array( 'callback' => $callback, diff --git a/Civi/Core/Transaction/Manager.php b/Civi/Core/Transaction/Manager.php index f7ff620095..7b2ca2dc64 100644 --- a/Civi/Core/Transaction/Manager.php +++ b/Civi/Core/Transaction/Manager.php @@ -161,8 +161,7 @@ class Manager { * @return \Civi\Core\Transaction\Frame */ protected function createBaseFrame() { - return new Frame($this->dao, 'BEGIN', 'COMMIT', 'ROLLBACK'); - ; + return new Frame($this->dao, 'BEGIN', 'COMMIT', 'ROLLBACK');; } /** diff --git a/Civi/Install/Requirements.php b/Civi/Install/Requirements.php index 8d4a6af612..3cb0da52e4 100644 --- a/Civi/Install/Requirements.php +++ b/Civi/Install/Requirements.php @@ -481,7 +481,7 @@ class Requirements { $conn = @mysql_connect($db_config['server'], $db_config['username'], $db_config['password']); if (!$conn) { $results['severity'] = $this::REQUIREMENT_ERROR; - $results['details'] = 'Could not connect to database'; + $results['details'] = 'Could not connect to database'; return $results; } diff --git a/Civi/Payment/System.php b/Civi/Payment/System.php index 18d66651ca..f72aaab48d 100644 --- a/Civi/Payment/System.php +++ b/Civi/Payment/System.php @@ -57,6 +57,7 @@ class System { } return $this->cache[$id]; } + /** * @param integer $id * @throws \CiviCRM_API3_Exception -- 2.25.1