Issues (21)

src/Entities/Demo.php (3 issues)

1
<?php
2
3
namespace Goldoni\Builder\Entities;
4
5
/**
6
 * Class Demo.
7
 */
8
class Demo
9
{
10
    /**
11
     * @var int
12
     */
13
    public $id;
14
    /**
15
     * @var string
16
     */
17
    public $firstName;
18
    /**
19
     * @var string
20
     */
21
    public $lastName;
22
    /**
23
     * @var string
24
     */
25
    public $email;
26
    /**
27
     * @var string
28
     */
29
    public $mobile;
30
    /**
31
     * @var string
32
     */
33
    public $phone;
34
    /**
35
     * @var string
36
     */
37
    public $deletedAt;
38
    /**
39
     * @var string
40
     */
41
    public $createdAt;
42
    /**
43
     * @var string
44
     */
45
    public $updatedAt;
46
47
    public function __construct()
48
    {
49
    }
50
51
    /**
52
     * @return string
53
     */
54
    public function getCreatedAt(): string
55
    {
56
        return $this->createdAt;
57
    }
58
59
    /**
60
     * @param null|string $datetime
61
     */
62
    public function setCreatedAt(?string $datetime = null): void
63
    {
64
        if (\is_string($datetime)) {
65
            $this->createdAt = new \DateTime($datetime);
0 ignored issues
show
Documentation Bug introduced by
It seems like new DateTime($datetime) of type DateTime is incompatible with the declared type string of property $createdAt.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
66
        }
67
    }
68
69
    /**
70
     * @return string
71
     */
72
    public function getUpdatedAt(): string
73
    {
74
        return $this->updatedAt;
75
    }
76
77
    /**
78
     * @param null|string $datetime
79
     */
80
    public function setUpdatedAt(?string $datetime = null): void
81
    {
82
        if (\is_string($datetime)) {
83
            $this->updatedAt = new \DateTime($datetime);
0 ignored issues
show
Documentation Bug introduced by
It seems like new DateTime($datetime) of type DateTime is incompatible with the declared type string of property $updatedAt.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
84
        }
85
    }
86
87
    /**
88
     * @return string
89
     */
90
    public function getDeletedAt(): string
91
    {
92
        return $this->deletedAt;
93
    }
94
95
    /**
96
     * @param null|string $datetime
97
     */
98
    public function setDeletedAt(?string $datetime = null): void
99
    {
100
        if (\is_string($datetime)) {
101
            $this->deletedAt = new \DateTime($datetime);
0 ignored issues
show
Documentation Bug introduced by
It seems like new DateTime($datetime) of type DateTime is incompatible with the declared type string of property $deletedAt.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
102
        }
103
    }
104
}
105