Code Duplication    Length = 13-13 lines in 2 locations

src/Eccube/Application.php 1 location

@@ 66-78 (lines=13) @@
63
64
    public function __construct(array $values = array())
65
    {
66
        if (\Phar::running(false)) {
67
            // phar
68
            $this->package = 'phar';
69
            $this->rootDir = dirname(\Phar::running(false));
70
        } elseif (file_exists(__DIR__.'/../../../../../vendor/ec-cube/ec-cube')) {
71
            // composer
72
            $this->package = 'composer';
73
            $this->rootDir = __DIR__.'/../../../../..';
74
        } else {
75
            // other
76
            $this->package = 'general';
77
            $this->rootDir = __DIR__.'/../..';
78
        }
79
80
        parent::__construct($values);
81

src/Eccube/InstallApplication.php 1 location

@@ 36-48 (lines=13) @@
33
34
    public function __construct(array $values = array())
35
    {
36
        if (\Phar::running(false)) {
37
            // phar
38
            $this->package = 'phar';
39
            $this->rootDir = dirname(\Phar::running(false));
40
        } elseif (file_exists(__DIR__.'/../../../../../vendor/ec-cube/ec-cube')) {
41
            // composer
42
            $this->package = 'composer';
43
            $this->rootDir = __DIR__.'/../../../../..';
44
        } else {
45
            // other
46
            $this->package = 'general';
47
            $this->rootDir = __DIR__.'/../..';
48
        }
49
50
        $app = $this;
51