Passed
Push — master ( fe8b36...51fbd7 )
by Luiz Kim
02:17
created

People::isPerson()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 3
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace ControleOnline\Entity;
4
5
use ApiPlatform\Metadata\Post;
0 ignored issues
show
Bug introduced by
The type ApiPlatform\Metadata\Post 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\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...
7
use ApiPlatform\Metadata\Delete;
0 ignored issues
show
Bug introduced by
The type ApiPlatform\Metadata\Delete 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\Put;
0 ignored issues
show
Bug introduced by
The type ApiPlatform\Metadata\Put 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\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...
10
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...
11
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...
12
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...
13
use App\Controller\AdminCustomerSalesmanAction;
0 ignored issues
show
Bug introduced by
The type App\Controller\AdminCustomerSalesmanAction 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 App\Controller\AdminPersonAddressesAction;
0 ignored issues
show
Bug introduced by
The type App\Controller\AdminPersonAddressesAction 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 App\Controller\AdminPersonBillingAction;
0 ignored issues
show
Bug introduced by
The type App\Controller\AdminPersonBillingAction 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 App\Controller\AdminPersonCompaniesAction;
0 ignored issues
show
Bug introduced by
The type App\Controller\AdminPersonCompaniesAction 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
use App\Controller\AdminPersonDocumentsAction;
0 ignored issues
show
Bug introduced by
The type App\Controller\AdminPersonDocumentsAction 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...
18
use App\Controller\AdminPersonEmailsAction;
0 ignored issues
show
Bug introduced by
The type App\Controller\AdminPersonEmailsAction 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 App\Controller\AdminPersonLinksAction;
0 ignored issues
show
Bug introduced by
The type App\Controller\AdminPersonLinksAction 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 App\Controller\AdminPersonFilesAction;
0 ignored issues
show
Bug introduced by
The type App\Controller\AdminPersonFilesAction 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 App\Controller\AdminPersonPhonesAction;
0 ignored issues
show
Bug introduced by
The type App\Controller\AdminPersonPhonesAction 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 App\Controller\AdminPersonSummaryAction;
0 ignored issues
show
Bug introduced by
The type App\Controller\AdminPersonSummaryAction 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 App\Controller\AdminPersonUsersAction;
0 ignored issues
show
Bug introduced by
The type App\Controller\AdminPersonUsersAction 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
use App\Controller\ChangeStatusAction;
0 ignored issues
show
Bug introduced by
The type App\Controller\ChangeStatusAction 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...
25
use App\Controller\CreateClientAction;
0 ignored issues
show
Bug introduced by
The type App\Controller\CreateClientAction 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...
26
use App\Controller\CreateContactAction;
0 ignored issues
show
Bug introduced by
The type App\Controller\CreateContactAction 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...
27
use App\Controller\CreatePeopleCustomerAction;
0 ignored issues
show
Bug introduced by
The type App\Controller\CreatePeopleCustomerAction 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...
28
use App\Controller\CreateProfessionalAction;
0 ignored issues
show
Bug introduced by
The type App\Controller\CreateProfessionalAction 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...
29
use App\Controller\DownloadPersonFileAction;
0 ignored issues
show
Bug introduced by
The type App\Controller\DownloadPersonFileAction 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...
30
use App\Controller\GetClientCollectionAction;
0 ignored issues
show
Bug introduced by
The type App\Controller\GetClientCollectionAction 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...
31
use App\Controller\GetClientLinkAction;
0 ignored issues
show
Bug introduced by
The type App\Controller\GetClientLinkAction 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...
32
use App\Controller\GetCloseProfessionalsAction;
0 ignored issues
show
Bug introduced by
The type App\Controller\GetCloseProfessionalsAction 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...
33
use App\Controller\GetCustomerCollectionAction;
0 ignored issues
show
Bug introduced by
The type App\Controller\GetCustomerCollectionAction 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...
34
use App\Controller\GetDefaultLinkAction;
0 ignored issues
show
Bug introduced by
The type App\Controller\GetDefaultLinkAction 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...
35
use App\Controller\GetMyCompaniesAction;
0 ignored issues
show
Bug introduced by
The type App\Controller\GetMyCompaniesAction 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...
36
use App\Controller\GetMySaleCompaniesAction;
0 ignored issues
show
Bug introduced by
The type App\Controller\GetMySaleCompaniesAction 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...
37
use App\Controller\GetPeopleMeAction;
0 ignored issues
show
Bug introduced by
The type App\Controller\GetPeopleMeAction 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
use App\Controller\GetProfessionalCollectionAction;
0 ignored issues
show
Bug introduced by
The type App\Controller\GetProfessionalCollectionAction 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...
39
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...
40
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...
41
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...
42
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...
43
use App\Controller\SearchClassesPeopleAction;
0 ignored issues
show
Bug introduced by
The type App\Controller\SearchClassesPeopleAction 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...
44
use App\Controller\SearchContactAction;
0 ignored issues
show
Bug introduced by
The type App\Controller\SearchContactAction 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...
45
use App\Controller\SearchContactLinkAction;
0 ignored issues
show
Bug introduced by
The type App\Controller\SearchContactLinkAction 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...
46
use App\Controller\SearchCustomerSalesmanAction;
0 ignored issues
show
Bug introduced by
The type App\Controller\SearchCustomerSalesmanAction 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...
47
use App\Controller\SearchLessonsPeopleAction;
0 ignored issues
show
Bug introduced by
The type App\Controller\SearchLessonsPeopleAction 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...
48
use App\Controller\SearchPeopleAction;
0 ignored issues
show
Bug introduced by
The type App\Controller\SearchPeopleAction 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...
49
use App\Controller\SearchTasksPeopleAction;
0 ignored issues
show
Bug introduced by
The type App\Controller\SearchTasksPeopleAction 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...
50
use App\Controller\UpdateClientAction;
0 ignored issues
show
Bug introduced by
The type App\Controller\UpdateClientAction 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...
51
use App\Controller\UpdatePeopleProfileAction;
0 ignored issues
show
Bug introduced by
The type App\Controller\UpdatePeopleProfileAction 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 App\Controller\UploadPersonFilesAction;
0 ignored issues
show
Bug introduced by
The type App\Controller\UploadPersonFilesAction 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
use App\Controller\VerifyPeopleStatusAction;
0 ignored issues
show
Bug introduced by
The type App\Controller\VerifyPeopleStatusAction 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...
54
use ControleOnline\Controller\CreateUserAction;
55
use stdClass;
56
57
/**
58
 * @ORM\EntityListeners ({App\Listener\LogListener::class})
59
 * @ORM\Entity (repositoryClass="ControleOnline\Repository\PeopleRepository")
60
 * @ORM\Table (name="people")
61
 */
