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

FlatsomeSiteReviewsSummary::options()   B

Complexity

Conditions 2
Paths 2

Size

Total Lines 121
Code Lines 94

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 0 Features 1
Metric Value
eloc 94
c 3
b 0
f 1
dl 0
loc 121
rs 8.1309
cc 2
nc 2
nop 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A FlatsomeSiteReviewsSummary::shortcodeClass() 0 3 1

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\Flatsome;
4
5
use GeminiLabs\SiteReviews\Shortcodes\SiteReviewsSummaryShortcode;
6
7
class FlatsomeSiteReviewsSummary extends FlatsomeShortcode
8
{
9
    public function icon(): string
10
    {
11
        return glsr()->url('assets/images/icons/flatsome/icon-summary.svg');
12
    }
13
14
    public static function shortcodeClass(): string
15
    {
16
        return SiteReviewsSummaryShortcode::class;
17
    }
18
}
19