1 | <?php |
||
20 | abstract class BaseGallery extends Gallery |
||
21 | { |
||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | private $uuid; |
||
26 | |||
27 | /** |
||
28 | * {@inheritdoc} |
||
29 | */ |
||
30 | public function __construct() |
||
31 | { |
||
32 | $this->galleryItems = new \Doctrine\Common\Collections\ArrayCollection(); |
||
|
|||
33 | } |
||
34 | |||
35 | /** |
||
36 | * Get universal unique id. |
||
37 | * |
||
38 | * @return string |
||
39 | */ |
||
40 | public function getUuid() |
||
41 | { |
||
42 | return $this->uuid; |
||
43 | } |
||
44 | |||
45 | /** |
||
46 | * {@inheritdoc} |
||
47 | */ |
||
48 | public function addGalleryItem(GalleryItemInterface $galleryItem) |
||
61 | |||
62 | /** |
||
63 | * Pre persist method. |
||
64 | */ |
||
65 | public function prePersist() |
||
66 | { |
||
67 | $this->createdAt = new \DateTime(); |
||
68 | $this->updatedAt = new \DateTime(); |
||
69 | |||
70 | $this->reorderGalleryItems(); |
||
71 | } |
||
72 | |||
73 | /** |
||
74 | * Pre Update method. |
||
75 | */ |
||
76 | public function preUpdate() |
||
77 | { |
||
78 | $this->updatedAt = new \DateTime(); |
||
79 | |||
80 | $this->reorderGalleryItems(); |
||
81 | } |
||
82 | |||
83 | /** |
||
84 | * Reorders gallery items based on their position. |
||
85 | */ |
||
86 | public function reorderGalleryItems() |
||
104 | } |
||
105 |
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..