Passed
Push — develop ( 49b51d...3839fb )
by Paul
26:28
created

ElementorSiteReviewsSummary::styleConfig()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 129
Code Lines 99

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 99
dl 0
loc 129
ccs 0
cts 128
cp 0
rs 8.0218
c 1
b 1
f 0
cc 1
nc 1
nop 0
crap 2

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\Elementor\Widgets;
4
5
use GeminiLabs\SiteReviews\Shortcodes\SiteReviewsSummaryShortcode;
6
7
class ElementorSiteReviewsSummary extends ElementorWidget
8
{
9
    public function get_icon(): string
10
    {
11
        return 'eicon-glsr-summary';
12
    }
13
14
    public static function shortcodeClass(): string
15
    {
16
        return SiteReviewsSummaryShortcode::class;
17
    }
18
}
19