Completed
Pull Request — master (#6210)
by Jordi Sala
52:30 queued 07:01
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/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.
src/Route/RouteCollection.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -62,6 +62,9 @@
 block discarded – undo
62 62
         $this->baseControllerName = $baseControllerName;
63 63
     }
64 64
 
65
+    /**
66
+     * @param string $pattern
67
+     */
65 68
     public function add(
66 69
         string $name,
67 70
         ?string $pattern = null,
Please login to merge, or discard this patch.
tests/Fixtures/Admin/CommentAdmin.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -18,6 +18,9 @@
 block discarded – undo
18 18
 
19 19
 class CommentAdmin extends AbstractAdmin
20 20
 {
21
+    /**
22
+     * @param string $label
23
+     */
21 24
     public function setClassnameLabel($label): void
22 25
     {
23 26
         $this->classnameLabel = $label;
Please login to merge, or discard this patch.
src/Admin/AdminInterface.php 1 patch
Doc Comments   +131 added lines patch added patch discarded remove patch
@@ -40,24 +40,54 @@  discard block
 block discarded – undo
40 40
  */
41 41
 interface AdminInterface extends AccessRegistryInterface, FieldDescriptionRegistryInterface, LifecycleHookProviderInterface, MenuBuilderInterface, ParentAdminInterface, UrlGeneratorInterface
42 42
 {
43
+    /**
44
+     * @return void
45
+     */
43 46
     public function setMenuFactory(FactoryInterface $menuFactory): void;
44 47
 
48
+    /**
49
+     * @return FactoryInterface
50
+     */
45 51
     public function getMenuFactory(): ?FactoryInterface;
46 52
 
53
+    /**
54
+     * @return void
55
+     */
47 56
     public function setFormContractor(FormContractorInterface $formContractor): void;
48 57
 
58
+    /**
59
+     * @return void
60
+     */
49 61
     public function setListBuilder(ListBuilderInterface $listBuilder): void;
50 62
 
63
+    /**
64
+     * @return ListBuilderInterface
65
+     */
51 66
     public function getListBuilder(): ?ListBuilderInterface;
52 67
 
68
+    /**
69
+     * @return void
70
+     */
53 71
     public function setDatagridBuilder(DatagridBuilderInterface $datagridBuilder): void;
54 72
 
73
+    /**
74
+     * @return DatagridBuilderInterface
75
+     */
55 76
     public function getDatagridBuilder(): ?DatagridBuilderInterface;
56 77
 
78
+    /**
79
+     * @return void
80
+     */
57 81
     public function setTranslator(TranslatorInterface $translator): void;
58 82
 
83
+    /**
84
+     * @return void
85
+     */
59 86
     public function setRequest(Request $request): void;
60 87
 
88
+    /**
89
+     * @return void
90
+     */
61 91
     public function setConfigurationPool(Pool $pool): void;
62 92
 
63 93
     /**
@@ -68,12 +98,16 @@  discard block
 block discarded – undo
68 98
      */
69 99
     public function getClass(): string;
70 100
 
101
+    /**
102
+     * @return void
103
+     */
71 104
     public function attachAdminClass(FieldDescriptionInterface $fieldDescription): void;
72 105
 
73 106
     public function getDatagrid(): DatagridInterface;
74 107
 
75 108
     /**
76 109
      * Set base controller name.
110
+     * @return void
77 111
      */
78 112
     public function setBaseControllerName(string $baseControllerName): void;
79 113
 
@@ -84,14 +118,19 @@  discard block
 block discarded – undo
84 118
 
85 119
     /**
86 120
      * Sets a list of templates.
121
+     * @return void
87 122
      */
88 123
     public function setTemplates(array $templates): void;
89 124
 
90 125
     /**
91 126
      * Sets a specific template.
127
+     * @return void
92 128
      */
93 129
     public function setTemplate(string $name, string $template): void;
94 130
 
131
+    /**
132
+     * @return ModelManagerInterface
133
+     */
95 134
     public function getModelManager(): ?ModelManagerInterface;
96 135
 
97 136
     /**
@@ -108,6 +147,7 @@  discard block
 block discarded – undo
108 147
 
109 148
     /**
110 149
      * Returns a form depend on the given $object.
150
+     * @return \Symfony\Component\Form\Form|null
111 151
      */
112 152
     public function getForm(): ?FormInterface;
113 153
 
@@ -133,6 +173,9 @@  discard block
 block discarded – undo
133 173
      */
134 174
     public function getSecurityInformation(): array;
135 175
 
176
+    /**
177
+     * @return void
178
+     */
136 179
     public function setParentFieldDescription(FieldDescriptionInterface $parentFieldDescription): void;
137 180
 
138 181
     /**
@@ -157,8 +200,14 @@  discard block
 block discarded – undo
157 200
      */
158 201
     public function hasRoute(string $name): bool;
159 202
 
203
+    /**
204
+     * @return void
205
+     */
160 206
     public function setSecurityHandler(SecurityHandlerInterface $securityHandler): void;
161 207
 
208
+    /**
209
+     * @return SecurityHandlerInterface
210
+     */
162 211
     public function getSecurityHandler(): ?SecurityHandlerInterface;
163 212
 
164 213
     /**
@@ -177,17 +226,33 @@  discard block
 block discarded – undo
177 226
      * Shorthand method for templating.
178 227
      *
179 228
      * @param object $model
229
+     * @return string
180 230
      */
181 231
     public function id($model): ?string;
182 232
 
233
+    /**
234
+     * @return void
235
+     */
183 236
     public function setValidator(ValidatorInterface $validator): void;
184 237
 
238
+    /**
239
+     * @return ValidatorInterface
240
+     */
185 241
     public function getValidator(): ?ValidatorInterface;
186 242
 
243
+    /**
244
+     * @return FieldDescriptionCollection|null
245
+     */
187 246
     public function getShow(): ?FieldDescriptionCollection;
188 247
 
248
+    /**
249
+     * @return void
250
+     */
189 251
     public function setFormTheme(array $formTheme): void;
190 252
 
253
+    /**
254
+     * @return FieldDescriptionCollection|null
255
+     */
191 256
     public function getList(): ?FieldDescriptionCollection;
192 257
 
193 258
     /**
@@ -195,6 +260,9 @@  discard block
 block discarded – undo
195 260
      */
196 261
     public function getFormTheme(): array;
197 262
 
263
+    /**
264
+     * @return void
265
+     */
198 266
     public function setFilterTheme(array $filterTheme): void;
199 267
 
200 268
     /**
@@ -202,6 +270,9 @@  discard block
 block discarded – undo
202 270
      */
203 271
     public function getFilterTheme(): array;
204 272
 
273
+    /**
274
+     * @return void
275
+     */
205 276
     public function addExtension(AdminExtensionInterface $extension): void;
206 277
 
207 278
     /**
@@ -211,8 +282,14 @@  discard block
 block discarded – undo
211 282
      */
212 283
     public function getExtensions(): array;
213 284
 
285
+    /**
286
+     * @return void
287
+     */
214 288
     public function setRouteBuilder(RouteBuilderInterface $routeBuilder): void;
215 289
 
290
+    /**
291
+     * @return RouteBuilderInterface
292
+     */
216 293
     public function getRouteBuilder(): ?RouteBuilderInterface;
217 294
 
218 295
     /**
@@ -220,8 +297,14 @@  discard block
 block discarded – undo
220 297
      */
221 298
     public function toString($object): string;
222 299
 
300
+    /**
301
+     * @return void
302
+     */
223 303
     public function setLabelTranslatorStrategy(LabelTranslatorStrategyInterface $labelTranslatorStrategy): void;
224 304
 
305
+    /**
306
+     * @return LabelTranslatorStrategyInterface
307
+     */
225 308
     public function getLabelTranslatorStrategy(): ?LabelTranslatorStrategyInterface;
226 309
 
227 310
     /**
@@ -233,6 +316,9 @@  discard block
 block discarded – undo
233 316
 
234 317
     public function getNewInstance(): object;
235 318
 
319
+    /**
320
+     * @return void
321
+     */
236 322
     public function setUniqid(string $uniqId): void;
237 323
 
238 324
     /**
@@ -252,6 +338,9 @@  discard block
 block discarded – undo
252 338
      */
253 339
     public function getObject($id): ?object;
254 340
 
341
+    /**
342
+     * @return void
343
+     */
255 344
     public function setSubject(?object $subject): void;
256 345
 
257 346
     public function getSubject(): object;
@@ -275,6 +364,7 @@  discard block
 block discarded – undo
275 364
 
276 365
     /**
277 366
      * Call before the batch action, allow you to alter the query and the idx.
367
+     * @return void
278 368
      */
279 369
     public function preBatchAction(string $actionName, ProxyQueryInterface $query, array &$idx, bool $allElements = false): void;
280 370
 
@@ -297,6 +387,7 @@  discard block
 block discarded – undo
297 387
      *
298 388
      * @deprecated this feature cannot be stable, use a custom validator,
299 389
      *             the feature will be removed with Symfony 2.2
390
+     * @return void
300 391
      */
301 392
     public function validate(ErrorElement $errorElement, $object): void;
302 393
 
@@ -304,11 +395,15 @@  discard block
 block discarded – undo
304 395
 
305 396
     /**
306 397
      * Add object security, fe. make the current user owner of the object.
398
+     * @return void
307 399
      */
308 400
     public function createObjectSecurity(object $object): void;
309 401
 
310 402
     public function getParent(): self;
311 403
 
404
+    /**
405
+     * @return void
406
+     */
312 407
     public function setParent(self $admin): void;
313 408
 
314 409
     /**
@@ -320,6 +415,7 @@  discard block
 block discarded – undo
320 415
      * Set the translation domain.
321 416
      *
322 417
      * @param string $translationDomain the translation domain
418
+     * @return void
323 419
      */
324 420
     public function setTranslationDomain(string $translationDomain): void;
325 421
 
@@ -339,6 +435,7 @@  discard block
 block discarded – undo
339 435
 
340 436
     /**
341 437
      * Set the form groups.
438
+     * @return void
342 439
      */
343 440
     public function setFormGroups(array $formGroups): void;
344 441
 
@@ -347,6 +444,9 @@  discard block
 block discarded – undo
347 444
      */
348 445
     public function getFormTabs(): array;
349 446
 
447
+    /**
448
+     * @return void
449
+     */
350 450
     public function setFormTabs(array $formTabs): void;
351 451
 
352 452
     /**
@@ -354,10 +454,14 @@  discard block
 block discarded – undo
354 454
      */
355 455
     public function getShowTabs(): array;
356 456
 
457
+    /**
458
+     * @return void
459
+     */
357 460
     public function setShowTabs(array $showTabs): void;
358 461
 
359 462
     /**
360 463
      * Remove a form group field.
464
+     * @return void
361 465
      */
362 466
     public function removeFieldFromFormGroup(string $key): void;
363 467
 
@@ -370,11 +474,13 @@  discard block
 block discarded – undo
370 474
 
371 475
     /**
372 476
      * Set the show groups.
477
+     * @return void
373 478
      */
374 479
     public function setShowGroups(array $showGroups): void;
375 480
 
376 481
     /**
377 482
      * Reorder items in showGroup.
483
+     * @return void
378 484
      */
379 485
     public function reorderShowGroup(string $group, array $keys): void;
380 486
 
@@ -390,6 +496,7 @@  discard block
 block discarded – undo
390 496
 
391 497
     /**
392 498
      * Sets the list of supported sub classes.
499
+     * @return void
393 500
      */
394 501
     public function setSubClasses(array $subClasses): void;
395 502
 
@@ -428,6 +535,7 @@  discard block
 block discarded – undo
428 535
 
429 536
     /**
430 537
      * Returns Admin`s label.
538
+     * @return string
431 539
      */
432 540
     public function getLabel(): ?string;
433 541
 
@@ -442,6 +550,7 @@  discard block
 block discarded – undo
442 550
 
443 551
     /**
444 552
      * Set the current child status.
553
+     * @return void
445 554
      */
446 555
     public function setCurrentChild(bool $currentChild): void;
447 556
 
@@ -465,6 +574,9 @@  discard block
 block discarded – undo
465 574
      */
466 575
     public function getListModes(): array;
467 576
 
577
+    /**
578
+     * @return void
579
+     */
468 580
     public function setListMode(string $mode): void;
469 581
 
470 582
     /**
@@ -489,12 +601,14 @@  discard block
 block discarded – undo
489 601
 
490 602
     /**
491 603
      * Returns the result link for an object.
604
+     * @return string|null
492 605
      */
493 606
     public function getSearchResultLink(object $object): ?string;
494 607
 
495 608
     /**
496 609
      * Setting to true will enable mosaic button for the admin screen.
497 610
      * Setting to false will hide mosaic button for the admin screen.
611
+     * @return void
498 612
      */
499 613
     public function showMosaicButton(bool $isShown): void;
500 614
 
@@ -520,6 +634,9 @@  discard block
 block discarded – undo
520 634
      */
521 635
     public function getRootCode(): string;
522 636
 
637
+    /**
638
+     * @return void
639
+     */
523 640
     public function setFilterPersister(?FilterPersisterInterface $filterPersister = null): void;
524 641
 
525 642
     /**
@@ -532,14 +649,24 @@  discard block
 block discarded – undo
532 649
      */
533 650
     public function getBaseRouteName(): string;
534 651
 
652
+    /**
653
+     * @param AbstractAdmin $childAdmin
654
+     */
535 655
     public function getSideMenu(string $action, ?self $childAdmin = null): ItemInterface;
536 656
 
657
+    /**
658
+     * @return void
659
+     */
537 660
     public function addParentAssociationMapping(string $code, string $value): void;
538 661
 
662
+    /**
663
+     * @return RouteGeneratorInterface|null
664
+     */
539 665
     public function getRouteGenerator(): ?RouteGeneratorInterface;
540 666
 
541 667
     /**
542 668
      * Returns the current child admin instance.
669
+     * @return AdminInterface|null
543 670
      */
544 671
     public function getCurrentChildAdmin(): ?self;
545 672
 
@@ -549,11 +676,15 @@  discard block
 block discarded – undo
549 676
      */
550 677
     public function getParentAssociationMapping(): ?string;
551 678
 
679
+    /**
680
+     * @return void
681
+     */
552 682
     public function reorderFormGroup(string $group, array $keys): void;
553 683
 
554 684
     /**
555 685
      * This method is being called by the main admin class and the child class,
556 686
      * the getFormBuilder is only call by the main admin class.
687
+     * @return void
557 688
      */
558 689
     public function defineFormBuilder(FormBuilderInterface $formBuilder): void;
559 690
 }
Please login to merge, or discard this patch.