From c1d8beb5f0d6f84d642a4c67eef9353d7c4d8c3e Mon Sep 17 00:00:00 2001 From: Dmitry Khomutov Date: Wed, 1 Feb 2017 20:07:05 +0700 Subject: [PATCH] Removed constant IS_CONSOLE --- bin/console | 2 -- bootstrap.php | 10 ---------- tests/bootstrap.php | 8 -------- 3 files changed, 20 deletions(-) diff --git a/bin/console b/bin/console index 4efa0a54..438ad5b9 100755 --- a/bin/console +++ b/bin/console @@ -11,8 +11,6 @@ use PHPCensor\Console\Application; -define('IS_CONSOLE', true); - error_reporting(-1); ini_set('display_errors', 1); diff --git a/bootstrap.php b/bootstrap.php index 1c238a1a..d1af2f40 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -7,8 +7,6 @@ * @link http://www.phptesting.org/ */ -use PHPCensor\Logging\LoggerConfig; - if (!defined('ROOT_DIR')) { define('ROOT_DIR', __DIR__ . DIRECTORY_SEPARATOR); } @@ -39,10 +37,6 @@ if (!defined('IS_WIN')) { require_once(ROOT_DIR . 'vendor/autoload.php'); -if (defined('IS_CONSOLE') && IS_CONSOLE) { - $loggerConfig = LoggerConfig::newFromFile(APP_DIR . "loggerconfig.php"); -} - // Load configuration if present: $conf = []; $conf['b8']['app']['namespace'] = 'PHPCensor'; @@ -60,8 +54,4 @@ if (!defined('APP_URL') && !empty($config)) { define('APP_URL', $config->get('php-censor.url', '') . '/'); } -if (!defined('IS_CONSOLE')) { - define('IS_CONSOLE', false); -} - \PHPCensor\Helper\Lang::init($config); diff --git a/tests/bootstrap.php b/tests/bootstrap.php index adf83769..b36266f6 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -39,10 +39,6 @@ if (!defined('IS_WIN')) { require_once(ROOT_DIR . 'vendor/autoload.php'); -if (defined('IS_CONSOLE') && IS_CONSOLE) { - $loggerConfig = LoggerConfig::newFromFile(APP_DIR . "loggerconfig.php"); -} - // Load configuration if present: $conf = []; $conf['b8']['app']['namespace'] = 'PHPCensor'; @@ -60,8 +56,4 @@ if (!defined('APP_URL') && !empty($config)) { define('APP_URL', $config->get('php-censor.url', '') . '/'); } -if (!defined('IS_CONSOLE')) { - define('IS_CONSOLE', false); -} - \PHPCensor\Helper\Lang::init($config, 'en');