@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | } |
30 | 30 | |
31 | 31 | for ($i = 1; $i <= $argc; $i++) { |
32 | - if (! isset($argv[$i])) { |
|
32 | + if ( ! isset($argv[$i])) { |
|
33 | 33 | break; |
34 | 34 | } |
35 | 35 | |
@@ -41,26 +41,26 @@ discard block |
||
41 | 41 | |
42 | 42 | // php install.php -a application |
43 | 43 | case '-a': |
44 | - if (is_dir($argv[$i+1])) { |
|
45 | - $this->app_dir = $argv[$i+1]; |
|
44 | + if (is_dir($argv[$i + 1])) { |
|
45 | + $this->app_dir = $argv[$i + 1]; |
|
46 | 46 | } else { |
47 | - throw new Exception('No such directory: ' . $argv[$i+1]); |
|
47 | + throw new Exception('No such directory: '.$argv[$i + 1]); |
|
48 | 48 | } |
49 | 49 | $i++; |
50 | 50 | break; |
51 | 51 | |
52 | 52 | // php install.php -p public |
53 | 53 | case '-p': |
54 | - if (is_dir($argv[$i+1])) { |
|
55 | - $this->pub_dir = $argv[$i+1]; |
|
54 | + if (is_dir($argv[$i + 1])) { |
|
55 | + $this->pub_dir = $argv[$i + 1]; |
|
56 | 56 | } else { |
57 | - throw new Exception('No such directory: ' . $argv[$i+1]); |
|
57 | + throw new Exception('No such directory: '.$argv[$i + 1]); |
|
58 | 58 | } |
59 | 59 | $i++; |
60 | 60 | break; |
61 | 61 | |
62 | 62 | default: |
63 | - throw new Exception('Unknown argument: ' . $argv[$i]); |
|
63 | + throw new Exception('Unknown argument: '.$argv[$i]); |
|
64 | 64 | } |
65 | 65 | } |
66 | 66 | } |
@@ -68,8 +68,8 @@ discard block |
||
68 | 68 | public function install() |
69 | 69 | { |
70 | 70 | $this->recursiveCopy( |
71 | - dirname(__FILE__) . '/application/tests', |
|
72 | - $this->app_dir . '/' . $this->test_dir |
|
71 | + dirname(__FILE__).'/application/tests', |
|
72 | + $this->app_dir.'/'.$this->test_dir |
|
73 | 73 | ); |
74 | 74 | $this->fixPath(); |
75 | 75 | } |
@@ -79,10 +79,10 @@ discard block |
||
79 | 79 | */ |
80 | 80 | private function fixPath() |
81 | 81 | { |
82 | - $file = $this->app_dir . '/' . $this->test_dir . '/Bootstrap.php'; |
|
82 | + $file = $this->app_dir.'/'.$this->test_dir.'/Bootstrap.php'; |
|
83 | 83 | $contents = file_get_contents($file); |
84 | 84 | |
85 | - if (! file_exists('system')) { |
|
85 | + if ( ! file_exists('system')) { |
|
86 | 86 | if (file_exists('vendor/codeigniter/framework/system')) { |
87 | 87 | $contents = str_replace( |
88 | 88 | '$system_path = \'../../system\';', |
@@ -94,8 +94,8 @@ discard block |
||
94 | 94 | } |
95 | 95 | } |
96 | 96 | |
97 | - if (! file_exists('index.php')) { |
|
98 | - if (file_exists($this->pub_dir . '/index.php')) { |
|
97 | + if ( ! file_exists('index.php')) { |
|
98 | + if (file_exists($this->pub_dir.'/index.php')) { |
|
99 | 99 | // CodeIgniter 3.0.6 and after |
100 | 100 | $contents = str_replace( |
101 | 101 | "define('FCPATH', realpath(dirname(__FILE__).'/../..').DIRECTORY_SEPARATOR);", |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | "define('FCPATH', realpath(dirname(__FILE__).'/../../' . $this->pub_dir).'/');", |
109 | 109 | $contents |
110 | 110 | ); |
111 | - } elseif (file_exists($this->app_dir . '/public/index.php')) { |
|
111 | + } elseif (file_exists($this->app_dir.'/public/index.php')) { |
|
112 | 112 | // CodeIgniter 3.0.6 and after |
113 | 113 | $contents = str_replace( |
114 | 114 | "define('FCPATH', realpath(dirname(__FILE__).'/../..').DIRECTORY_SEPARATOR);", |
@@ -138,10 +138,10 @@ discard block |
||
138 | 138 | |
139 | 139 | public function update() |
140 | 140 | { |
141 | - $target_dir = $this->app_dir . '/' . $this->test_dir . '/_ci_phpunit_test'; |
|
141 | + $target_dir = $this->app_dir.'/'.$this->test_dir.'/_ci_phpunit_test'; |
|
142 | 142 | $this->recursiveUnlink($target_dir); |
143 | 143 | $this->recursiveCopy( |
144 | - dirname(__FILE__) . '/application/tests/_ci_phpunit_test', |
|
144 | + dirname(__FILE__).'/application/tests/_ci_phpunit_test', |
|
145 | 145 | $target_dir |
146 | 146 | ); |
147 | 147 | } |
@@ -163,12 +163,12 @@ discard block |
||
163 | 163 | |
164 | 164 | foreach ($iterator as $file) { |
165 | 165 | if ($file->isDir()) { |
166 | - @mkdir($dst . '/' . $iterator->getSubPathName()); |
|
166 | + @mkdir($dst.'/'.$iterator->getSubPathName()); |
|
167 | 167 | } else { |
168 | - $success = copy($file, $dst . '/' . $iterator->getSubPathName()); |
|
168 | + $success = copy($file, $dst.'/'.$iterator->getSubPathName()); |
|
169 | 169 | if ($success) { |
170 | - if (! $this->silent) { |
|
171 | - echo 'copied: ' . $dst . '/' . $iterator->getSubPathName() . PHP_EOL; |
|
170 | + if ( ! $this->silent) { |
|
171 | + echo 'copied: '.$dst.'/'.$iterator->getSubPathName().PHP_EOL; |
|
172 | 172 | } |
173 | 173 | } |
174 | 174 | } |