Passed
Push — master ( 36b7e9...6362bf )
by Luiz Kim
10:22 queued 01:59
created

DocumentModel::setDocumentModel()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 5
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
4
namespace ControleOnline\Entity;
5
6
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...
7
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...
8
9
/**
10
 * @ORM\Table(name="document_model")
11
 * @ORM\Entity
12
 * @ORM\EntityListeners({ControleOnline\Listener\LogListener::class}) 
13
 */
14
class DocumentModel
15
{
16
    /**
17
     * @ORM\Column(type="integer", nullable=false)
18
     * @ORM\Id
19
     * @ORM\GeneratedValue(strategy="IDENTITY")
20
     */
21
    private $id;
22
23
    /**
24
     * @ORM\Column(name="document_model", type="string", nullable=false)
25
     */
26
    private $document_model;
27
28
    /**
29
     * @ORM\Column(name="content", type="text", nullable=false)
30
     */
31
    private $content;
32
33
    /**
34
     * @ORM\Column(name="people_id", type="integer", nullable=true) 
35
     */
36
    private $peopleId;
37
38
    /**
39
     * @return int
40
     */
41
    public function getId(): int
42
    {
43
        return $this->id;
44
    }
45
46
    /**
47
     * @return string
48
     */
49
    public function getDocumentModel(): string
50
    {
51
        return $this->document_model;
52
    }
53
54
    /**
55
     * @param string $document_model
56
     * @return DocumentModel
57
     */
58
    public function setDocumentModel(string $document_model): DocumentModel
59
    {
60
        $this->document_model = $document_model;
61
62
        return $this;
63
    }
64
65
    /**
66
     * @return string
67
     */
68
    public function getContent(): string
69
    {
70
        return $this->content;
71
    }
72
73
    /**
74
     * @param string $content
75
     * @return DocumentModel
76
     */
77
    public function setContent(string $content): DocumentModel
78
    {
79
        $this->content = $content;
80
        return $this;
81
    }
82
83
    public function getPeopleId(): int
84
    {
85
        return $this->peopleId;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->peopleId could return the type null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
86
    }
87
88
    public function setPeopleId(int $peopleId): DocumentModel
89
    {
90
        $this->peopleId = $peopleId;
91
        return $this;
92
    }
93
}
94