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

FlatsomeSiteReviewsForm::options()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 89
Code Lines 73

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 1 Features 1
Metric Value
eloc 73
dl 0
loc 89
rs 8.589
c 2
b 1
f 1
cc 1
nc 1
nop 0

1 Method

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