Passed
Push — master ( 36adc7...a5e8db )
by Danny
02:31
created

config.php ➔ presscli_config()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 93
Code Lines 52

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 52
nc 1
nop 0
dl 0
loc 93
rs 8.4642
c 0
b 0
f 0

How to fix   Long Method   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
<?php
2
/**
3
 * The Press CLI default configuration.
4
 *
5
 * @return array The configuration.
6
 */
7
function presscli_config() {
8
    return [
9
        'database' => [
10
            'user' => 'root',
11
            'password' => 'root',
12
            'prefix' => 'wp_',
13
            'name' => '',
14
            'host' => '127.0.0.1',
15
        ],
16
        'plugins' => [
17
            [
18
                'plugin' => 'jetpack',
19
                'activate' => false,
20
            ],
21
            [
22
                'plugin' => 'crop-thumbnails',
23
                'activate' => true,
24
            ],
25
            [
26
                'plugin' => 'query-monitor',
27
                'activate' => true,
28
            ],
29
            [
30
                'plugin' => 'force-regenerate-thumbnails',
31
                'activate' => true,
32
            ],
33
            [
34
                'plugin' => 'force-regenerate-thumbnails',
35
                'activate' => true,
36
            ],
37
            [
38
                'plugin' => 'mailtrap-for-wp',
39
                'activate' => false,
40
            ],
41
            // [
42
            //     'plugin' => 'wp-migrate-db-pro',
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
43
            //     'activate' => false,
0 ignored issues
show
Unused Code Comprehensibility introduced by
43% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
44
            //     'location' => '~/Desktop/plugins/wp-migrate-db-pro.zip',
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
45
            // ],
46
        ],
47
        'user' => [
48
            'name' => '',
49
            'email' => '',
50
            'password' => '',
51
        ],
52
        'theme' => [
53
            'type' => 'zip',
54
            'url' => 'https://github.com/matchboxdesigngroup/kindling/archive/1.0.1.zip',
55
            'name' => '',
56
            // 'style-css' => [
0 ignored issues
show
Unused Code Comprehensibility introduced by
50% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
57
            //     'theme-name' => '',
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
58
            //     'client' => '',
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
59
            //     'version' => '1.0.0-dev',
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
60
            // ],
61
        ],
62
        'menus' => [
63
            [
64
                'name' => 'Primary Navigation',
65
                'location' => 'primary_navigation',
66
            ],
67
            [
68
                'name' => 'Footer Navigation',
69
                'location' => 'footer_navigation',
70
            ],
71
            [
72
                'name' => 'Social Menu',
73
                'location' => 'social_menu',
74
            ],
75
        ],
76
        'site' => [
77
            'title' => '',
78
            'url' => '',
79
        ],
80
        'rewrite' => [
81
            'structure' => '/%postname%/',
82
        ],
83
        'commands' => [
84
            'preInstall' => [],
85
            'postInstallTheme' => [
86
                'yarn',
87
                'bower install',
88
            ],
89
            'postInstall' => [],
90
        ],
91
        'settings' => [
92
            'afterInstall' => [
93
                'removeUserPassword' => true,
94
                'removeUserEmail' => true,
95
                'removeUserName' => true,
96
            ],
97
        ],
98
    ];
99
}
100