Test Failed
Push — develop ( 6c74c3...4ba53a )
by Paul
08:25
created

VcSiteReviewsSummary::vcShortcodeSettings()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 76
Code Lines 61

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 1
Metric Value
eloc 61
c 2
b 0
f 1
dl 0
loc 76
rs 8.8509
cc 1
nc 1
nop 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
namespace GeminiLabs\SiteReviews\Integrations\WPBakery;
4
5
use GeminiLabs\SiteReviews\Modules\Rating;
6
use GeminiLabs\SiteReviews\Shortcodes\SiteReviewsSummaryShortcode;
7
8
class VcSiteReviewsSummary extends VcShortcode
9
{
10
    public static function vcShortcodeClass(): string
11
    {
12
        return SiteReviewsSummaryShortcode::class;
13
    }
14
15
    public static function vcShortcodeIcon(): string
16
    {
17
        return glsr()->url('assets/images/icons/wpbakery/icon-summary.svg');
18
    }
19
20
    protected static function vcStyleConfig(): array
21
    {
22
        return [
23
            // 'style_preset' => [
24
            //     'group' => 'design',
25
            //     'heading' => esc_html_x('Style', 'admin-text', 'site-reviews'),
26
            //     'options' => [
27
            //         '1' => esc_html_x('Style 1', 'admin-text', 'site-reviews'),
28
            //         '2' => esc_html_x('Style 2', 'admin-text', 'site-reviews'),
29
            //         '3' => esc_html_x('Style 3', 'admin-text', 'site-reviews'),
30
            //     ],
31
            //     'placeholder' => esc_html_x('Default', 'admin-text', 'site-reviews'),
32
            //     'prefix_class' => 'is-style-',
33
            //     'std' => '',
34
            //     'type' => 'dropdown',
35
            // ],
36
            // 'style_align' => [
37
            //     'group' => 'design',
38
            //     'heading' => esc_html_x('Alignment', 'admin-text', 'site-reviews'),
39
            //     'options' => [
40
            //         'left' => esc_html_x('Start', 'admin-text', 'site-reviews'),
41
            //         'center' => esc_html_x('Center', 'admin-text', 'site-reviews'),
42
            //         'right' => esc_html_x('End', 'admin-text', 'site-reviews'),
43
            //     ],
44
            //     'std' => 'left',
45
            //     'type' => 'dropdown',
46
            // ],
47
            // 'style_max_width' => [
48
            //     'group' => 'design',
49
            //     'heading' => esc_html_x('Max Width', 'admin-text', 'site-reviews'),
50
            //     'type' => 'textfield',
51
            // ],
52
            // 'style_rating_color' => [
53
            //     'group' => 'design',
54
            //     'heading' => esc_html_x('Star Color', 'admin-text', 'site-reviews'),
55
            //     'type' => 'colorpicker',
56
            // ],
57
            // 'style_rating_size' => [
58
            //     'group' => 'design',
59
            //     'heading' => esc_html_x('Star Size', 'admin-text', 'site-reviews'),
60
            //     'type' => 'textfield',
61
            // ],
62
            // 'style_bar_color' => [
63
            //     'group' => 'design',
64
            //     'heading' => esc_html_x('Bar Color', 'admin-text', 'site-reviews'),
65
            //     'type' => 'colorpicker',
66
            // ],
67
            // 'style_bar_gap' => [
68
            //     'group' => 'design',
69
            //     'heading' => esc_html_x('Bar Gap', 'admin-text', 'site-reviews'),
70
            //     'type' => 'textfield',
71
            // ],
72
            // 'style_bar_size' => [
73
            //     'group' => 'design',
74
            //     'heading' => esc_html_x('Bar Size', 'admin-text', 'site-reviews'),
75
            //     'type' => 'textfield',
76
            // ],
77
        ];
78
    }
79
}
80