Skip to content

Commit

Permalink
style: remove spaces before and after .
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Apr 15, 2018
1 parent 08e3a8c commit 3ecedf6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion install.php
Expand Up @@ -8,7 +8,7 @@
* @link https://github.com/kenjis/ci-phpunit-test
*/

require __DIR__ . '/lib/Installer.php';
require __DIR__.'/lib/Installer.php';

$installer = new Installer($argv);
$installer->install();
24 changes: 12 additions & 12 deletions lib/Installer.php
Expand Up @@ -44,7 +44,7 @@ private function parse_args($argv)
if (is_dir($argv[$i+1])) {
$this->app_dir = $argv[$i+1];
} else {
throw new Exception('No such directory: ' . $argv[$i+1]);
throw new Exception('No such directory: '.$argv[$i+1]);
}
$i++;
break;
Expand All @@ -54,22 +54,22 @@ private function parse_args($argv)
if (is_dir($argv[$i+1])) {
$this->pub_dir = $argv[$i+1];
} else {
throw new Exception('No such directory: ' . $argv[$i+1]);
throw new Exception('No such directory: '.$argv[$i+1]);
}
$i++;
break;

default:
throw new Exception('Unknown argument: ' . $argv[$i]);
throw new Exception('Unknown argument: '.$argv[$i]);
}
}
}

public function install()
{
$this->recursiveCopy(
dirname(__FILE__.'/..') . '/application/tests',
$this->app_dir . '/' . $this->test_dir
dirname(__FILE__.'/..').'/application/tests',
$this->app_dir.'/'.$this->test_dir
);
$this->fixPath();
}
Expand All @@ -79,7 +79,7 @@ public function install()
*/
private function fixPath()
{
$file = $this->app_dir . '/' . $this->test_dir . '/Bootstrap.php';
$file = $this->app_dir.'/'.$this->test_dir.'/Bootstrap.php';
$contents = file_get_contents($file);

if (! file_exists('system')) {
Expand All @@ -95,7 +95,7 @@ private function fixPath()
}

if (! file_exists('index.php')) {
if (file_exists($this->pub_dir . '/index.php')) {
if (file_exists($this->pub_dir.'/index.php')) {
// CodeIgniter 3.0.6 and after
$contents = str_replace(
"define('FCPATH', realpath(dirname(__FILE__).'/../..').DIRECTORY_SEPARATOR);",
Expand All @@ -108,7 +108,7 @@ private function fixPath()
"define('FCPATH', realpath(dirname(__FILE__).'/../../{$this->pub_dir}').'/');",
$contents
);
} elseif (file_exists($this->app_dir . '/public/index.php')) {
} elseif (file_exists($this->app_dir.'/public/index.php')) {
// CodeIgniter 3.0.6 and after
$contents = str_replace(
"define('FCPATH', realpath(dirname(__FILE__).'/../..').DIRECTORY_SEPARATOR);",
Expand Down Expand Up @@ -138,7 +138,7 @@ private function fixPath()

public function update()
{
$target_dir = $this->app_dir . '/' . $this->test_dir . '/_ci_phpunit_test';
$target_dir = $this->app_dir.'/'.$this->test_dir.'/_ci_phpunit_test';
$this->recursiveUnlink($target_dir);
$this->recursiveCopy(
dirname(__FILE__.'/..').'/application/tests/_ci_phpunit_test',
Expand All @@ -163,12 +163,12 @@ private function recursiveCopy($src, $dst)

foreach ($iterator as $file) {
if ($file->isDir()) {
@mkdir($dst . '/' . $iterator->getSubPathName());
@mkdir($dst.'/'.$iterator->getSubPathName());
} else {
$success = copy($file, $dst . '/' . $iterator->getSubPathName());
$success = copy($file, $dst.'/'.$iterator->getSubPathName());
if ($success) {
if (! $this->silent) {
echo 'copied: ' . $dst . '/' . $iterator->getSubPathName() . PHP_EOL;
echo 'copied: '.$dst.'/'.$iterator->getSubPathName().PHP_EOL;
}
}
}
Expand Down

0 comments on commit 3ecedf6

Please sign in to comment.