1 | <?php |
||
16 | class Event implements \JsonSerializable |
||
17 | { |
||
18 | use ORMBehaviors\Timestampable\Timestampable; |
||
19 | |||
20 | /** |
||
21 | * @var int |
||
22 | * |
||
23 | * @ORM\Column(name="id", type="integer") |
||
24 | * @ORM\Id |
||
25 | * @ORM\GeneratedValue(strategy="AUTO") |
||
26 | */ |
||
27 | private $id; |
||
28 | |||
29 | /** |
||
30 | * @var string |
||
31 | * |
||
32 | * @ORM\Column(name="name", type="string", length=255) |
||
33 | * @Groups({"Short"}) |
||
34 | */ |
||
35 | private $googleId; |
||
36 | |||
37 | /** |
||
38 | * @var ArrayCollection|$users[] |
||
39 | * @ORM\ManyToMany(targetEntity="AppBundle\Entity\User", mappedBy="events", cascade={"persist"}) |
||
40 | */ |
||
41 | private $users = []; |
||
42 | |||
43 | public function __construct() |
||
44 | { |
||
45 | $this->users = new ArrayCollection(); |
||
|
|||
46 | } |
||
47 | |||
48 | public function jsonSerialize() |
||
54 | |||
55 | |||
56 | /** |
||
57 | * Get id |
||
58 | * |
||
59 | * @return integer |
||
60 | */ |
||
61 | public function getId() |
||
62 | { |
||
63 | return $this->id; |
||
64 | } |
||
65 | |||
66 | /** |
||
67 | * Set googleId |
||
68 | * |
||
69 | * @param string $googleId |
||
70 | * |
||
71 | * @return Event |
||
72 | */ |
||
73 | public function setGoogleId($googleId) |
||
79 | |||
80 | /** |
||
81 | * Get googleId |
||
82 | * |
||
83 | * @return string |
||
84 | */ |
||
85 | public function getGoogleId() |
||
89 | |||
90 | /** |
||
91 | * Add user |
||
92 | * |
||
93 | * @param User $user |
||
94 | * |
||
95 | * @return Event |
||
96 | */ |
||
97 | public function addUser(User $user) |
||
103 | |||
104 | /** |
||
105 | * Remove user |
||
106 | * |
||
107 | * @param User $user |
||
108 | */ |
||
109 | public function removeUser(User $user) |
||
113 | |||
114 | /** |
||
115 | * Get users |
||
116 | * |
||
117 | * @return ArrayCollection |
||
118 | */ |
||
119 | public function getUsers() |
||
123 | } |
||
124 |
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..