62
#[ApiResource(
63
    operations: [
64
65
        new Get(security: 'is_granted(\'ROLE_CLIENT\')'),
66
67
        new Get(
68
            security: 'is_granted(\'ROLE_CLIENT\')',
69
            uriTemplate: '/people/{id}/contact',
70
            controller: SearchContactAction::class
71
        ),
72
        new Post(
73
            uriTemplate: '/people/{id}/add-user',
74
            controller: CreateUserAction::class,
75
            securityPostDenormalize: 'is_granted(\'ROLE_CLIENT\')',
76
        ),
77
        new Put(
78
            security: 'is_granted(\'edit\', object)',
79
            uriTemplate: '/people/{id}/profile/{component}',
80
            requirements: ['component' => '^(phone|address|email|user|document|link)+$'],
81
            controller: UpdatePeopleProfileAction::class
82
        ),
83
84
        new Get(
85
            security: 'is_granted(\'ROLE_CLIENT\')',
86
            uriTemplate: '/people/{id}/status',
87
            controller: VerifyPeopleStatusAction::class
88
        ),
89
90
        new Get(
91
            security: 'is_granted(\'ROLE_CLIENT\')',
92
            uriTemplate: '/people/{id}/classes',
93
            controller: SearchClassesPeopleAction::class
94
        ),
95
96
        new Get(
97
            security: 'is_granted(\'ROLE_CLIENT\')',
98
            uriTemplate: '/people/{id}/lessons',
99
            controller: SearchLessonsPeopleAction::class
100
        ),
101
        new Put(
102
            uriTemplate: '/customers/{id}/change-status',
103
            controller: ChangeStatusAction::class,
104
            requirements: ['id' => '^\\d+$'],
105
            security: 'is_granted(\'edit\', object)'
106
        ),
107
        new Get(
108
            uriTemplate: '/customers/{id}',
109
            requirements: ['id' => '^\\d+$'],
110
            security: 'is_granted(\'read\', object)'
111
        ),
112
        new Get(
113
            uriTemplate: '/customers/{id}/links',
114
            requirements: ['id' => '^\\d+$'],
115
            security: 'is_granted(\'read\', object)',
116
            controller: AdminPersonLinksAction::class
117
        ),
118
        new Put(
119
            uriTemplate: '/customers/{id}/links',
120
            requirements: ['id' => '^\\d+$'],
121
            security: 'is_granted(\'edit\', object)',
122
            controller: AdminPersonLinksAction::class
123
        ),
124
        new Delete(
125
            uriTemplate: '/customers/{id}/links',
126
            requirements: ['id' => '^\\d+$'],
127
            security: 'is_granted(\'delete\', object)',
128
            controller: AdminPersonLinksAction::class
129
        ),
130
        new Get(
131
            uriTemplate: '/customers/{id}/addresses',
132
            requirements: ['id' => '^\\d+$'],
133
            security: 'is_granted(\'read\', object)',
134
            controller: AdminPersonAddressesAction::class
135
        ),
136
        new Put(
137
            uriTemplate: '/customers/{id}/addresses',
138
            requirements: ['id' => '^\\d+$'],
139
            security: 'is_granted(\'edit\', object)',
140
            controller: AdminPersonAddressesAction::class
141
        ),
142
        new Delete(
143
            uriTemplate: '/customers/{id}/addresses',
144
            requirements: ['id' => '^\\d+$'],
145
            security: 'is_granted(\'delete\', object)',
146
            controller: AdminPersonAddressesAction::class
147
        ),
148
        new Get(
149
            uriTemplate: '/customers/{id}/documents',
150
            requirements: ['id' => '^\\d+$'],
151
            security: 'is_granted(\'read\', object)',
152
            controller: AdminPersonDocumentsAction::class
153
        ),
154
        new Put(
155
            uriTemplate: '/customers/{id}/documents',
156
            requirements: ['id' => '^\\d+$'],
157
            security: 'is_granted(\'edit\', object)',
158
            controller: AdminPersonDocumentsAction::class
159
        ),
160
        new Delete(
161
            uriTemplate: '/customers/{id}/documents',
162
            requirements: ['id' => '^\\d+$'],
163
            security: 'is_granted(\'delete\', object)',
164
            controller: AdminPersonDocumentsAction::class
165
        ),
166
        new Get(
167
            uriTemplate: '/customers/{id}/billing',
168
            requirements: ['id' => '^\\d+$'],
169
            security: 'is_granted(\'read\', object)',
170
            controller: AdminPersonBillingAction::class
171
        ),
172
        new Put(
173
            uriTemplate: '/customers/{id}/billing',
174
            requirements: ['id' => '^\\d+$'],
175
            security: 'is_granted(\'edit\', object)',
176
            controller: AdminPersonBillingAction::class
177
        ),
178
        new Get(
179
            uriTemplate: '/customers/{id}/phones',
180
            requirements: ['id' => '^\\d+$'],
181
            security: 'is_granted(\'read\', object)',
182
            controller: AdminPersonPhonesAction::class
183
        ),
184
        new Put(
185
            uriTemplate: '/customers/{id}/phones',
186
            requirements: ['id' => '^\\d+$'],
187
            security: 'is_granted(\'edit\', object)',
188
            controller: AdminPersonPhonesAction::class
189
        ),
190
        new Delete(
191
            uriTemplate: '/customers/{id}/phones',
192
            requirements: ['id' => '^\\d+$'],
193
            security: 'is_granted(\'delete\', object)',
194
            controller: AdminPersonPhonesAction::class
195
        ),
196
        new Get(
197
            uriTemplate: '/customers/{id}/emails',
198
            requirements: ['id' => '^\\d+$'],
199
            security: 'is_granted(\'read\', object)',
200
            controller: AdminPersonEmailsAction::class
201
        ),
202
        new Put(
203
            uriTemplate: '/customers/{id}/emails',
204
            requirements: ['id' => '^\\d+$'],
205
            security: 'is_granted(\'edit\', object)',
206
            controller: AdminPersonEmailsAction::class
207
        ),
208
        new Delete(
209
            uriTemplate: '/customers/{id}/emails',
210
            requirements: ['id' => '^\\d+$'],
211
            security: 'is_granted(\'delete\', object)',
212
            controller: AdminPersonEmailsAction::class
213
        ),
214
        new Get(
215
            uriTemplate: '/customers/{id}/users',
216
            requirements: ['id' => '^\\d+$'],
217
            security: 'is_granted(\'read\', object)',
218
            controller: AdminPersonUsersAction::class
219
        ),
220
        new Put(
221
            uriTemplate: '/customers/{id}/users',
222
            requirements: ['id' => '^\\d+$'],
223
            security: 'is_granted(\'edit\', object)',
224
            controller: AdminPersonUsersAction::class
225
        ),
226
        new Delete(
227
            uriTemplate: '/customers/{id}/users',
228
            requirements: ['id' => '^\\d+$'],
229
            security: 'is_granted(\'delete\', object)',
230
            controller: AdminPersonUsersAction::class
231
        ),
232
        new Get(
233
            uriTemplate: '/customers/{id}/salesman',
234
            requirements: ['id' => '^\\d+$'],
235
            security: 'is_granted(\'read\', object)',
236
            controller: AdminCustomerSalesmanAction::class
237
        ),
238
        new Put(
239
            uriTemplate: '/customers/{id}/salesman',
240
            requirements: ['id' => '^\\d+$'],
241
            security: 'is_granted(\'edit\', object)',
242
            controller: AdminCustomerSalesmanAction::class
243
        ),
244
        new Delete(
245
            uriTemplate: '/customers/{id}/salesman',
246
            requirements: ['id' => '^\\d+$'],
247
            security: 'is_granted(\'delete\', object)',
248
            controller: AdminCustomerSalesmanAction::class
249
        ),
250
        new Get(
251
            uriTemplate: '/customers/{id}/summary',
252
            requirements: ['id' => '^\\d+$'],
253
            security: 'is_granted(\'read\', object)',
254
            controller: AdminPersonSummaryAction::class
255
        ),
256
        new Put(
257
            uriTemplate: '/customers/{id}/summary',
258
            requirements: ['id' => '^\\d+$'],
259
            security: 'is_granted(\'edit\', object)',
260
            controller: AdminPersonSummaryAction::class
261
        ),
262
        new Get(
263
            uriTemplate: '/customers/{id}/files',
264
            requirements: ['id' => '^\\d+$'],
265
            security: 'is_granted(\'read\', object)',
266
            controller: AdminPersonFilesAction::class
267
        ),
268
        new Get(
269
            uriTemplate: '/customers/{id}/files/{fileId}',
270
            requirements: ['id' => '^\\d+$', 'fileId' => '^\\d+$'],
271
            security: 'is_granted(\'read\', object)',
272
            controller: DownloadPersonFileAction::class
273
        ),
274
        new Delete(
275
            uriTemplate: '/customers/{id}/files',
276
            requirements: ['id' => '^\\d+$'],
277
            security: 'is_granted(\'delete\', object)',
278
            controller: AdminPersonFilesAction::class
279
        ),
280
        new Get(
281
            uriTemplate: '/customers/{id}/companies',
282
            requirements: ['id' => '^\\d+$'],
283
            security: 'is_granted(\'read\', object)',
284
            controller: AdminPersonCompaniesAction::class
285
        ),
286
        new Put(
287
            uriTemplate: '/customers/{id}/companies',
288
            requirements: ['id' => '^\\d+$'],
289
            security: 'is_granted(\'edit\', object)',
290
            controller: AdminPersonCompaniesAction::class
291
        ),
292
        new Delete(
293
            uriTemplate: '/customers/{id}/companies',
294
            requirements: ['id' => '^\\d+$'],
295
            security: 'is_granted(\'delete\', object)',
296
            controller: AdminPersonCompaniesAction::class
297
        ),
298
        new Get(
299
            uriTemplate: '/professionals/{id}',
300
            requirements: ['id' => '^\\d+$'],
301
            security: 'is_granted(\'read\', object)'
302
        ),
303
        new Get(
304
            uriTemplate: '/professionals/{id}/summary',
305
            requirements: ['id' => '^\\d+$'],
306
            security: 'is_granted(\'read\', object)',
307
            controller: AdminPersonSummaryAction::class
308
        ),
309
        new Put(
310
            uriTemplate: '/professionals/{id}/summary',
311
            requirements: ['id' => '^\\d+$'],
312
            security: 'is_granted(\'edit\', object)',
313
            controller: AdminPersonSummaryAction::class
314
        ),
315
        new Get(
316
            uriTemplate: '/professionals/{id}/links',
317
            requirements: ['id' => '^\\d+$'],
318
            security: 'is_granted(\'read\', object)',
319
            controller: AdminPersonLinksAction::class
320
        ),
321
        new Put(
322
            uriTemplate: '/professionals/{id}/links',
323
            requirements: ['id' => '^\\d+$'],
324
            security: 'is_granted(\'edit\', object)',
325
            controller: AdminPersonLinksAction::class
326
        ),
327
        new Delete(
328
            uriTemplate: '/professionals/{id}/links',
329
            requirements: ['id' => '^\\d+$'],
330
            security: 'is_granted(\'delete\', object)',
331
            controller: AdminPersonLinksAction::class
332
        ),
333
        new Get(
334
            uriTemplate: '/professionals/{id}/addresses',
335
            requirements: ['id' => '^\\d+$'],
336
            security: 'is_granted(\'read\', object)',
337
            controller: AdminPersonAddressesAction::class
338
        ),
339
        new Put(
340
            uriTemplate: '/professionals/{id}/addresses',
341
            requirements: ['id' => '^\\d+$'],
342
            security: 'is_granted(\'edit\', object)',
343
            controller: AdminPersonAddressesAction::class
344
        ),
345
        new Delete(
346
            uriTemplate: '/professionals/{id}/addresses',
347
            requirements: ['id' => '^\\d+$'],
348
            security: 'is_granted(\'delete\', object)',
349
            controller: AdminPersonAddressesAction::class
350
        ),
351
        new Get(
352
            uriTemplate: '/professionals/{id}/documents',
353
            requirements: ['id' => '^\\d+$'],
354
            security: 'is_granted(\'read\', object)',
355
            controller: AdminPersonDocumentsAction::class
356
        ),
357
        new Put(
358
            uriTemplate: '/professionals/{id}/documents',
359
            requirements: ['id' => '^\\d+$'],
360
            security: 'is_granted(\'edit\', object)',
361
            controller: AdminPersonDocumentsAction::class
362
        ),
363
        new Delete(
364
            uriTemplate: '/professionals/{id}/documents',
365
            requirements: ['id' => '^\\d+$'],
366
            security: 'is_granted(\'delete\', object)',
367
            controller: AdminPersonDocumentsAction::class
368
        ),
369
        new Get(
370
            uriTemplate: '/professionals/{id}/emails',
371
            requirements: ['id' => '^\\d+$'],
372
            security: 'is_granted(\'read\', object)',
373
            controller: AdminPersonEmailsAction::class
374
        ),
375
        new Put(
376
            uriTemplate: '/professionals/{id}/emails',
377
            requirements: ['id' => '^\\d+$'],
378
            security: 'is_granted(\'edit\', object)',
379
            controller: AdminPersonEmailsAction::class
380
        ),
381
        new Delete(
382
            uriTemplate: '/professionals/{id}/emails',
383
            requirements: ['id' => '^\\d+$'],
384
            security: 'is_granted(\'delete\', object)',
385
            controller: AdminPersonEmailsAction::class
386
        ),
387
        new Get(
388
            uriTemplate: '/professionals/{id}/phones',
389
            requirements: ['id' => '^\\d+$'],
390
            security: 'is_granted(\'read\', object)',
391
            controller: AdminPersonPhonesAction::class
392
        ),
393
        new Put(
394
            uriTemplate: '/professionals/{id}/phones',
395
            requirements: ['id' => '^\\d+$'],
396
            security: 'is_granted(\'edit\', object)',
397
            controller: AdminPersonPhonesAction::class
398
        ),
399
        new Delete(
400
            uriTemplate: '/professionals/{id}/phones',
401
            requirements: ['id' => '^\\d+$'],
402
            security: 'is_granted(\'delete\', object)',
403
            controller: AdminPersonPhonesAction::class
404
        ),
405
        new Get(
406
            uriTemplate: '/professionals/{id}/billing',
407
            requirements: ['id' => '^\\d+$'],
408
            security: 'is_granted(\'read\', object)',
409
            controller: AdminPersonBillingAction::class
410
        ),
411
        new Put(
412
            uriTemplate: '/professionals/{id}/billing',
413
            requirements: ['id' => '^\\d+$'],
414
            security: 'is_granted(\'edit\', object)',
415
            controller: AdminPersonBillingAction::class
416
        ),
417
418
        new Get(
419
            uriTemplate: '/professionals/{id}/files',
420
            requirements: ['id' => '^\\d+$'],
421
            security: 'is_granted(\'read\', object)',
422
            controller: AdminPersonFilesAction::class
423
        ),
424
425
        new Get(
426
            uriTemplate: '/professionals/{id}/files/{fileId}',
427
            requirements: ['id' => '^\\d+$', 'fileId' => '^\\d+$'],
428
            security: 'is_granted(\'read\', object)',
429
            controller: DownloadPersonFileAction::class
430
        ),
431
432
        new Delete(
433
            uriTemplate: '/professionals/{id}/files',
434
            requirements: ['id' => '^\\d+$'],
435
            security: 'is_granted(\'delete\', object)',
436
            controller: AdminPersonFilesAction::class
437
        ),
438
439
        new Get(
440
            uriTemplate: '/professionals/{id}/users',
441
            requirements: ['id' => '^\\d+$'],
442
            security: 'is_granted(\'read\', object)',
443
            controller: AdminPersonUsersAction::class
444
        ),
445
446
        new Put(
447
            uriTemplate: '/professionals/{id}/users',
448
            requirements: ['id' => '^\\d+$'],
449
            security: 'is_granted(\'edit\', object)',
450
            controller: AdminPersonUsersAction::class
451
        ),
452
453
        new Delete(
454
            uriTemplate: '/professionals/{id}/users',
455
            requirements: ['id' => '^\\d+$'],
456
            security: 'is_granted(\'delete\', object)',
457
            controller: AdminPersonUsersAction::class
458
        ),
459
460
        new Get(
461
            uriTemplate: '/professionals/{id}/companies',
462
            requirements: ['id' => '^\\d+$'],
463
            security: 'is_granted(\'read\', object)',
464
            controller: AdminPersonCompaniesAction::class
465
        ),
466
467
        new Put(
468
            uriTemplate: '/professionals/{id}/companies',
469
            requirements: ['id' => '^\\d+$'],
470
            security: 'is_granted(\'edit\', object)',
471
            controller: AdminPersonCompaniesAction::class
472
        ),
473
474
        new Delete(
475
            uriTemplate: '/professionals/{id}/companies',
476
            requirements: ['id' => '^\\d+$'],
477
            security: 'is_granted(\'delete\', object)',
478
            controller: AdminPersonCompaniesAction::class
479
        ),
480
481
        new GetCollection(
482
            securityPostDenormalize: 'is_granted(\'ROLE_CLIENT\')',
483
            uriTemplate: '/people'
484
        ),
485
486
        new GetCollection(
487
            security: 'is_granted(\'IS_AUTHENTICATED_ANONYMOUSLY\')',
488
            uriTemplate: '/people/link/default',
489
            controller: GetDefaultLinkAction::class
490
        ),
491
492
        new Post(
493
            security: 'is_granted(\'ROLE_CLIENT\')',
494
            uriTemplate: '/people/customer',
495
            controller: CreatePeopleCustomerAction::class
496
        ),
497
498
        new GetCollection(
499
            security: 'is_granted(\'ROLE_CLIENT\')',
500
            uriTemplate: '/customers',
501
            controller: GetCustomerCollectionAction::class
502
        ),
503
504
        new GetCollection(
505
            security: 'is_granted(\'ROLE_CLIENT\')',
506
            uriTemplate: '/customers/search-salesman',
507
            controller: SearchCustomerSalesmanAction::class
508
        ),
509
        new Post(
510
            uriTemplate: '/customers/files',
511
            security: 'is_granted(\'ROLE_CLIENT\')',
512
            controller: UploadPersonFilesAction::class,
513
            deserialize: false
514
        ),
515
        new Post(
516
            uriTemplate: '/people/contact',
517
            controller: CreateContactAction::class
518
        ),
519
        new GetCollection(
520
            uriTemplate: '/people/companies/my',
521
            controller: GetMyCompaniesAction::class
522
        ),
523
        new GetCollection(
524
            uriTemplate: '/people/my-sale-companies',
525
            controller: GetMySaleCompaniesAction::class
526
        ),
527
        new GetCollection(
528
            security: 'is_granted(\'ROLE_CLIENT\')',
529
            uriTemplate: '/people-search',
530
            controller: SearchPeopleAction::class
531
        ),
532
        new GetCollection(
533
            security: 'is_granted(\'ROLE_CLIENT\')',
534
            uriTemplate: '/people/contact',
535
            controller: SearchContactLinkAction::class
536
        ),
537
        new GetCollection(
538
            security: 'is_granted(\'ROLE_CLIENT\')',
539
            uriTemplate: '/people/client-link',
540
            controller: GetClientLinkAction::class
541
        ),
542
        new GetCollection(
543
            security: 'is_granted(\'ROLE_CLIENT\')',
544
            uriTemplate: '/people/me',
545
            controller: GetPeopleMeAction::class
546
        ),
547
        new GetCollection(
548
            security: 'is_granted(\'ROLE_CLIENT\')',
549
            uriTemplate: '/tasks/people',
550
            controller: ControleOnline\Entity\SearchTasksPeopleAction::class
551
        ),
552
        new GetCollection(
553
            uriTemplate: '/people/professionals/close/{lat}/{lng}',
554
            openapiContext: [],
555
            controller: GetCloseProfessionalsAction::class
556
        ),
557
        new Post(
558
            uriTemplate: '/professionals',
559
            controller: CreateProfessionalAction::class,
560
            securityPostDenormalize: 'is_granted(\'create\', object)'
561
        ),
562
        new GetCollection(
563
            security: 'is_granted(\'ROLE_CLIENT\')',
564
            uriTemplate: '/professionals',
565
            controller: GetProfessionalCollectionAction::class
566
        ),
567
        new Get(
568
            uriTemplate: '/companies/{id}',
569
            requirements: ['id' => '^\\d+$'],
570
            security: 'is_granted(\'read\', object)'
571
        ),
572
        new Get(
573
            uriTemplate: '/companies/{id}/salesman',
574
            requirements: ['id' => '^\\d+$'],
575
            security: 'is_granted(\'read\', object)',
576
            controller: \App\Controller\AdminLinkSalesmanAction::class
577
        ),
578
        new Put(
579
            uriTemplate: '/companies/{id}/salesman',
580
            requirements: ['id' => '^\\d+$'],
581
            security: 'is_granted(\'edit\', object)',
582
            controller: \App\Controller\AdminLinkSalesmanAction::class
583
        ),
584
        new Delete(
585
            uriTemplate: '/companies/{id}/salesman',
586
            requirements: ['id' => '^\\d+$'],
587
            security: 'is_granted(\'delete\', object)',
588
            controller: \App\Controller\AdminLinkSalesmanAction::class
589
        ),
590
        new Get(
591
            uriTemplate: '/clients/{id}',
592
            requirements: ['id' => '^\\d+$'],
593
            security: 'is_granted(\'ROLE_CLIENT\')'
594
        ),
595
        new Put(
596
            uriTemplate: '/clients/{id}',
597
            requirements: ['id' => '^\\d+$'],
598
            security: 'is_granted(\'ROLE_CLIENT\')',
599
            controller: UpdateClientAction::class
600
        ), new GetCollection(
601
            security: 'is_granted(\'ROLE_CLIENT\')',
602
            uriTemplate: '/clients',
603
            controller: GetClientCollectionAction::class
604
        ),
605
        new Post(
606
            uriTemplate: '/clients',
607
            controller: CreateClientAction::class
608
        )
609
    ],
