Test Failed
Branch master (df1c42)
by Mostafa
15:23
created

Attachment::setCover()   C

Complexity

Conditions 16
Paths 27

Size

Total Lines 64
Code Lines 36

Duplication

Lines 0
Ratio 0 %

Importance

Changes 8
Bugs 1 Features 0
Metric Value
cc 16
eloc 36
c 8
b 1
f 0
nc 27
nop 1
dl 0
loc 64
rs 5.5666

How to fix   Long Method    Complexity   

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 Mostafaznv\Larupload\Storage;
4
5
use Mostafaznv\Larupload\Concerns\Storage\Attachment\AttachmentActions;
6
use Mostafaznv\Larupload\Concerns\Storage\Attachment\AttachmentEvents;
7
use Mostafaznv\Larupload\Concerns\Storage\Attachment\BaseAttachment;
8
use Mostafaznv\Larupload\Concerns\Storage\Attachment\CoverAttachment;
9
use Mostafaznv\Larupload\Concerns\Storage\Attachment\QueueAttachment;
10
use Mostafaznv\Larupload\Concerns\Storage\Attachment\RetrieveAttachment;
11
use Mostafaznv\Larupload\Concerns\Storage\Attachment\StyleAttachment;
12
use Mostafaznv\Larupload\UploadEntities;
13
14
class Attachment extends UploadEntities
15
{
16
    use BaseAttachment;
0 ignored issues
show
introduced by
The trait Mostafaznv\Larupload\Con...tachment\BaseAttachment requires some properties which are not provided by Mostafaznv\Larupload\Storage\Attachment: $duration, $height, $width
Loading history...
17
    use AttachmentActions;
18
    use AttachmentEvents;
19
    use CoverAttachment;
20
    use StyleAttachment;
21
    use RetrieveAttachment;
22
    use QueueAttachment;
23
}
24