Passed
Push — master ( bf25fa...9131d3 )
by Luiz Kim
02:12
created

PackageModules::setUsers()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 4
rs 10
1
<?php
2
3
namespace ControleOnline\Entity;
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 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...
12
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...
13
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...
14
/**
15
 * @ORM\EntityListeners ({ControleOnline\Listener\LogListener::class})
16
 * @ORM\Table (name="package_modules", uniqueConstraints={@ORM\UniqueConstraint (name="package_id", columns={"package_id", "module_id"})}, indexes={@ORM\Index (name="module_id", columns={"module_id"}), @ORM\Index(name="IDX_A1EC265BF44CABFF", columns={"package_id"})})
17
 * @ORM\Entity (repositoryClass="ControleOnline\Repository\PackageModulesRepository")
18
 */
19
#[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' => ['package_modules_read']], denormalizationContext: ['groups' => ['package_modules_write']])]
20
class PackageModules
21
{
22
    /**
23
     * @var int
24
     *
25
     * @ORM\Column(name="id", type="integer", nullable=false)
26
     * @ORM\Id
27
     * @ORM\GeneratedValue(strategy="IDENTITY")
28
     */
29
    private $id;
30
    /**
31
     * @var int
32
     *
33
     * @ORM\Column(name="users", type="integer", nullable=false)
34
     */
35
    private $users;
36
    /**
37
     * @var Module
0 ignored issues
show
Bug introduced by
The type ControleOnline\Entity\Module 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...
38
     *
39
     * @ORM\ManyToOne(targetEntity="Module")
40
     * @ORM\JoinColumns({
41
     *   @ORM\JoinColumn(name="module_id", referencedColumnName="id")
42
     * })
43
     */
44
    private $module;
45
    /**
46
     * @var Package
47
     *
48
     * @ORM\ManyToOne(targetEntity="Package")
49
     * @ORM\JoinColumns({
50
     *   @ORM\JoinColumn(name="package_id", referencedColumnName="id")
51
     * })
52
     */
53
    private $package;
54
    /**
55
     * Get the value of id
56
     */
57
    public function getId() : int
58
    {
59
        return $this->id;
60
    }
61
    /**
62
     * Get the value of users
63
     */
64
    public function getUsers() : int
65
    {
66
        return $this->users;
67
    }
68
    /**
69
     * Set the value of users
70
     */
71
    public function setUsers(int $users) : self
72
    {
73
        $this->users = $users;
74
        return $this;
75
    }
76
    /**
77
     * Get the value of module
78
     */
79
    public function getModule() : Module
80
    {
81
        return $this->module;
82
    }
83
    /**
84
     * Set the value of module
85
     */
86
    public function setModule(Module $module) : self
87
    {
88
        $this->module = $module;
89
        return $this;
90
    }
91
    /**
92
     * Get the value of package
93
     */
94
    public function getPackage() : Package
95
    {
96
        return $this->package;
97
    }
98
    /**
99
     * Set the value of package
100
     */
101
    public function setPackage(Package $package) : self
102
    {
103
        $this->package = $package;
104
        return $this;
105
    }
106
}
107