Failed Conditions
Push — master ( 5e6761...398dce )
by Adrien
04:14 queued 01:57
created

HasDescription   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 27
rs 10
ccs 0
cts 7
cp 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getDescription() 0 3 1
A setDescription() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Ecodev\Felix\Model\Traits;
6
7
use Ecodev\Felix\Utility;
8
9
trait HasDescription
10
{
11
    /**
12
     * @var string
13
     *
14
     * @ORM\Column(type="text", length=65535)
15
     */
16
    private $description = '';
17
18
    /**
19
     * Set description
20
     *
21
     * @param string $description
22
     */
23
    public function setDescription(string $description): void
24
    {
25
        $this->description = Utility::sanitizeRichText($description);
0 ignored issues
show
Bug introduced by
The method sanitizeRichText() does not exist on Ecodev\Felix\Utility. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

25
        /** @scrutinizer ignore-call */ 
26
        $this->description = Utility::sanitizeRichText($description);

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
26
    }
27
28
    /**
29
     * Get description
30
     *
31
     * @return string
32
     */
33
    public function getDescription(): string
34
    {
35
        return $this->description;
36
    }
37
}
38