@@ -210,10 +210,10 @@ |
||
210 | 210 | { |
211 | 211 | // Ensure there's a trailing slash |
212 | 212 | $system_path = strtr( |
213 | - rtrim($system_path, '/\\'), |
|
214 | - '/\\', |
|
215 | - DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR |
|
216 | - ).DIRECTORY_SEPARATOR; |
|
213 | + rtrim($system_path, '/\\'), |
|
214 | + '/\\', |
|
215 | + DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR |
|
216 | + ).DIRECTORY_SEPARATOR; |
|
217 | 217 | } |
218 | 218 | |
219 | 219 | // Is the system path correct? |
@@ -63,8 +63,7 @@ discard block |
||
63 | 63 | * Different environments will require different levels of error reporting. |
64 | 64 | * By default development will show errors but testing and live will hide them. |
65 | 65 | */ |
66 | -switch (ENVIRONMENT) |
|
67 | -{ |
|
66 | +switch (ENVIRONMENT) { |
|
68 | 67 | case 'development': |
69 | 68 | error_reporting(-1); |
70 | 69 | ini_set('display_errors', 1); |
@@ -79,12 +78,9 @@ discard block |
||
79 | 78 | case 'testing': |
80 | 79 | case 'production': |
81 | 80 | ini_set('display_errors', 0); |
82 | - if (version_compare(PHP_VERSION, '5.3', '>=')) |
|
83 | - { |
|
81 | + if (version_compare(PHP_VERSION, '5.3', '>=')) { |
|
84 | 82 | error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED); |
85 | - } |
|
86 | - else |
|
87 | - { |
|
83 | + } else { |
|
88 | 84 | error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_USER_NOTICE); |
89 | 85 | } |
90 | 86 | break; |
@@ -197,17 +193,13 @@ discard block |
||
197 | 193 | */ |
198 | 194 | |
199 | 195 | // Set the current directory correctly for CLI requests |
200 | -if (defined('STDIN')) |
|
201 | -{ |
|
196 | +if (defined('STDIN')) { |
|
202 | 197 | chdir(dirname(__FILE__)); |
203 | 198 | } |
204 | 199 | |
205 | -if (($_temp = realpath($system_path)) !== FALSE) |
|
206 | -{ |
|
200 | +if (($_temp = realpath($system_path)) !== FALSE) { |
|
207 | 201 | $system_path = $_temp.DIRECTORY_SEPARATOR; |
208 | -} |
|
209 | -else |
|
210 | -{ |
|
202 | +} else { |
|
211 | 203 | // Ensure there's a trailing slash |
212 | 204 | $system_path = strtr( |
213 | 205 | rtrim($system_path, '/\\'), |
@@ -217,8 +209,7 @@ discard block |
||
217 | 209 | } |
218 | 210 | |
219 | 211 | // Is the system path correct? |
220 | -if ( ! is_dir($system_path)) |
|
221 | -{ |
|
212 | +if ( ! is_dir($system_path)) { |
|
222 | 213 | header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); |
223 | 214 | echo 'Your system folder path does not appear to be set correctly. Please open the following file and correct this: '.pathinfo(__FILE__, PATHINFO_BASENAME); |
224 | 215 | exit(3); // EXIT_CONFIG |
@@ -242,31 +233,23 @@ discard block |
||
242 | 233 | define('SYSDIR', basename(BASEPATH)); |
243 | 234 | |
244 | 235 | // The path to the "application" directory |
245 | -if (is_dir($application_folder)) |
|
246 | -{ |
|
247 | - if (($_temp = realpath($application_folder)) !== FALSE) |
|
248 | - { |
|
236 | +if (is_dir($application_folder)) { |
|
237 | + if (($_temp = realpath($application_folder)) !== FALSE) { |
|
249 | 238 | $application_folder = $_temp; |
250 | - } |
|
251 | - else |
|
252 | - { |
|
239 | + } else { |
|
253 | 240 | $application_folder = strtr( |
254 | 241 | rtrim($application_folder, '/\\'), |
255 | 242 | '/\\', |
256 | 243 | DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR |
257 | 244 | ); |
258 | 245 | } |
259 | -} |
|
260 | -elseif (is_dir(BASEPATH.$application_folder.DIRECTORY_SEPARATOR)) |
|
261 | -{ |
|
246 | +} elseif (is_dir(BASEPATH.$application_folder.DIRECTORY_SEPARATOR)) { |
|
262 | 247 | $application_folder = BASEPATH.strtr( |
263 | 248 | trim($application_folder, '/\\'), |
264 | 249 | '/\\', |
265 | 250 | DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR |
266 | 251 | ); |
267 | -} |
|
268 | -else |
|
269 | -{ |
|
252 | +} else { |
|
270 | 253 | header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); |
271 | 254 | echo 'Your application folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF; |
272 | 255 | exit(3); // EXIT_CONFIG |
@@ -275,35 +258,25 @@ discard block |
||
275 | 258 | define('APPPATH', $application_folder.DIRECTORY_SEPARATOR); |
276 | 259 | |
277 | 260 | // The path to the "views" directory |
278 | -if ( ! isset($view_folder[0]) && is_dir(APPPATH.'views'.DIRECTORY_SEPARATOR)) |
|
279 | -{ |
|
261 | +if ( ! isset($view_folder[0]) && is_dir(APPPATH.'views'.DIRECTORY_SEPARATOR)) { |
|
280 | 262 | $view_folder = APPPATH.'views'; |
281 | -} |
|
282 | -elseif (is_dir($view_folder)) |
|
283 | -{ |
|
284 | - if (($_temp = realpath($view_folder)) !== FALSE) |
|
285 | - { |
|
263 | +} elseif (is_dir($view_folder)) { |
|
264 | + if (($_temp = realpath($view_folder)) !== FALSE) { |
|
286 | 265 | $view_folder = $_temp; |
287 | - } |
|
288 | - else |
|
289 | - { |
|
266 | + } else { |
|
290 | 267 | $view_folder = strtr( |
291 | 268 | rtrim($view_folder, '/\\'), |
292 | 269 | '/\\', |
293 | 270 | DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR |
294 | 271 | ); |
295 | 272 | } |
296 | -} |
|
297 | -elseif (is_dir(APPPATH.$view_folder.DIRECTORY_SEPARATOR)) |
|
298 | -{ |
|
273 | +} elseif (is_dir(APPPATH.$view_folder.DIRECTORY_SEPARATOR)) { |
|
299 | 274 | $view_folder = APPPATH.strtr( |
300 | 275 | trim($view_folder, '/\\'), |
301 | 276 | '/\\', |
302 | 277 | DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR |
303 | 278 | ); |
304 | -} |
|
305 | -else |
|
306 | -{ |
|
279 | +} else { |
|
307 | 280 | header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); |
308 | 281 | echo 'Your view folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF; |
309 | 282 | exit(3); // EXIT_CONFIG |
@@ -29,27 +29,27 @@ discard block |
||
29 | 29 | |
30 | 30 | public function getMock_ion_auth_logged_in() { |
31 | 31 | $ion_auth = $this->getMockBuilder('Ion_auth') |
32 | - ->disableOriginalConstructor() |
|
33 | - ->getMock(); |
|
32 | + ->disableOriginalConstructor() |
|
33 | + ->getMock(); |
|
34 | 34 | |
35 | 35 | $ion_auth->expects($this->at(0)) |
36 | - ->method('logged_in') |
|
37 | - ->willReturn(TRUE); |
|
36 | + ->method('logged_in') |
|
37 | + ->willReturn(TRUE); |
|
38 | 38 | $ion_auth->expects($this->at(1)) |
39 | - ->method('logged_in') |
|
40 | - ->willReturn(TRUE); |
|
39 | + ->method('logged_in') |
|
40 | + ->willReturn(TRUE); |
|
41 | 41 | |
42 | 42 | $ion_auth->expects($this->any()) |
43 | - ->method($this->anything()) |
|
44 | - ->will($this->returnSelf()); |
|
43 | + ->method($this->anything()) |
|
44 | + ->will($this->returnSelf()); |
|
45 | 45 | |
46 | 46 | return $ion_auth; |
47 | 47 | } |
48 | 48 | |
49 | 49 | public function getMock_CI_DB_result(array $methods) { |
50 | 50 | $db_result = $this->getMockBuilder('CI_DB_result') |
51 | - ->disableOriginalConstructor() |
|
52 | - ->getMock(); |
|
51 | + ->disableOriginalConstructor() |
|
52 | + ->getMock(); |
|
53 | 53 | |
54 | 54 | foreach ($methods as $method => $return) { |
55 | 55 | $db_result->method($method)->willReturn($return); |
@@ -59,9 +59,9 @@ discard block |
||
59 | 59 | |
60 | 60 | public function getMock_CI_DB($return) { |
61 | 61 | $db = $this->getMockBuilder('CI_DB') |
62 | - ->disableOriginalConstructor() |
|
63 | - ->setMethods(array('select', 'from', 'where', 'get')) |
|
64 | - ->getMock(); |
|
62 | + ->disableOriginalConstructor() |
|
63 | + ->setMethods(array('select', 'from', 'where', 'get')) |
|
64 | + ->getMock(); |
|
65 | 65 | |
66 | 66 | $db->expects($this->at(3)) |
67 | 67 | ->method('get') |
@@ -30,8 +30,8 @@ |
||
30 | 30 | $User_Model = $this->User_Model; |
31 | 31 | |
32 | 32 | $ion_auth = $this->getMockBuilder('ion_auth') |
33 | - ->disableOriginalConstructor() |
|
34 | - ->getMock(); |
|
33 | + ->disableOriginalConstructor() |
|
34 | + ->getMock(); |
|
35 | 35 | $ion_auth->method('logged_in')->willReturn(FALSE); |
36 | 36 | |
37 | 37 | $User_Model->ion_auth = $ion_auth; |
@@ -54,8 +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')) |
|
58 | -{ |
|
57 | +if (! defined('ENVIRONMENT')) { |
|
59 | 58 | define('ENVIRONMENT', 'testing'); |
60 | 59 | } |
61 | 60 | |
@@ -67,8 +66,7 @@ discard block |
||
67 | 66 | * Different environments will require different levels of error reporting. |
68 | 67 | * By default development will show errors but testing and live will hide them. |
69 | 68 | */ |
70 | -switch (ENVIRONMENT) |
|
71 | -{ |
|
69 | +switch (ENVIRONMENT) { |
|
72 | 70 | case 'testing': |
73 | 71 | case 'development': |
74 | 72 | error_reporting(-1); |
@@ -77,12 +75,9 @@ discard block |
||
77 | 75 | |
78 | 76 | case 'production': |
79 | 77 | ini_set('display_errors', 0); |
80 | - if (version_compare(PHP_VERSION, '5.3', '>=')) |
|
81 | - { |
|
78 | + if (version_compare(PHP_VERSION, '5.3', '>=')) { |
|
82 | 79 | error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED); |
83 | - } |
|
84 | - else |
|
85 | - { |
|
80 | + } else { |
|
86 | 81 | error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_USER_NOTICE); |
87 | 82 | } |
88 | 83 | break; |
@@ -200,19 +195,15 @@ discard block |
||
200 | 195 | chdir(dirname(__FILE__)); |
201 | 196 | // } |
202 | 197 | |
203 | - if (($_temp = realpath($system_path)) !== FALSE) |
|
204 | - { |
|
198 | + if (($_temp = realpath($system_path)) !== FALSE) { |
|
205 | 199 | $system_path = $_temp.'/'; |
206 | - } |
|
207 | - else |
|
208 | - { |
|
200 | + } else { |
|
209 | 201 | // Ensure there's a trailing slash |
210 | 202 | $system_path = rtrim($system_path, '/').'/'; |
211 | 203 | } |
212 | 204 | |
213 | 205 | // Is the system path correct? |
214 | - if ( ! is_dir($system_path)) |
|
215 | - { |
|
206 | + if ( ! is_dir($system_path)) { |
|
216 | 207 | header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); |
217 | 208 | echo 'Your system folder path does not appear to be set correctly. Please open the following file and correct this: '.pathinfo(__FILE__, PATHINFO_BASENAME); |
218 | 209 | exit(3); // EXIT_CONFIG |
@@ -236,19 +227,14 @@ discard block |
||
236 | 227 | define('SYSDIR', trim(strrchr(trim(BASEPATH, '/'), '/'), '/')); |
237 | 228 | |
238 | 229 | // The path to the "application" folder |
239 | - if (is_dir($application_folder)) |
|
240 | - { |
|
241 | - if (($_temp = realpath($application_folder)) !== FALSE) |
|
242 | - { |
|
230 | + if (is_dir($application_folder)) { |
|
231 | + if (($_temp = realpath($application_folder)) !== FALSE) { |
|
243 | 232 | $application_folder = $_temp; |
244 | 233 | } |
245 | 234 | |
246 | 235 | define('APPPATH', $application_folder.DIRECTORY_SEPARATOR); |
247 | - } |
|
248 | - else |
|
249 | - { |
|
250 | - if ( ! is_dir(BASEPATH.$application_folder.DIRECTORY_SEPARATOR)) |
|
251 | - { |
|
236 | + } else { |
|
237 | + if ( ! is_dir(BASEPATH.$application_folder.DIRECTORY_SEPARATOR)) { |
|
252 | 238 | header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); |
253 | 239 | echo 'Your application folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF; |
254 | 240 | exit(3); // EXIT_CONFIG |
@@ -258,30 +244,21 @@ discard block |
||
258 | 244 | } |
259 | 245 | |
260 | 246 | // The path to the "views" folder |
261 | - if ( ! is_dir($view_folder)) |
|
262 | - { |
|
263 | - if ( ! empty($view_folder) && is_dir(APPPATH.$view_folder.DIRECTORY_SEPARATOR)) |
|
264 | - { |
|
247 | + if ( ! is_dir($view_folder)) { |
|
248 | + if ( ! empty($view_folder) && is_dir(APPPATH.$view_folder.DIRECTORY_SEPARATOR)) { |
|
265 | 249 | $view_folder = APPPATH.$view_folder; |
266 | - } |
|
267 | - elseif ( ! is_dir(APPPATH.'views'.DIRECTORY_SEPARATOR)) |
|
268 | - { |
|
250 | + } elseif ( ! is_dir(APPPATH.'views'.DIRECTORY_SEPARATOR)) { |
|
269 | 251 | header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); |
270 | 252 | echo 'Your view folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF; |
271 | 253 | exit(3); // EXIT_CONFIG |
272 | - } |
|
273 | - else |
|
274 | - { |
|
254 | + } else { |
|
275 | 255 | $view_folder = APPPATH.'views'; |
276 | 256 | } |
277 | 257 | } |
278 | 258 | |
279 | - if (($_temp = realpath($view_folder)) !== FALSE) |
|
280 | - { |
|
259 | + if (($_temp = realpath($view_folder)) !== FALSE) { |
|
281 | 260 | $view_folder = $_temp.DIRECTORY_SEPARATOR; |
282 | - } |
|
283 | - else |
|
284 | - { |
|
261 | + } else { |
|
285 | 262 | $view_folder = rtrim($view_folder, '/\\').DIRECTORY_SEPARATOR; |
286 | 263 | } |
287 | 264 |
@@ -11,8 +11,7 @@ discard block |
||
11 | 11 | // $mock_table = new Mock_Libraries_Table(); // Will load ./mocks/libraries/table.php |
12 | 12 | // $mock_database_driver = new Mock_Database_Driver(); // Will load ./mocks/database/driver.php |
13 | 13 | // and so on... |
14 | -function autoload($class) |
|
15 | -{ |
|
14 | +function autoload($class) { |
|
16 | 15 | $dir = realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR; |
17 | 16 | |
18 | 17 | $ci_core = array( |
@@ -60,60 +59,42 @@ discard block |
||
60 | 59 | |
61 | 60 | $ci_drivers = array('Session', 'Cache'); |
62 | 61 | |
63 | - if (strpos($class, 'Mock_') === 0) |
|
64 | - { |
|
62 | + if (strpos($class, 'Mock_') === 0) { |
|
65 | 63 | $class = strtolower(str_replace(array('Mock_', '_'), array('', DIRECTORY_SEPARATOR), $class)); |
66 | - } |
|
67 | - elseif (strpos($class, 'CI_') === 0) |
|
68 | - { |
|
64 | + } elseif (strpos($class, 'CI_') === 0) { |
|
69 | 65 | $subclass = substr($class, 3); |
70 | 66 | |
71 | - if (in_array($subclass, $ci_core)) |
|
72 | - { |
|
67 | + if (in_array($subclass, $ci_core)) { |
|
73 | 68 | $dir = SYSTEM_PATH.'core'.DIRECTORY_SEPARATOR; |
74 | 69 | $class = $subclass; |
75 | - } |
|
76 | - elseif (in_array($subclass, $ci_libraries)) |
|
77 | - { |
|
70 | + } elseif (in_array($subclass, $ci_libraries)) { |
|
78 | 71 | $dir = SYSTEM_PATH.'libraries'.DIRECTORY_SEPARATOR; |
79 | 72 | $class = ($subclass === 'Driver_Library') ? 'Driver' : $subclass; |
80 | - } |
|
81 | - elseif (in_array($subclass, $ci_drivers)) |
|
82 | - { |
|
73 | + } elseif (in_array($subclass, $ci_drivers)) { |
|
83 | 74 | $dir = SYSTEM_PATH.'libraries'.DIRECTORY_SEPARATOR.$subclass.DIRECTORY_SEPARATOR; |
84 | 75 | $class = $subclass; |
85 | - } |
|
86 | - elseif (in_array(($parent = strtok($subclass, '_')), $ci_drivers)) { |
|
76 | + } elseif (in_array(($parent = strtok($subclass, '_')), $ci_drivers)) { |
|
87 | 77 | $dir = SYSTEM_PATH.'libraries'.DIRECTORY_SEPARATOR.$parent.DIRECTORY_SEPARATOR.'drivers'.DIRECTORY_SEPARATOR; |
88 | 78 | $class = $subclass; |
89 | - } |
|
90 | - elseif (preg_match('/^CI_DB_(.+)_(.+)_(driver|forge|result|utility)$/', $class, $m) && count($m) === 4) |
|
91 | - { |
|
79 | + } elseif (preg_match('/^CI_DB_(.+)_(.+)_(driver|forge|result|utility)$/', $class, $m) && count($m) === 4) { |
|
92 | 80 | $driver_path = SYSTEM_PATH.'database'.DIRECTORY_SEPARATOR.'drivers'.DIRECTORY_SEPARATOR; |
93 | 81 | $dir = $driver_path.$m[1].DIRECTORY_SEPARATOR.'subdrivers'.DIRECTORY_SEPARATOR; |
94 | 82 | $file = $dir.$m[1].'_'.$m[2].'_'.$m[3].'.php'; |
95 | - } |
|
96 | - elseif (preg_match('/^CI_DB_(.+)_(driver|forge|result|utility)$/', $class, $m) && count($m) === 3) |
|
97 | - { |
|
83 | + } elseif (preg_match('/^CI_DB_(.+)_(driver|forge|result|utility)$/', $class, $m) && count($m) === 3) { |
|
98 | 84 | $driver_path = SYSTEM_PATH.'database'.DIRECTORY_SEPARATOR.'drivers'.DIRECTORY_SEPARATOR; |
99 | 85 | $dir = $driver_path.$m[1].DIRECTORY_SEPARATOR; |
100 | 86 | $file = $dir.$m[1].'_'.$m[2].'.php'; |
101 | - } |
|
102 | - elseif (strpos($class, 'CI_DB') === 0) |
|
103 | - { |
|
87 | + } elseif (strpos($class, 'CI_DB') === 0) { |
|
104 | 88 | $dir = SYSTEM_PATH.'database'.DIRECTORY_SEPARATOR; |
105 | 89 | $file = $dir.str_replace(array('CI_DB','active_record'), array('DB', 'active_rec'), $subclass).'.php'; |
106 | - } |
|
107 | - else |
|
108 | - { |
|
90 | + } else { |
|
109 | 91 | $class = strtolower($class); |
110 | 92 | } |
111 | 93 | } |
112 | 94 | |
113 | 95 | $file = isset($file) ? $file : $dir.$class.'.php'; |
114 | 96 | |
115 | - if ( ! file_exists($file)) |
|
116 | - { |
|
97 | + if ( ! file_exists($file)) { |
|
117 | 98 | return FALSE; |
118 | 99 | } |
119 | 100 |
@@ -8,8 +8,7 @@ discard block |
||
8 | 8 | * @link https://github.com/kenjis/ci-phpunit-test |
9 | 9 | */ |
10 | 10 | |
11 | -class Mock_Libraries_Email |
|
12 | -{ |
|
11 | +class Mock_Libraries_Email { |
|
13 | 12 | private $data = []; |
14 | 13 | |
15 | 14 | /** |
@@ -17,43 +16,35 @@ discard block |
||
17 | 16 | */ |
18 | 17 | public $return_send = TRUE; |
19 | 18 | |
20 | - public function initialize() |
|
21 | - { |
|
19 | + public function initialize() { |
|
22 | 20 | |
23 | 21 | } |
24 | 22 | |
25 | - public function from($from) |
|
26 | - { |
|
23 | + public function from($from) { |
|
27 | 24 | $this->data['from'] = $from; |
28 | 25 | } |
29 | 26 | |
30 | - public function to($to) |
|
31 | - { |
|
27 | + public function to($to) { |
|
32 | 28 | $this->data['to'] = $to; |
33 | 29 | } |
34 | 30 | |
35 | - public function bcc($bcc) |
|
36 | - { |
|
31 | + public function bcc($bcc) { |
|
37 | 32 | $this->data['bcc'] = $bcc; |
38 | 33 | } |
39 | 34 | |
40 | - public function subject($subject) |
|
41 | - { |
|
35 | + public function subject($subject) { |
|
42 | 36 | $this->data['subject'] = $subject; |
43 | 37 | } |
44 | 38 | |
45 | - public function message($message) |
|
46 | - { |
|
39 | + public function message($message) { |
|
47 | 40 | $this->data['message'] = $message; |
48 | 41 | } |
49 | 42 | |
50 | - public function send() |
|
51 | - { |
|
43 | + public function send() { |
|
52 | 44 | return $this->return_send; |
53 | 45 | } |
54 | 46 | |
55 | - public function _get_data() |
|
56 | - { |
|
47 | + public function _get_data() { |
|
57 | 48 | return $this->data; |
58 | 49 | } |
59 | 50 | } |
@@ -1,7 +1,6 @@ |
||
1 | 1 | <?php defined('BASEPATH') OR exit('No direct script access allowed'); |
2 | 2 | |
3 | -class About extends MY_Controller |
|
4 | -{ |
|
3 | +class About extends MY_Controller { |
|
5 | 4 | public function __construct() { |
6 | 5 | parent::__construct(); |
7 | 6 | } |
@@ -89,12 +89,14 @@ |
||
89 | 89 | //password changed successfully, redirect to login |
90 | 90 | $this->session->set_flashdata('notices', $this->ion_auth->messages()); |
91 | 91 | redirect("user/login", 'refresh'); |
92 | - } else { //@codeCoverageIgnore |
|
92 | + } else { |
|
93 | +//@codeCoverageIgnore |
|
93 | 94 | //password changed unsuccessfully, refresh page. |
94 | 95 | $this->session->set_flashdata('notices', $this->ion_auth->errors()); |
95 | 96 | redirect('user/reset_password/'.$code, 'refresh'); |
96 | 97 | } |
97 | - } else { //@codeCoverageIgnore |
|
98 | + } else { |
|
99 | +//@codeCoverageIgnore |
|
98 | 100 | //form is invalid OR first-time viewing page |
99 | 101 | $this->global_data['notices'] = (validation_errors()) ? validation_errors() : $this->session->flashdata('notices'); |
100 | 102 |
@@ -46,7 +46,8 @@ |
||
46 | 46 | $this->session->keep_flashdata('referred_from'); |
47 | 47 | if($prevURL = $this->session->flashdata('referred_from')) { |
48 | 48 | redirect($prevURL); |
49 | - } else { //@codeCoverageIgnore |
|
49 | + } else { |
|
50 | +//@codeCoverageIgnore |
|
50 | 51 | redirect('/'); //TODO (CHECK): Should this be refresh? |
51 | 52 | } //@codeCoverageIgnore |
52 | 53 | } else { |