@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME)); |
244 | 244 | |
245 | 245 | // Path to the test directory containing all the test files. |
246 | - define('TESTPATH', __DIR__.DIRECTORY_SEPARATOR); // Should be the folder this `Bootstrap.php` file is in. |
|
246 | + define('TESTPATH', __DIR__.DIRECTORY_SEPARATOR); // Should be the folder this `Bootstrap.php` file is in. |
|
247 | 247 | |
248 | 248 | // Path to the system directory |
249 | 249 | define('BASEPATH', $system_path); |
@@ -325,9 +325,9 @@ discard block |
||
325 | 325 | define('VIEWPATH', $view_folder.DIRECTORY_SEPARATOR); |
326 | 326 | |
327 | 327 | // Path to the ci-phpunit-test directory |
328 | - if (is_file(TESTPATH . '_ci_phpunit_test' . DIRECTORY_SEPARATOR . 'CIPHPUnitTest.php')) |
|
328 | + if (is_file(TESTPATH.'_ci_phpunit_test'.DIRECTORY_SEPARATOR.'CIPHPUnitTest.php')) |
|
329 | 329 | { |
330 | - define('CI_PHPUNIT_TESTPATH', TESTPATH . '_ci_phpunit_test' . DIRECTORY_SEPARATOR); |
|
330 | + define('CI_PHPUNIT_TESTPATH', TESTPATH.'_ci_phpunit_test'.DIRECTORY_SEPARATOR); |
|
331 | 331 | } |
332 | 332 | else |
333 | 333 | { |
@@ -388,7 +388,7 @@ discard block |
||
388 | 388 | * ------------------------------------------------------------------- |
389 | 389 | */ |
390 | 390 | |
391 | -require CI_PHPUNIT_TESTPATH . '/CIPHPUnitTest.php'; |
|
391 | +require CI_PHPUNIT_TESTPATH.'/CIPHPUnitTest.php'; |
|
392 | 392 | |
393 | 393 | CIPHPUnitTest::init(); |
394 | 394 | // Or you can set directories for autoloading |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | } |
73 | 73 | |
74 | 74 | // Load the mime types |
75 | - $mimes =& get_mimes(); |
|
75 | + $mimes = & get_mimes(); |
|
76 | 76 | |
77 | 77 | // Only change the default MIME if we can find one |
78 | 78 | if (isset($mimes[$extension])) |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | |
118 | 118 | if (TestCase::isTestingEnv()) |
119 | 119 | { |
120 | - $CI =& get_instance(); |
|
120 | + $CI = & get_instance(); |
|
121 | 121 | $CI->output->set_header('Content-Type: '.$mime); |
122 | 122 | $CI->output->set_header('Content-Disposition: attachment; filename="'.$filename.'"'); |
123 | 123 | $CI->output->set_header('Expires: 0'); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | } |
73 | 73 | |
74 | 74 | // Load the mime types |
75 | - $mimes =& get_mimes(); |
|
75 | + $mimes = & get_mimes(); |
|
76 | 76 | |
77 | 77 | // Only change the default MIME if we can find one |
78 | 78 | if (isset($mimes[$extension])) |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | |
118 | 118 | if (TestCase::isTestingEnv()) |
119 | 119 | { |
120 | - $CI =& get_instance(); |
|
120 | + $CI = & get_instance(); |
|
121 | 121 | $CI->output->set_header('Content-Type: '.$mime); |
122 | 122 | $CI->output->set_header('Content-Disposition: attachment; filename="'.$filename.'"'); |
123 | 123 | $CI->output->set_header('Expires: 0'); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | } |
73 | 73 | |
74 | 74 | // Load the mime types |
75 | - $mimes =& get_mimes(); |
|
75 | + $mimes = & get_mimes(); |
|
76 | 76 | |
77 | 77 | // Only change the default MIME if we can find one |
78 | 78 | if (isset($mimes[$extension])) |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | |
118 | 118 | if (TestCase::isTestingEnv()) |
119 | 119 | { |
120 | - $CI =& get_instance(); |
|
120 | + $CI = & get_instance(); |
|
121 | 121 | $CI->output->set_header('Content-Type: '.$mime); |
122 | 122 | $CI->output->set_header('Content-Disposition: attachment; filename="'.$filename.'"'); |
123 | 123 | $CI->output->set_header('Expires: 0'); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | } |
73 | 73 | |
74 | 74 | // Load the mime types |
75 | - $mimes =& get_mimes(); |
|
75 | + $mimes = & get_mimes(); |
|
76 | 76 | |
77 | 77 | // Only change the default MIME if we can find one |
78 | 78 | if (isset($mimes[$extension])) |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | |
118 | 118 | if (TestCase::isTestingEnv()) |
119 | 119 | { |
120 | - $CI =& get_instance(); |
|
120 | + $CI = & get_instance(); |
|
121 | 121 | $CI->output->set_header('Content-Type: '.$mime); |
122 | 122 | $CI->output->set_header('Content-Disposition: attachment; filename="'.$filename.'"'); |
123 | 123 | $CI->output->set_header('Expires: 0'); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | } |
73 | 73 | |
74 | 74 | // Load the mime types |
75 | - $mimes =& get_mimes(); |
|
75 | + $mimes = & get_mimes(); |
|
76 | 76 | |
77 | 77 | // Only change the default MIME if we can find one |
78 | 78 | if (isset($mimes[$extension])) |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | |
118 | 118 | if (TestCase::isTestingEnv()) |
119 | 119 | { |
120 | - $CI =& get_instance(); |
|
120 | + $CI = & get_instance(); |
|
121 | 121 | $CI->output->set_header('Content-Type: '.$mime); |
122 | 122 | $CI->output->set_header('Content-Disposition: attachment; filename="'.$filename.'"'); |
123 | 123 | $CI->output->set_header('Expires: 0'); |
@@ -11,9 +11,9 @@ discard block |
||
11 | 11 | class Installer |
12 | 12 | { |
13 | 13 | private $silent = false; |
14 | - private $app_dir = 'application'; // -a DIRECTORY |
|
15 | - private $pub_dir = 'public'; // -p DIRECTORY |
|
16 | - private $test_dir = null; // -t DIRECTORY |
|
14 | + private $app_dir = 'application'; // -a DIRECTORY |
|
15 | + private $pub_dir = 'public'; // -p DIRECTORY |
|
16 | + private $test_dir = null; // -t DIRECTORY |
|
17 | 17 | private $from_composer = false; |
18 | 18 | |
19 | 19 | public function __construct($argv) |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | } |
31 | 31 | |
32 | 32 | for ($i = 1; $i <= $argc; $i++) { |
33 | - if (! isset($argv[$i])) { |
|
33 | + if ( ! isset($argv[$i])) { |
|
34 | 34 | break; |
35 | 35 | } |
36 | 36 | |
@@ -42,29 +42,29 @@ discard block |
||
42 | 42 | |
43 | 43 | // php install.php -a application |
44 | 44 | case '-a': |
45 | - if (is_dir($argv[$i+1])) { |
|
46 | - $this->app_dir = $argv[$i+1]; |
|
45 | + if (is_dir($argv[$i + 1])) { |
|
46 | + $this->app_dir = $argv[$i + 1]; |
|
47 | 47 | } else { |
48 | - throw new Exception('No such application directory: '.$argv[$i+1]); |
|
48 | + throw new Exception('No such application directory: '.$argv[$i + 1]); |
|
49 | 49 | } |
50 | 50 | $i++; |
51 | 51 | break; |
52 | 52 | |
53 | 53 | // php install.php -p public |
54 | 54 | case '-p': |
55 | - if (is_dir($argv[$i+1])) { |
|
56 | - $this->pub_dir = $argv[$i+1]; |
|
55 | + if (is_dir($argv[$i + 1])) { |
|
56 | + $this->pub_dir = $argv[$i + 1]; |
|
57 | 57 | } else { |
58 | - throw new Exception('No such public directory: '.$argv[$i+1]); |
|
58 | + throw new Exception('No such public directory: '.$argv[$i + 1]); |
|
59 | 59 | } |
60 | 60 | $i++; |
61 | 61 | break; |
62 | 62 | // php install.php -t application/tests |
63 | 63 | case '-t': |
64 | - if (is_dir($argv[$i+1])) { |
|
65 | - $this->test_dir = $argv[$i+1]; |
|
64 | + if (is_dir($argv[$i + 1])) { |
|
65 | + $this->test_dir = $argv[$i + 1]; |
|
66 | 66 | } else { |
67 | - throw new Exception('No such test directory: '.$argv[$i+1]); |
|
67 | + throw new Exception('No such test directory: '.$argv[$i + 1]); |
|
68 | 68 | } |
69 | 69 | $i++; |
70 | 70 | break; |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | $file = $this->test_dir.'/Bootstrap.php'; |
106 | 106 | $contents = file_get_contents($file); |
107 | 107 | |
108 | - if (! file_exists('system')) { |
|
108 | + if ( ! file_exists('system')) { |
|
109 | 109 | if (file_exists('vendor/codeigniter/framework/system')) { |
110 | 110 | $contents = str_replace( |
111 | 111 | '$system_path = \'../../system\';', |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | } |
118 | 118 | } |
119 | 119 | |
120 | - if (! file_exists('index.php')) { |
|
120 | + if ( ! file_exists('index.php')) { |
|
121 | 121 | if (file_exists($this->pub_dir.'/index.php')) { |
122 | 122 | // CodeIgniter 3.0.6 and after |
123 | 123 | $contents = str_replace( |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | } else { |
191 | 191 | $success = copy($file, $dst.'/'.$iterator->getSubPathName()); |
192 | 192 | if ($success) { |
193 | - if (! $this->silent) { |
|
193 | + if ( ! $this->silent) { |
|
194 | 194 | echo 'copied: '.$dst.'/'.$iterator->getSubPathName().PHP_EOL; |
195 | 195 | } |
196 | 196 | } |
@@ -36,17 +36,17 @@ discard block |
||
36 | 36 | { |
37 | 37 | public function leaveNode(Node $node) |
38 | 38 | { |
39 | - if (! ($node instanceof FuncCall)) |
|
39 | + if ( ! ($node instanceof FuncCall)) |
|
40 | 40 | { |
41 | 41 | return; |
42 | 42 | } |
43 | 43 | |
44 | - if (! ($node->name instanceof Name)) |
|
44 | + if ( ! ($node->name instanceof Name)) |
|
45 | 45 | { |
46 | 46 | return; |
47 | 47 | } |
48 | 48 | |
49 | - if (! $node->name->isUnqualified()) |
|
49 | + if ( ! $node->name->isUnqualified()) |
|
50 | 50 | { |
51 | 51 | return; |
52 | 52 | } |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | FunctionPatcher::isWhitelisted((string) $node->name) |
56 | 56 | && ! FunctionPatcher::isBlacklisted((string) $node->name) |
57 | 57 | ) { |
58 | - $replacement = new FullyQualified('__FuncProxy__::' . (string) $node->name); |
|
58 | + $replacement = new FullyQualified('__FuncProxy__::'.(string) $node->name); |
|
59 | 59 | $node->name = $replacement; |
60 | 60 | } |
61 | 61 | } |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | |
25 | 25 | public function enterNode(Node $node) |
26 | 26 | { |
27 | - $callback = [$this, 'before' . ucfirst($node->getType())]; |
|
27 | + $callback = [$this, 'before'.ucfirst($node->getType())]; |
|
28 | 28 | if (is_callable($callback)) { |
29 | 29 | call_user_func_array($callback, [$node]); |
30 | 30 | } |
@@ -32,9 +32,9 @@ discard block |
||
32 | 32 | |
33 | 33 | public function leaveNode(Node $node) |
34 | 34 | { |
35 | - if (! ($node instanceof ConstFetch)) |
|
35 | + if ( ! ($node instanceof ConstFetch)) |
|
36 | 36 | { |
37 | - $callback = [$this, 'rewrite' . ucfirst($node->getType())]; |
|
37 | + $callback = [$this, 'rewrite'.ucfirst($node->getType())]; |
|
38 | 38 | if (is_callable($callback)) { |
39 | 39 | call_user_func_array($callback, [$node]); |
40 | 40 | } |
@@ -47,19 +47,19 @@ discard block |
||
47 | 47 | return; |
48 | 48 | } |
49 | 49 | |
50 | - if (! ($node->name instanceof Name)) |
|
50 | + if ( ! ($node->name instanceof Name)) |
|
51 | 51 | { |
52 | 52 | return; |
53 | 53 | } |
54 | 54 | |
55 | - if (! $node->name->isUnqualified()) |
|
55 | + if ( ! $node->name->isUnqualified()) |
|
56 | 56 | { |
57 | 57 | return; |
58 | 58 | } |
59 | 59 | |
60 | - if (! ConstantPatcher::isBlacklisted((string) $node->name)) |
|
60 | + if ( ! ConstantPatcher::isBlacklisted((string) $node->name)) |
|
61 | 61 | { |
62 | - $replacement = new FullyQualified('__ConstProxy__::get(\'' . (string) $node->name . '\')'); |
|
62 | + $replacement = new FullyQualified('__ConstProxy__::get(\''.(string) $node->name.'\')'); |
|
63 | 63 | $node->name = $replacement; |
64 | 64 | } |
65 | 65 | } |