610
    formats: ['jsonld', 'json', 'html', 'jsonhal', 'csv' => ['text/csv']],
611
    security: 'is_granted(\'ROLE_CLIENT\')',
612
    normalizationContext: ['groups' => ['people_read']],
613
    denormalizationContext: ['groups' => ['people_write']]
614
)]
615
class People
616
{
617
    /**
618
     * @ORM\Column(type="integer", nullable=false)
619
     * @ORM\Id
620
     * @ORM\GeneratedValue(strategy="IDENTITY")
621
     * @Groups({"category_read","pruduct_read","display_read",  
622
     *      "task_read", "task_interaction_read","coupon_read","logistic_read","notifications_read","people_provider_read"})
623
     */
624
    private $id;
625
    /**
626
     * @ORM\Column(type="boolean",  nullable=false)
627
     */
628
    private $enable = 0;
629
    /**
630
     * @ORM\Column(type="boolean",  nullable=false)
631
     */
632
    private $icms = 1;
633
    /**
634
     * @ORM\Column(type="string", length=50, nullable=false)
635
     * @Groups({
636
     *     "category_read","order_read", "document_read", "email_read", "people_read",
637
     *     "invoice_read",  "order_detail_status_read", "mycontract_read",
638
     *     "my_contract_item_read", "mycontractpeople_read", 
639
     *      
640
     *       
641
     *      "task_read", "task_interaction_read","coupon_read", "logistic_read",
642
     *     "queue_read","display_read","notifications_read","people_provider_read"
643
     * })
644
     */
645
    private $name;
646
    /**
647
     * @ORM\Column(type="datetime", nullable=false, columnDefinition="DATETIME")
648
     */
649
    private $registerDate;
650
    /**
651
     * @ORM\Column(type="string", length=50, nullable=false)
652
     * @Groups({
653
     *     "category_read","order_read", "document_read", "email_read", "people_read", "invoice_read",
654
     *      "order_detail_status_read", "mycontract_read",
655
     *     "my_contract_item_read", "mycontractpeople_read", 
656
     *       
657
     *      "task_read", "task_interaction_read","coupon_read","logistic_read",
658
     *     "pruduct_read","queue_read","display_read","notifications_read","people_provider_read"
659
     * })
660
     */
661
    private $alias;
662
    /**
663
     * @var string
664
     *
665
     * @ORM\Column(name="other_informations", type="json",  nullable=true)
666
     * @Groups({
667
     *     "order_read", "document_read", "email_read", "people_read", "invoice_read",
668
     *      "order_detail_status_read", "mycontract_read",
669
     *     "my_contract_item_read", "mycontractpeople_read", 
670
     *       
671
     *      "task_read", "task_interaction_read","coupon_read"
672
     * }) 
673
     */
674
    private $otherInformations;
675
    /**
676
     * @ORM\Column(type="string", length=1, nullable=false)
677
     * @Groups({"pruduct_read","display_read","people_read", "my_contract_item_read", "mycontractpeople_read", "task_read", "task_interaction_read"})
678
     */
679
    private $peopleType = 'F';
680
    /**
681
     * @ORM\Column(type="float", nullable=false)
682
     * @Groups({"people_read"})
683
     */
684
    private $billing = 0;
685
    /**
686
     * @ORM\ManyToOne(targetEntity="ControleOnline\Entity\File", inversedBy="people")
687
     * @ORM\JoinColumns({
688
     *   @ORM\JoinColumn(name="image_id", referencedColumnName="id")
689
     * })
690
     * @Groups({"people_read","display_read"})
691
     */
692
    private $file;
693
    /**
694
     * @var Collection
695
     *
696
     * @ORM\OneToMany(targetEntity="ControleOnline\Entity\Config", mappedBy="people")
697
     * @ORM\OrderBy({"config_key" = "ASC"})
698
     */
699
    private $config;
700
    /**
701
     * @ORM\ManyToOne(targetEntity="ControleOnline\Entity\File")
702
     * @ORM\JoinColumns({
703
     *   @ORM\JoinColumn(name="alternative_image", referencedColumnName="id")
704
     * })
705
     */
706
    private $alternativeFile;
707
    /**
708
     * @ORM\ManyToOne(targetEntity="ControleOnline\Entity\File")
709
     * @ORM\JoinColumns({
710
     *   @ORM\JoinColumn(name="background_image", referencedColumnName="id")
711
     * })
712
     */
713
    private $backgroundFile;
714
    /**
715
     * @ORM\ManyToOne(targetEntity="ControleOnline\Entity\Language", inversedBy="people")
716
     * @ORM\JoinColumns({
717
     *   @ORM\JoinColumn(name="language_id", referencedColumnName="id")
718
     * })
719
     */
720
    private $language;
721
    /**
722
     * @var Collection
723
     *
724
     * @ORM\OneToMany(targetEntity="ControleOnline\Entity\PeopleLink", mappedBy="people")
725
     * @ORM\OrderBy({"link" = "ASC"})
726
     */
727
    private $people;
728
729
    /**
730
     * @var Collection
731
     *
732
     * @ORM\OneToMany(targetEntity="ControleOnline\Entity\PeopleLink", mappedBy="company")
733
     * @ORM\OrderBy({"link" = "ASC"})
734
     */
735
    private $link;
736
737
    /**
738
     * @var Collection
739
     *
740
     * @ORM\OneToMany(targetEntity="ControleOnline\Entity\User", mappedBy="people")
741
     * @ORM\OrderBy({"username" = "ASC"})
742
     * @Groups({"people_read"})
743
     */
744
    private $user;
745
    /**
746
     * @var Collection
747
     *
748
     * @ORM\OneToMany(targetEntity="ControleOnline\Entity\Document", mappedBy="people")
749
     * @Groups({"people_read", "task_interaction_read"})
750
     */
751
    private $document;
752
    /**
753
     * @var Collection
754
     *
755
     * @ORM\OneToMany(targetEntity="ControleOnline\Entity\Address", mappedBy="people")
756
     * @ORM\OrderBy({"nickname" = "ASC"})
757
     * @Groups({"people_read", "logistic_read"})
758
     */
759
    private $address;
760
    /**
761
     * @var Collection
762
     *
763
     * @ORM\OneToMany(targetEntity="ControleOnline\Entity\Phone", mappedBy="people")
764
     * @Groups({"people_read",   "task_interaction_read"})
765
     */
766
    private $phone;
767
    /**
768
     * @var Collection
769
     *
770
     * @ORM\OneToMany(targetEntity="ControleOnline\Entity\Email", mappedBy="people")
771
     * @Groups({"people_read", "get_contracts",  "task_interaction_read"})
772
     */
773
    private $email;
774
    /**
775
     * Many Peoples have Many Contracts.
776
     *
777
     * @ORM\OneToMany (targetEntity="ControleOnline\Entity\ContractPeople", mappedBy="people")
778
     */
779
    private $contractsPeople;
780
781
    /**
782
     * @ORM\Column(type="string", length=255, nullable=false)
783
     * @Groups({"people_read"})
784
     */
785
    private $billingDays;
786
    /**
787
     * @ORM\Column(type="integer", nullable=false)
788
     * @Groups({"people_read", "my_contract_item_read", "mycontractpeople_read"})
789
     */
790
    private $paymentTerm;
791
792
793
    /**
794
     * @ORM\Column(type="datetime", nullable=false, columnDefinition="DATETIME")
795
     * @Groups({"people_read", "my_contract_item_read", "mycontractpeople_read"})
796
     */
797
    private $foundationDate = null;
798
    /**
799
     * @Groups({"people_read", "my_contract_item_read", "mycontractpeople_read"})
800
     */
801
    private $averageRating = 4;
802
    public function __construct()
803
    {
804
        $this->enable = 0;
0 ignored issues
show
Documentation Bug introduced by
The property $enable was declared of type boolean, but 0 is of type integer. Maybe add a type cast?

This check looks for assignments to scalar types that may be of the wrong type.

To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.

$answer = 42;

$correct = false;

$correct = (bool) $answer;
Loading history...
805
        $this->icms = 1;
0 ignored issues
show
Documentation Bug introduced by
The property $icms was declared of type boolean, but 1 is of type integer. Maybe add a type cast?

This check looks for assignments to scalar types that may be of the wrong type.

To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.

$answer = 42;

$correct = false;

$correct = (bool) $answer;
Loading history...
806
        $this->billing = 0;
807
        $this->registerDate =            new \DateTime('now');
808
        $this->people =            new \Doctrine\Common\Collections\ArrayCollection();
809
        $this->config =            new \Doctrine\Common\Collections\ArrayCollection();
810
        $this->link =            new \Doctrine\Common\Collections\ArrayCollection();
811
        $this->user =            new \Doctrine\Common\Collections\ArrayCollection();
812
        $this->document =            new \Doctrine\Common\Collections\ArrayCollection();
813
        $this->address =            new \Doctrine\Common\Collections\ArrayCollection();
814
        $this->email =            new \Doctrine\Common\Collections\ArrayCollection();
815
        $this->phone =            new \Doctrine\Common\Collections\ArrayCollection();
816
        $this->billingDays = 'daily';
817
        $this->paymentTerm = 1;
818
819
        $this->otherInformations = json_encode(
820
            new stdClass()
821
        );
822
    }
823
    public function getId()
824
    {
825
        return $this->id;
826
    }
827
    public function getAverageRating()
828
    {
829
        return $this->averageRating;
830
    }
831
    public function setAverageRating($averageRating)
832
    {
833
        $this->averageRating = $averageRating;
834
        return $this;
835
    }
836
    public function getIcms()
837
    {
838
        return $this->icms;
839
    }
840
    public function setIcms($icms)
841
    {
842
        $this->icms = $icms ?: 0;
0 ignored issues
show
Documentation Bug introduced by
It seems like $icms ?: 0 can also be of type integer. However, the property $icms is declared as type boolean. Maybe add an additional type check?

Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a mixed type is assigned to a property that is type hinted more strictly.

For example, imagine you have a variable $accountId that can either hold an Id object or false (if there is no account id yet). Your code now assigns that value to the id property of an instance of the Account class. This class holds a proper account, so the id value must no longer be false.

Either this assignment is in error or a type check should be added for that assignment.

class Id
{
    public $id;

    public function __construct($id)
    {
        $this->id = $id;
    }

}

class Account
{
    /** @var  Id $id */
    public $id;
}

$account_id = false;

if (starsAreRight()) {
    $account_id = new Id(42);
}

$account = new Account();
if ($account instanceof Id)
{
    $account->id = $account_id;
}
Loading history...
843
        return $this;
844
    }
845
    public function getEnabled()
846
    {
847
        return $this->enable;
848
    }
849
    public function setEnabled($enable)
850
    {
851
        $this->enable = $enable ?: 0;
0 ignored issues
show
Documentation Bug introduced by
It seems like $enable ?: 0 can also be of type integer. However, the property $enable is declared as type boolean. Maybe add an additional type check?

Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a mixed type is assigned to a property that is type hinted more strictly.

For example, imagine you have a variable $accountId that can either hold an Id object or false (if there is no account id yet). Your code now assigns that value to the id property of an instance of the Account class. This class holds a proper account, so the id value must no longer be false.

Either this assignment is in error or a type check should be added for that assignment.

class Id
{
    public $id;

    public function __construct($id)
    {
        $this->id = $id;
    }

}

class Account
{
    /** @var  Id $id */
    public $id;
}

$account_id = false;

if (starsAreRight()) {
    $account_id = new Id(42);
}

$account = new Account();
if ($account instanceof Id)
{
    $account->id = $account_id;
}
Loading history...
852
        return $this;
853
    }
854
    public function setPeopleType($people_type)
855
    {
856
        $this->peopleType = $people_type;
857
        return $this;
858
    }
859
    public function getPeopleType()
860
    {
861
        return $this->peopleType;
862
    }
863
    /**
864
     * Set name.
865
     */
866
    public function setName(string $name): self
867
    {
868
        $this->name = $name;
869
        return $this;
870
    }
871
    /**
872
     * Get name.
873
     */
874
    public function getName(): string
875
    {
876
        return strtoupper($this->name);
877
    }
878
    public function setAlias($alias)
879
    {
880
        $this->alias = $alias;
881
        return $this;
882
    }
883
    public function getAlias()
884
    {
885
        return strtoupper($this->alias);
886
    }
887
    public function setFile(File $file = null)
0 ignored issues
show
Bug introduced by
The type ControleOnline\Entity\File 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...
888
    {
889
        $this->file = $file;
890
        return $this;
891
    }
892
    public function getFile()
893
    {
894
        return $this->file;
895
    }
896
    public function setAlternativeFile(File $alternative_file = null)
897
    {
898
        $this->alternativeFile = $alternative_file;
899
        return $this;
900
    }
901
    public function getAlternativeFile()
902
    {
903
        return $this->alternativeFile;
904
    }
905
    public function getBackgroundFile()
906
    {
907
        return $this->backgroundFile;
908
    }
909
    public function setBackgroundFile(File $backgroundFile = null)
910
    {
911
        $this->backgroundFile = $backgroundFile;
912
        return $this;
913
    }
914
    public function setLanguage(Language $language = null)
0 ignored issues
show
Bug introduced by
The type ControleOnline\Entity\Language 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...
915
    {
916
        $this->language = $language;
917
        return $this;
918
    }
919
    public function getLanguage()
920
    {
921
        return $this->language;
922
    }
923
    public function setBilling($billing)
924
    {
925
        $this->billing = $billing;
926
        return $this;
927
    }
928
    public function getBilling()
929
    {
930
        return $this->billing;
931
    }
932
    public function getRegisterDate(): \DateTimeInterface
933
    {
934
        return $this->registerDate;
935
    }
936
    public function setRegisterDate(\DateTimeInterface $registerDate): self
937
    {
938
        $this->registerDate = $registerDate;
939
        return $this;
940
    }
941
    /**
942
     * Add document.
943
     *
944
     * @return People
945
     */
946
    public function addDocument(Document $document)
947
    {
948
        $this->document[] = $document;
949
        return $this;
950
    }
951
    /**
952
     * Add people.
953
     *
954
     * @return People
955
     */
956
    public function addPeople(People $people)
957
    {
958
        $this->people[] = $people;
959
        return $this;
960
    }
961
    /**
962
     * Remove people.
963
     */
964
    public function removePeople(People $people)
965
    {
966
        $this->people->removeElement($people);
967
    }
968
    /**
969
     * Get people.
970
     *
971
     * @return Collection
972
     */
973
    public function getPeople()
974
    {
975
        return $this->people;
976
    }
977
    /**
978
     * Add link.
979
     *
980
     * @return People
981
     */
982
    public function addLink(People $link)
983
    {
984
        $this->link[] = $link;
985
        return $this;
986
    }
987
    /**
988
     * Remove link.
989
     *
990
     * @param \Core\Entity\Link $link
0 ignored issues
show
Bug introduced by
The type Core\Entity\Link 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...
991
     */
992
    public function removeLink(People $link)
993
    {
994
        $this->link->removeElement($link);
995
    }
996
    /**
997
     * Get link.
998
     *
999
     * @return Collection
1000
     */
1001
    public function getLink()
1002
    {
1003
        return $this->link;
1004
    }
1005
    /**
1006
     * Add user.
1007
     *
1008
     * @return People
1009
     */
1010
    public function addUser(\ControleOnline\Entity\User $user)
0 ignored issues
show
Bug introduced by
The type ControleOnline\Entity\User 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...
1011
    {
1012
        $this->user[] = $user;
1013
        return $this;
1014
    }
1015
    /**
1016
     * Remove user.
1017
     */
1018
    public function removeUser(\ControleOnline\Entity\User $user)
1019
    {
1020
        $this->user->removeElement($user);
1021
    }
1022
    /**
1023
     * Get user.
1024
     *
1025
     * @return Collection
1026
     */
1027
    public function getUser()
1028
    {
1029
        return $this->user;
1030
    }
1031
    /**
1032
     * Get document.
1033
     *
1034
     * @return Collection
1035
     */
1036
    public function getDocument()
1037
    {
1038
        return $this->document;
1039
    }
1040
    /**
1041
     * Get address.
1042
     *
1043
     * @return Collection
1044
     */
1045
    public function getAddress()
1046
    {
1047
        return $this->address;
1048
    }
1049
    /**
1050
     * Get document.
1051
     *
1052
     * @return Collection
1053
     */
1054
    public function getPhone()
1055
    {
1056
        return $this->phone;
1057
    }
1058
    /**
1059
     * Get email.
1060
     *
1061
     * @return Collection
1062
     */
1063
    public function getEmail()
1064
    {
1065
        return $this->email;
1066
    }
1067
    public function getContractsPeople(): Collection
1068
    {
1069
        return $this->contractsPeople;
1070
    }
1071
    public function setBillingDays(string $billingDays): self
1072
    {
1073
        $this->billingDays = $billingDays;
1074
        return $this;
1075
    }
1076
    public function getBillingDays(): string
1077
    {
1078
        return $this->billingDays;
1079
    }
1080
    public function setPaymentTerm(int $paymentTerm): self
1081
    {
1082
        $this->paymentTerm = $paymentTerm;
1083
        return $this;
1084
    }
1085
    public function getPaymentTerm(): int
1086
    {
1087
        return $this->paymentTerm;
1088
    }
1089
    public function getFoundationDate(): ?\DateTime
1090
    {
1091
        return $this->foundationDate;
1092
    }
1093
    public function setFoundationDate(\DateTimeInterface $date): self
1094
    {
1095
        $this->foundationDate = $date;
1096
        return $this;
1097
    }
1098
    public function getFullName(): string
1099
    {
1100
        if ($this->getPeopleType() == 'F') {
1101
            return trim(preg_replace('/[^A-Za-z\s]/', '', sprintf('%s %s', $this->getName(), $this->getAlias())));
1102
        }
1103
        return trim(preg_replace('/[^A-Za-z\s]/', '', $this->getName()));
1104
    }
1105
    public function isPerson(): bool
1106
    {
1107
        return $this->getPeopleType() == 'F';
1108
    }
1109
    public function getOneEmail(): ?Email
1110
    {
1111
        if (($email = $this->getEmail()->first()) === false) {
1112
            return null;
1113
        }
1114
        return $email;
1115
    }
1116
    public function getOneDocument(): ?Document
1117
    {
1118
        $documents = $this->getDocument()->filter(function ($peopleDocument) {
1119
            if ($peopleDocument->getPeople()->getPeopleType() == 'F') {
1120
                return $peopleDocument->getDocumentType()->getDocumentType() == 'CPF';
1121
            }
1122
            return $peopleDocument->getDocumentType()->getDocumentType() == 'CNPJ';
1123
        });
1124
        return ($document = $documents->first()) === false ? null : $document;
1125
    }
1126
    public function getBirthdayAsString(): ?string
1127
    {
1128
        if ($this->getFoundationDate() instanceof \DateTimeInterface) {
1129
            return $this->getFoundationDate()->format('Y-m-d');
1130
        }
1131
        return null;
1132
    }
1133
    /**
1134
     * Get otherInformations
1135
     *
1136
     * @return stdClass
1137
     */
1138
    public function getOtherInformations($decode = false)
1139
    {
1140
        return $decode ? (object) json_decode(is_array($this->otherInformations) ? json_encode($this->otherInformations) : $this->otherInformations) : $this->otherInformations;
0 ignored issues
show
introduced by
The condition is_array($this->otherInformations) is always false.
Loading history...
Bug Best Practice introduced by
The expression return $decode ? (object...this->otherInformations also could return the type string which is incompatible with the documented return type stdClass.
Loading history...
1141
    }
1142
    /**
1143
     * Set comments
1144
     *
1145
     * @param string $otherInformations
1146
     * @return Order
0 ignored issues
show
Bug introduced by
The type ControleOnline\Entity\Order 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...
1147
     */
1148
    public function addOtherInformations($key, $value)
1149
    {
1150
        $otherInformations = $this->getOtherInformations(true);
1151
        $otherInformations->{$key} = $value;
1152
        $this->otherInformations = json_encode($otherInformations);
1153
        return $this;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this returns the type ControleOnline\Entity\People which is incompatible with the documented return type ControleOnline\Entity\Order.
Loading history...
1154
    }
1155
    /**
1156
     * Set comments
1157
     *
1158
     * @param string $otherInformations
1159
     * @return Order
1160
     */
1161
    public function setOtherInformations(stdClass $otherInformations)
1162
    {
1163
        $this->otherInformations = json_encode($otherInformations);
1164
        return $this;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this returns the type ControleOnline\Entity\People which is incompatible with the documented return type ControleOnline\Entity\Order.
Loading history...
1165
    }
1166
    /**
1167
     * Add Config.
1168
     *
1169
     * @return People
1170
     */
1171
    public function addConfig(\ControleOnline\Entity\Config $config)
0 ignored issues
show
Bug introduced by
The type ControleOnline\Entity\Config 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...
1172
    {
1173
        $this->config[] = $config;
1174
        return $this;
1175
    }
1176
    /**
1177
     * Remove Config.
1178
     */
1179
    public function removeConfig(\ControleOnline\Entity\Config $config)
1180
    {
1181
        $this->config->removeElement($config);
1182
    }
1183
    /**
1184
     * Get config.
1185
     *
1186
     * @return Collection
1187
     */
1188
    public function getConfig()
1189
    {
1190
        return $this->config;
1191
    }
1192
}
1193