Revert "Used ternary operator instead of "or" for constant definition"

This reverts commit 2bb6f13505e212d68841a7e6609806fb30d04002.
This commit is contained in:
Alexander Makarov 2014-03-06 01:56:51 +04:00
parent 13bef84dfb
commit d8763496cc
5 changed files with 15 additions and 15 deletions

View File

@ -2,14 +2,14 @@
// the entry script URL (without host info) for functional and acceptance tests
// PLEASE ADJUST IT TO THE ACTUAL ENTRY SCRIPT URL
defined('TEST_ENTRY_URL') ?: define('TEST_ENTRY_URL', '/basic/web/index-test.php');
defined('TEST_ENTRY_URL') or define('TEST_ENTRY_URL', '/basic/web/index-test.php');
// the entry script file path for functional and acceptance tests
defined('TEST_ENTRY_FILE') ?: define('TEST_ENTRY_FILE', dirname(__DIR__) . '/web/index-test.php');
defined('TEST_ENTRY_FILE') or define('TEST_ENTRY_FILE', dirname(__DIR__) . '/web/index-test.php');
defined('YII_DEBUG') ?: define('YII_DEBUG', true);
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') ?: define('YII_ENV', 'test');
defined('YII_ENV') or define('YII_ENV', 'test');
require_once(__DIR__ . '/../vendor/autoload.php');

View File

@ -1,12 +1,12 @@
<?php
defined('YII_DEBUG') ?: define('YII_DEBUG', true);
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') ?: define('YII_ENV', 'test');
defined('YII_ENV') or define('YII_ENV', 'test');
// fcgi doesn't have STDIN and STDOUT defined by default
defined('STDIN') ?: define('STDIN', fopen('php://stdin', 'r'));
defined('STDOUT') ?: define('STDOUT', fopen('php://stdout', 'w'));
defined('STDIN') or define('STDIN', fopen('php://stdin', 'r'));
defined('STDOUT') or define('STDOUT', fopen('php://stdout', 'w'));
require(__DIR__ . '/../vendor/autoload.php');
require(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php');

View File

@ -5,8 +5,8 @@ if (!in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1'])) {
die('You are not allowed to access this file.');
}
defined('YII_DEBUG') ?: define('YII_DEBUG', true);
defined('YII_ENV') ?: define('YII_ENV', 'test');
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'test');
require(__DIR__ . '/../vendor/autoload.php');
require(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php');

View File

@ -1,8 +1,8 @@
<?php
// comment out the following two lines when deployed to production
defined('YII_DEBUG') ?: define('YII_DEBUG', true);
defined('YII_ENV') ?: define('YII_ENV', 'dev');
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');
require(__DIR__ . '/../vendor/autoload.php');
require(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php');

6
yii
View File

@ -8,11 +8,11 @@
* @license http://www.yiiframework.com/license/
*/
defined('YII_DEBUG') ?: define('YII_DEBUG', true);
defined('YII_DEBUG') or define('YII_DEBUG', true);
// fcgi doesn't have STDIN and STDOUT defined by default
defined('STDIN') ?: define('STDIN', fopen('php://stdin', 'r'));
defined('STDOUT') ?: define('STDOUT', fopen('php://stdout', 'w'));
defined('STDIN') or define('STDIN', fopen('php://stdin', 'r'));
defined('STDOUT') or define('STDOUT', fopen('php://stdout', 'w'));
require(__DIR__ . '/vendor/autoload.php');
require(__DIR__ . '/vendor/yiisoft/yii2/Yii.php');