1 | <?php |
||
17 | class Post extends AbstractTranslateableStory |
||
18 | { |
||
19 | use DeletedByTrait; |
||
20 | |||
21 | /** |
||
22 | * @var integer |
||
23 | * |
||
24 | * @ORM\Column(name="id", type="integer") |
||
25 | * @ORM\Id |
||
26 | * @ORM\GeneratedValue(strategy="AUTO") |
||
27 | */ |
||
28 | protected $id; |
||
29 | |||
30 | /** |
||
31 | * @var \Doctrine\Common\Collections\Collection |
||
32 | * |
||
33 | * @ORM\OneToMany( |
||
34 | * targetEntity="AppBundle\Entity\Translations\PostTranslation", |
||
35 | * mappedBy="object", |
||
36 | * cascade={"persist", "remove"} |
||
37 | * ) |
||
38 | */ |
||
39 | protected $translations; |
||
40 | |||
41 | /** |
||
42 | * @var \Application\Sonata\MediaBundle\Entity\GalleryHasMedia |
||
43 | * |
||
44 | * @ORM\ManyToMany(targetEntity="Application\Sonata\MediaBundle\Entity\GalleryHasMedia", cascade={"persist"}) |
||
45 | * @ORM\JoinTable(name="post_galleryHasMedia", |
||
46 | * joinColumns={@ORM\JoinColumn(name="post_id",referencedColumnName="id")}, |
||
47 | * inverseJoinColumns={@ORM\JoinColumn(name="galleryHasMedia_id",referencedColumnName="id")} |
||
48 | * ) |
||
49 | */ |
||
50 | protected $galleryHasMedia; |
||
51 | |||
52 | /** |
||
53 | * \Doctrine\Common\Collections\Collection |
||
54 | * |
||
55 | * @ORM\ManyToMany(targetEntity="AppBundle\Entity\Tag", inversedBy="posts", cascade={"persist"}) |
||
56 | * @Serializer\Expose |
||
57 | */ |
||
58 | protected $tags; |
||
59 | |||
60 | /** |
||
61 | * @var bool |
||
62 | * |
||
63 | * @ORM\Column(name="pinned", type="boolean") |
||
64 | * @Serializer\Type("boolean") |
||
65 | * @Serializer\Expose |
||
66 | */ |
||
67 | protected $pinned = false; |
||
68 | |||
69 | /** |
||
70 | * Constructor |
||
71 | */ |
||
72 | public function __construct() |
||
73 | { |
||
74 | parent::__construct(); |
||
75 | $this->galleryHasMedia = new \Doctrine\Common\Collections\ArrayCollection(); |
||
|
|||
76 | $this->tags = new \Doctrine\Common\Collections\ArrayCollection(); |
||
77 | } |
||
78 | |||
79 | /** |
||
80 | * Get id |
||
81 | * |
||
82 | * @return integer |
||
83 | */ |
||
84 | 1 | public function getId() |
|
88 | |||
89 | /** |
||
90 | * Unset translations |
||
91 | * |
||
92 | * @return Post |
||
93 | */ |
||
94 | 4 | public function unsetTranslations() |
|
100 | |||
101 | /** |
||
102 | * Add galleryHasMedia |
||
103 | * |
||
104 | * @param \Application\Sonata\MediaBundle\Entity\GalleryHasMedia $galleryHasMedia |
||
105 | * @return self |
||
106 | */ |
||
107 | public function addGalleryHasMedia(\Application\Sonata\MediaBundle\Entity\GalleryHasMedia $galleryHasMedia) |
||
113 | |||
114 | /** |
||
115 | * Remove galleryHasMedia |
||
116 | * |
||
117 | * @param \Application\Sonata\MediaBundle\Entity\GalleryHasMedia $galleryHasMedia |
||
118 | */ |
||
119 | public function removeGalleryHasMedia(\Application\Sonata\MediaBundle\Entity\GalleryHasMedia $galleryHasMedia) |
||
123 | |||
124 | /** |
||
125 | * Get galleryHasMedia |
||
126 | * |
||
127 | * @return \Doctrine\Common\Collections\Collection |
||
128 | */ |
||
129 | 5 | public function getGalleryHasMedia() |
|
133 | |||
134 | /** |
||
135 | * Add tags |
||
136 | * |
||
137 | * @param \AppBundle\Entity\Tag $tags |
||
138 | * @return self |
||
139 | */ |
||
140 | public function addTag(\AppBundle\Entity\Tag $tags) |
||
146 | |||
147 | /** |
||
148 | * Remove tags |
||
149 | * |
||
150 | * @param \AppBundle\Entity\Tag $tags |
||
151 | */ |
||
152 | public function removeTag(\AppBundle\Entity\Tag $tags) |
||
156 | |||
157 | /** |
||
158 | * Get tags |
||
159 | * |
||
160 | * @return \Doctrine\Common\Collections\Collection |
||
161 | */ |
||
162 | 4 | public function getTags() |
|
166 | |||
167 | /** |
||
168 | * @param boolean $pinned |
||
169 | * @return Post |
||
170 | */ |
||
171 | 1 | public function setPinned($pinned) |
|
177 | |||
178 | /** |
||
179 | * @return boolean |
||
180 | */ |
||
181 | public function isPinned() |
||
185 | } |
||
186 |
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..