Passed
Pull Request — develop (#54)
by Mario
01:23
created

AnonymousRole::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace App\Entity;
4
5
use App\Entity\Attribute\Accessor;
6
7
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...
8
use ApiPlatform\Core\Annotation\ApiProperty;
0 ignored issues
show
Bug introduced by
The type ApiPlatform\Core\Annotation\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 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 Symfony\Bridge\Doctrine\Validator\Constraints as ORMAssert;
0 ignored issues
show
Bug introduced by
The type Symfony\Bridge\Doctrine\Validator\Constraints 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 As Serializer;
0 ignored issues
show
Bug introduced by
The type Symfony\Component\Serializer\Annotation 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 Symfony\Component\Validator\Constraints as Assert;
0 ignored issues
show
Bug introduced by
The type Symfony\Component\Validator\Constraints 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
14
/**
15
 * Class AnonymousRole
16
 *
17
 * @ApiResource(
18
 *      attributes={
19
 *          "normalization_context"={
20
 *              "groups"={"assigned_role_output"}
21
 *          },
22
 *          "denormalization_context"={
23
 *              "groups"={"assigned_role_input"}
24
 *          },
25
 *          "filters"={
26
 *              "app.anonymous_role.search",
27
 *              "app.anonymous_role.date",
28
 *              "app.anonymous_role.order"
29
 *          }
30
 *      }
31
 * )
32
 * @ORM\Entity(repositoryClass="App\Repository\AnonymousRoleRepository")
33
 * @ORM\Table(name="app_anonymous_role")
34
 * @ORM\Cache(usage="NONSTRICT_READ_WRITE")
35
 * @ORMAssert\UniqueEntity(fields="uuid")
36
 */
37
class AnonymousRole extends AssignedRole
38
{
39
    use Accessor\Anonymous;
40
41
    /**
42
     * @var \App\Entity\Anonymous
43
     * @ApiProperty
44
     * @Serializer\Groups({"assigned_role_output", "assigned_role_input"})
45
     * @ORM\ManyToOne(targetEntity="App\Entity\Anonymous", inversedBy="roles")
46
     * @ORM\JoinColumn(name="anonymous_id", referencedColumnName="id")
47
     * @ORM\Cache(usage="NONSTRICT_READ_WRITE")
48
     * @Assert\Valid
49
     */
50
    private $anonymous;
0 ignored issues
show
introduced by
The private property $anonymous is not used, and could be removed.
Loading history...
51
}
52