Passed
Push — master ( 3d2772...3889da )
by Luiz Kim
21:03 queued 19:00
created

Language::removePeople()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 1
c 2
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
namespace ControleOnline\Entity;
4
5
use ApiPlatform\Core\Annotation\ApiResource;
0 ignored issues
show
Bug introduced by
The type ApiPlatform\Core\Annotation\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...
6
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...
7
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...
8
use Doctrine\Common\Collections\ArrayCollection;
0 ignored issues
show
Bug introduced by
The type Doctrine\Common\Collections\ArrayCollection 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 Doctrine\Common\Collections\Collection;
0 ignored issues
show
Bug introduced by
The type Doctrine\Common\Collections\Collection 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
11
/**
12
 * @ORM\Entity(repositoryClass="ControleOnline\Repository\LanguageRepository")
13
 * @ORM\Table(name="language", uniqueConstraints={@ORM\UniqueConstraint(name="language", columns={"language"})})
14
 * @ORM\EntityListeners({ControleOnline\Listener\LogListener::class}) 
15
 */
16
class Language
17
{
18
    /**
19
     *
20
     * @ORM\Column(type="integer", nullable=false)
21
     * @ORM\Id
22
     * @ORM\GeneratedValue(strategy="IDENTITY")
23
     */
24
    private $id;
25
26
    /**
27
     * @ORM\Column(type="string", length=10, nullable=false)
28
     */
29
    private $language;
30
31
    /**
32
     * @ORM\Column(type="boolean", nullable=false)
33
     */
34
    private $locked;
35
36
    /**
37
     *
38
     * @ORM\OneToMany(targetEntity="ControleOnline\Entity\People", mappedBy="language")
39
     */
40
    private $people;
41
42
    public function __construct()
43
    {
44
        $this->people = new \Doctrine\Common\Collections\ArrayCollection();
45
    }
46
47
    public function getId()
48
    {
49
        return $this->id;
50
    }
51
52
    public function addPeople(People $people)
0 ignored issues
show
Bug introduced by
The type ControleOnline\Entity\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...
53
    {
54
        $this->people[] = $people;
55
56
        return $this;
57
    }
58
59
    public function removePeople(People $people)
60
    {
61
        $this->people->removeElement($people);
62
    }
63
64
    public function getPeople()
65
    {
66
        return $this->people;
67
    }
68
69
    public function setLanguage($language)
70
    {
71
        $this->language = $language;
72
73
        return $this;
74
    }
75
76
    public function getLanguage()
77
    {
78
        return $this->language;
79
    }
80
81
    public function setLocked($locked)
82
    {
83
        $this->locked = $locked;
84
85
        return $this;
86
    }
87
88
    public function getLocked()
89
    {
90
        return $this->locked;
91
    }
92
}
93