@@ -33,35 +33,35 @@ discard block |
||
33 | 33 | $cwd_backup = getcwd(); |
34 | 34 | |
35 | 35 | // Load autoloader for ci-phpunit-test |
36 | - require __DIR__ . '/autoloader.php'; |
|
36 | + require __DIR__.'/autoloader.php'; |
|
37 | 37 | |
38 | 38 | // Autoloader for PHP-Parser |
39 | 39 | // Don't use `require`, because we may have required already |
40 | 40 | // in `patcher/bootstrap.php` |
41 | - require_once __DIR__ . '/patcher/third_party/PHP-Parser/lib/bootstrap.php'; |
|
41 | + require_once __DIR__.'/patcher/third_party/PHP-Parser/lib/bootstrap.php'; |
|
42 | 42 | |
43 | - require APPPATH . '/tests/TestCase.php'; |
|
43 | + require APPPATH.'/tests/TestCase.php'; |
|
44 | 44 | |
45 | - $db_test_case_file = APPPATH . '/tests/DbTestCase.php'; |
|
45 | + $db_test_case_file = APPPATH.'/tests/DbTestCase.php'; |
|
46 | 46 | if (is_readable($db_test_case_file)) |
47 | 47 | { |
48 | 48 | require $db_test_case_file; |
49 | 49 | } |
50 | 50 | |
51 | 51 | // Replace a few Common functions |
52 | - require __DIR__ . '/replacing/core/Common.php'; |
|
53 | - require BASEPATH . 'core/Common.php'; |
|
52 | + require __DIR__.'/replacing/core/Common.php'; |
|
53 | + require BASEPATH.'core/Common.php'; |
|
54 | 54 | |
55 | 55 | // Workaround for missing CodeIgniter's error handler |
56 | 56 | // See https://github.com/kenjis/ci-phpunit-test/issues/37 |
57 | 57 | set_error_handler('_error_handler'); |
58 | 58 | |
59 | 59 | // Load new functions of CIPHPUnitTest |
60 | - require __DIR__ . '/functions.php'; |
|
60 | + require __DIR__.'/functions.php'; |
|
61 | 61 | // Load ci-phpunit-test CI_Loader |
62 | - require __DIR__ . '/replacing/core/Loader.php'; |
|
62 | + require __DIR__.'/replacing/core/Loader.php'; |
|
63 | 63 | // Load ci-phpunit-test CI_Input |
64 | - require __DIR__ . '/replacing/core/Input.php'; |
|
64 | + require __DIR__.'/replacing/core/Input.php'; |
|
65 | 65 | |
66 | 66 | // Change current directroy |
67 | 67 | chdir(FCPATH); |
@@ -73,12 +73,12 @@ discard block |
||
73 | 73 | * |
74 | 74 | * And away we go... |
75 | 75 | */ |
76 | - require __DIR__ . '/replacing/core/CodeIgniter.php'; |
|
76 | + require __DIR__.'/replacing/core/CodeIgniter.php'; |
|
77 | 77 | |
78 | 78 | self::replaceHelpers(); |
79 | 79 | |
80 | 80 | // Create CodeIgniter instance |
81 | - if (! self::wiredesignzHmvcInstalled()) |
|
81 | + if ( ! self::wiredesignzHmvcInstalled()) |
|
82 | 82 | { |
83 | 83 | new CI_Controller(); |
84 | 84 | } |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | |
100 | 100 | public static function createCodeIgniterInstance() |
101 | 101 | { |
102 | - if (! self::wiredesignzHmvcInstalled()) |
|
102 | + if ( ! self::wiredesignzHmvcInstalled()) |
|
103 | 103 | { |
104 | 104 | new CI_Controller(); |
105 | 105 | } |
@@ -128,11 +128,11 @@ discard block |
||
128 | 128 | protected static function replaceLoader() |
129 | 129 | { |
130 | 130 | $my_loader_file = |
131 | - APPPATH . 'core/' . config_item('subclass_prefix') . 'Loader.php'; |
|
131 | + APPPATH.'core/'.config_item('subclass_prefix').'Loader.php'; |
|
132 | 132 | |
133 | 133 | if (file_exists($my_loader_file)) |
134 | 134 | { |
135 | - self::$loader_class = config_item('subclass_prefix') . 'Loader'; |
|
135 | + self::$loader_class = config_item('subclass_prefix').'Loader'; |
|
136 | 136 | if ( ! class_exists(self::$loader_class)) |
137 | 137 | { |
138 | 138 | require $my_loader_file; |
@@ -151,19 +151,19 @@ discard block |
||
151 | 151 | |
152 | 152 | protected static function loadHelper($helper) |
153 | 153 | { |
154 | - $my_helper_file = APPPATH . 'helpers/' . config_item('subclass_prefix') . $helper . '.php'; |
|
154 | + $my_helper_file = APPPATH.'helpers/'.config_item('subclass_prefix').$helper.'.php'; |
|
155 | 155 | if (file_exists($my_helper_file)) |
156 | 156 | { |
157 | 157 | require $my_helper_file; |
158 | 158 | } |
159 | - require __DIR__ . '/replacing/helpers/' . $helper . '.php'; |
|
159 | + require __DIR__.'/replacing/helpers/'.$helper.'.php'; |
|
160 | 160 | } |
161 | 161 | |
162 | 162 | public static function setPatcherCacheDir($dir = null) |
163 | 163 | { |
164 | 164 | if ($dir === null) |
165 | 165 | { |
166 | - $dir = APPPATH . 'tests/_ci_phpunit_test/tmp/cache'; |
|
166 | + $dir = APPPATH.'tests/_ci_phpunit_test/tmp/cache'; |
|
167 | 167 | } |
168 | 168 | |
169 | 169 | MonkeyPatchManager::setCacheDir( |
@@ -101,7 +101,7 @@ |
||
101 | 101 | } |
102 | 102 | |
103 | 103 | // Load the mime types |
104 | - $mimes =& get_mimes(); |
|
104 | + $mimes = & get_mimes(); |
|
105 | 105 | |
106 | 106 | // Only change the default MIME if we can find one |
107 | 107 | if (isset($mimes[$extension])) |
@@ -67,8 +67,7 @@ discard block |
||
67 | 67 | if ($filename === '' OR $data === '') |
68 | 68 | { |
69 | 69 | return; |
70 | - } |
|
71 | - elseif ($data === NULL) |
|
70 | + } elseif ($data === NULL) |
|
72 | 71 | { |
73 | 72 | if ( ! @is_file($filename) OR ($filesize = @filesize($filename)) === FALSE) |
74 | 73 | { |
@@ -78,8 +77,7 @@ discard block |
||
78 | 77 | $filepath = $filename; |
79 | 78 | $filename = explode('/', str_replace(DIRECTORY_SEPARATOR, '/', $filename)); |
80 | 79 | $filename = end($filename); |
81 | - } |
|
82 | - else |
|
80 | + } else |
|
83 | 81 | { |
84 | 82 | $filesize = strlen($data); |
85 | 83 | } |
@@ -158,8 +156,7 @@ discard block |
||
158 | 156 | if (ENVIRONMENT !== 'testing') |
159 | 157 | { |
160 | 158 | exit($data); |
161 | - } |
|
162 | - else |
|
159 | + } else |
|
163 | 160 | { |
164 | 161 | echo($data); |
165 | 162 | throw new CIPHPUnitTestExitException('exit() from force_download()'); |
@@ -176,8 +173,7 @@ discard block |
||
176 | 173 | if (ENVIRONMENT !== 'testing') |
177 | 174 | { |
178 | 175 | exit; |
179 | - } |
|
180 | - else |
|
176 | + } else |
|
181 | 177 | { |
182 | 178 | throw new CIPHPUnitTestExitException('exit() from force_download()'); |
183 | 179 | } |