@@ -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(); |
@@ -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 | /* |
@@ -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 |
@@ -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 | } |
@@ -203,8 +202,7 @@ discard block |
||
| 203 | 202 | if (($_temp = realpath($system_path)) !== FALSE) |
| 204 | 203 | { |
| 205 | 204 | $system_path = $_temp.'/'; |
| 206 | - } |
|
| 207 | - else |
|
| 205 | + } else |
|
| 208 | 206 | { |
| 209 | 207 | // Ensure there's a trailing slash |
| 210 | 208 | $system_path = rtrim($system_path, '/').'/'; |
@@ -244,8 +242,7 @@ discard block |
||
| 244 | 242 | } |
| 245 | 243 | |
| 246 | 244 | define('APPPATH', $application_folder.DIRECTORY_SEPARATOR); |
| 247 | - } |
|
| 248 | - else |
|
| 245 | + } else |
|
| 249 | 246 | { |
| 250 | 247 | if ( ! is_dir(BASEPATH.$application_folder.DIRECTORY_SEPARATOR)) |
| 251 | 248 | { |
@@ -263,14 +260,12 @@ discard block |
||
| 263 | 260 | if ( ! empty($view_folder) && is_dir(APPPATH.$view_folder.DIRECTORY_SEPARATOR)) |
| 264 | 261 | { |
| 265 | 262 | $view_folder = APPPATH.$view_folder; |
| 266 | - } |
|
| 267 | - elseif ( ! is_dir(APPPATH.'views'.DIRECTORY_SEPARATOR)) |
|
| 263 | + } elseif ( ! is_dir(APPPATH.'views'.DIRECTORY_SEPARATOR)) |
|
| 268 | 264 | { |
| 269 | 265 | header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); |
| 270 | 266 | echo 'Your view folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF; |
| 271 | 267 | exit(3); // EXIT_CONFIG |
| 272 | - } |
|
| 273 | - else |
|
| 268 | + } else |
|
| 274 | 269 | { |
| 275 | 270 | $view_folder = APPPATH.'views'; |
| 276 | 271 | } |
@@ -279,8 +274,7 @@ discard block |
||
| 279 | 274 | if (($_temp = realpath($view_folder)) !== FALSE) |
| 280 | 275 | { |
| 281 | 276 | $view_folder = $_temp.DIRECTORY_SEPARATOR; |
| 282 | - } |
|
| 283 | - else |
|
| 277 | + } else |
|
| 284 | 278 | { |
| 285 | 279 | $view_folder = rtrim($view_folder, '/\\').DIRECTORY_SEPARATOR; |
| 286 | 280 | } |
@@ -1,40 +1,40 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * CodeIgniter |
|
| 4 | - * |
|
| 5 | - * An open source application development framework for PHP |
|
| 6 | - * |
|
| 7 | - * This content is released under the MIT License (MIT) |
|
| 8 | - * |
|
| 9 | - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology |
|
| 10 | - * |
|
| 11 | - * Permission is hereby granted, free of charge, to any person obtaining a copy |
|
| 12 | - * of this software and associated documentation files (the "Software"), to deal |
|
| 13 | - * in the Software without restriction, including without limitation the rights |
|
| 14 | - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
| 15 | - * copies of the Software, and to permit persons to whom the Software is |
|
| 16 | - * furnished to do so, subject to the following conditions: |
|
| 17 | - * |
|
| 18 | - * The above copyright notice and this permission notice shall be included in |
|
| 19 | - * all copies or substantial portions of the Software. |
|
| 20 | - * |
|
| 21 | - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
| 22 | - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
| 23 | - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
| 24 | - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
| 25 | - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|
| 26 | - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
|
| 27 | - * THE SOFTWARE. |
|
| 28 | - * |
|
| 29 | - * @package CodeIgniter |
|
| 30 | - * @author EllisLab Dev Team |
|
| 31 | - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) |
|
| 32 | - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) |
|
| 33 | - * @license http://opensource.org/licenses/MIT MIT License |
|
| 34 | - * @link http://codeigniter.com |
|
| 35 | - * @since Version 1.0.0 |
|
| 36 | - * @filesource |
|
| 37 | - */ |
|
| 3 | + * CodeIgniter |
|
| 4 | + * |
|
| 5 | + * An open source application development framework for PHP |
|
| 6 | + * |
|
| 7 | + * This content is released under the MIT License (MIT) |
|
| 8 | + * |
|
| 9 | + * Copyright (c) 2014 - 2015, British Columbia Institute of Technology |
|
| 10 | + * |
|
| 11 | + * Permission is hereby granted, free of charge, to any person obtaining a copy |
|
| 12 | + * of this software and associated documentation files (the "Software"), to deal |
|
| 13 | + * in the Software without restriction, including without limitation the rights |
|
| 14 | + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
| 15 | + * copies of the Software, and to permit persons to whom the Software is |
|
| 16 | + * furnished to do so, subject to the following conditions: |
|
| 17 | + * |
|
| 18 | + * The above copyright notice and this permission notice shall be included in |
|
| 19 | + * all copies or substantial portions of the Software. |
|
| 20 | + * |
|
| 21 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
| 22 | + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
| 23 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
| 24 | + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
| 25 | + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|
| 26 | + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
|
| 27 | + * THE SOFTWARE. |
|
| 28 | + * |
|
| 29 | + * @package CodeIgniter |
|
| 30 | + * @author EllisLab Dev Team |
|
| 31 | + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) |
|
| 32 | + * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) |
|
| 33 | + * @license http://opensource.org/licenses/MIT MIT License |
|
| 34 | + * @link http://codeigniter.com |
|
| 35 | + * @since Version 1.0.0 |
|
| 36 | + * @filesource |
|
| 37 | + */ |
|
| 38 | 38 | defined('BASEPATH') OR exit('No direct script access allowed'); |
| 39 | 39 | |
| 40 | 40 | /** |
@@ -31,27 +31,27 @@ discard block |
||
| 31 | 31 | self::$autoload_dirs = $autoload_dirs; |
| 32 | 32 | |
| 33 | 33 | // Load autoloader for ci-phpunit-test |
| 34 | - require __DIR__ . '/autoloader.php'; |
|
| 34 | + require __DIR__.'/autoloader.php'; |
|
| 35 | 35 | |
| 36 | 36 | // Autoloader for PHP-Parser |
| 37 | 37 | // Don't use `require`, because we may have required already |
| 38 | 38 | // in `patcher/bootstrap.php` |
| 39 | - require_once __DIR__ . '/patcher/third_party/PHP-Parser/lib/bootstrap.php'; |
|
| 39 | + require_once __DIR__.'/patcher/third_party/PHP-Parser/lib/bootstrap.php'; |
|
| 40 | 40 | |
| 41 | - require APPPATH . '/tests/TestCase.php'; |
|
| 41 | + require APPPATH.'/tests/TestCase.php'; |
|
| 42 | 42 | |
| 43 | 43 | // Replace a few Common functions |
| 44 | - require __DIR__ . '/replacing/core/Common.php'; |
|
| 45 | - require BASEPATH . 'core/Common.php'; |
|
| 44 | + require __DIR__.'/replacing/core/Common.php'; |
|
| 45 | + require BASEPATH.'core/Common.php'; |
|
| 46 | 46 | |
| 47 | 47 | // Workaround for missing CodeIgniter's error handler |
| 48 | 48 | // See https://github.com/kenjis/ci-phpunit-test/issues/37 |
| 49 | 49 | set_error_handler('_error_handler'); |
| 50 | 50 | |
| 51 | 51 | // Load new functions of CIPHPUnitTest |
| 52 | - require __DIR__ . '/functions.php'; |
|
| 52 | + require __DIR__.'/functions.php'; |
|
| 53 | 53 | // Load ci-phpunit-test CI_Loader |
| 54 | - require __DIR__ . '/replacing/core/Loader.php'; |
|
| 54 | + require __DIR__.'/replacing/core/Loader.php'; |
|
| 55 | 55 | |
| 56 | 56 | self::replaceHelpers(); |
| 57 | 57 | |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | * |
| 66 | 66 | * And away we go... |
| 67 | 67 | */ |
| 68 | - require __DIR__ . '/replacing/core/CodeIgniter.php'; |
|
| 68 | + require __DIR__.'/replacing/core/CodeIgniter.php'; |
|
| 69 | 69 | new CI_Controller(); |
| 70 | 70 | |
| 71 | 71 | // This code is here, not to cause errors with HMVC |
@@ -83,11 +83,11 @@ discard block |
||
| 83 | 83 | protected static function replaceLoader() |
| 84 | 84 | { |
| 85 | 85 | $my_loader_file = |
| 86 | - APPPATH . 'core/' . config_item('subclass_prefix') . 'Loader.php'; |
|
| 86 | + APPPATH.'core/'.config_item('subclass_prefix').'Loader.php'; |
|
| 87 | 87 | |
| 88 | 88 | if (file_exists($my_loader_file)) |
| 89 | 89 | { |
| 90 | - self::$loader_class = config_item('subclass_prefix') . 'Loader'; |
|
| 90 | + self::$loader_class = config_item('subclass_prefix').'Loader'; |
|
| 91 | 91 | if ( ! class_exists(self::$loader_class)) |
| 92 | 92 | { |
| 93 | 93 | require $my_loader_file; |
@@ -98,19 +98,19 @@ discard block |
||
| 98 | 98 | |
| 99 | 99 | protected static function replaceHelpers() |
| 100 | 100 | { |
| 101 | - $my_helper_file = APPPATH . 'helpers/' . config_item('subclass_prefix') . 'url_helper.php'; |
|
| 101 | + $my_helper_file = APPPATH.'helpers/'.config_item('subclass_prefix').'url_helper.php'; |
|
| 102 | 102 | if (file_exists($my_helper_file)) |
| 103 | 103 | { |
| 104 | 104 | require $my_helper_file; |
| 105 | 105 | } |
| 106 | - require __DIR__ . '/replacing/helpers/url_helper.php'; |
|
| 106 | + require __DIR__.'/replacing/helpers/url_helper.php'; |
|
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | public static function setPatcherCacheDir($dir = null) |
| 110 | 110 | { |
| 111 | 111 | if ($dir === null) |
| 112 | 112 | { |
| 113 | - $dir = APPPATH . 'tests/_ci_phpunit_test/tmp/cache'; |
|
| 113 | + $dir = APPPATH.'tests/_ci_phpunit_test/tmp/cache'; |
|
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | MonkeyPatchManager::setCacheDir( |
@@ -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; |
@@ -43,8 +43,7 @@ discard block |
||
| 43 | 43 | APPPATH.'controllers', |
| 44 | 44 | APPPATH.'modules', |
| 45 | 45 | ]; |
| 46 | - } |
|
| 47 | - else |
|
| 46 | + } else |
|
| 48 | 47 | { |
| 49 | 48 | $this->dirs = $dirs; |
| 50 | 49 | } |
@@ -85,8 +84,7 @@ discard block |
||
| 85 | 84 | { |
| 86 | 85 | $dir = __DIR__; |
| 87 | 86 | $this->loadClassFile($dir, $class); |
| 88 | - } |
|
| 89 | - else |
|
| 87 | + } else |
|
| 90 | 88 | { |
| 91 | 89 | $dir = __DIR__ . '/exceptions'; |
| 92 | 90 | $this->loadClassFile($dir, $class); |
@@ -151,8 +149,7 @@ discard block |
||
| 151 | 149 | { |
| 152 | 150 | require $filename; |
| 153 | 151 | return true; |
| 154 | - } |
|
| 155 | - else |
|
| 152 | + } else |
|
| 156 | 153 | { |
| 157 | 154 | unset($this->cache[$class]); |
| 158 | 155 | } |
@@ -1,12 +1,12 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Part of CI PHPUnit Test |
|
| 4 | - * |
|
| 5 | - * @author Kenji Suzuki <https://github.com/kenjis> |
|
| 6 | - * @license MIT License |
|
| 7 | - * @copyright 2015 Kenji Suzuki |
|
| 8 | - * @link https://github.com/kenjis/ci-phpunit-test |
|
| 9 | - */ |
|
| 3 | + * Part of CI PHPUnit Test |
|
| 4 | + * |
|
| 5 | + * @author Kenji Suzuki <https://github.com/kenjis> |
|
| 6 | + * @license MIT License |
|
| 7 | + * @copyright 2015 Kenji Suzuki |
|
| 8 | + * @link https://github.com/kenjis/ci-phpunit-test |
|
| 9 | + */ |
|
| 10 | 10 | |
| 11 | 11 | require __DIR__ . '/Installer.php'; |
| 12 | 12 | |
@@ -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 | } |
@@ -1,12 +1,12 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Part of CI PHPUnit Test |
|
| 4 | - * |
|
| 5 | - * @author Kenji Suzuki <https://github.com/kenjis> |
|
| 6 | - * @license MIT License |
|
| 7 | - * @copyright 2015 Kenji Suzuki |
|
| 8 | - * @link https://github.com/kenjis/ci-phpunit-test |
|
| 9 | - */ |
|
| 3 | + * Part of CI PHPUnit Test |
|
| 4 | + * |
|
| 5 | + * @author Kenji Suzuki <https://github.com/kenjis> |
|
| 6 | + * @license MIT License |
|
| 7 | + * @copyright 2015 Kenji Suzuki |
|
| 8 | + * @link https://github.com/kenjis/ci-phpunit-test |
|
| 9 | + */ |
|
| 10 | 10 | |
| 11 | 11 | require __DIR__ . '/Installer.php'; |
| 12 | 12 | |
@@ -86,7 +86,7 @@ |
||
| 86 | 86 | break; |
| 87 | 87 | default: |
| 88 | 88 | throw new RuntimeException( |
| 89 | - 'Sorry, ' . $count . ' params not implemented yet' |
|
| 89 | + 'Sorry, '.$count.' params not implemented yet' |
|
| 90 | 90 | ); |
| 91 | 91 | } |
| 92 | 92 | } |
@@ -1,12 +1,12 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Part of CI PHPUnit Test |
|
| 4 | - * |
|
| 5 | - * @author Kenji Suzuki <https://github.com/kenjis> |
|
| 6 | - * @license MIT License |
|
| 7 | - * @copyright 2015 Kenji Suzuki |
|
| 8 | - * @link https://github.com/kenjis/ci-phpunit-test |
|
| 9 | - */ |
|
| 3 | + * Part of CI PHPUnit Test |
|
| 4 | + * |
|
| 5 | + * @author Kenji Suzuki <https://github.com/kenjis> |
|
| 6 | + * @license MIT License |
|
| 7 | + * @copyright 2015 Kenji Suzuki |
|
| 8 | + * @link https://github.com/kenjis/ci-phpunit-test |
|
| 9 | + */ |
|
| 10 | 10 | |
| 11 | 11 | require __DIR__ . '/Installer.php'; |
| 12 | 12 | |
@@ -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 | } |
@@ -1,12 +1,12 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Part of CI PHPUnit Test |
|
| 4 | - * |
|
| 5 | - * @author Kenji Suzuki <https://github.com/kenjis> |
|
| 6 | - * @license MIT License |
|
| 7 | - * @copyright 2015 Kenji Suzuki |
|
| 8 | - * @link https://github.com/kenjis/ci-phpunit-test |
|
| 9 | - */ |
|
| 3 | + * Part of CI PHPUnit Test |
|
| 4 | + * |
|
| 5 | + * @author Kenji Suzuki <https://github.com/kenjis> |
|
| 6 | + * @license MIT License |
|
| 7 | + * @copyright 2015 Kenji Suzuki |
|
| 8 | + * @link https://github.com/kenjis/ci-phpunit-test |
|
| 9 | + */ |
|
| 10 | 10 | |
| 11 | 11 | require __DIR__ . '/Installer.php'; |
| 12 | 12 | |
@@ -38,8 +38,7 @@ |
||
| 38 | 38 | { |
| 39 | 39 | $patched = true; |
| 40 | 40 | $new_source = static::generateNewSource($source); |
| 41 | - } |
|
| 42 | - else |
|
| 41 | + } else |
|
| 43 | 42 | { |
| 44 | 43 | $new_source = $source; |
| 45 | 44 | } |
@@ -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 | }; |
@@ -1,12 +1,12 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Part of CI PHPUnit Test |
|
| 4 | - * |
|
| 5 | - * @author Kenji Suzuki <https://github.com/kenjis> |
|
| 6 | - * @license MIT License |
|
| 7 | - * @copyright 2015 Kenji Suzuki |
|
| 8 | - * @link https://github.com/kenjis/ci-phpunit-test |
|
| 9 | - */ |
|
| 3 | + * Part of CI PHPUnit Test |
|
| 4 | + * |
|
| 5 | + * @author Kenji Suzuki <https://github.com/kenjis> |
|
| 6 | + * @license MIT License |
|
| 7 | + * @copyright 2015 Kenji Suzuki |
|
| 8 | + * @link https://github.com/kenjis/ci-phpunit-test |
|
| 9 | + */ |
|
| 10 | 10 | |
| 11 | 11 | require __DIR__ . '/Installer.php'; |
| 12 | 12 | |
@@ -19,8 +19,8 @@ |
||
| 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); |
@@ -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'; |
@@ -1,12 +1,12 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Part of CI PHPUnit Test |
|
| 4 | - * |
|
| 5 | - * @author Kenji Suzuki <https://github.com/kenjis> |
|
| 6 | - * @license MIT License |
|
| 7 | - * @copyright 2015 Kenji Suzuki |
|
| 8 | - * @link https://github.com/kenjis/ci-phpunit-test |
|
| 9 | - */ |
|
| 3 | + * Part of CI PHPUnit Test |
|
| 4 | + * |
|
| 5 | + * @author Kenji Suzuki <https://github.com/kenjis> |
|
| 6 | + * @license MIT License |
|
| 7 | + * @copyright 2015 Kenji Suzuki |
|
| 8 | + * @link https://github.com/kenjis/ci-phpunit-test |
|
| 9 | + */ |
|
| 10 | 10 | |
| 11 | 11 | require __DIR__ . '/Installer.php'; |
| 12 | 12 | |