Passed
Push — master ( ba7d8d...e67af9 )
by Luiz Kim
02:11
created

CepAddress::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
namespace ControleOnline\Entity;
4
5
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...
6
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...
7
8
use DoctrineExtensions\Query\Mysql\Lpad;
0 ignored issues
show
Bug introduced by
The type DoctrineExtensions\Query\Mysql\Lpad 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 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...
10
11
/** 
12
 * @ApiResource(
13
 *     attributes={
14
 *          "formats"={"jsonld", "json", "html", "jsonhal", "csv"={"text/csv"}},
15
 *          "access_control"="is_granted('ROLE_CLIENT')" 
16
 *     },  
17
 *     collectionOperations={},
18
 *     itemOperations      ={
19
 *        "get"={
20
 *            "access_control"="is_granted('ROLE_CLIENT')",
21
 *            "method"        ="GET",
22
 *            "path"          ="/cep_address/{id}",
23
 *            "requirements"  ={"id"="^\d{8}$"},
24
 *        },
25
 *     },
26
 * )
27
 */
28
final class CepAddress
29
{
30
    /**
31
     * @ApiProperty(identifier=true)
32
     * @var string
33
     */
34
    public $id;
35
36
    /**
37
     * @var string
38
     */
39
    public $description;
40
41
    /**
42
     * @var string
43
     */
44
    public $country;
45
46
    /**
47
     * @var string
48
     */
49
    public $state;
50
51
    /**
52
     * @var string
53
     */
54
    public $city;
55
56
    /**
57
     * @var string
58
     */
59
    public $district;
60
61
    /**
62
     * @var string
63
     */
64
    public $street;
65
66
    /**
67
     * @var string
68
     */
69
    public $provider;
70
71
    public function __construct(string $id)
72
    {
73
        $this->id = $id;
74
    }
75
}
76