@@ -10,108 +10,108 @@ |
||
10 | 10 | |
11 | 11 | class Installer |
12 | 12 | { |
13 | - const TEST_FOLDER = 'application/tests'; |
|
13 | + const TEST_FOLDER = 'application/tests'; |
|
14 | 14 | |
15 | - public static function install() |
|
16 | - { |
|
17 | - self::recursiveCopy( |
|
18 | - 'vendor/kenjis/ci-phpunit-test/application/tests', |
|
19 | - static::TEST_FOLDER |
|
20 | - ); |
|
21 | - self::fixPath(); |
|
22 | - } |
|
15 | + public static function install() |
|
16 | + { |
|
17 | + self::recursiveCopy( |
|
18 | + 'vendor/kenjis/ci-phpunit-test/application/tests', |
|
19 | + static::TEST_FOLDER |
|
20 | + ); |
|
21 | + self::fixPath(); |
|
22 | + } |
|
23 | 23 | |
24 | - /** |
|
25 | - * Fix paths in Bootstrap.php |
|
26 | - */ |
|
27 | - private static function fixPath() |
|
28 | - { |
|
29 | - $file = static::TEST_FOLDER . '/Bootstrap.php'; |
|
30 | - $contents = file_get_contents($file); |
|
24 | + /** |
|
25 | + * Fix paths in Bootstrap.php |
|
26 | + */ |
|
27 | + private static function fixPath() |
|
28 | + { |
|
29 | + $file = static::TEST_FOLDER . '/Bootstrap.php'; |
|
30 | + $contents = file_get_contents($file); |
|
31 | 31 | |
32 | - if (! file_exists('system')) { |
|
33 | - if (file_exists('vendor/codeigniter/framework/system')) { |
|
34 | - $contents = str_replace( |
|
35 | - '$system_path = \'../../system\';', |
|
36 | - '$system_path = \'../../vendor/codeigniter/framework/system\';', |
|
37 | - $contents |
|
38 | - ); |
|
39 | - } else { |
|
40 | - throw new Exception('Can\'t find "system" folder.'); |
|
41 | - } |
|
42 | - } |
|
32 | + if (! file_exists('system')) { |
|
33 | + if (file_exists('vendor/codeigniter/framework/system')) { |
|
34 | + $contents = str_replace( |
|
35 | + '$system_path = \'../../system\';', |
|
36 | + '$system_path = \'../../vendor/codeigniter/framework/system\';', |
|
37 | + $contents |
|
38 | + ); |
|
39 | + } else { |
|
40 | + throw new Exception('Can\'t find "system" folder.'); |
|
41 | + } |
|
42 | + } |
|
43 | 43 | |
44 | - if (! file_exists('index.php')) { |
|
45 | - if (file_exists('public/index.php')) { |
|
46 | - $contents = str_replace( |
|
47 | - "define('FCPATH', realpath(dirname(__FILE__).'/../..').'/');", |
|
48 | - "define('FCPATH', realpath(dirname(__FILE__).'/../../public').'/');", |
|
49 | - $contents |
|
50 | - ); |
|
51 | - } else { |
|
52 | - throw new Exception('Can\'t find "index.php".'); |
|
53 | - } |
|
54 | - } |
|
44 | + if (! file_exists('index.php')) { |
|
45 | + if (file_exists('public/index.php')) { |
|
46 | + $contents = str_replace( |
|
47 | + "define('FCPATH', realpath(dirname(__FILE__).'/../..').'/');", |
|
48 | + "define('FCPATH', realpath(dirname(__FILE__).'/../../public').'/');", |
|
49 | + $contents |
|
50 | + ); |
|
51 | + } else { |
|
52 | + throw new Exception('Can\'t find "index.php".'); |
|
53 | + } |
|
54 | + } |
|
55 | 55 | |
56 | - file_put_contents($file, $contents); |
|
57 | - } |
|
56 | + file_put_contents($file, $contents); |
|
57 | + } |
|
58 | 58 | |
59 | - public static function update() |
|
60 | - { |
|
61 | - self::recursiveUnlink('application/tests/_ci_phpunit_test'); |
|
62 | - self::recursiveCopy( |
|
63 | - 'vendor/kenjis/ci-phpunit-test/application/tests/_ci_phpunit_test', |
|
64 | - 'application/tests/_ci_phpunit_test' |
|
65 | - ); |
|
66 | - } |
|
59 | + public static function update() |
|
60 | + { |
|
61 | + self::recursiveUnlink('application/tests/_ci_phpunit_test'); |
|
62 | + self::recursiveCopy( |
|
63 | + 'vendor/kenjis/ci-phpunit-test/application/tests/_ci_phpunit_test', |
|
64 | + 'application/tests/_ci_phpunit_test' |
|
65 | + ); |
|
66 | + } |
|
67 | 67 | |
68 | - /** |
|
69 | - * Recursive Copy |
|
70 | - * |
|
71 | - * @param string $src |
|
72 | - * @param string $dst |
|
73 | - */ |
|
74 | - private static function recursiveCopy($src, $dst) |
|
75 | - { |
|
76 | - @mkdir($dst, 0755); |
|
68 | + /** |
|
69 | + * Recursive Copy |
|
70 | + * |
|
71 | + * @param string $src |
|
72 | + * @param string $dst |
|
73 | + */ |
|
74 | + private static function recursiveCopy($src, $dst) |
|
75 | + { |
|
76 | + @mkdir($dst, 0755); |
|
77 | 77 | |
78 | - $iterator = new \RecursiveIteratorIterator( |
|
79 | - new \RecursiveDirectoryIterator($src, \RecursiveDirectoryIterator::SKIP_DOTS), |
|
80 | - \RecursiveIteratorIterator::SELF_FIRST |
|
81 | - ); |
|
78 | + $iterator = new \RecursiveIteratorIterator( |
|
79 | + new \RecursiveDirectoryIterator($src, \RecursiveDirectoryIterator::SKIP_DOTS), |
|
80 | + \RecursiveIteratorIterator::SELF_FIRST |
|
81 | + ); |
|
82 | 82 | |
83 | - foreach ($iterator as $file) { |
|
84 | - if ($file->isDir()) { |
|
85 | - @mkdir($dst . '/' . $iterator->getSubPathName()); |
|
86 | - } else { |
|
87 | - $success = copy($file, $dst . '/' . $iterator->getSubPathName()); |
|
88 | - if ($success) { |
|
89 | - echo 'copied: ' . $dst . '/' . $iterator->getSubPathName() . PHP_EOL; |
|
90 | - } |
|
91 | - } |
|
92 | - } |
|
93 | - } |
|
83 | + foreach ($iterator as $file) { |
|
84 | + if ($file->isDir()) { |
|
85 | + @mkdir($dst . '/' . $iterator->getSubPathName()); |
|
86 | + } else { |
|
87 | + $success = copy($file, $dst . '/' . $iterator->getSubPathName()); |
|
88 | + if ($success) { |
|
89 | + echo 'copied: ' . $dst . '/' . $iterator->getSubPathName() . PHP_EOL; |
|
90 | + } |
|
91 | + } |
|
92 | + } |
|
93 | + } |
|
94 | 94 | |
95 | - /** |
|
96 | - * Recursive Unlink |
|
97 | - * |
|
98 | - * @param string $dir |
|
99 | - */ |
|
100 | - private static function recursiveUnlink($dir) |
|
101 | - { |
|
102 | - $iterator = new \RecursiveIteratorIterator( |
|
103 | - new \RecursiveDirectoryIterator($dir, \RecursiveDirectoryIterator::SKIP_DOTS), |
|
104 | - \RecursiveIteratorIterator::CHILD_FIRST |
|
105 | - ); |
|
95 | + /** |
|
96 | + * Recursive Unlink |
|
97 | + * |
|
98 | + * @param string $dir |
|
99 | + */ |
|
100 | + private static function recursiveUnlink($dir) |
|
101 | + { |
|
102 | + $iterator = new \RecursiveIteratorIterator( |
|
103 | + new \RecursiveDirectoryIterator($dir, \RecursiveDirectoryIterator::SKIP_DOTS), |
|
104 | + \RecursiveIteratorIterator::CHILD_FIRST |
|
105 | + ); |
|
106 | 106 | |
107 | - foreach ($iterator as $file) { |
|
108 | - if ($file->isDir()) { |
|
109 | - rmdir($file); |
|
110 | - } else { |
|
111 | - unlink($file); |
|
112 | - } |
|
113 | - } |
|
107 | + foreach ($iterator as $file) { |
|
108 | + if ($file->isDir()) { |
|
109 | + rmdir($file); |
|
110 | + } else { |
|
111 | + unlink($file); |
|
112 | + } |
|
113 | + } |
|
114 | 114 | |
115 | - rmdir($dir); |
|
116 | - } |
|
115 | + rmdir($dir); |
|
116 | + } |
|
117 | 117 | } |
@@ -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 | /** |
@@ -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 | } |
@@ -129,8 +129,7 @@ discard block |
||
129 | 129 | return $this->callControllerMethod( |
130 | 130 | $http_method, $argv, $params |
131 | 131 | ); |
132 | - } |
|
133 | - else |
|
132 | + } else |
|
134 | 133 | { |
135 | 134 | return $this->requestUri($http_method, $argv, $params); |
136 | 135 | } |
@@ -141,8 +140,7 @@ discard block |
||
141 | 140 | if ($e->getCode() === 0) |
142 | 141 | { |
143 | 142 | set_status_header(200); |
144 | - } |
|
145 | - else |
|
143 | + } else |
|
146 | 144 | { |
147 | 145 | set_status_header($e->getCode()); |
148 | 146 | } |
@@ -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 |
@@ -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 |
@@ -54,8 +54,7 @@ discard block |
||
54 | 54 | if (is_string($argv)) |
55 | 55 | { |
56 | 56 | $path = $argv; |
57 | - } |
|
58 | - elseif (is_array($argv)) |
|
57 | + } elseif (is_array($argv)) |
|
59 | 58 | { |
60 | 59 | // Generate URI path from array of controller, method, arg, ... |
61 | 60 | $path = implode('/', $argv); |
@@ -66,8 +65,7 @@ discard block |
||
66 | 65 | $_SERVER['REQUEST_URI'] = |
67 | 66 | '/' . $path . '?' |
68 | 67 | . http_build_query($_GET); |
69 | - } |
|
70 | - else |
|
68 | + } else |
|
71 | 69 | { |
72 | 70 | $_SERVER['REQUEST_URI'] = '/' . $path; |
73 | 71 | } |
@@ -108,8 +106,7 @@ discard block |
||
108 | 106 | ) |
109 | 107 | { |
110 | 108 | $key = $normalized_name; |
111 | - } |
|
112 | - else |
|
109 | + } else |
|
113 | 110 | { |
114 | 111 | $key = 'HTTP_' . $normalized_name; |
115 | 112 | } |
@@ -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 |
@@ -1,12 +1,12 @@ discard block |
||
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 | namespace Kenjis\MonkeyPatch; |
12 | 12 | |
@@ -251,10 +251,10 @@ discard block |
||
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)) |
@@ -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, |
@@ -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 | } |
@@ -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 |