1 | <?php |
||
19 | class CustomerOrder |
||
20 | { |
||
21 | use TimestampableTrait; |
||
22 | |||
23 | const STATUS_OPENED = 'opened'; |
||
24 | const STATUS_CLOSED = 'closed'; |
||
25 | const STATUS_PENDING = 'pending'; |
||
26 | const STATUS_PAID = 'paid'; |
||
27 | const STATUS_REJECTED = 'rejected'; |
||
28 | |||
29 | /** |
||
30 | * @var Uuid |
||
31 | * |
||
32 | * @ORM\Column(name="id", type="uuid_binary") |
||
33 | * @ORM\Id |
||
34 | * @ORM\GeneratedValue(strategy="UUID") |
||
35 | */ |
||
36 | private $id; |
||
37 | |||
38 | /** |
||
39 | * @var ArrayCollection|Ticket[] |
||
40 | * |
||
41 | * @ORM\OneToMany( |
||
42 | * targetEntity="AppBundle\Entity\Ticket", |
||
43 | * mappedBy="object", |
||
44 | * cascade={"persist", "remove"} |
||
45 | * ) |
||
46 | */ |
||
47 | protected $tickets; |
||
48 | |||
49 | /** |
||
50 | * @var Enum |
||
51 | * @Assert\Choice(callback="getStatuses") |
||
52 | * @ORM\Column( |
||
53 | * name="status", |
||
54 | * type="string", |
||
55 | * columnDefinition="enum('free', 'booked', 'ordered', 'opened', 'closed')" |
||
56 | * ) |
||
57 | * @Expose() |
||
58 | */ |
||
59 | protected $status; |
||
60 | |||
61 | /** |
||
62 | * CustomerOrder constructor. |
||
63 | */ |
||
64 | public function __construct() |
||
70 | |||
71 | /** |
||
72 | * @return Uuid |
||
73 | */ |
||
74 | public function getId() |
||
78 | |||
79 | /** |
||
80 | * @return Ticket[]|ArrayCollection |
||
81 | */ |
||
82 | public function getTickets() |
||
86 | |||
87 | /** |
||
88 | * @param Ticket[]|ArrayCollection $tickets |
||
89 | */ |
||
90 | public function setTickets($tickets) |
||
94 | |||
95 | /** |
||
96 | * @return Enum |
||
97 | */ |
||
98 | public function getStatus() |
||
102 | |||
103 | /** |
||
104 | * @param Enum $status |
||
105 | */ |
||
106 | public function setStatus($status) |
||
110 | |||
111 | /** |
||
112 | * Add Ticket |
||
113 | * |
||
114 | * @param Ticket $ticket |
||
115 | * @return CustomerOrder |
||
116 | */ |
||
117 | public function addTicket(Ticket $ticket) |
||
126 | |||
127 | /** |
||
128 | * @param Ticket $ticket |
||
129 | */ |
||
130 | public function removeTicket(Ticket $ticket) |
||
137 | |||
138 | /** |
||
139 | * @return bool |
||
140 | */ |
||
141 | private function isStatusPaid() |
||
145 | /** |
||
146 | * @return array |
||
147 | */ |
||
148 | public static function getStatuses() |
||
158 | } |
||
159 |
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..