From 1beb837783e65093f2223112abdd5ce1d55143a7 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Mon, 31 Mar 2014 16:35:28 +0000 Subject: [PATCH] A few little code cleanups --- library/Icinga/Application/Cli.php | 5 +---- library/Icinga/Application/Web.php | 31 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 20 deletions(-) diff --git a/library/Icinga/Application/Cli.php b/library/Icinga/Application/Cli.php index ebfa06c39..9d77e54b3 100644 --- a/library/Icinga/Application/Cli.php +++ b/library/Icinga/Application/Cli.php @@ -37,10 +37,7 @@ use Icinga\Cli\Screen; use Icinga\Application\Benchmark; use Icinga\Exception\ProgrammingError; -// @codingStandardsIgnoreStart -require_once dirname(__FILE__) . '/ApplicationBootstrap.php'; -require_once dirname(__FILE__). '/../Exception/ProgrammingError.php'; -// @codingStandardsIgnoreStop +require_once __DIR__ . '/ApplicationBootstrap.php'; class Cli extends ApplicationBootstrap { diff --git a/library/Icinga/Application/Web.php b/library/Icinga/Application/Web.php index 19f39ec48..0f63f8d5e 100644 --- a/library/Icinga/Application/Web.php +++ b/library/Icinga/Application/Web.php @@ -29,30 +29,27 @@ namespace Icinga\Application; -// @codingStandardsIgnoreStart -require_once dirname(__FILE__) . '/ApplicationBootstrap.php'; -// @codingStandardsIgnoreStop +require_once __DIR__ . '/ApplicationBootstrap.php'; -use \DateTimeZone; -use \Exception; -use \Zend_Layout; -use \Zend_Paginator; -use \Zend_View_Helper_PaginationControl; -use \Zend_Controller_Action_HelperBroker; -use \Zend_Controller_Router_Route; -use \Zend_Controller_Front; -use Icinga\Logger\Logger; use Icinga\Authentication\Manager as AuthenticationManager; use Icinga\Exception\ConfigurationError; use Icinga\Exception\NotReadableError; -use Icinga\User; +use Icinga\Logger\Logger; use Icinga\Web\Request; use Icinga\Web\View; - -use Icinga\Util\DateTimeFactory; use Icinga\Web\Session\Session as BaseSession; use Icinga\Web\Session; +use Icinga\User; use Icinga\Util\Translator; +use Icinga\Util\DateTimeFactory; +use DateTimeZone; +use Exception; +use Zend_Layout; +use Zend_Paginator; +use Zend_View_Helper_PaginationControl; +use Zend_Controller_Action_HelperBroker; +use Zend_Controller_Router_Route; +use Zend_Controller_Front; /** * Use this if you want to make use of Icinga functionality in other web projects @@ -219,7 +216,9 @@ class Web extends ApplicationBootstrap $config = null; } $authenticationManager = AuthenticationManager::getInstance($config); - if ($config !== null && $config->global !== null && $config->global->get('authenticationMode', 'internal') === 'external') { + if ($config !== null && $config->global !== null && + $config->global->get('authenticationMode', 'internal') === 'external' + ) { $authenticationManager->authenticateFromRemoteUser(); } if ($authenticationManager->isAuthenticated() === true) {