Failed Conditions
Pull Request — experimental/sf (#3225)
by Kentaro
58:20 queued 49:13
created

FileManagePage::一覧_削除_accept()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
4
namespace Page\Admin;
5
6
7
class FileManagePage extends AbstractAdminPageStyleGuide
0 ignored issues
show
introduced by
Missing class doc comment
Loading history...
8
{
9
10
    /**
0 ignored issues
show
introduced by
Doc comment for parameter "$I" missing
Loading history...
11
     * FileManagePage constructor.
12
     */
13
    public function __construct(\AcceptanceTester $I)
14
    {
15
        parent::__construct($I);
16
    }
17
18
    public static function go($I)
19
    {
20
        $page = new self($I);
21
        return $page->goPage('/content/file_manager', 'ファイル管理コンテンツ管理');
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
22
    }
23
24
    public function 入力_ファイル($fileName)
0 ignored issues
show
Coding Style introduced by
Method name "FileManagePage::入力_ファイル" is not in camel caps format
Loading history...
25
    {
26
        $this->tester->attachFile(['id' => 'form_file'], $fileName);
27
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
28
    }
29
30
    public function アップロード()
0 ignored issues
show
Coding Style introduced by
Method name "FileManagePage::アップロード" is not in camel caps format
Loading history...
31
    {
32
        $this->tester->click('#upload_box__file a.action-upload');
33
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
34
    }
35
36
    public function 入力_フォルダ名($value)
0 ignored issues
show
Coding Style introduced by
Method name "FileManagePage::入力_フォルダ名" is not in camel caps format
Loading history...
37
    {
38
        $this->tester->fillField(['id' => 'form_create_file'], $value);
39
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
40
    }
41
42
    public function フォルダ作成()
0 ignored issues
show
Coding Style introduced by
Method name "FileManagePage::フォルダ作成" is not in camel caps format
Loading history...
43
    {
44
        $this->tester->click('#form1 a.action-create');
45
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
46
    }
47
48
    public function ファイル名($rowNum)
0 ignored issues
show
Coding Style introduced by
Method name "FileManagePage::ファイル名" is not in camel caps format
Loading history...
49
    {
50
        return "#fileList table > tbody > tr:nth-child(${rowNum}) > td:nth-child(2)";
51
    }
52
53
    public function 一覧_ダウンロード($rowNum)
0 ignored issues
show
Coding Style introduced by
Method name "FileManagePage::一覧_ダウンロード" is not in camel caps format
Loading history...
54
    {
55
        $this->tester->click("#fileList table > tbody > tr:nth-child(${rowNum}) > td:nth-child(5) a.action-download");
56
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
57
    }
58
59
    public function 一覧_表示($rowNum)
0 ignored issues
show
Coding Style introduced by
Method name "FileManagePage::一覧_表示" is not in camel caps format
Loading history...
60
    {
61
        $this->tester->click("#fileList table > tbody > tr:nth-child(${rowNum}) > td:nth-child(5) a.action-view");
62
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
63
    }
64
65
    public function 一覧_削除($rowNum)
0 ignored issues
show
Coding Style introduced by
Method name "FileManagePage::一覧_削除" is not in camel caps format
Loading history...
66
    {
67
        $this->tester->click("#fileList table > tbody > tr:nth-child(${rowNum}) > td:nth-child(5) a.action-delete");
68
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
69
    }
70
71
    public function 一覧_削除_accept($rowNum)
0 ignored issues
show
Coding Style introduced by
Method name "FileManagePage::一覧_削除_accept" is not in camel caps format
Loading history...
72
    {
73
        $this->tester->click("#fileList table > tbody > tr:nth-child(${rowNum}) > td:nth-child(5) > div > div:nth-child(3) div.modal a.btn-ec-delete");
74
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
75
    }
76
77
    /**
0 ignored issues
show
introduced by
Doc comment for parameter "$index" missing
Loading history...
78
     * パンくずのパスを取得
79
     * @param $index int 0から始まる(0はuser_data)
0 ignored issues
show
introduced by
Missing parameter name
Loading history...
80
     * @return string
81
     */
82
    public function パンくず($index)
0 ignored issues
show
Coding Style introduced by
Method name "FileManagePage::パンくず" is not in camel caps format
Loading history...
83
    {
84
        $index = ($index * 2) + 1;
85
        return "#bread > a:nth-child(${index})";
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
86
    }
87
}