Staff   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 142
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 30
c 0
b 0
f 0
dl 0
loc 142
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
1
<?php
2
3
namespace App\Entity;
4
5
use App\Entity\Attribute\Accessor as EntityAccessor;
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
use Ds\Component\Model\Attribute\Accessor;
0 ignored issues
show
Bug introduced by
The type Ds\Component\Model\Attribute\Accessor 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 Ds\Component\Model\Type\Deletable;
0 ignored issues
show
Bug introduced by
The type Ds\Component\Model\Type\Deletable 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 Ds\Component\Model\Type\Identifiable;
0 ignored issues
show
Bug introduced by
The type Ds\Component\Model\Type\Identifiable 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 Ds\Component\Model\Type\Identitiable;
0 ignored issues
show
Bug introduced by
The type Ds\Component\Model\Type\Identitiable 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 Ds\Component\Model\Type\Ownable;
0 ignored issues
show
Bug introduced by
The type Ds\Component\Model\Type\Ownable 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 Ds\Component\Model\Type\Uuidentifiable;
0 ignored issues
show
Bug introduced by
The type Ds\Component\Model\Type\Uuidentifiable 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 Ds\Component\Model\Type\Versionable;
0 ignored issues
show
Bug introduced by
The type Ds\Component\Model\Type\Versionable 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
use Ds\Component\Tenant\Model\Attribute\Accessor as TenantAccessor;
0 ignored issues
show
Bug introduced by
The type Ds\Component\Tenant\Model\Attribute\Accessor 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...
15
use Ds\Component\Tenant\Model\Type\Tenantable;
0 ignored issues
show
Bug introduced by
The type Ds\Component\Tenant\Model\Type\Tenantable 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...
16
use Knp\DoctrineBehaviors\Model as Behavior;
0 ignored issues
show
Bug introduced by
The type Knp\DoctrineBehaviors\Model 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...
17
18
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...
19
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...
20
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...
21
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...
22
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...
23
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...
24
25
/**
26
 * Class Staff
27
 *
28
 * @ApiResource(
29
 *     shortName="staffs",
30
 *     attributes={
31
 *         "normalization_context"={
32
 *             "groups"={"staff_output"}
33
 *         },
34
 *         "denormalization_context"={
35
 *             "groups"={"staff_input"}
36
 *         },
37
 *         "filters"={
38
 *             "app.staff.search",
39
 *             "app.staff.date",
40
 *             "app.staff.order"
41
 *         }
42
 *     }
43
 * )
44
 * @ORM\Entity(repositoryClass="App\Repository\StaffRepository")
45
 * @ORM\Table(name="app_staff")
46
 * @ORM\Cache(usage="NONSTRICT_READ_WRITE")
47
 * @ORMAssert\UniqueEntity(fields="uuid")
48
 */
