Completed
Pull Request — master (#6210)
by Jordi Sala
37:29
created
src/Admin/AbstractAdmin.php 1 patch
Doc Comments   +7 added lines patch added patch discarded remove patch
@@ -1236,6 +1236,9 @@  discard block
 block discarded – undo
1236 1236
         return $this->baseControllerName;
1237 1237
     }
1238 1238
 
1239
+    /**
1240
+     * @param string $label
1241
+     */
1239 1242
     public function setLabel(?string $label): void
1240 1243
     {
1241 1244
         $this->label = $label;
@@ -1877,6 +1880,9 @@  discard block
 block discarded – undo
1877 1880
         return $this->managerType;
1878 1881
     }
1879 1882
 
1883
+    /**
1884
+     * @param string $type
1885
+     */
1880 1886
     public function setManagerType(?string $type): void
1881 1887
     {
1882 1888
         $this->managerType = $type;
@@ -2311,6 +2317,7 @@  discard block
 block discarded – undo
2311 2317
 
2312 2318
     /**
2313 2319
      * {@inheritdoc}
2320
+     * @param boolean $isShown
2314 2321
      */
2315 2322
     final public function showMosaicButton($isShown): void
2316 2323
     {
Please login to merge, or discard this patch.
src/Admin/AdminInterface.php 1 patch
Doc Comments   +127 added lines patch added patch discarded remove patch
@@ -39,22 +39,49 @@  discard block
 block discarded – undo
39 39
  */
40 40
 interface AdminInterface extends AccessRegistryInterface, FieldDescriptionRegistryInterface, LifecycleHookProviderInterface, MenuBuilderInterface, ParentAdminInterface, UrlGeneratorInterface
41 41
 {
42
+    /**
43
+     * @return void
44
+     */
42 45
     public function setMenuFactory(MenuFactoryInterface $menuFactory): void;
43 46
 
47
+    /**
48
+     * @return MenuFactoryInterface
49
+     */
44 50
     public function getMenuFactory(): ?MenuFactoryInterface;
45 51
 
52
+    /**
53
+     * @return void
54
+     */
46 55
     public function setFormContractor(FormContractorInterface $formContractor): void;
47 56
 
57
+    /**
58
+     * @return void
59
+     */
48 60
     public function setListBuilder(ListBuilderInterface $listBuilder): void;
49 61
 
62
+    /**
63
+     * @return ListBuilderInterface
64
+     */
50 65
     public function getListBuilder(): ?ListBuilderInterface;
51 66
 
67
+    /**
68
+     * @return void
69
+     */
52 70
     public function setDatagridBuilder(DatagridBuilderInterface $datagridBuilder): void;
53 71
 
72
+    /**
73
+     * @return DatagridBuilderInterface
74
+     */
54 75
     public function getDatagridBuilder(): ?DatagridBuilderInterface;
55 76
 
77
+    /**
78
+     * @return void
79
+     */
56 80
     public function setRequest(Request $request): void;
57 81
 
82
+    /**
83
+     * @return void
84
+     */
58 85
     public function setConfigurationPool(Pool $pool): void;
59 86
 
60 87
     /**
@@ -65,12 +92,16 @@  discard block
 block discarded – undo
65 92
      */
66 93
     public function getClass(): string;
67 94
 
95
+    /**
96
+     * @return void
97
+     */
68 98
     public function attachAdminClass(FieldDescriptionInterface $fieldDescription): void;
69 99
 
70 100
     public function getDatagrid(): DatagridInterface;
71 101
 
72 102
     /**
73 103
      * Set base controller name.
104
+     * @return void
74 105
      */
75 106
     public function setBaseControllerName(string $baseControllerName): void;
76 107
 
@@ -81,14 +112,19 @@  discard block
 block discarded – undo
81 112
 
82 113
     /**
83 114
      * Sets a list of templates.
115
+     * @return void
84 116
      */
85 117
     public function setTemplates(array $templates): void;
86 118
 
87 119
     /**
88 120
      * Sets a specific template.
121
+     * @return void
89 122
      */
90 123
     public function setTemplate(string $name, string $template): void;
91 124
 
125
+    /**
126
+     * @return ModelManagerInterface
127
+     */
92 128
     public function getModelManager(): ?ModelManagerInterface;
93 129
 
94 130
     /**
@@ -105,6 +141,7 @@  discard block
 block discarded – undo
105 141
 
106 142
     /**
107 143
      * Returns a form depend on the given $object.
144
+     * @return \Symfony\Component\Form\Form|null
108 145
      */
109 146
     public function getForm(): ?FormInterface;
110 147
 
@@ -130,6 +167,9 @@  discard block
 block discarded – undo
130 167
      */
131 168
     public function getSecurityInformation(): array;
132 169
 
170
+    /**
171
+     * @return void
172
+     */
133 173
     public function setParentFieldDescription(FieldDescriptionInterface $parentFieldDescription): void;
134 174
 
135 175
     /**
@@ -154,8 +194,14 @@  discard block
 block discarded – undo
154 194
      */
155 195
     public function hasRoute(string $name): bool;
156 196
 
197
+    /**
198
+     * @return void
199
+     */
157 200
     public function setSecurityHandler(SecurityHandlerInterface $securityHandler): void;
158 201
 
202
+    /**
203
+     * @return SecurityHandlerInterface
204
+     */
159 205
     public function getSecurityHandler(): ?SecurityHandlerInterface;
160 206
 
161 207
     /**
@@ -174,17 +220,33 @@  discard block
 block discarded – undo
174 220
      * Shorthand method for templating.
175 221
      *
176 222
      * @param object $model
223
+     * @return string
177 224
      */
178 225
     public function id($model): ?string;
179 226
 
227
+    /**
228
+     * @return void
229
+     */
180 230
     public function setValidator(ValidatorInterface $validator): void;
181 231
 
232
+    /**
233
+     * @return ValidatorInterface
234
+     */
182 235
     public function getValidator(): ?ValidatorInterface;
183 236
 
237
+    /**
238
+     * @return FieldDescriptionCollection|null
239
+     */
184 240
     public function getShow(): ?FieldDescriptionCollection;
185 241
 
242
+    /**
243
+     * @return void
244
+     */
186 245
     public function setFormTheme(array $formTheme): void;
187 246
 
247
+    /**
248
+     * @return FieldDescriptionCollection|null
249
+     */
188 250
     public function getList(): ?FieldDescriptionCollection;
189 251
 
190 252
     /**
@@ -192,6 +254,9 @@  discard block
 block discarded – undo
192 254
      */
193 255
     public function getFormTheme(): array;
194 256
 
257
+    /**
258
+     * @return void
259
+     */
195 260
     public function setFilterTheme(array $filterTheme): void;
196 261
 
197 262
     /**
@@ -199,6 +264,9 @@  discard block
 block discarded – undo
199 264
      */
200 265
     public function getFilterTheme(): array;
201 266
 
267
+    /**
268
+     * @return void
269
+     */
202 270
     public function addExtension(AdminExtensionInterface $extension): void;
203 271
 
204 272
     /**
@@ -208,8 +276,14 @@  discard block
 block discarded – undo
208 276
      */
209 277
     public function getExtensions(): array;
210 278
 
279
+    /**
280
+     * @return void
281
+     */
211 282
     public function setRouteBuilder(RouteBuilderInterface $routeBuilder): void;
212 283
 
284
+    /**
285
+     * @return RouteBuilderInterface
286
+     */
213 287
     public function getRouteBuilder(): ?RouteBuilderInterface;
214 288
 
215 289
     /**
@@ -217,8 +291,14 @@  discard block
 block discarded – undo
217 291
      */
218 292
     public function toString($object): string;
219 293
 
294
+    /**
295
+     * @return void
296
+     */
220 297
     public function setLabelTranslatorStrategy(LabelTranslatorStrategyInterface $labelTranslatorStrategy): void;
221 298
 
299
+    /**
300
+     * @return LabelTranslatorStrategyInterface
301
+     */
222 302
     public function getLabelTranslatorStrategy(): ?LabelTranslatorStrategyInterface;
223 303
 
224 304
     /**
@@ -230,6 +310,9 @@  discard block
 block discarded – undo
230 310
 
231 311
     public function getNewInstance(): object;
232 312
 
313
+    /**
314
+     * @return void
315
+     */
233 316
     public function setUniqid(string $uniqId): void;
234 317
 
235 318
     /**
@@ -249,6 +332,9 @@  discard block
 block discarded – undo
249 332
      */
250 333
     public function getObject($id): ?object;
251 334
 
335
+    /**
336
+     * @return void
337
+     */
252 338
     public function setSubject(?object $subject): void;
253 339
 
254 340
     /**
@@ -275,6 +361,7 @@  discard block
 block discarded – undo
275 361
 
276 362
     /**
277 363
      * Call before the batch action, allow you to alter the query and the idx.
364
+     * @return void
278 365
      */
279 366
     public function preBatchAction(string $actionName, ProxyQueryInterface $query, array &$idx, bool $allElements = false): void;
280 367
 
@@ -294,11 +381,15 @@  discard block
 block discarded – undo
294 381
 
295 382
     /**
296 383
      * Add object security, fe. make the current user owner of the object.
384
+     * @return void
297 385
      */
298 386
     public function createObjectSecurity(object $object): void;
299 387
 
300 388
     public function getParent(): self;
301 389
 
390
+    /**
391
+     * @return void
392
+     */
302 393
     public function setParent(self $admin): void;
303 394
 
304 395
     /**
@@ -310,6 +401,7 @@  discard block
 block discarded – undo
310 401
      * Set the translation domain.
311 402
      *
312 403
      * @param string $translationDomain the translation domain
404
+     * @return void
313 405
      */
314 406
     public function setTranslationDomain(string $translationDomain): void;
315 407
 
@@ -329,6 +421,7 @@  discard block
 block discarded – undo
329 421
 
330 422
     /**
331 423
      * Set the form groups.
424
+     * @return void
332 425
      */
333 426
     public function setFormGroups(array $formGroups): void;
334 427
 
@@ -337,6 +430,9 @@  discard block
 block discarded – undo
337 430
      */
338 431
     public function getFormTabs(): array;
339 432
 
433
+    /**
434
+     * @return void
435
+     */
340 436
     public function setFormTabs(array $formTabs): void;
341 437
 
342 438
     /**
@@ -344,10 +440,14 @@  discard block
 block discarded – undo
344 440
      */
345 441
     public function getShowTabs(): array;
346 442
 
443
+    /**
444
+     * @return void
445
+     */
347 446
     public function setShowTabs(array $showTabs): void;
348 447
 
349 448
     /**
350 449
      * Remove a form group field.
450
+     * @return void
351 451
      */
352 452
     public function removeFieldFromFormGroup(string $key): void;
353 453
 
@@ -360,11 +460,13 @@  discard block
 block discarded – undo
360 460
 
361 461
     /**
362 462
      * Set the show groups.
463
+     * @return void
363 464
      */
364 465
     public function setShowGroups(array $showGroups): void;
365 466
 
366 467
     /**
367 468
      * Reorder items in showGroup.
469
+     * @return void
368 470
      */
369 471
     public function reorderShowGroup(string $group, array $keys): void;
370 472
 
@@ -380,6 +482,7 @@  discard block
 block discarded – undo
380 482
 
381 483
     /**
382 484
      * Sets the list of supported sub classes.
485
+     * @return void
383 486
      */
384 487
     public function setSubClasses(array $subClasses): void;
385 488
 
@@ -418,6 +521,7 @@  discard block
 block discarded – undo
418 521
 
419 522
     /**
420 523
      * Returns Admin`s label.
524
+     * @return string
421 525
      */
422 526
     public function getLabel(): ?string;
423 527
 
@@ -432,6 +536,7 @@  discard block
 block discarded – undo
432 536
 
433 537
     /**
434 538
      * Set the current child status.
539
+     * @return void
435 540
      */
436 541
     public function setCurrentChild(bool $currentChild): void;
437 542
 
@@ -455,6 +560,9 @@  discard block
 block discarded – undo
455 560
      */
456 561
     public function getListModes(): array;
457 562
 
563
+    /**
564
+     * @return void
565
+     */
458 566
     public function setListMode(string $mode): void;
459 567
 
460 568
     /**
@@ -479,12 +587,14 @@  discard block
 block discarded – undo
479 587
 
480 588
     /**
481 589
      * Returns the result link for an object.
590
+     * @return string|null
482 591
      */
483 592
     public function getSearchResultLink(object $object): ?string;
484 593
 
485 594
     /**
486 595
      * Setting to true will enable mosaic button for the admin screen.
487 596
      * Setting to false will hide mosaic button for the admin screen.
597
+     * @return void
488 598
      */
489 599
     public function showMosaicButton(bool $isShown): void;
490 600
 
@@ -510,6 +620,9 @@  discard block
 block discarded – undo
510 620
      */
511 621
     public function getRootCode(): string;
512 622
 
623
+    /**
624
+     * @return void
625
+     */
513 626
     public function setFilterPersister(?FilterPersisterInterface $filterPersister = null): void;
514 627
 
515 628
     /**
@@ -522,14 +635,24 @@  discard block
 block discarded – undo
522 635
      */
523 636
     public function getBaseRouteName(): string;
524 637
 
638
+    /**
639
+     * @param AbstractAdmin $childAdmin
640
+     */
525 641
     public function getSideMenu(string $action, ?self $childAdmin = null): ItemInterface;
526 642
 
643
+    /**
644
+     * @return void
645
+     */
527 646
     public function addParentAssociationMapping(string $code, string $value): void;
528 647
 
648
+    /**
649
+     * @return RouteGeneratorInterface|null
650
+     */
529 651
     public function getRouteGenerator(): ?RouteGeneratorInterface;
530 652
 
531 653
     /**
532 654
      * Returns the current child admin instance.
655
+     * @return AdminInterface|null
533 656
      */
534 657
     public function getCurrentChildAdmin(): ?self;
535 658
 
@@ -539,11 +662,15 @@  discard block
 block discarded – undo
539 662
      */
540 663
     public function getParentAssociationMapping(): ?string;
541 664
 
665
+    /**
666
+     * @return void
667
+     */
542 668
     public function reorderFormGroup(string $group, array $keys): void;
543 669
 
544 670
     /**
545 671
      * This method is being called by the main admin class and the child class,
546 672
      * the getFormBuilder is only call by the main admin class.
673
+     * @return void
547 674
      */
548 675
     public function defineFormBuilder(FormBuilderInterface $formBuilder): void;
549 676
 }
Please login to merge, or discard this patch.
src/Admin/FieldDescriptionInterface.php 1 patch
Doc Comments   +16 added lines patch added patch discarded remove patch
@@ -26,6 +26,7 @@  discard block
 block discarded – undo
26 26
 {
27 27
     /**
28 28
      * set the field name.
29
+     * @return void
29 30
      */
30 31
     public function setFieldName(?string $fieldName): void;
31 32
 
@@ -38,6 +39,7 @@  discard block
 block discarded – undo
38 39
 
39 40
     /**
40 41
      * Set the name.
42
+     * @return void
41 43
      */
42 44
     public function setName(?string $name): void;
43 45
 
@@ -61,6 +63,7 @@  discard block
 block discarded – undo
61 63
      * Define an option, an option is has a name and a value.
62 64
      *
63 65
      * @param mixed $value
66
+     * @return void
64 67
      */
65 68
     public function setOption(string $name, $value): void;
66 69
 
@@ -72,6 +75,7 @@  discard block
 block discarded – undo
72 75
      * Then the value are copied across to the related property value.
73 76
      *
74 77
      * @param array<string, mixed> $options
78
+     * @return void
75 79
      */
76 80
     public function setOptions(array $options): void;
77 81
 
@@ -84,6 +88,8 @@  discard block
 block discarded – undo
84 88
 
85 89
     /**
86 90
      * Sets the template used to render the field.
91
+     * @param string $template
92
+     * @return void
87 93
      */
88 94
     public function setTemplate(?string $template): void;
89 95
 
@@ -97,16 +103,19 @@  discard block
 block discarded – undo
97 103
     /**
98 104
      * Sets the field type. The type is a mandatory field as it's used to select the correct template
99 105
      * or the logic associated to the current FieldDescription object.
106
+     * @return void
100 107
      */
101 108
     public function setType(?string $type): void;
102 109
 
103 110
     /**
104 111
      * Returns the type.
112
+     * @return string
105 113
      */
106 114
     public function getType(): ?string;
107 115
 
108 116
     /**
109 117
      * set the parent Admin (only used in nested admin).
118
+     * @return void
110 119
      */
111 120
     public function setParent(AdminInterface $parent);
112 121
 
@@ -129,6 +138,7 @@  discard block
 block discarded – undo
129 138
 
130 139
     /**
131 140
      * Returns the related Target object model.
141
+     * @return string
132 142
      */
133 143
     public function getTargetModel(): ?string;
134 144
 
@@ -160,6 +170,7 @@  discard block
 block discarded – undo
160 170
      * set the association admin instance (only used if the field is linked to an Admin).
161 171
      *
162 172
      * @param AdminInterface $associationAdmin the associated admin
173
+     * @return void
163 174
      */
164 175
     public function setAssociationAdmin(AdminInterface $associationAdmin);
165 176
 
@@ -184,6 +195,7 @@  discard block
 block discarded – undo
184 195
 
185 196
     /**
186 197
      * set the admin class linked to this FieldDescription.
198
+     * @return void
187 199
      */
188 200
     public function setAdmin(AdminInterface $admin);
189 201
 
@@ -198,11 +210,13 @@  discard block
 block discarded – undo
198 210
      * merge option values related to the provided option name.
199 211
      *
200 212
      * @throws \RuntimeException
213
+     * @return void
201 214
      */
202 215
     public function mergeOption(string $name, array $options = []): void;
203 216
 
204 217
     /**
205 218
      * merge options values.
219
+     * @return void
206 220
      */
207 221
     public function mergeOptions(array $options = []): void;
208 222
 
@@ -210,6 +224,7 @@  discard block
 block discarded – undo
210 224
      * set the original mapping type (only used if the field is linked to an entity).
211 225
      *
212 226
      * @param string|int $mappingType
227
+     * @return void
213 228
      */
214 229
     public function setMappingType($mappingType);
215 230
 
@@ -259,6 +274,7 @@  discard block
 block discarded – undo
259 274
 
260 275
     /**
261 276
      * Defines the help message.
277
+     * @return void
262 278
      */
263 279
     public function setHelp(string $help): void;
264 280
 }
Please login to merge, or discard this patch.