@@ -106,15 +106,15 @@ discard block |
||
| 106 | 106 | )'); |
| 107 | 107 | }); |
| 108 | 108 | |
| 109 | -task('deploy:copy_files', function () { |
|
| 109 | +task('deploy:copy_files', function() { |
|
| 110 | 110 | $sharedPath = '{{deploy_path}}/shared'; |
| 111 | - foreach (get('copy_files') as $file) { |
|
| 111 | + foreach(get('copy_files') as $file) { |
|
| 112 | 112 | $dirname = dirname(parse($file)); |
| 113 | 113 | // Create dir of shared file |
| 114 | - run("mkdir -p $sharedPath/" . $dirname); |
|
| 114 | + run("mkdir -p $sharedPath/".$dirname); |
|
| 115 | 115 | // Check if shared file does not exist in shared. |
| 116 | 116 | // and file exist in release |
| 117 | - if (!test("[ -f $sharedPath/$file ]") && test("[ -f {{release_path}}/$file ]")) { |
|
| 117 | + if(!test("[ -f $sharedPath/$file ]") && test("[ -f {{release_path}}/$file ]")) { |
|
| 118 | 118 | // Copy file in shared dir if not present |
| 119 | 119 | run("cp -rv {{release_path}}/$file $sharedPath/$file"); |
| 120 | 120 | } |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | } |
| 130 | 130 | }); |
| 131 | 131 | |
| 132 | -task('deploy:migrate_db', function () { |
|
| 132 | +task('deploy:migrate_db', function() { |
|
| 133 | 133 | // Migration is disabled by default on production, so we need to toggle it temporally. |
| 134 | 134 | run('( \ |
| 135 | 135 | cd {{release_path}} && \ |
@@ -139,14 +139,14 @@ discard block |
||
| 139 | 139 | )'); |
| 140 | 140 | }); |
| 141 | 141 | |
| 142 | -task('deploy:maintenance_enable', function () { |
|
| 142 | +task('deploy:maintenance_enable', function() { |
|
| 143 | 143 | //define('MAINTENANCE', FALSE); |
| 144 | 144 | run('( \ |
| 145 | 145 | cd {{release_path}} && \ |
| 146 | 146 | sed -i -r "s/(\'MAINTENANCE\',) FALSE/\1 TRUE/" public/index.php \ |
| 147 | 147 | )'); |
| 148 | 148 | }); |
| 149 | -task('deploy:maintenance_disable', function () { |
|
| 149 | +task('deploy:maintenance_disable', function() { |
|
| 150 | 150 | //define('MAINTENANCE', FALSE); |
| 151 | 151 | run('( \ |
| 152 | 152 | cd {{release_path}} && \ |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | // Maintenance Mode |
| 40 | 40 | define('MAINTENANCE', FALSE); |
| 41 | 41 | if(MAINTENANCE && PHP_SAPI !== 'cli') { |
| 42 | - require_once __DIR__ . DIRECTORY_SEPARATOR . '../application/views/common/maintenance.php'; ## call view |
|
| 42 | + require_once __DIR__.DIRECTORY_SEPARATOR.'../application/views/common/maintenance.php'; ## call view |
|
| 43 | 43 | exit(); |
| 44 | 44 | } |
| 45 | 45 | |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | * Different environments will require different levels of error reporting. |
| 82 | 82 | * By default development will show errors but testing and live will hide them. |
| 83 | 83 | */ |
| 84 | -switch (ENVIRONMENT) |
|
| 84 | +switch(ENVIRONMENT) |
|
| 85 | 85 | { |
| 86 | 86 | case 'development': |
| 87 | 87 | error_reporting(-1); |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | case 'testing': |
| 95 | 95 | case 'production': |
| 96 | 96 | ini_set('display_errors', 0); |
| 97 | - if (version_compare(PHP_VERSION, '5.3', '>=')) |
|
| 97 | + if(version_compare(PHP_VERSION, '5.3', '>=')) |
|
| 98 | 98 | { |
| 99 | 99 | error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED); |
| 100 | 100 | } |
@@ -212,12 +212,12 @@ discard block |
||
| 212 | 212 | */ |
| 213 | 213 | |
| 214 | 214 | // Set the current directory correctly for CLI requests |
| 215 | -if (defined('STDIN')) |
|
| 215 | +if(defined('STDIN')) |
|
| 216 | 216 | { |
| 217 | 217 | chdir(dirname(__FILE__)); |
| 218 | 218 | } |
| 219 | 219 | |
| 220 | -if (($_temp = realpath($system_path)) !== FALSE) |
|
| 220 | +if(($_temp = realpath($system_path)) !== FALSE) |
|
| 221 | 221 | { |
| 222 | 222 | $system_path = $_temp.DIRECTORY_SEPARATOR; |
| 223 | 223 | } |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | } |
| 233 | 233 | |
| 234 | 234 | // Is the system path correct? |
| 235 | -if ( ! is_dir($system_path)) |
|
| 235 | +if(!is_dir($system_path)) |
|
| 236 | 236 | { |
| 237 | 237 | header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); |
| 238 | 238 | echo 'Your system folder path does not appear to be set correctly. Please open the following file and correct this: '.pathinfo(__FILE__, PATHINFO_BASENAME); |
@@ -257,9 +257,9 @@ discard block |
||
| 257 | 257 | define('SYSDIR', basename(BASEPATH)); |
| 258 | 258 | |
| 259 | 259 | // The path to the "application" directory |
| 260 | -if (is_dir($application_folder)) |
|
| 260 | +if(is_dir($application_folder)) |
|
| 261 | 261 | { |
| 262 | - if (($_temp = realpath($application_folder)) !== FALSE) |
|
| 262 | + if(($_temp = realpath($application_folder)) !== FALSE) |
|
| 263 | 263 | { |
| 264 | 264 | $application_folder = $_temp; |
| 265 | 265 | } |
@@ -272,7 +272,7 @@ discard block |
||
| 272 | 272 | ); |
| 273 | 273 | } |
| 274 | 274 | } |
| 275 | -elseif (is_dir(BASEPATH.$application_folder.DIRECTORY_SEPARATOR)) |
|
| 275 | +elseif(is_dir(BASEPATH.$application_folder.DIRECTORY_SEPARATOR)) |
|
| 276 | 276 | { |
| 277 | 277 | $application_folder = BASEPATH.strtr( |
| 278 | 278 | trim($application_folder, '/\\'), |
@@ -290,13 +290,13 @@ discard block |
||
| 290 | 290 | define('APPPATH', $application_folder.DIRECTORY_SEPARATOR); |
| 291 | 291 | |
| 292 | 292 | // The path to the "views" directory |
| 293 | -if ( ! isset($view_folder[0]) && is_dir(APPPATH.'views'.DIRECTORY_SEPARATOR)) |
|
| 293 | +if(!isset($view_folder[0]) && is_dir(APPPATH.'views'.DIRECTORY_SEPARATOR)) |
|
| 294 | 294 | { |
| 295 | 295 | $view_folder = APPPATH.'views'; |
| 296 | 296 | } |
| 297 | -elseif (is_dir($view_folder)) |
|
| 297 | +elseif(is_dir($view_folder)) |
|
| 298 | 298 | { |
| 299 | - if (($_temp = realpath($view_folder)) !== FALSE) |
|
| 299 | + if(($_temp = realpath($view_folder)) !== FALSE) |
|
| 300 | 300 | { |
| 301 | 301 | $view_folder = $_temp; |
| 302 | 302 | } |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | ); |
| 310 | 310 | } |
| 311 | 311 | } |
| 312 | -elseif (is_dir(APPPATH.$view_folder.DIRECTORY_SEPARATOR)) |
|
| 312 | +elseif(is_dir(APPPATH.$view_folder.DIRECTORY_SEPARATOR)) |
|
| 313 | 313 | { |
| 314 | 314 | $view_folder = APPPATH.strtr( |
| 315 | 315 | trim($view_folder, '/\\'), |