Test Failed
Push — develop ( c6b569...7a7654 )
by Paul
09:40
created

SiteReviewsBlock::attributes()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 66
Code Lines 49

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 49
dl 0
loc 66
ccs 0
cts 65
cp 0
rs 9.1127
c 0
b 0
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\Blocks;
4
5
use GeminiLabs\SiteReviews\Contracts\ShortcodeContract;
6
use GeminiLabs\SiteReviews\Shortcodes\SiteReviewsShortcode;
7
8
class SiteReviewsBlock extends Block
9
{
10
    public function shortcode(): ShortcodeContract
11
    {
12
        return glsr(SiteReviewsShortcode::class);
13
    }
14
}
15