@@ -243,7 +243,7 @@ discard block |
||
| 243 | 243 | } |
| 244 | 244 | |
| 245 | 245 | /** |
| 246 | - * @param string|DateTimeInterface $newsDate The news date. |
|
| 246 | + * @param string $newsDate The news date. |
|
| 247 | 247 | * @throws InvalidArgumentException If the timestamp is invalid. |
| 248 | 248 | * @return self |
| 249 | 249 | */ |
@@ -360,7 +360,7 @@ discard block |
||
| 360 | 360 | } |
| 361 | 361 | |
| 362 | 362 | /** |
| 363 | - * @return Translation|string|null |
|
| 363 | + * @return null|Translation |
|
| 364 | 364 | */ |
| 365 | 365 | public function defaultMetaDescription() |
| 366 | 366 | { |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | { |
| 32 | 32 | parent::__construct($data); |
| 33 | 33 | |
| 34 | - if (is_callable([ $this, 'defaultData' ])) { |
|
| 34 | + if (is_callable([$this, 'defaultData'])) { |
|
| 35 | 35 | $this->setData($this->defaultData()); |
| 36 | 36 | } |
| 37 | 37 | } |
@@ -363,7 +363,7 @@ discard block |
||
| 363 | 363 | /** |
| 364 | 364 | * Retrieve the menus this object belongs to. |
| 365 | 365 | * |
| 366 | - * @return Translation|string|null |
|
| 366 | + * @return string[] |
|
| 367 | 367 | */ |
| 368 | 368 | public function inMenu() |
| 369 | 369 | { |
@@ -430,7 +430,7 @@ discard block |
||
| 430 | 430 | } |
| 431 | 431 | |
| 432 | 432 | /** |
| 433 | - * @return Translation|string|null |
|
| 433 | + * @return null|Translation |
|
| 434 | 434 | */ |
| 435 | 435 | public function defaultMetaDescription() |
| 436 | 436 | { |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | { |
| 32 | 32 | parent::__construct($data); |
| 33 | 33 | |
| 34 | - if (is_callable([ $this, 'defaultData' ])) { |
|
| 34 | + if (is_callable([$this, 'defaultData'])) { |
|
| 35 | 35 | $this->setData($this->defaultData()); |
| 36 | 36 | } |
| 37 | 37 | } |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | // ========================================================================== |
| 84 | 84 | |
| 85 | 85 | /** |
| 86 | - * @return mixed |
|
| 86 | + * @return string |
|
| 87 | 87 | */ |
| 88 | 88 | public function defaultMetaTitle() |
| 89 | 89 | { |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | /** |
| 94 | - * @return mixed |
|
| 94 | + * @return string |
|
| 95 | 95 | */ |
| 96 | 96 | public function defaultMetaDescription() |
| 97 | 97 | { |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | /** |
| 102 | - * @return mixed |
|
| 102 | + * @return string |
|
| 103 | 103 | */ |
| 104 | 104 | public function defaultMetaImage() |
| 105 | 105 | { |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | /** |
| 110 | - * @return mixed |
|
| 110 | + * @return string |
|
| 111 | 111 | */ |
| 112 | 112 | public function defaultMetaUrl() |
| 113 | 113 | { |
@@ -232,7 +232,7 @@ |
||
| 232 | 232 | // ========================================================================== |
| 233 | 233 | |
| 234 | 234 | /** |
| 235 | - * @return mixed |
|
| 235 | + * @return string |
|
| 236 | 236 | */ |
| 237 | 237 | public function defaultFromEmail() |
| 238 | 238 | { |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | /** |
| 62 | - * @return boolean Entry cycle. |
|
| 62 | + * @return string Entry cycle. |
|
| 63 | 63 | */ |
| 64 | 64 | public function entryCycle() |
| 65 | 65 | { |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | /** |
| 58 | - * @return mixed |
|
| 58 | + * @return string[] |
|
| 59 | 59 | */ |
| 60 | 60 | public function name() |
| 61 | 61 | { |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | { |
| 35 | 35 | parent::__construct($data); |
| 36 | 36 | |
| 37 | - if (is_callable([ $this, 'defaultData' ])) { |
|
| 37 | + if (is_callable([$this, 'defaultData'])) { |
|
| 38 | 38 | $this->setData($this->defaultData()); |
| 39 | 39 | } |
| 40 | 40 | } |
@@ -88,9 +88,9 @@ discard block |
||
| 88 | 88 | parent::validate($v); |
| 89 | 89 | |
| 90 | 90 | foreach ($this->translator()->locales() as $locale => $value) { |
| 91 | - if (!(string)$this->name()[$locale]) { |
|
| 91 | + if (!(string) $this->name()[$locale]) { |
|
| 92 | 92 | $this->validator()->error( |
| 93 | - (string)$this->translator()->translation([ |
|
| 93 | + (string) $this->translator()->translation([ |
|
| 94 | 94 | 'fr' => 'Le NOM doit être rempli dans toutes les langues.', |
| 95 | 95 | 'en' => 'The NAME must be filled in all languages.', |
| 96 | 96 | ]) |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | /** |
| 88 | - * @param mixed $date The news date to filter |
|
| 88 | + * @param DateTime $date The news date to filter |
|
| 89 | 89 | * [startDate, endDate] |
| 90 | 90 | * DateTimeInterface |
| 91 | 91 | * string. |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | /** |
| 104 | - * @param mixed $date The news date to filter |
|
| 104 | + * @param DateTime $date The news date to filter |
|
| 105 | 105 | * [startDate, endDate] |
| 106 | 106 | * DateTimeInterface |
| 107 | 107 | * string. |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | // ========================================================================== |
| 122 | 122 | |
| 123 | 123 | /** |
| 124 | - * @return mixed |
|
| 124 | + * @return string |
|
| 125 | 125 | */ |
| 126 | 126 | public function lifespan() |
| 127 | 127 | { |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | { |
| 55 | 55 | $now = new DateTime(); |
| 56 | 56 | $loader = $this->all(); |
| 57 | - $loader->addFilter('publish_date', $now->format('Y-m-d H:i:s'), [ 'operator' => '<=' ]) |
|
| 57 | + $loader->addFilter('publish_date', $now->format('Y-m-d H:i:s'), ['operator' => '<=']) |
|
| 58 | 58 | ->addOrder('start_date', 'asc'); |
| 59 | 59 | |
| 60 | 60 | return $loader; |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | { |
| 96 | 96 | $date = $this->parseAsDate($date); |
| 97 | 97 | $loader = $this->published(); |
| 98 | - $loader->addFilter('end_date', $date->format('Y-m-d H:i:s'), [ 'operator' => '>=' ]); |
|
| 98 | + $loader->addFilter('end_date', $date->format('Y-m-d H:i:s'), ['operator' => '>=']); |
|
| 99 | 99 | |
| 100 | 100 | return $loader; |
| 101 | 101 | } |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | { |
| 112 | 112 | $date = $this->parseAsDate($date); |
| 113 | 113 | $loader = $this->published(); |
| 114 | - $loader->addFilter('end_date', $date->format('Y-m-d H:i:s'), [ 'operator' => '<' ]); |
|
| 114 | + $loader->addFilter('end_date', $date->format('Y-m-d H:i:s'), ['operator' => '<']); |
|
| 115 | 115 | |
| 116 | 116 | return $loader; |
| 117 | 117 | } |
@@ -213,7 +213,7 @@ |
||
| 213 | 213 | // ========================================================================== |
| 214 | 214 | |
| 215 | 215 | /** |
| 216 | - * @return object |
|
| 216 | + * @return string |
|
| 217 | 217 | */ |
| 218 | 218 | public function objType() |
| 219 | 219 | { |
@@ -73,7 +73,7 @@ |
||
| 73 | 73 | $loader = $this->all(); |
| 74 | 74 | $operator = []; |
| 75 | 75 | if (!$this->baseSection()) { |
| 76 | - $operator = [ 'operator' => 'IS NULL' ]; |
|
| 76 | + $operator = ['operator' => 'IS NULL']; |
|
| 77 | 77 | } |
| 78 | 78 | $loader->addFilter('master', $this->baseSection(), $operator); |
| 79 | 79 | |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | /** |
| 28 | 28 | * Formatted event list |
| 29 | 29 | * Return the entries for the current page |
| 30 | - * @return \Generator|void |
|
| 30 | + * @return \Generator |
|
| 31 | 31 | */ |
| 32 | 32 | public function eventsList() |
| 33 | 33 | { |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | /** |
| 42 | 42 | * Formatted event archive list |
| 43 | 43 | * Returns the entries for the current page. |
| 44 | - * @return \Generator|void |
|
| 44 | + * @return \Generator |
|
| 45 | 45 | */ |
| 46 | 46 | public function eventArchiveList() |
| 47 | 47 | { |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | /** |
| 76 | - * @return mixed |
|
| 76 | + * @return \Generator |
|
| 77 | 77 | */ |
| 78 | 78 | public function featEvents() |
| 79 | 79 | { |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | |
| 123 | 123 | /** |
| 124 | 124 | * Amount of events (total) |
| 125 | - * @return integer How many events? |
|
| 125 | + * @return boolean How many events? |
|
| 126 | 126 | */ |
| 127 | 127 | public function numEvent() |
| 128 | 128 | { |
@@ -228,8 +228,8 @@ discard block |
||
| 228 | 228 | protected function eventFormatShort(EventInterface $event) |
| 229 | 229 | { |
| 230 | 230 | return [ |
| 231 | - 'title' => (string)$event->title(), |
|
| 232 | - 'url' => (string)$event->url(), |
|
| 231 | + 'title' => (string) $event->title(), |
|
| 232 | + 'url' => (string) $event->url(), |
|
| 233 | 233 | 'startDate' => $this->getEventStartDateFormat($event), |
| 234 | 234 | 'startDateTime' => $event->startDate()->format('Y-m-d h:i'), |
| 235 | 235 | 'endDate' => $this->getEventEndDateFormat($event), |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | 'endDateTime' => $event->endDate()->format('Y-m-d h:i'), |
| 255 | 255 | 'date' => $this->getEventDateFormat($event), |
| 256 | 256 | 'time' => $this->getEventTimeFormat($event), |
| 257 | - 'title' => (string)$event->title(), |
|
| 257 | + 'title' => (string) $event->title(), |
|
| 258 | 258 | 'url' => $event->url() |
| 259 | 259 | ]; |
| 260 | 260 | } |
@@ -271,9 +271,9 @@ discard block |
||
| 271 | 271 | |
| 272 | 272 | return [ |
| 273 | 273 | 'id' => $event->id(), |
| 274 | - 'title' => (string)$event->title(), |
|
| 275 | - 'summary' => (string)$event->summary(), |
|
| 276 | - 'content' => (string)$event->content(), |
|
| 274 | + 'title' => (string) $event->title(), |
|
| 275 | + 'summary' => (string) $event->summary(), |
|
| 276 | + 'content' => (string) $event->content(), |
|
| 277 | 277 | 'image' => $event->image(), |
| 278 | 278 | 'startDate' => $this->getEventStartDateFormat($event), |
| 279 | 279 | 'startDateTime' => $event->startDate()->format('Y-m-d h:i'), |
@@ -288,9 +288,9 @@ discard block |
||
| 288 | 288 | 'gallery' => $gallery, |
| 289 | 289 | 'hasGallery' => !!(count($gallery)), |
| 290 | 290 | 'url' => $event->url(), |
| 291 | - 'metaTitle' => (string)$event->metaTitle(), |
|
| 292 | - 'locationName' => (string)$event->locationName(), |
|
| 293 | - 'dateNotes' => (string)$event->dateNotes(), |
|
| 291 | + 'metaTitle' => (string) $event->metaTitle(), |
|
| 292 | + 'locationName' => (string) $event->locationName(), |
|
| 293 | + 'dateNotes' => (string) $event->dateNotes(), |
|
| 294 | 294 | 'category' => $event->category() |
| 295 | 295 | ]; |
| 296 | 296 | } |
@@ -303,7 +303,7 @@ discard block |
||
| 303 | 303 | { |
| 304 | 304 | return [ |
| 305 | 305 | 'id' => $category->id(), |
| 306 | - 'name' => (string)$category->name(), |
|
| 306 | + 'name' => (string) $category->name(), |
|
| 307 | 307 | ]; |
| 308 | 308 | } |
| 309 | 309 | |