Passed
Push — master ( 3f8050...70788f )
by Luiz Kim
05:05 queued 02:57
created

Particulars   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 76
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 16
c 1
b 0
f 0
dl 0
loc 76
rs 10
wmc 8

8 Methods

Rating   Name   Duplication   Size   Complexity  
A setPeople() 0 4 1
A getId() 0 3 1
A getPeople() 0 3 1
A setValue() 0 4 1
A __construct() 0 2 1
A getValue() 0 3 1
A getType() 0 3 1
A setType() 0 4 1
1
<?php
2
3
namespace ControleOnline\Entity\Particulars;
4
5
use ApiPlatform\Metadata\GetCollection;
0 ignored issues
show
Bug introduced by
The type ApiPlatform\Metadata\GetCollection was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use ApiPlatform\Metadata\Get;
0 ignored issues
show
Bug introduced by
The type ApiPlatform\Metadata\Get was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
use ApiPlatform\Metadata\ApiResource;
0 ignored issues
show
Bug introduced by
The type ApiPlatform\Metadata\ApiResource was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
8
use ApiPlatform\Metadata\ApiProperty;
0 ignored issues
show
Bug introduced by
The type ApiPlatform\Metadata\ApiProperty was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
9
use ApiPlatform\Metadata\ApiFilter;
0 ignored issues
show
Bug introduced by
The type ApiPlatform\Metadata\ApiFilter was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
10
use Doctrine\ORM\Mapping as ORM;
0 ignored issues
show
Bug introduced by
The type Doctrine\ORM\Mapping was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
11
use Symfony\Component\Serializer\Annotation\Groups;
0 ignored issues
show
Bug introduced by
The type Symfony\Component\Serializer\Annotation\Groups was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
12
/**
13
 * @ORM\EntityListeners ({App\Listener\LogListener::class})
14
 * @ORM\Table (name="particulars")
15
 * @ORM\Entity (repositoryClass="ControleOnline\Repository\ParticularsRepository")
16
 */
17
#[ApiResource(operations: [new Get(security: 'is_granted(\'ROLE_CLIENT\')'), new GetCollection(security: 'is_granted(\'ROLE_CLIENT\')')], formats: ['jsonld', 'json', 'html', 'jsonhal', 'csv' => ['text/csv']], normalizationContext: ['groups' => ['particulars_read']], denormalizationContext: ['groups' => ['particulars_write']])]
18
class Particulars
19
{
20
    /**
21
     * @var integer
22
     *
23
     * @ORM\Column(name="id", type="integer", nullable=false)
24
     * @ORM\Id
25
     * @ORM\GeneratedValue(strategy="IDENTITY")
26
     */
27
    private $id;
28
    /**
29
     * @var \ControleOnline\Entity\Particulars\ParticularsType
30
     *
31
     * @ORM\ManyToOne(targetEntity="ControleOnline\Entity\Particulars\ParticularsType")
32
     * @ORM\JoinColumns({
33
     *   @ORM\JoinColumn(name="particulars_type_id", referencedColumnName="id")
34
     * })
35
     * @Groups({"particulars_read"})
36
     */
37
    private $type;
38
    /**
39
     * @var \ControleOnline\Entity\People
40
     *
41
     * @ORM\ManyToOne(targetEntity="ControleOnline\Entity\People")
42
     * @ORM\JoinColumns({
43
     *   @ORM\JoinColumn(name="people_id", referencedColumnName="id")
44
     * })
45
     */
46
    private $people;
47
    /**
48
     * @ORM\Column(name="particular_value", type="string", nullable=false)
49
     * @Groups({"particulars_read"})
50
     */
51
    private $value;
52
    /**
53
     * Constructor
54
     */
55
    public function __construct()
56
    {
57
    }
58
    /**
59
     * Get id
60
     *
61
     * @return integer
62
     */
63
    public function getId()
64
    {
65
        return $this->id;
66
    }
67
    public function setType(ParticularsType $type) : self
68
    {
69
        $this->type = $type;
70
        return $this;
71
    }
72
    public function getType() : ParticularsType
73
    {
74
        return $this->type;
75
    }
76
    public function setPeople(People $people) : self
0 ignored issues
show
Bug introduced by
The type ControleOnline\Entity\Particulars\People was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
77
    {
78
        $this->people = $people;
79
        return $this;
80
    }
81
    public function getPeople() : People
82
    {
83
        return $this->people;
84
    }
85
    public function setValue(string $value) : self
86
    {
87
        $this->value = $value;
88
        return $this;
89
    }
90
    public function getValue() : string
91
    {
92
        return $this->value;
93
    }
94
}
95