Passed
Push — master ( 6362bf...699ce5 )
by Luiz Kim
10:28 queued 08:19
created

Config::getId()   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 0
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\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...
7
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...
8
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...
9
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...
10
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...
11
12
13
/**
14
 * @ORM\EntityListeners ({ControleOnline\Listener\LogListener::class})
15
 * @ORM\Table (name="config", uniqueConstraints={@ORM\UniqueConstraint (name="people_id", columns={"people_id","config_key"})})
16
 * @ORM\Entity (repositoryClass="ControleOnline\Repository\ConfigRepository")
17
 */
18
#[ApiResource(
19
    operations: [
20
        new Get(security: 'is_granted(\'ROLE_ADMIN\') or is_granted(\'ROLE_CLIENT\')'),
21
        new GetCollection(
22
            security: 'is_granted(\'IS_AUTHENTICATED_ANONYMOUSLY\')',
23
            uriTemplate: '/configs/app-config',
24
            controller: \App\Controller\GetAppConfigAction::class
25
        )
26
    ],
27
    formats: ['jsonld', 'json', 'html', 'jsonhal', 'csv' => ['text/csv']]
28
)]
29
class Config
30
{
31
    /**
32
     * @var integer
33
     *
34
     * @ORM\Column(name="id", type="integer", nullable=false)
35
     * @ORM\Id
36
     * @ORM\GeneratedValue(strategy="IDENTITY")
37
     */
38
    private $id;
39
    /**
40
     * @var \ControleOnline\Entity\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...
41
     *
42
     * @ORM\ManyToOne(targetEntity="ControleOnline\Entity\People")
43
     * @ORM\JoinColumns({
44
     *   @ORM\JoinColumn(name="people_id", referencedColumnName="id")
45
     * })
46
     */
47
    private $people;
48
    /**
49
     * @var string
50
     *
51
     * @ORM\Column(name="config_key", type="string", length=255, nullable=false)
52
     */
53
    private $config_key;
54
    /**
55
     * @var string
56
     *
57
     * @ORM\Column(name="visibility", type="string", length=255, nullable=false)
58
     */
59
    private $visibility;
60
    /**
61
     * @var string
62
     *
63
     * @ORM\Column(name="config_value", type="string", length=255, nullable=false)
64
     */
65
    private $config_value;
66
    /**
67
     * Get id
68
     *
69
     * @return integer
70
     */
71
    public function getId()
72
    {
73
        return $this->id;
74
    }
75
    /**
76
     * Set people
77
     *
78
     * @param \ControleOnline\Entity\People $people
79
     * @return PeopleConfigKey
0 ignored issues
show
Bug introduced by
The type ControleOnline\Entity\PeopleConfigKey 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...
80
     */
81
    public function setPeople(\ControleOnline\Entity\People $people = null)
82
    {
83
        $this->people = $people;
84
        return $this;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this returns the type ControleOnline\Entity\Config which is incompatible with the documented return type ControleOnline\Entity\PeopleConfigKey.
Loading history...
85
    }
86
    /**
87
     * Get people
88
     *
89
     * @return \ControleOnline\Entity\People
90
     */
91
    public function getPeople()
92
    {
93
        return $this->people;
94
    }
95
    /**
96
     * Set config_key
97
     *
98
     * @param string config_key
0 ignored issues
show
Bug introduced by
The type ControleOnline\Entity\config_key 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...
99
     * @return PeopleConfigKey
100
     */
101
    public function setConfigKey($config_key)
102
    {
103
        $this->config_key = $config_key;
104
        return $this;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this returns the type ControleOnline\Entity\Config which is incompatible with the documented return type ControleOnline\Entity\PeopleConfigKey.
Loading history...
105
    }
106
    /**
107
     * Get config_key
108
     *
109
     * @return string
110
     */
111
    public function getConfigKey()
112
    {
113
        return $this->config_key;
114
    }
115
    /**
116
     * Set visibility
117
     *
118
     * @param string visibility
0 ignored issues
show
Bug introduced by
The type ControleOnline\Entity\visibility 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...
119
     * @return Config
120
     */
121
    public function setVisibility($visibility)
122
    {
123
        $this->visibility = $visibility;
124
        return $this;
125
    }
126
    /**
127
     * Get visibility
128
     *
129
     * @return string
130
     */
131
    public function getVisibility()
132
    {
133
        return $this->visibility;
134
    }
135
    /**
136
     * Set config_value
137
     *
138
     * @param string config_value
0 ignored issues
show
Bug introduced by
The type ControleOnline\Entity\config_value 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...
139
     * @return PeopleConfigKey
140
     */
141
    public function setConfigValue($config_value)
142
    {
143
        $this->config_value = $config_value;
144
        return $this;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this returns the type ControleOnline\Entity\Config which is incompatible with the documented return type ControleOnline\Entity\PeopleConfigKey.
Loading history...
145
    }
146
    /**
147
     * Get config_value
148
     *
149
     * @return string
150
     */
151
    public function getConfigValue()
152
    {
153
        return $this->config_value;
154
    }
155
}
156