Completed
Pull Request — master (#1538)
by k-yamamura
86:12 queued 46:27
created

Version20160413151321::up()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 17
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 17
rs 9.4285
cc 1
eloc 9
nc 1
nop 1
1
<?php
2
3
namespace DoctrineMigrations;
4
5
use Doctrine\DBAL\Migrations\AbstractMigration;
6
use Doctrine\DBAL\Schema\Schema;
7
use Eccube\Application;
8
use Symfony\Component\Yaml\Yaml;
9
10
/**
11
 * Auto-generated Migration: Please modify to your needs!
12
 */
13
class Version20160413151321 extends AbstractMigration
14
{
15
    /**
16
     * @param Schema $schema
17
     */
18
    public function up(Schema $schema)
19
    {
20
        // this up() migration is auto-generated, please modify it to your needs
21
22
        // path.ymlの更新
23
        $app = Application::getInstance();
24
        $file = $app['config']['root_dir'] . '/app/config/eccube/path.yml';
0 ignored issues
show
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
25
        $config = Yaml::parse(file_get_contents($file));
26
27
        $config['public_path'] = '/html';
28
        $config['public_path_realdir'] = $config['root_dir'] . $config['public_path'];
0 ignored issues
show
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
29
        $config['plugin_html_realdir'] = $config['root_dir'] . $config['public_path'] . '/plugin';
0 ignored issues
show
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
30
        $config['plugin_urlpath'] = $config['root_urlpath'] . '/plugin';
0 ignored issues
show
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
31
32
        file_put_contents($file, Yaml::dump($config));
33
34
    }
35
36
    /**
37
     * @param Schema $schema
38
     */
39
    public function down(Schema $schema)
40
    {
41
        // this down() migration is auto-generated, please modify it to your needs
42
43
    }
44
}
45