@@ -10,15 +10,15 @@ |
||
10 | 10 | <?php echo \Myth\CLI::write("\tLine Number: {$line}"); ?> |
11 | 11 | |
12 | 12 | <?php |
13 | - if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE) { |
|
13 | + if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE) { |
|
14 | 14 | |
15 | - echo \Myth\CLI::write("\n\tBacktrace"); |
|
15 | + echo \Myth\CLI::write("\n\tBacktrace"); |
|
16 | 16 | |
17 | - foreach (debug_backtrace() as $error) { |
|
18 | - if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0) { |
|
19 | - echo \Myth\CLI::write("\t\t- {$error['function']}() - Line {$error['line']} in {$error['file']}"); |
|
20 | - } |
|
21 | - } |
|
17 | + foreach (debug_backtrace() as $error) { |
|
18 | + if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0) { |
|
19 | + echo \Myth\CLI::write("\t\t- {$error['function']}() - Line {$error['line']} in {$error['file']}"); |
|
20 | + } |
|
21 | + } |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | echo \Myth\CLI::new_line(); |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | |
6 | 6 | <?= $uikit->row([], function() use($uikit) { |
7 | 7 | |
8 | - echo $uikit->column(['sizes' => ['l'=>6]], function() use($uikit) { ?> |
|
8 | + echo $uikit->column(['sizes' => ['l'=>6]], function() use($uikit) { ?> |
|
9 | 9 | <h3>What Is Sprint?</h3> |
10 | 10 | |
11 | 11 | <p>SprintPHP is a souped-up version of <a href="http://codeigniter.com">CodeIgniter <?= CI_VERSION ?></a>. And soon to be the heart and soul |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | |
26 | 26 | |
27 | 27 | |
28 | - echo $uikit->column(['sizes' => ['l'=>6]], function() use($uikit) { ?> |
|
28 | + echo $uikit->column(['sizes' => ['l'=>6]], function() use($uikit) { ?> |
|
29 | 29 | <h3>Get To Know Sprint</h3> |
30 | 30 | |
31 | 31 | <p>The following resources will help you as you explore the power and flexibility that SprintPHP provides. Feel free to dig into source code of the controllers and views |
@@ -39,6 +39,6 @@ discard block |
||
39 | 39 | |
40 | 40 | <?php }); |
41 | 41 | |
42 | - }); ?> |
|
42 | + }); ?> |
|
43 | 43 | |
44 | 44 | </div> |
@@ -258,9 +258,12 @@ discard block |
||
258 | 258 | <?php endforeach; ?> |
259 | 259 | </table> |
260 | 260 | |
261 | - <?php else : ?> |
|
261 | + <?php else { |
|
262 | + : ?> |
|
262 | 263 | |
263 | - <?php echo $sections['console']; ?> |
|
264 | + <?php echo $sections['console']; |
|
265 | +} |
|
266 | +?> |
|
264 | 267 | |
265 | 268 | <?php endif; ?> |
266 | 269 | </div> |
@@ -289,9 +292,12 @@ discard block |
||
289 | 292 | <?php endforeach; ?> |
290 | 293 | </table> |
291 | 294 | |
292 | - <?php else : ?> |
|
295 | + <?php else { |
|
296 | + : ?> |
|
293 | 297 | |
294 | - <?php echo $sections['console']; ?> |
|
298 | + <?php echo $sections['console']; |
|
299 | +} |
|
300 | +?> |
|
295 | 301 | |
296 | 302 | <?php endif; ?> |
297 | 303 | </div> |
@@ -310,9 +316,12 @@ discard block |
||
310 | 316 | <?php endforeach; ?> |
311 | 317 | </table> |
312 | 318 | |
313 | - <?php else : ?> |
|
319 | + <?php else { |
|
320 | + : ?> |
|
314 | 321 | |
315 | - <?php echo $sections['benchmarks']; ?> |
|
322 | + <?php echo $sections['benchmarks']; |
|
323 | +} |
|
324 | +?> |
|
316 | 325 | |
317 | 326 | <?php endif; ?> |
318 | 327 | </div> |
@@ -333,9 +342,12 @@ discard block |
||
333 | 342 | <?php endforeach; ?> |
334 | 343 | </table> |
335 | 344 | |
336 | - <?php else : ?> |
|
345 | + <?php else { |
|
346 | + : ?> |
|
337 | 347 | |
338 | - <?php echo $sections['queries']; ?> |
|
348 | + <?php echo $sections['queries']; |
|
349 | +} |
|
350 | +?> |
|
339 | 351 | |
340 | 352 | <?php endif; ?> |
341 | 353 | </div> |
@@ -395,8 +407,11 @@ discard block |
||
395 | 407 | <?php foreach ($sections[$section] as $key => $val) : ?> |
396 | 408 | <tr><td class="hilight"><?php echo $key ?></td><td><?php echo htmlspecialchars($val) ?></td></tr> |
397 | 409 | <?php endforeach; ?> |
398 | - <?php else : ?> |
|
399 | - <tr><td><?php echo $sections[$section]; ?></td></tr> |
|
410 | + <?php else { |
|
411 | + : ?> |
|
412 | + <tr><td><?php echo $sections[$section]; |
|
413 | +} |
|
414 | +?></td></tr> |
|
400 | 415 | <?php endif; ?> |
401 | 416 | </table> |
402 | 417 | <?php endif; ?> |
@@ -423,20 +438,26 @@ discard block |
||
423 | 438 | <?php endforeach; ?> |
424 | 439 | </table> |
425 | 440 | |
426 | - <?php else : ?> |
|
441 | + <?php else { |
|
442 | + : ?> |
|
427 | 443 | |
428 | - <?php echo $sections['files']; ?> |
|
444 | + <?php echo $sections['files']; |
|
445 | +} |
|
446 | +?> |
|
429 | 447 | |
430 | 448 | <?php endif; ?> |
431 | 449 | </div> |
432 | 450 | <?php endif; ?> |
433 | 451 | |
434 | 452 | |
435 | -<?php else: ?> |
|
453 | +<?php else { |
|
454 | + : ?> |
|
436 | 455 | |
437 | 456 | <p class="ci-profiler-box"><?php echo lang('profiler_no_profiles') ?></p> |
438 | 457 | |
439 | -<?php endif; ?> |
|
458 | +<?php endif; |
|
459 | +} |
|
460 | +?> |
|
440 | 461 | |
441 | 462 | </div> <!-- /codeigniter_profiler --> |
442 | 463 | </div> |
443 | 464 | \ No newline at end of file |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | Load Time |
197 | 197 | </a> |
198 | 198 | <a href="#" id="ci-profiler-menu-memory" onclick="ci_profiler_bar.show('ci-profiler-memory', 'ci-profiler-menu-memory'); return false;"> |
199 | - <span><?php echo (! function_exists('memory_get_usage')) ? '0' : round(memory_get_usage()/1024/1024, 2).' MB' ?></span> |
|
199 | + <span><?php echo ( ! function_exists('memory_get_usage')) ? '0' : round(memory_get_usage() / 1024 / 1024, 2).' MB' ?></span> |
|
200 | 200 | Memory Used |
201 | 201 | </a> |
202 | 202 | <?php endif; ?> |
@@ -384,7 +384,7 @@ discard block |
||
384 | 384 | |
385 | 385 | <?php $append = ($section == 'get' || $section == 'post') ? '_data' : '' ?> |
386 | 386 | <a href="#" onclick="ci_profiler_bar.toggle_data_table('<?php echo $section ?>'); return false;"> |
387 | - <h2><?php echo lang('profiler_' . $section . $append) ?></h2> |
|
387 | + <h2><?php echo lang('profiler_'.$section.$append) ?></h2> |
|
388 | 388 | </a> |
389 | 389 | |
390 | 390 |
@@ -49,20 +49,20 @@ discard block |
||
49 | 49 | ini_set('display_errors', 1); |
50 | 50 | |
51 | 51 | // Load our autoloader |
52 | -require __DIR__ .'/../vendor/autoload.php'; |
|
52 | +require __DIR__.'/../vendor/autoload.php'; |
|
53 | 53 | |
54 | 54 | // Load configuration |
55 | 55 | require 'build_config.php'; |
56 | 56 | |
57 | 57 | // Folder definitions |
58 | -define('BUILDBASE', __DIR__ .'/'); |
|
58 | +define('BUILDBASE', __DIR__.'/'); |
|
59 | 59 | |
60 | 60 | // Don't stop script exectuion on 404... |
61 | 61 | function show_404($page = '', $log_error = TRUE) {} |
62 | 62 | |
63 | 63 | // Make sure we have access to CI() object. |
64 | 64 | ob_start(); |
65 | - require( BUILDBASE .'../index.php' ); |
|
65 | + require(BUILDBASE.'../index.php'); |
|
66 | 66 | ob_end_clean(); |
67 | 67 | |
68 | 68 | //-------------------------------------------------------------------- |
@@ -73,12 +73,12 @@ discard block |
||
73 | 73 | |
74 | 74 | if (empty($release)) |
75 | 75 | { |
76 | - $release = CLI::prompt("Which script", array_keys($config['builds']) ); |
|
76 | + $release = CLI::prompt("Which script", array_keys($config['builds'])); |
|
77 | 77 | } |
78 | 78 | |
79 | -if (! array_key_exists($release, $config['builds'])) |
|
79 | +if ( ! array_key_exists($release, $config['builds'])) |
|
80 | 80 | { |
81 | - CLI::error('Invalid build specified: '. $release); |
|
81 | + CLI::error('Invalid build specified: '.$release); |
|
82 | 82 | exit(1); |
83 | 83 | } |
84 | 84 | |
@@ -89,20 +89,20 @@ discard block |
||
89 | 89 | $class_name = $config['builds'][$release]; |
90 | 90 | |
91 | 91 | |
92 | -if (! file_exists(BUILDBASE ."scripts/{$class_name}.php")) |
|
92 | +if ( ! file_exists(BUILDBASE."scripts/{$class_name}.php")) |
|
93 | 93 | { |
94 | - CLI::error('Unable to find build script: '. $class_name .'.php'); |
|
94 | + CLI::error('Unable to find build script: '.$class_name.'.php'); |
|
95 | 95 | exit(1); |
96 | 96 | } |
97 | 97 | |
98 | -require BUILDBASE ."lib/BaseBuilder.php"; |
|
99 | -require BUILDBASE ."scripts/{$class_name}.php"; |
|
98 | +require BUILDBASE."lib/BaseBuilder.php"; |
|
99 | +require BUILDBASE."scripts/{$class_name}.php"; |
|
100 | 100 | |
101 | -$builder = new $class_name( $config['destinations'][$release], get_instance() ); |
|
101 | +$builder = new $class_name($config['destinations'][$release], get_instance()); |
|
102 | 102 | |
103 | -if (! is_object($builder)) |
|
103 | +if ( ! is_object($builder)) |
|
104 | 104 | { |
105 | - CLI::error('Unable to make new class: '. $class_name); |
|
105 | + CLI::error('Unable to make new class: '.$class_name); |
|
106 | 106 | exit(1); |
107 | 107 | } |
108 | 108 | |
@@ -118,4 +118,4 @@ discard block |
||
118 | 118 | $end_time = microtime(true); |
119 | 119 | $elapsed_time = number_format($end_time - $start_time, 4); |
120 | 120 | |
121 | -CLI::write('Done in '. $elapsed_time .' seconds', 'green'); |
|
122 | 121 | \ No newline at end of file |
122 | +CLI::write('Done in '.$elapsed_time.' seconds', 'green'); |
|
123 | 123 | \ No newline at end of file |
@@ -11,7 +11,7 @@ |
||
11 | 11 | $config['builds'] = [ |
12 | 12 | 'release' => 'SprintRelease', |
13 | 13 | 'postCreateProject' => 'InitialCleanup', |
14 | - 'publishSubTrees' => 'SubTreeSplit' |
|
14 | + 'publishSubTrees' => 'SubTreeSplit' |
|
15 | 15 | ]; |
16 | 16 | |
17 | 17 | //-------------------------------------------------------------------- |
@@ -16,11 +16,11 @@ discard block |
||
16 | 16 | |
17 | 17 | protected $ignore_files = ['.', '..', '.git', 'vendor', '.idea', '.travis.yml', 'build']; |
18 | 18 | |
19 | - public function __construct($destination, $ci=null) |
|
19 | + public function __construct($destination, $ci = null) |
|
20 | 20 | { |
21 | 21 | parent::__construct($ci); |
22 | 22 | |
23 | - $this->source_path = realpath(BUILDBASE .'../'); |
|
23 | + $this->source_path = realpath(BUILDBASE.'../'); |
|
24 | 24 | |
25 | 25 | if (empty($this->source_path)) |
26 | 26 | { |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | $this->cleanTestsFolder(); |
47 | 47 | |
48 | 48 | CLI::write("\tRemoving application modules..."); |
49 | - $this->cleanFolder($this->dest_path .'/application/modules', ['index.html', '.htaccess']); |
|
49 | + $this->cleanFolder($this->dest_path.'/application/modules', ['index.html', '.htaccess']); |
|
50 | 50 | |
51 | 51 | CLI::write("\tGenerating default encryption key for config file..."); |
52 | 52 | $this->generateEncryptionKey(); |
@@ -61,10 +61,10 @@ discard block |
||
61 | 61 | private function cleanTempFiles() |
62 | 62 | { |
63 | 63 | // Remove Log Files |
64 | - $this->cleanFolder($this->dest_path .'/application/logs', ['index.html', '.htaccess']); |
|
64 | + $this->cleanFolder($this->dest_path.'/application/logs', ['index.html', '.htaccess']); |
|
65 | 65 | |
66 | 66 | // Cache Files |
67 | - $this->cleanFolder($this->dest_path .'/application/cache', ['index.html', '.htaccess']); |
|
67 | + $this->cleanFolder($this->dest_path.'/application/cache', ['index.html', '.htaccess']); |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | //-------------------------------------------------------------------- |
@@ -72,15 +72,15 @@ discard block |
||
72 | 72 | public function cleanTestsFolder() |
73 | 73 | { |
74 | 74 | // Remove coverage Files |
75 | - $this->cleanFolder($this->dest_path .'/tests/_output', ['.gitignore']); |
|
75 | + $this->cleanFolder($this->dest_path.'/tests/_output', ['.gitignore']); |
|
76 | 76 | |
77 | 77 | // Remove our Acceptance tests |
78 | - $this->cleanFolder($this->dest_path .'/tests/acceptance/myth'); |
|
79 | - rmdir($this->dest_path .'/tests/acceptance/myth'); |
|
78 | + $this->cleanFolder($this->dest_path.'/tests/acceptance/myth'); |
|
79 | + rmdir($this->dest_path.'/tests/acceptance/myth'); |
|
80 | 80 | |
81 | 81 | // Remove our Unit tests |
82 | - $this->cleanFolder($this->dest_path .'/tests/unit/myth'); |
|
83 | - rmdir($this->dest_path .'/tests/unit/myth'); |
|
82 | + $this->cleanFolder($this->dest_path.'/tests/unit/myth'); |
|
83 | + rmdir($this->dest_path.'/tests/unit/myth'); |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | //-------------------------------------------------------------------- |
@@ -94,13 +94,13 @@ discard block |
||
94 | 94 | $length = 16; |
95 | 95 | |
96 | 96 | $this->ci->load->library('Encryption'); |
97 | - $key = bin2hex( $this->ci->encryption->create_key( $length ) ); |
|
97 | + $key = bin2hex($this->ci->encryption->create_key($length)); |
|
98 | 98 | |
99 | 99 | $replace = "hex2bin( '$key' )"; |
100 | 100 | |
101 | 101 | $kit = new FileKit(); |
102 | 102 | |
103 | - $kit->replaceIn(BUILDBASE .'../application/config/config.php', "'PLEASE_CHANGE_ME!'", $replace); |
|
103 | + $kit->replaceIn(BUILDBASE.'../application/config/config.php', "'PLEASE_CHANGE_ME!'", $replace); |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | //-------------------------------------------------------------------- |
@@ -17,7 +17,7 @@ |
||
17 | 17 | |
18 | 18 | public function __construct($destination) |
19 | 19 | { |
20 | - $this->source_path = realpath(BUILDBASE .'../'); |
|
20 | + $this->source_path = realpath(BUILDBASE .'../'); |
|
21 | 21 | |
22 | 22 | if (empty($this->source_path)) |
23 | 23 | { |
@@ -17,7 +17,7 @@ |
||
17 | 17 | |
18 | 18 | public function __construct($destination) |
19 | 19 | { |
20 | - $this->source_path = realpath(BUILDBASE .'../'); |
|
20 | + $this->source_path = realpath(BUILDBASE .'../'); |
|
21 | 21 | |
22 | 22 | if (empty($this->source_path)) |
23 | 23 | { |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | |
18 | 18 | public function __construct($destination) |
19 | 19 | { |
20 | - $this->source_path = realpath(BUILDBASE .'../'); |
|
20 | + $this->source_path = realpath(BUILDBASE.'../'); |
|
21 | 21 | |
22 | 22 | if (empty($this->source_path)) |
23 | 23 | { |
@@ -25,8 +25,8 @@ discard block |
||
25 | 25 | exit(1); |
26 | 26 | } |
27 | 27 | |
28 | - $this->dest_path = BUILDBASE . $destination; |
|
29 | - $this->dest_path = rtrim($this->dest_path, '/ ') .'/'. date('Y-m-d'); |
|
28 | + $this->dest_path = BUILDBASE.$destination; |
|
29 | + $this->dest_path = rtrim($this->dest_path, '/ ').'/'.date('Y-m-d'); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | //-------------------------------------------------------------------- |
@@ -51,10 +51,10 @@ discard block |
||
51 | 51 | $this->cleanTestsFolder(); |
52 | 52 | |
53 | 53 | CLI::write("\tRemoving application modules..."); |
54 | - $this->cleanFolder($this->dest_path .'/application/modules', ['index.html', '.htaccess']); |
|
54 | + $this->cleanFolder($this->dest_path.'/application/modules', ['index.html', '.htaccess']); |
|
55 | 55 | |
56 | 56 | CLI::write("\tCompressing files..."); |
57 | - $this->compressFolder($this->dest_path, $this->dest_path .'/Sprint_'. date('Y-m-d') .'.zip'); |
|
57 | + $this->compressFolder($this->dest_path, $this->dest_path.'/Sprint_'.date('Y-m-d').'.zip'); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | //-------------------------------------------------------------------- |
@@ -66,10 +66,10 @@ discard block |
||
66 | 66 | private function cleanTempFiles() |
67 | 67 | { |
68 | 68 | // Remove Log Files |
69 | - $this->cleanFolder($this->dest_path .'/application/logs', ['index.html', '.htaccess']); |
|
69 | + $this->cleanFolder($this->dest_path.'/application/logs', ['index.html', '.htaccess']); |
|
70 | 70 | |
71 | 71 | // Cache Files |
72 | - $this->cleanFolder($this->dest_path .'/application/cache', ['index.html', '.htaccess']); |
|
72 | + $this->cleanFolder($this->dest_path.'/application/cache', ['index.html', '.htaccess']); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | //-------------------------------------------------------------------- |
@@ -77,15 +77,15 @@ discard block |
||
77 | 77 | public function cleanTestsFolder() |
78 | 78 | { |
79 | 79 | // Remove coverage Files |
80 | - $this->cleanFolder($this->dest_path .'/tests/_output', ['.gitignore']); |
|
80 | + $this->cleanFolder($this->dest_path.'/tests/_output', ['.gitignore']); |
|
81 | 81 | |
82 | 82 | // Remove our Acceptance tests |
83 | - $this->cleanFolder($this->dest_path .'/tests/acceptance/myth'); |
|
84 | - rmdir($this->dest_path .'/tests/acceptance/myth'); |
|
83 | + $this->cleanFolder($this->dest_path.'/tests/acceptance/myth'); |
|
84 | + rmdir($this->dest_path.'/tests/acceptance/myth'); |
|
85 | 85 | |
86 | 86 | // Remove our Unit tests |
87 | - $this->cleanFolder($this->dest_path .'/tests/unit/myth'); |
|
88 | - rmdir($this->dest_path .'/tests/unit/myth'); |
|
87 | + $this->cleanFolder($this->dest_path.'/tests/unit/myth'); |
|
88 | + rmdir($this->dest_path.'/tests/unit/myth'); |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | //-------------------------------------------------------------------- |
@@ -12,12 +12,12 @@ |
||
12 | 12 | */ |
13 | 13 | class SubTreeSplit extends BaseBuilder { |
14 | 14 | |
15 | - public function run() |
|
16 | - { |
|
15 | + public function run() |
|
16 | + { |
|
17 | 17 | |
18 | - } |
|
18 | + } |
|
19 | 19 | |
20 | - //-------------------------------------------------------------------- |
|
20 | + //-------------------------------------------------------------------- |
|
21 | 21 | |
22 | 22 | |
23 | 23 | } |
24 | 24 | \ No newline at end of file |
@@ -57,29 +57,29 @@ discard block |
||
57 | 57 | */ |
58 | 58 | $domain = ! empty($_SERVER['HTTP_HOST']) ? strtolower($_SERVER['HTTP_HOST']) : 'cli'; |
59 | 59 | |
60 | - /** |
|
61 | - * A simple method to automatically determine the environment that |
|
62 | - * the script is running on. Modify to support your needs. |
|
63 | - * |
|
64 | - * To handle Travis-ci testing, we check for an environment |
|
65 | - * variable called TRAVIS which is set in the .travis.yml file. |
|
66 | - * This allows a database-specific setup for Travis testing. |
|
67 | - */ |
|
68 | - if (isset($_ENV['TRAVIS'])) |
|
69 | - { |
|
70 | - define('ENVIRONMENT', 'travis'); |
|
71 | - } |
|
72 | - else if (isset($_ENV['TESTING'])) |
|
73 | - { |
|
74 | - define('ENVIRONMENT', 'testing'); |
|
75 | - } |
|
76 | - else if (strpos($domain, '.dev') !== false || $domain == 'cli') |
|
77 | - { |
|
78 | - define('ENVIRONMENT', 'development'); |
|
79 | - } |
|
80 | - else { |
|
81 | - define('ENVIRONMENT', 'production'); |
|
82 | - } |
|
60 | + /** |
|
61 | + * A simple method to automatically determine the environment that |
|
62 | + * the script is running on. Modify to support your needs. |
|
63 | + * |
|
64 | + * To handle Travis-ci testing, we check for an environment |
|
65 | + * variable called TRAVIS which is set in the .travis.yml file. |
|
66 | + * This allows a database-specific setup for Travis testing. |
|
67 | + */ |
|
68 | + if (isset($_ENV['TRAVIS'])) |
|
69 | + { |
|
70 | + define('ENVIRONMENT', 'travis'); |
|
71 | + } |
|
72 | + else if (isset($_ENV['TESTING'])) |
|
73 | + { |
|
74 | + define('ENVIRONMENT', 'testing'); |
|
75 | + } |
|
76 | + else if (strpos($domain, '.dev') !== false || $domain == 'cli') |
|
77 | + { |
|
78 | + define('ENVIRONMENT', 'development'); |
|
79 | + } |
|
80 | + else { |
|
81 | + define('ENVIRONMENT', 'production'); |
|
82 | + } |
|
83 | 83 | |
84 | 84 | /* |
85 | 85 | *--------------------------------------------------------------- |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | switch (ENVIRONMENT) |
93 | 93 | { |
94 | 94 | case 'development': |
95 | - case 'travis': |
|
95 | + case 'travis': |
|
96 | 96 | case 'testing': |
97 | 97 | error_reporting(-1); |
98 | 98 | ini_set('display_errors', 1); |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | * Include the path if the folder is not in the same directory |
151 | 151 | * as this file. |
152 | 152 | */ |
153 | - $myth_folder = 'myth'; |
|
153 | + $myth_folder = 'myth'; |
|
154 | 154 | |
155 | 155 | /* |
156 | 156 | *--------------------------------------------------------------- |
@@ -267,8 +267,8 @@ discard block |
||
267 | 267 | // Name of the "system folder" |
268 | 268 | define('SYSDIR', trim(strrchr(trim(BASEPATH, '/'), '/'), '/')); |
269 | 269 | |
270 | - // Path to the myth folder |
|
271 | - define('MYTHPATH', rtrim( str_replace('\\', '/', $myth_folder), '/ ') .'/' ); |
|
270 | + // Path to the myth folder |
|
271 | + define('MYTHPATH', rtrim( str_replace('\\', '/', $myth_folder), '/ ') .'/' ); |
|
272 | 272 | |
273 | 273 | // The path to the "application" folder |
274 | 274 | if (is_dir($application_folder)) |
@@ -92,7 +92,7 @@ |
||
92 | 92 | switch (ENVIRONMENT) |
93 | 93 | { |
94 | 94 | case 'development': |
95 | - case 'travis': |
|
95 | + case 'travis': |
|
96 | 96 | case 'testing': |
97 | 97 | error_reporting(-1); |
98 | 98 | ini_set('display_errors', 1); |
@@ -268,7 +268,7 @@ |
||
268 | 268 | define('SYSDIR', trim(strrchr(trim(BASEPATH, '/'), '/'), '/')); |
269 | 269 | |
270 | 270 | // Path to the myth folder |
271 | - define('MYTHPATH', rtrim( str_replace('\\', '/', $myth_folder), '/ ') .'/' ); |
|
271 | + define('MYTHPATH', rtrim(str_replace('\\', '/', $myth_folder), '/ ').'/'); |
|
272 | 272 | |
273 | 273 | // The path to the "application" folder |
274 | 274 | if (is_dir($application_folder)) |
@@ -68,16 +68,13 @@ discard block |
||
68 | 68 | if (isset($_ENV['TRAVIS'])) |
69 | 69 | { |
70 | 70 | define('ENVIRONMENT', 'travis'); |
71 | - } |
|
72 | - else if (isset($_ENV['TESTING'])) |
|
71 | + } else if (isset($_ENV['TESTING'])) |
|
73 | 72 | { |
74 | 73 | define('ENVIRONMENT', 'testing'); |
75 | - } |
|
76 | - else if (strpos($domain, '.dev') !== false || $domain == 'cli') |
|
74 | + } else if (strpos($domain, '.dev') !== false || $domain == 'cli') |
|
77 | 75 | { |
78 | 76 | define('ENVIRONMENT', 'development'); |
79 | - } |
|
80 | - else { |
|
77 | + } else { |
|
81 | 78 | define('ENVIRONMENT', 'production'); |
82 | 79 | } |
83 | 80 | |
@@ -103,8 +100,7 @@ discard block |
||
103 | 100 | if (version_compare(PHP_VERSION, '5.3', '>=')) |
104 | 101 | { |
105 | 102 | error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED); |
106 | - } |
|
107 | - else |
|
103 | + } else |
|
108 | 104 | { |
109 | 105 | error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_USER_NOTICE); |
110 | 106 | } |
@@ -235,8 +231,7 @@ discard block |
||
235 | 231 | if (($_temp = realpath($system_path)) !== FALSE) |
236 | 232 | { |
237 | 233 | $system_path = $_temp.'/'; |
238 | - } |
|
239 | - else |
|
234 | + } else |
|
240 | 235 | { |
241 | 236 | // Ensure there's a trailing slash |
242 | 237 | $system_path = rtrim($system_path, '/').'/'; |
@@ -279,8 +274,7 @@ discard block |
||
279 | 274 | } |
280 | 275 | |
281 | 276 | define('APPPATH', $application_folder.DIRECTORY_SEPARATOR); |
282 | - } |
|
283 | - else |
|
277 | + } else |
|
284 | 278 | { |
285 | 279 | if ( ! is_dir(BASEPATH.$application_folder.DIRECTORY_SEPARATOR)) |
286 | 280 | { |
@@ -298,14 +292,12 @@ discard block |
||
298 | 292 | if ( ! empty($view_folder) && is_dir(APPPATH.$view_folder.DIRECTORY_SEPARATOR)) |
299 | 293 | { |
300 | 294 | $view_folder = APPPATH.$view_folder; |
301 | - } |
|
302 | - elseif ( ! is_dir(APPPATH.'views'.DIRECTORY_SEPARATOR)) |
|
295 | + } elseif ( ! is_dir(APPPATH.'views'.DIRECTORY_SEPARATOR)) |
|
303 | 296 | { |
304 | 297 | header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); |
305 | 298 | echo 'Your view folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF; |
306 | 299 | exit(3); // EXIT_CONFIG |
307 | - } |
|
308 | - else |
|
300 | + } else |
|
309 | 301 | { |
310 | 302 | $view_folder = APPPATH.'views'; |
311 | 303 | } |
@@ -314,8 +306,7 @@ discard block |
||
314 | 306 | if (($_temp = realpath($view_folder)) !== FALSE) |
315 | 307 | { |
316 | 308 | $view_folder = $_temp.DIRECTORY_SEPARATOR; |
317 | - } |
|
318 | - else |
|
309 | + } else |
|
319 | 310 | { |
320 | 311 | $view_folder = rtrim($view_folder, '/\\').DIRECTORY_SEPARATOR; |
321 | 312 | } |