OrganizationRole   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 37
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
1
<?php
2
3
namespace App\Entity;
4
5
use App\Entity\Attribute\Accessor;
6
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...
7
8
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...
9
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...
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\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...
12
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...
13
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...
14
15
/**
16
 * Class OrganizationRole
17
 *
18
 * @ApiResource(
19
 *      attributes={
20
 *          "normalization_context"={
21
 *              "groups"={"business_unit_role_output"}
22
 *          },
23
 *          "denormalization_context"={
24
 *              "groups"={"business_unit_role_input"}
25
 *          },
26
 *          "filters"={
27
 *              "app.organization_role.search",
28
 *              "app.organization_role.date",
29
 *              "app.organization_role.order"
30
 *          }
31
 *      }
32
 * )
33
 * @ORM\Entity(repositoryClass="App\Repository\OrganizationRoleRepository")
34
 * @ORM\Table(name="app_organization_role")
35
 * @ORM\Cache(usage="NONSTRICT_READ_WRITE")
36
 * @ORMAssert\UniqueEntity(fields="uuid")
37
 */
38
class OrganizationRole extends BusinessUnitRole
39
{
40
    use Accessor\Organization;
41
    use Accessor\BusinessUnits;
42
43
    /**
44
     * @var \App\Entity\Organization
45
     * @ApiProperty
46
     * @Serializer\Groups({"business_unit_role_output", "business_unit_role_input"})
47
     * @ORM\ManyToOne(targetEntity="App\Entity\Organization", inversedBy="roles")
48
     * @ORM\JoinColumn(name="organization_id", referencedColumnName="id")
49
     * @ORM\Cache(usage="NONSTRICT_READ_WRITE")
50
     * @Assert\Valid
51
     */
52
    private $organization;
0 ignored issues
show
introduced by
The private property $organization is not used, and could be removed.
Loading history...
53
54
    /**
55
     * @var \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...
56
     * @ApiProperty
57
     * @Serializer\Groups({"business_unit_role_output", "business_unit_role_input"})
58
     * @ORM\ManyToMany(targetEntity="App\Entity\BusinessUnit", cascade={"remove", "persist"})
59
     * @ORM\JoinTable(
60
     *     name="app_organization_role_bu",
61
     *     joinColumns={
62
     *         @ORM\JoinColumn(name="organization_role_id", referencedColumnName="id")
63
     *     }
64
     * )
65
     * @ORM\Cache(usage="NONSTRICT_READ_WRITE")
66
     */
67
    private $businessUnits;
68
69
    /**
70
     * Constructor
71
     */
72
    public function __construct()
73
    {
74
        $this->businessUnits = new ArrayCollection;
75
    }
76
}
77