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

FlatsomeSiteReviews::options()   B

Complexity

Conditions 2
Paths 2

Size

Total Lines 141
Code Lines 111

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 111
c 1
b 0
f 1
dl 0
loc 141
rs 8
cc 2
nc 2
nop 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A FlatsomeSiteReviews::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\SiteReviewsShortcode;
6
7
class FlatsomeSiteReviews extends FlatsomeShortcode
8
{
9
    public function icon(): string
10
    {
11
        return glsr()->url('assets/images/icons/flatsome/icon-reviews.svg');
12
    }
13
14
    public static function shortcodeClass(): string
15
    {
16
        return SiteReviewsShortcode::class;
17
    }
18
}
19