@@ -26,10 +26,10 @@ discard block |
||
| 26 | 26 | */ |
| 27 | 27 | private static function fixPath() |
| 28 | 28 | { |
| 29 | - $file = static::TEST_FOLDER . '/Bootstrap.php'; |
|
| 29 | + $file = static::TEST_FOLDER.'/Bootstrap.php'; |
|
| 30 | 30 | $contents = file_get_contents($file); |
| 31 | 31 | |
| 32 | - if (! file_exists('system')) { |
|
| 32 | + if ( ! file_exists('system')) { |
|
| 33 | 33 | if (file_exists('vendor/codeigniter/framework/system')) { |
| 34 | 34 | $contents = str_replace( |
| 35 | 35 | '$system_path = \'../../system\';', |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | } |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | - if (! file_exists('index.php')) { |
|
| 44 | + if ( ! file_exists('index.php')) { |
|
| 45 | 45 | if (file_exists('public/index.php')) { |
| 46 | 46 | $contents = str_replace( |
| 47 | 47 | "define('FCPATH', realpath(dirname(__FILE__).'/../..').'/');", |
@@ -82,11 +82,11 @@ discard block |
||
| 82 | 82 | |
| 83 | 83 | foreach ($iterator as $file) { |
| 84 | 84 | if ($file->isDir()) { |
| 85 | - @mkdir($dst . '/' . $iterator->getSubPathName()); |
|
| 85 | + @mkdir($dst.'/'.$iterator->getSubPathName()); |
|
| 86 | 86 | } else { |
| 87 | - $success = copy($file, $dst . '/' . $iterator->getSubPathName()); |
|
| 87 | + $success = copy($file, $dst.'/'.$iterator->getSubPathName()); |
|
| 88 | 88 | if ($success) { |
| 89 | - echo 'copied: ' . $dst . '/' . $iterator->getSubPathName() . PHP_EOL; |
|
| 89 | + echo 'copied: '.$dst.'/'.$iterator->getSubPathName().PHP_EOL; |
|
| 90 | 90 | } |
| 91 | 91 | } |
| 92 | 92 | } |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | |
| 17 | 17 | public function __construct() |
| 18 | 18 | { |
| 19 | - $this->CI =& get_instance(); |
|
| 19 | + $this->CI = & get_instance(); |
|
| 20 | 20 | $this->CI->load->database(); |
| 21 | 21 | $this->CI->load->dbforge(); |
| 22 | 22 | $this->db = $this->CI->db; |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | */ |
| 31 | 31 | public function call($seeder) |
| 32 | 32 | { |
| 33 | - $file = APPPATH . 'database/seeds/' . $seeder . '.php'; |
|
| 33 | + $file = APPPATH.'database/seeds/'.$seeder.'.php'; |
|
| 34 | 34 | require_once $file; |
| 35 | 35 | $obj = new $seeder; |
| 36 | 36 | $obj->run(); |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | * NOTE: If you change these, also change the error_reporting() code below |
| 55 | 55 | */ |
| 56 | 56 | // This is needed for @runInSeparateProcess |
| 57 | -if (! defined('ENVIRONMENT')) |
|
| 57 | +if ( ! defined('ENVIRONMENT')) |
|
| 58 | 58 | { |
| 59 | 59 | define('ENVIRONMENT', 'testing'); |
| 60 | 60 | } |
@@ -327,7 +327,7 @@ discard block |
||
| 327 | 327 | * Added for CI PHPUnit Test |
| 328 | 328 | * ------------------------------------------------------------------- |
| 329 | 329 | */ |
| 330 | -require __DIR__ . '/_ci_phpunit_test/CIPHPUnitTest.php'; |
|
| 330 | +require __DIR__.'/_ci_phpunit_test/CIPHPUnitTest.php'; |
|
| 331 | 331 | CIPHPUnitTest::init(); |
| 332 | 332 | /* |
| 333 | 333 | * 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; |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | return $this->$name; |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | - throw new LogicException('No such property: ' . $name); |
|
| 44 | + throw new LogicException('No such property: '.$name); |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | public static function setUpBeforeClass() |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | { |
| 62 | 62 | reset_instance(); |
| 63 | 63 | new CI_Controller(); |
| 64 | - $this->CI =& get_instance(); |
|
| 64 | + $this->CI = & get_instance(); |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | protected function tearDown() |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | $this->assertSame( |
| 236 | 236 | $code, |
| 237 | 237 | $actual, |
| 238 | - 'Status code is not ' . $code . ' but ' . $actual . '.' |
|
| 238 | + 'Status code is not '.$code.' but '.$actual.'.' |
|
| 239 | 239 | ); |
| 240 | 240 | } |
| 241 | 241 | |
@@ -247,7 +247,7 @@ discard block |
||
| 247 | 247 | */ |
| 248 | 248 | public function assertResponseHeader($name, $value) |
| 249 | 249 | { |
| 250 | - $CI =& get_instance(); |
|
| 250 | + $CI = & get_instance(); |
|
| 251 | 251 | $actual = $CI->output->get_header($name); |
| 252 | 252 | |
| 253 | 253 | if ($actual === null) |
@@ -277,18 +277,18 @@ discard block |
||
| 277 | 277 | $this->fail('redirect() is not called.'); |
| 278 | 278 | } |
| 279 | 279 | |
| 280 | - if (! function_exists('site_url')) |
|
| 280 | + if ( ! function_exists('site_url')) |
|
| 281 | 281 | { |
| 282 | - $CI =& get_instance(); |
|
| 282 | + $CI = & get_instance(); |
|
| 283 | 283 | $CI->load->helper('url'); |
| 284 | 284 | } |
| 285 | 285 | $absolute_url = site_url($uri); |
| 286 | - $expected = 'Redirect to ' . $absolute_url; |
|
| 286 | + $expected = 'Redirect to '.$absolute_url; |
|
| 287 | 287 | |
| 288 | 288 | $this->assertSame( |
| 289 | 289 | $expected, |
| 290 | 290 | $status['redirect'], |
| 291 | - 'URL to redirect is not ' . $expected . ' but ' . $status['redirect'] . '.' |
|
| 291 | + 'URL to redirect is not '.$expected.' but '.$status['redirect'].'.' |
|
| 292 | 292 | ); |
| 293 | 293 | |
| 294 | 294 | if ($code !== null) |
@@ -296,7 +296,7 @@ discard block |
||
| 296 | 296 | $this->assertSame( |
| 297 | 297 | $code, |
| 298 | 298 | $status['code'], |
| 299 | - 'Status code is not ' . $code . ' but ' . $status['code'] . '.' |
|
| 299 | + 'Status code is not '.$code.' but '.$status['code'].'.' |
|
| 300 | 300 | ); |
| 301 | 301 | } |
| 302 | 302 | } |
@@ -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 | } |
@@ -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 | }; |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | // Set $_GET if URI string has query string |
| 32 | 32 | parse_str($query_string, $_GET); |
| 33 | 33 | // Remove query string from URI string |
| 34 | - $argv = substr($argv, 0, -strlen($query_string)-1); |
|
| 34 | + $argv = substr($argv, 0, -strlen($query_string) - 1); |
|
| 35 | 35 | } |
| 36 | 36 | } |
| 37 | 37 | |
@@ -64,12 +64,12 @@ discard block |
||
| 64 | 64 | if ($_GET !== []) |
| 65 | 65 | { |
| 66 | 66 | $_SERVER['REQUEST_URI'] = |
| 67 | - '/' . $path . '?' |
|
| 67 | + '/'.$path.'?' |
|
| 68 | 68 | . http_build_query($_GET); |
| 69 | 69 | } |
| 70 | 70 | else |
| 71 | 71 | { |
| 72 | - $_SERVER['REQUEST_URI'] = '/' . $path; |
|
| 72 | + $_SERVER['REQUEST_URI'] = '/'.$path; |
|
| 73 | 73 | } |
| 74 | 74 | } |
| 75 | 75 | |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | |
| 87 | 87 | if ($query_string === false) |
| 88 | 88 | { |
| 89 | - throw new LogicException('Bad URI string: ' . $uri); |
|
| 89 | + throw new LogicException('Bad URI string: '.$uri); |
|
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | return $query_string; |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | } |
| 112 | 112 | else |
| 113 | 113 | { |
| 114 | - $key = 'HTTP_' . $normalized_name; |
|
| 114 | + $key = 'HTTP_'.$normalized_name; |
|
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | $_SERVER[$key] = $value; |
@@ -9,10 +9,10 @@ discard block |
||
| 9 | 9 | */ |
| 10 | 10 | |
| 11 | 11 | // Autoloader for ci-phpunit-test |
| 12 | -require __DIR__ . '/CIPHPUnitTestAutoloader.php'; |
|
| 13 | -require __DIR__ . '/CIPHPUnitTestFileCache.php'; |
|
| 12 | +require __DIR__.'/CIPHPUnitTestAutoloader.php'; |
|
| 13 | +require __DIR__.'/CIPHPUnitTestFileCache.php'; |
|
| 14 | 14 | $cache = new CIPHPUnitTestFileCache( |
| 15 | - __DIR__ . '/tmp/cache/autoload.php' |
|
| 15 | + __DIR__.'/tmp/cache/autoload.php' |
|
| 16 | 16 | ); |
| 17 | 17 | $autoload_dirs = CIPHPUnitTest::getAutoloadDirs(); |
| 18 | 18 | $autoloader = new CIPHPUnitTestAutoloader($cache, $autoload_dirs); |
@@ -20,5 +20,5 @@ discard block |
||
| 20 | 20 | |
| 21 | 21 | // Register CodeIgniter's tests/mocks/autoloader.php |
| 22 | 22 | define('SYSTEM_PATH', BASEPATH); |
| 23 | -require APPPATH .'tests/mocks/autoloader.php'; |
|
| 23 | +require APPPATH.'tests/mocks/autoloader.php'; |
|
| 24 | 24 | spl_autoload_register('autoload'); |