@@ -69,28 +69,28 @@ |
||
69 | 69 | */ |
70 | 70 | switch (ENVIRONMENT) |
71 | 71 | { |
72 | - case 'testing': |
|
73 | - case 'development': |
|
74 | - error_reporting(-1); |
|
75 | - ini_set('display_errors', 1); |
|
76 | - break; |
|
77 | - |
|
78 | - case 'production': |
|
79 | - ini_set('display_errors', 0); |
|
80 | - if (version_compare(PHP_VERSION, '5.3', '>=')) |
|
81 | - { |
|
82 | - error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED); |
|
83 | - } |
|
84 | - else |
|
85 | - { |
|
86 | - error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_USER_NOTICE); |
|
87 | - } |
|
88 | - break; |
|
89 | - |
|
90 | - default: |
|
91 | - header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); |
|
92 | - echo 'The application environment is not set correctly.'; |
|
93 | - exit(1); // EXIT_ERROR |
|
72 | + case 'testing': |
|
73 | + case 'development': |
|
74 | + error_reporting(-1); |
|
75 | + ini_set('display_errors', 1); |
|
76 | + break; |
|
77 | + |
|
78 | + case 'production': |
|
79 | + ini_set('display_errors', 0); |
|
80 | + if (version_compare(PHP_VERSION, '5.3', '>=')) |
|
81 | + { |
|
82 | + error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED); |
|
83 | + } |
|
84 | + else |
|
85 | + { |
|
86 | + error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_USER_NOTICE); |
|
87 | + } |
|
88 | + break; |
|
89 | + |
|
90 | + default: |
|
91 | + header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); |
|
92 | + echo 'The application environment is not set correctly.'; |
|
93 | + exit(1); // EXIT_ERROR |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | /* |
@@ -80,8 +80,7 @@ discard block |
||
80 | 80 | if (version_compare(PHP_VERSION, '5.3', '>=')) |
81 | 81 | { |
82 | 82 | error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED); |
83 | - } |
|
84 | - else |
|
83 | + } else |
|
85 | 84 | { |
86 | 85 | error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_USER_NOTICE); |
87 | 86 | } |
@@ -204,8 +203,7 @@ discard block |
||
204 | 203 | if (($_temp = realpath($system_path)) !== FALSE) |
205 | 204 | { |
206 | 205 | $system_path = $_temp.DIRECTORY_SEPARATOR; |
207 | - } |
|
208 | - else |
|
206 | + } else |
|
209 | 207 | { |
210 | 208 | // Ensure there's a trailing slash |
211 | 209 | $system_path = strtr( |
@@ -249,8 +247,7 @@ discard block |
||
249 | 247 | if (($_temp = realpath($application_folder)) !== FALSE) |
250 | 248 | { |
251 | 249 | $application_folder = $_temp; |
252 | - } |
|
253 | - else |
|
250 | + } else |
|
254 | 251 | { |
255 | 252 | $application_folder = strtr( |
256 | 253 | rtrim($application_folder, '/\\'), |
@@ -258,16 +255,14 @@ discard block |
||
258 | 255 | DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR |
259 | 256 | ); |
260 | 257 | } |
261 | - } |
|
262 | - elseif (is_dir(BASEPATH.$application_folder.DIRECTORY_SEPARATOR)) |
|
258 | + } elseif (is_dir(BASEPATH.$application_folder.DIRECTORY_SEPARATOR)) |
|
263 | 259 | { |
264 | 260 | $application_folder = BASEPATH.strtr( |
265 | 261 | trim($application_folder, '/\\'), |
266 | 262 | '/\\', |
267 | 263 | DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR |
268 | 264 | ); |
269 | - } |
|
270 | - else |
|
265 | + } else |
|
271 | 266 | { |
272 | 267 | header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); |
273 | 268 | echo 'Your application folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF; |
@@ -280,14 +275,12 @@ discard block |
||
280 | 275 | if ( ! isset($view_folder[0]) && is_dir(APPPATH.'views'.DIRECTORY_SEPARATOR)) |
281 | 276 | { |
282 | 277 | $view_folder = APPPATH.'views'; |
283 | - } |
|
284 | - elseif (is_dir($view_folder)) |
|
278 | + } elseif (is_dir($view_folder)) |
|
285 | 279 | { |
286 | 280 | if (($_temp = realpath($view_folder)) !== FALSE) |
287 | 281 | { |
288 | 282 | $view_folder = $_temp; |
289 | - } |
|
290 | - else |
|
283 | + } else |
|
291 | 284 | { |
292 | 285 | $view_folder = strtr( |
293 | 286 | rtrim($view_folder, '/\\'), |
@@ -295,16 +288,14 @@ discard block |
||
295 | 288 | DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR |
296 | 289 | ); |
297 | 290 | } |
298 | - } |
|
299 | - elseif (is_dir(APPPATH.$view_folder.DIRECTORY_SEPARATOR)) |
|
291 | + } elseif (is_dir(APPPATH.$view_folder.DIRECTORY_SEPARATOR)) |
|
300 | 292 | { |
301 | 293 | $view_folder = APPPATH.strtr( |
302 | 294 | trim($view_folder, '/\\'), |
303 | 295 | '/\\', |
304 | 296 | DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR |
305 | 297 | ); |
306 | - } |
|
307 | - else |
|
298 | + } else |
|
308 | 299 | { |
309 | 300 | header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); |
310 | 301 | echo 'Your view folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF; |
@@ -317,8 +308,7 @@ discard block |
||
317 | 308 | if (is_file(TESTPATH . '_ci_phpunit_test' . DIRECTORY_SEPARATOR . 'CIPHPUnitTest.php')) |
318 | 309 | { |
319 | 310 | define('CI_PHPUNIT_TESTPATH', TESTPATH . '_ci_phpunit_test' . DIRECTORY_SEPARATOR); |
320 | - } |
|
321 | - else |
|
311 | + } else |
|
322 | 312 | { |
323 | 313 | // Assume Composer with a vendor directory parallel to the application directory |
324 | 314 | define('CI_PHPUNIT_TESTPATH', implode( |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME)); |
244 | 244 | |
245 | 245 | // Path to the test directory containing all the test files. |
246 | - define('TESTPATH', __DIR__.DIRECTORY_SEPARATOR); // Should be the folder this `Bootstrap.php` file is in. |
|
246 | + define('TESTPATH', __DIR__.DIRECTORY_SEPARATOR); // Should be the folder this `Bootstrap.php` file is in. |
|
247 | 247 | |
248 | 248 | // Path to the system directory |
249 | 249 | define('BASEPATH', $system_path); |
@@ -325,9 +325,9 @@ discard block |
||
325 | 325 | define('VIEWPATH', $view_folder.DIRECTORY_SEPARATOR); |
326 | 326 | |
327 | 327 | // Path to the ci-phpunit-test directory |
328 | - if (is_file(TESTPATH . '_ci_phpunit_test' . DIRECTORY_SEPARATOR . 'CIPHPUnitTest.php')) |
|
328 | + if (is_file(TESTPATH.'_ci_phpunit_test'.DIRECTORY_SEPARATOR.'CIPHPUnitTest.php')) |
|
329 | 329 | { |
330 | - define('CI_PHPUNIT_TESTPATH', TESTPATH . '_ci_phpunit_test' . DIRECTORY_SEPARATOR); |
|
330 | + define('CI_PHPUNIT_TESTPATH', TESTPATH.'_ci_phpunit_test'.DIRECTORY_SEPARATOR); |
|
331 | 331 | } |
332 | 332 | else |
333 | 333 | { |
@@ -388,7 +388,7 @@ discard block |
||
388 | 388 | * ------------------------------------------------------------------- |
389 | 389 | */ |
390 | 390 | |
391 | -require CI_PHPUNIT_TESTPATH . '/CIPHPUnitTest.php'; |
|
391 | +require CI_PHPUNIT_TESTPATH.'/CIPHPUnitTest.php'; |
|
392 | 392 | |
393 | 393 | CIPHPUnitTest::init(); |
394 | 394 | // Or you can set directories for autoloading |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | { |
70 | 70 | if (in_array($class, $this->alias)) |
71 | 71 | { |
72 | - $dir = __DIR__ . '/alias'; |
|
72 | + $dir = __DIR__.'/alias'; |
|
73 | 73 | $this->loadClassFile($dir, $class); |
74 | 74 | } |
75 | 75 | } |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | } |
89 | 89 | else |
90 | 90 | { |
91 | - $dir = __DIR__ . '/exceptions'; |
|
91 | + $dir = __DIR__.'/exceptions'; |
|
92 | 92 | $this->loadClassFile($dir, $class); |
93 | 93 | } |
94 | 94 | } |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | |
130 | 130 | protected function loadClassFile($dir, $class) |
131 | 131 | { |
132 | - $class_file = $dir . '/' . $class . '.php'; |
|
132 | + $class_file = $dir.'/'.$class.'.php'; |
|
133 | 133 | if (file_exists($class_file)) |
134 | 134 | { |
135 | 135 | require $class_file; |
@@ -44,8 +44,7 @@ discard block |
||
44 | 44 | APPPATH.'modules', |
45 | 45 | APPPATH.'hooks', |
46 | 46 | ]; |
47 | - } |
|
48 | - else |
|
47 | + } else |
|
49 | 48 | { |
50 | 49 | $this->dirs = $dirs; |
51 | 50 | } |
@@ -86,8 +85,7 @@ discard block |
||
86 | 85 | { |
87 | 86 | $dir = __DIR__; |
88 | 87 | $this->loadClassFile($dir, $class); |
89 | - } |
|
90 | - else |
|
88 | + } else |
|
91 | 89 | { |
92 | 90 | $dir = __DIR__ . '/exceptions'; |
93 | 91 | $this->loadClassFile($dir, $class); |
@@ -152,8 +150,7 @@ discard block |
||
152 | 150 | { |
153 | 151 | require $filename; |
154 | 152 | return true; |
155 | - } |
|
156 | - else |
|
153 | + } else |
|
157 | 154 | { |
158 | 155 | unset($this->cache[$class]); |
159 | 156 | } |
@@ -24,18 +24,18 @@ |
||
24 | 24 | } |
25 | 25 | |
26 | 26 | $dir = dirname($this->file); |
27 | - if (! is_dir($dir)) |
|
27 | + if ( ! is_dir($dir)) |
|
28 | 28 | { |
29 | 29 | if (@mkdir($dir, 0777, true) === false) |
30 | 30 | { |
31 | - throw new RuntimeException('Failed to create folder: ' . $dir); |
|
31 | + throw new RuntimeException('Failed to create folder: '.$dir); |
|
32 | 32 | } |
33 | 33 | } |
34 | 34 | |
35 | 35 | if (file_put_contents($this->file, '') === false) |
36 | 36 | { |
37 | 37 | throw new RuntimeException( |
38 | - 'Failed to write to cache file: ' . $this->file |
|
38 | + 'Failed to write to cache file: '.$this->file |
|
39 | 39 | ); |
40 | 40 | } |
41 | 41 | } |
@@ -67,8 +67,7 @@ |
||
67 | 67 | if ($this->offsetExists($key)) |
68 | 68 | { |
69 | 69 | return $this->map[$key]; |
70 | - } |
|
71 | - else |
|
70 | + } else |
|
72 | 71 | { |
73 | 72 | return null; |
74 | 73 | } |
@@ -21,7 +21,7 @@ |
||
21 | 21 | $ref_method->setAccessible(true); |
22 | 22 | $obj = (gettype($obj) === 'object') ? $obj : null; |
23 | 23 | |
24 | - return function () use ($obj, $ref_method) { |
|
24 | + return function() use ($obj, $ref_method) { |
|
25 | 25 | $args = func_get_args(); |
26 | 26 | return $ref_method->invokeArgs($obj, $args); |
27 | 27 | }; |
@@ -29,16 +29,14 @@ |
||
29 | 29 | if (empty($class) OR ! file_exists(APPPATH.'controllers/'.$RTR->directory.$class.'.php')) |
30 | 30 | { |
31 | 31 | $e404 = TRUE; |
32 | - } |
|
33 | - else |
|
32 | + } else |
|
34 | 33 | { |
35 | 34 | require_once(APPPATH.'controllers/'.$RTR->directory.$class.'.php'); |
36 | 35 | |
37 | 36 | if ( ! class_exists($class, FALSE) OR $method[0] === '_' OR method_exists('CI_Controller', $method)) |
38 | 37 | { |
39 | 38 | $e404 = TRUE; |
40 | - } |
|
41 | - elseif (method_exists($class, '_remap')) |
|
39 | + } elseif (method_exists($class, '_remap')) |
|
42 | 40 | { |
43 | 41 | $params = array($method, array_slice($URI->rsegments, 2)); |
44 | 42 | $method = '_remap'; |
@@ -19,8 +19,8 @@ discard block |
||
19 | 19 | */ |
20 | 20 | public function getRoute() |
21 | 21 | { |
22 | - $RTR =& load_class('Router', 'core'); |
|
23 | - $URI =& load_class('URI', 'core'); |
|
22 | + $RTR = & load_class('Router', 'core'); |
|
23 | + $URI = & load_class('URI', 'core'); |
|
24 | 24 | |
25 | 25 | $e404 = FALSE; |
26 | 26 | $class = ucfirst($RTR->class); |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | { |
58 | 58 | // If 404, CodeIgniter instance is not created yet. So create it here. |
59 | 59 | // Because we need CI->output->_status |
60 | - $CI =& get_instance(); |
|
60 | + $CI = & get_instance(); |
|
61 | 61 | if ($CI instanceof CIPHPUnitTestNullCodeIgniter) |
62 | 62 | { |
63 | 63 | CIPHPUnitTest::createCodeIgniterInstance(); |
@@ -39,8 +39,7 @@ |
||
39 | 39 | { |
40 | 40 | $CI->db->close(); |
41 | 41 | $CI->db = null; |
42 | - } |
|
43 | - else |
|
42 | + } else |
|
44 | 43 | { |
45 | 44 | // Don't close if SQLite in-memory database |
46 | 45 | // If we close it, all tables and stored data will be gone |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | reset_config(); |
33 | 33 | |
34 | 34 | // Close db connection |
35 | - $CI =& get_instance(); |
|
35 | + $CI = & get_instance(); |
|
36 | 36 | if (isset($CI->db)) |
37 | 37 | { |
38 | 38 | if ( |
@@ -52,12 +52,12 @@ discard block |
||
52 | 52 | } |
53 | 53 | |
54 | 54 | // Load core classes |
55 | - $BM =& load_class('Benchmark', 'core'); |
|
55 | + $BM = & load_class('Benchmark', 'core'); |
|
56 | 56 | CIPHPUnitTestSuperGlobal::set_Global('BM', $BM); |
57 | - $EXT =& load_class('Hooks', 'core'); |
|
57 | + $EXT = & load_class('Hooks', 'core'); |
|
58 | 58 | CIPHPUnitTestSuperGlobal::set_Global('EXT', $EXT); |
59 | 59 | |
60 | - $CFG =& load_class('Config', 'core'); |
|
60 | + $CFG = & load_class('Config', 'core'); |
|
61 | 61 | CIPHPUnitTestSuperGlobal::set_Global('CFG', $CFG); |
62 | 62 | // Do we have any manually set config items in the index.php file? |
63 | 63 | global $assign_to_config; |
@@ -69,19 +69,19 @@ discard block |
||
69 | 69 | } |
70 | 70 | } |
71 | 71 | |
72 | - $UNI =& load_class('URI', 'core'); |
|
72 | + $UNI = & load_class('URI', 'core'); |
|
73 | 73 | CIPHPUnitTestSuperGlobal::set_Global('UNI', $UNI); |
74 | 74 | // $URI =& load_class('Utf8', 'core'); |
75 | 75 | // CIPHPUnitTestSuperGlobal::set_Global('URI', $URI); |
76 | - $RTR =& load_class('Router', 'core'); |
|
76 | + $RTR = & load_class('Router', 'core'); |
|
77 | 77 | CIPHPUnitTestSuperGlobal::set_Global('RTR', $RTR); |
78 | - $OUT =& load_class('Output', 'core'); |
|
78 | + $OUT = & load_class('Output', 'core'); |
|
79 | 79 | CIPHPUnitTestSuperGlobal::set_Global('OUT', $OUT); |
80 | - $SEC =& load_class('Security', 'core'); |
|
80 | + $SEC = & load_class('Security', 'core'); |
|
81 | 81 | CIPHPUnitTestSuperGlobal::set_Global('SEC', $SEC); |
82 | - $IN =& load_class('Input', 'core'); |
|
82 | + $IN = & load_class('Input', 'core'); |
|
83 | 83 | CIPHPUnitTestSuperGlobal::set_Global('IN', $IN); |
84 | - $LANG =& load_class('Lang', 'core'); |
|
84 | + $LANG = & load_class('Lang', 'core'); |
|
85 | 85 | CIPHPUnitTestSuperGlobal::set_Global('LANG', $LANG); |
86 | 86 | |
87 | 87 | CIPHPUnitTest::loadLoader(); |
@@ -45,17 +45,17 @@ discard block |
||
45 | 45 | throw new LogicException("No such directory: $dir"); |
46 | 46 | } |
47 | 47 | |
48 | - self::$src_cache_dir = self::$cache_dir . '/src'; |
|
48 | + self::$src_cache_dir = self::$cache_dir.'/src'; |
|
49 | 49 | self::$tmp_function_whitelist_file = |
50 | - self::$cache_dir . '/conf/func_whiltelist.php'; |
|
50 | + self::$cache_dir.'/conf/func_whiltelist.php'; |
|
51 | 51 | self::$tmp_function_blacklist_file = |
52 | - self::$cache_dir . '/conf/func_blacklist.php'; |
|
52 | + self::$cache_dir.'/conf/func_blacklist.php'; |
|
53 | 53 | self::$tmp_patcher_list_file = |
54 | - self::$cache_dir . '/conf/patcher_list.php'; |
|
54 | + self::$cache_dir.'/conf/patcher_list.php'; |
|
55 | 55 | self::$tmp_include_paths_file = |
56 | - self::$cache_dir . '/conf/include_paths.php'; |
|
56 | + self::$cache_dir.'/conf/include_paths.php'; |
|
57 | 57 | self::$tmp_exclude_paths_file = |
58 | - self::$cache_dir . '/conf/exclude_paths.php'; |
|
58 | + self::$cache_dir.'/conf/exclude_paths.php'; |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | public static function getCacheDir() |
@@ -73,16 +73,16 @@ discard block |
||
73 | 73 | return false; |
74 | 74 | } |
75 | 75 | |
76 | - return self::$src_cache_dir . '/' . $relative_path; |
|
76 | + return self::$src_cache_dir.'/'.$relative_path; |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | protected static function createDir($dir) |
80 | 80 | { |
81 | - if (! is_dir($dir)) |
|
81 | + if ( ! is_dir($dir)) |
|
82 | 82 | { |
83 | - if (! @mkdir($dir, 0777, true)) |
|
83 | + if ( ! @mkdir($dir, 0777, true)) |
|
84 | 84 | { |
85 | - throw new RuntimeException('Failed to create folder: ' . $dir); |
|
85 | + throw new RuntimeException('Failed to create folder: '.$dir); |
|
86 | 86 | } |
87 | 87 | } |
88 | 88 | } |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | public static function appendTmpFunctionBlacklist($function) |
155 | 155 | { |
156 | 156 | file_put_contents( |
157 | - self::getTmpFunctionBlacklistFile(), $function . "\n", FILE_APPEND |
|
157 | + self::getTmpFunctionBlacklistFile(), $function."\n", FILE_APPEND |
|
158 | 158 | ); |
159 | 159 | } |
160 | 160 | |
@@ -234,20 +234,20 @@ discard block |
||
234 | 234 | { |
235 | 235 | $cache = self::getSrcCacheFilePath($orig_file); |
236 | 236 | @unlink($cache); |
237 | - MonkeyPatchManager::log('remove_src_cache: ' . $cache); |
|
237 | + MonkeyPatchManager::log('remove_src_cache: '.$cache); |
|
238 | 238 | return $cache; |
239 | 239 | } |
240 | 240 | |
241 | 241 | public static function clearSrcCache() |
242 | 242 | { |
243 | 243 | self::recursiveUnlink(self::$src_cache_dir); |
244 | - MonkeyPatchManager::log('clear_src_cache: cleared ' . self::$src_cache_dir); |
|
244 | + MonkeyPatchManager::log('clear_src_cache: cleared '.self::$src_cache_dir); |
|
245 | 245 | } |
246 | 246 | |
247 | 247 | public static function clearCache() |
248 | 248 | { |
249 | 249 | self::recursiveUnlink(self::$cache_dir); |
250 | - MonkeyPatchManager::log('clear_cache: cleared ' . self::$cache_dir); |
|
250 | + MonkeyPatchManager::log('clear_cache: cleared '.self::$cache_dir); |
|
251 | 251 | } |
252 | 252 | |
253 | 253 | /** |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | */ |
258 | 258 | protected static function recursiveUnlink($dir) |
259 | 259 | { |
260 | - if (! is_dir($dir)) |
|
260 | + if ( ! is_dir($dir)) |
|
261 | 261 | { |
262 | 262 | return; |
263 | 263 | } |
@@ -251,10 +251,10 @@ |
||
251 | 251 | } |
252 | 252 | |
253 | 253 | /** |
254 | - * Recursive Unlink |
|
255 | - * |
|
256 | - * @param string $dir |
|
257 | - */ |
|
254 | + * Recursive Unlink |
|
255 | + * |
|
256 | + * @param string $dir |
|
257 | + */ |
|
258 | 258 | protected static function recursiveUnlink($dir) |
259 | 259 | { |
260 | 260 | if (! is_dir($dir)) |
@@ -59,7 +59,7 @@ |
||
59 | 59 | { |
60 | 60 | $this->unwrap(); |
61 | 61 | |
62 | - MonkeyPatchManager::log('stream_open: ' . $path); |
|
62 | + MonkeyPatchManager::log('stream_open: '.$path); |
|
63 | 63 | |
64 | 64 | $including = (bool) ($options & self::STREAM_OPEN_FOR_INCLUDE); |
65 | 65 | if ($including && $this->shouldPreprocess($path)) { |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | PHPUnit_Framework_TestCase::assertEquals( |
55 | 55 | $expected_times, |
56 | 56 | $actual_times, |
57 | - $class_method . '() expected to be not invoked, but invoked ' . $actual_times . ' times.' |
|
57 | + $class_method.'() expected to be not invoked, but invoked '.$actual_times.' times.' |
|
58 | 58 | ); |
59 | 59 | } |
60 | 60 | elseif ($expected_times === '+') |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | PHPUnit_Framework_TestCase::assertGreaterThanOrEqual( |
63 | 63 | 1, |
64 | 64 | $actual_times, |
65 | - $class_method . '() expected to be invoked at least one time, but invoked ' . $actual_times . ' times.' |
|
65 | + $class_method.'() expected to be invoked at least one time, but invoked '.$actual_times.' times.' |
|
66 | 66 | ); |
67 | 67 | } |
68 | 68 | else |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | PHPUnit_Framework_TestCase::assertEquals( |
71 | 71 | $expected_times, |
72 | 72 | $actual_times, |
73 | - $class_method . '() expected to be invoked ' . $expected_times . ' times, but invoked ' . $actual_times . ' times.' |
|
73 | + $class_method.'() expected to be invoked '.$expected_times.' times, but invoked '.$actual_times.' times.' |
|
74 | 74 | ); |
75 | 75 | } |
76 | 76 | } |
@@ -31,12 +31,10 @@ discard block |
||
31 | 31 | if ($invoked === false) |
32 | 32 | { |
33 | 33 | $actual_times = 0; |
34 | - } |
|
35 | - elseif ($expected_params === null) |
|
34 | + } elseif ($expected_params === null) |
|
36 | 35 | { |
37 | 36 | $actual_times = count($invocations[$class_method]); |
38 | - } |
|
39 | - else |
|
37 | + } else |
|
40 | 38 | { |
41 | 39 | $count = 0; |
42 | 40 | foreach ($invocations[$class_method] as $actual_params) |
@@ -56,16 +54,14 @@ discard block |
||
56 | 54 | $actual_times, |
57 | 55 | $class_method . '() expected to be not invoked, but invoked ' . $actual_times . ' times.' |
58 | 56 | ); |
59 | - } |
|
60 | - elseif ($expected_times === '+') |
|
57 | + } elseif ($expected_times === '+') |
|
61 | 58 | { |
62 | 59 | PHPUnit_Framework_TestCase::assertGreaterThanOrEqual( |
63 | 60 | 1, |
64 | 61 | $actual_times, |
65 | 62 | $class_method . '() expected to be invoked at least one time, but invoked ' . $actual_times . ' times.' |
66 | 63 | ); |
67 | - } |
|
68 | - else |
|
64 | + } else |
|
69 | 65 | { |
70 | 66 | PHPUnit_Framework_TestCase::assertEquals( |
71 | 67 | $expected_times, |