Completed
Pull Request — master (#232)
by
unknown
09:30
created

install.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
/**
3
 * Part of ci-phpunit-test
4
 *
5
 * @author     Kenji Suzuki <https://github.com/kenjis>
6
 * @license    MIT License
7
 * @copyright  2015 Kenji Suzuki
8
 * @link       https://github.com/kenjis/ci-phpunit-test
9
 */
10
11
require __DIR__ . '/Installer.php';
12
13
$silent = false;
14
$app_dir = 'application';
15
16
// php install.php -s
17 View Code Duplication
if (isset($argv[1]) && $argv[1] === '-s') {
0 ignored issues
show
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
18
    $silent = true;
19
20
    // php install.php -s app
21
    if (isset($argv[2]) && is_dir($argv[2])) {
22
        $app_dir = $argv[2];
23
    }
24
}
25
26
// php install.php app
27
if (isset($argv[1]) && is_dir($argv[1])) {
28
    $app_dir = $argv[1];
29
}
30
31
$installer = new Installer($silent);
32
$installer->install($app_dir);
33