49
class Staff implements Identifiable, Uuidentifiable, Ownable, Identitiable, Deletable, Versionable, Tenantable
50
{
51
    use Behavior\Timestampable\Timestampable;
0 ignored issues
show
Bug introduced by
The type Knp\DoctrineBehaviors\Mo...stampable\Timestampable 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...
52
    use Behavior\SoftDeletable\SoftDeletable;
0 ignored issues
show
Bug introduced by
The type Knp\DoctrineBehaviors\Mo...Deletable\SoftDeletable 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
    use Accessor\Id;
0 ignored issues
show
Bug introduced by
The type Ds\Component\Model\Attribute\Accessor\Id 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...
55
    use Accessor\Uuid;
0 ignored issues
show
Bug introduced by
The type Ds\Component\Model\Attribute\Accessor\Uuid 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
    use Accessor\Owner;
0 ignored issues
show
Bug introduced by
The type Ds\Component\Model\Attribute\Accessor\Owner 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...
57
    use Accessor\OwnerUuid;
0 ignored issues
show
Bug introduced by
The type Ds\Component\Model\Attribute\Accessor\OwnerUuid 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...
58
    use EntityAccessor\Identity\Identity;
59
    use EntityAccessor\Identity\IdentityUuid;
60
    use EntityAccessor\Personas;
61
    use EntityAccessor\Roles;
62
    use EntityAccessor\BusinessUnits;
63
    use Accessor\Deleted;
0 ignored issues
show
Bug introduced by
The type Ds\Component\Model\Attribute\Accessor\Deleted 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...
64
    use Accessor\Version;
0 ignored issues
show
Bug introduced by
The type Ds\Component\Model\Attribute\Accessor\Version 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...
65
    use TenantAccessor\Tenant;
0 ignored issues
show
Bug introduced by
The type Ds\Component\Tenant\Mode...tribute\Accessor\Tenant 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...
66
67
    /**
68
     * @var integer
69
     * @ApiProperty(identifier=false, writable=false)
70
     * @Serializer\Groups({"staff_output"})
71
     * @ORM\Id
72
     * @ORM\GeneratedValue(strategy="AUTO")
73
     * @ORM\Column(name="id", type="integer")
74
     */
75
    private $id;
0 ignored issues
show
introduced by
The private property $id is not used, and could be removed.
Loading history...
76
77
    /**
78
     * @var string
79
     * @ApiProperty(identifier=true, writable=false)
80
     * @Serializer\Groups({"staff_output"})
81
     * @ORM\Column(name="uuid", type="guid", unique=true)
82
     * @Assert\Uuid
83
     */
84
    private $uuid;
0 ignored issues
show
introduced by
The private property $uuid is not used, and could be removed.
Loading history...
85
86
    /**
87
     * @var \DateTime
88
     * @ApiProperty(writable=false)
89
     * @Serializer\Groups({"staff_output"})
90
     */
91
    protected $createdAt;
92
93
    /**
94
     * @var \DateTime
95
     * @ApiProperty(writable=false)
96
     * @Serializer\Groups({"staff_output"})
97
     */
98
    protected $updatedAt;
99
100
    /**
101
     * @var \DateTime
102
     * @ApiProperty(writable=false)
103
     * @Serializer\Groups({"staff_output"})
104
     */
105
    protected $deletedAt;
106
107
    /**
108
     * @var string
109
     * @ApiProperty
110
     * @Serializer\Groups({"staff_output", "staff_input"})
111
     * @ORM\Column(name="`owner`", type="string", length=255, nullable=true)
112
     * @Assert\NotBlank
113
     * @Assert\Length(min=1, max=255)
114
     */
115
    private $owner;
0 ignored issues
show
introduced by
The private property $owner is not used, and could be removed.
Loading history...
116
117
    /**
118
     * @var string
119
     * @ApiProperty
120
     * @Serializer\Groups({"staff_output", "staff_input"})
121
     * @ORM\Column(name="owner_uuid", type="guid", nullable=true)
122
     * @Assert\NotBlank
123
     * @Assert\Uuid
124
     */
125
    private $ownerUuid;
0 ignored issues
show
introduced by
The private property $ownerUuid is not used, and could be removed.
Loading history...
126
127
    /**
128
     * @var \Doctrine\Common\Collections\ArrayCollection
129
     * @ApiProperty(writable=false)
130
     * @Serializer\Groups({"staff_output"})
131
     * @ORM\OneToMany(targetEntity="StaffPersona", mappedBy="staff", cascade={"persist", "remove"})
132
     * @ORM\Cache(usage="NONSTRICT_READ_WRITE")
133
     */
134
    private $personas;
135
136
    /**
137
     * @var \Doctrine\Common\Collections\ArrayCollection
138
     * @ApiProperty(writable=false)
139
     * @Serializer\Groups({"staff_output"})
140
     * @ORM\OneToMany(targetEntity="StaffRole", mappedBy="staff", cascade={"persist", "remove"})
141
     * @ORM\Cache(usage="NONSTRICT_READ_WRITE")
142
     */
143
    private $roles;
144
145
    /**
146
     * @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...
147
     * @ApiProperty
148
     * @Serializer\Groups({"staff_output", "staff_input"})
149
     * @ORM\ManyToMany(targetEntity="BusinessUnit", inversedBy="staffs")
150
     * @ORM\JoinTable(
151
     *     name="app_staff_bu",
152
     *     joinColumns={
153
     *         @ORM\JoinColumn(name="staff_id", referencedColumnName="id")
154
     *     },
155
     *     inverseJoinColumns={
156
     *         @ORM\JoinColumn(name="bu_id", referencedColumnName="id")
157
     *     }
158
     * )
159
     * @ORM\Cache(usage="NONSTRICT_READ_WRITE")
160
     */
161
    private $businessUnits;
162
163
    /**
164
     * @var integer
165
     * @ApiProperty
166
     * @Serializer\Groups({"staff_output", "staff_input"})
167
     * @ORM\Column(name="version", type="integer")
168
     * @ORM\Version
169
     * @Assert\NotBlank
170
     * @Assert\Type("integer")
171
     */
172
    private $version;
0 ignored issues
show
introduced by
The private property $version is not used, and could be removed.
Loading history...
173
174
    /**
175
     * @var string
176
     * @ApiProperty(writable=false)
177
     * @Serializer\Groups({"staff_output"})
178
     * @ORM\Column(name="tenant", type="guid")
179
     * @Assert\Uuid
180
     */
181
    private $tenant;
0 ignored issues
show
introduced by
The private property $tenant is not used, and could be removed.
Loading history...
182
183
    /**
184
     * Constructor
185
     */
186
    public function __construct()
187
    {
188
        $this->personas = new ArrayCollection;
189
        $this->roles = new ArrayCollection;
190
        $this->businessUnits = new ArrayCollection;
191
    }
192
}
193