Completed
Pull Request — master (#6005)
by Javier
03:27
created
src/Admin/BaseFieldDescription.php 1 patch
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -131,6 +131,9 @@  discard block
 block discarded – undo
131 131
      */
132 132
     private static $fieldGetters = [];
133 133
 
134
+    /**
135
+     * @param string $fieldName
136
+     */
134 137
     public function setFieldName(?string $fieldName): void
135 138
     {
136 139
         $this->fieldName = $fieldName;
@@ -141,6 +144,9 @@  discard block
 block discarded – undo
141 144
         return $this->fieldName;
142 145
     }
143 146
 
147
+    /**
148
+     * @param string $name
149
+     */
144 150
     public function setName(?string $name): void
145 151
     {
146 152
         $this->name = $name;
@@ -438,6 +444,9 @@  discard block
 block discarded – undo
438 444
         return $object->{$fieldName};
439 445
     }
440 446
 
447
+    /**
448
+     * @param string $fieldName
449
+     */
441 450
     private function cacheFieldGetter($object, ?string $fieldName, string $method, ?string $getter = null): void
442 451
     {
443 452
         $getterKey = $this->getFieldGetterKey($object, $fieldName);
Please login to merge, or discard this patch.
src/Admin/AbstractAdmin.php 1 patch
Doc Comments   +13 added lines patch added patch discarded remove patch
@@ -936,6 +936,7 @@  discard block
 block discarded – undo
936 936
 
937 937
     /**
938 938
      * NEXT_MAJOR: remove this method.
939
+     * @param string $subClass
939 940
      */
940 941
     public function addSubClass($subClass): void
941 942
     {
@@ -1067,6 +1068,9 @@  discard block
 block discarded – undo
1067 1068
         return $this->routeGenerator->hasAdminRoute($this, $name);
1068 1069
     }
1069 1070
 
1071
+    /**
1072
+     * @param string $adminCode
1073
+     */
1070 1074
     public function isCurrentRoute(string $name, ?string $adminCode = null): bool
1071 1075
     {
1072 1076
         if (!$this->hasRequest()) {
@@ -1309,6 +1313,9 @@  discard block
 block discarded – undo
1309 1313
         return $this->baseControllerName;
1310 1314
     }
1311 1315
 
1316
+    /**
1317
+     * @param string $label
1318
+     */
1312 1319
     public function setLabel(?string $label): void
1313 1320
     {
1314 1321
         $this->label = $label;
@@ -1822,6 +1829,7 @@  discard block
 block discarded – undo
1822 1829
      *
1823 1830
      * NEXT_MAJOR: remove this method
1824 1831
      *
1832
+     * @param string $domain
1825 1833
      * @return string the translated string
1826 1834
      *
1827 1835
      * @deprecated since sonata-project/admin-bundle 3.9, to be removed with 4.0
@@ -2002,6 +2010,9 @@  discard block
 block discarded – undo
2002 2010
         return $this->managerType;
2003 2011
     }
2004 2012
 
2013
+    /**
2014
+     * @param string $type
2015
+     */
2005 2016
     public function setManagerType(?string $type): void
2006 2017
     {
2007 2018
         $this->managerType = $type;
@@ -2409,6 +2420,7 @@  discard block
 block discarded – undo
2409 2420
 
2410 2421
     /**
2411 2422
      * {@inheritdoc}
2423
+     * @param boolean $isShown
2412 2424
      */
2413 2425
     final public function showMosaicButton($isShown): void
2414 2426
     {
@@ -2535,6 +2547,7 @@  discard block
 block discarded – undo
2535 2547
      * NEXT_MAJOR: remove this method.
2536 2548
      *
2537 2549
      * @deprecated Use configureTabMenu instead
2550
+     * @param string $action
2538 2551
      */
2539 2552
     protected function configureSideMenu(ItemInterface $menu, $action, ?AdminInterface $childAdmin = null): void
2540 2553
     {
Please login to merge, or discard this patch.
src/Admin/AdminInterface.php 1 patch
Doc Comments   +123 added lines patch added patch discarded remove patch
@@ -37,26 +37,59 @@  discard block
 block discarded – undo
37 37
  */
38 38
 interface AdminInterface extends AccessRegistryInterface, FieldDescriptionRegistryInterface, LifecycleHookProviderInterface, MenuBuilderInterface, ParentAdminInterface, UrlGeneratorInterface
39 39
 {
40
+    /**
41
+     * @return void
42
+     */
40 43
     public function setMenuFactory(MenuFactoryInterface $menuFactory): void;
41 44
 
45
+    /**
46
+     * @return MenuFactoryInterface
47
+     */
42 48
     public function getMenuFactory(): ?MenuFactoryInterface;
43 49
 
50
+    /**
51
+     * @return void
52
+     */
44 53
     public function setFormContractor(FormContractorInterface $formContractor): void;
45 54
 
55
+    /**
56
+     * @return void
57
+     */
46 58
     public function setListBuilder(ListBuilderInterface $listBuilder): void;
47 59
 
60
+    /**
61
+     * @return ListBuilderInterface
62
+     */
48 63
     public function getListBuilder(): ?ListBuilderInterface;
49 64
 
65
+    /**
66
+     * @return void
67
+     */
50 68
     public function setDatagridBuilder(DatagridBuilderInterface $datagridBuilder): void;
51 69
 
70
+    /**
71
+     * @return DatagridBuilderInterface
72
+     */
52 73
     public function getDatagridBuilder(): ?DatagridBuilderInterface;
53 74
 
75
+    /**
76
+     * @return void
77
+     */
54 78
     public function setTranslator(TranslatorInterface $translator): void;
55 79
 
80
+    /**
81
+     * @return TranslatorInterface
82
+     */
56 83
     public function getTranslator(): ?TranslatorInterface;
57 84
 
85
+    /**
86
+     * @return void
87
+     */
58 88
     public function setRequest(Request $request): void;
59 89
 
90
+    /**
91
+     * @return void
92
+     */
60 93
     public function setConfigurationPool(Pool $pool): void;
61 94
 
62 95
     /**
@@ -67,12 +100,19 @@  discard block
 block discarded – undo
67 100
      */
68 101
     public function getClass(): string;
69 102
 
103
+    /**
104
+     * @return void
105
+     */
70 106
     public function attachAdminClass(FieldDescriptionInterface $fieldDescription): void;
71 107
 
108
+    /**
109
+     * @return DatagridInterface|null
110
+     */
72 111
     public function getDatagrid(): ?DatagridInterface;
73 112
 
74 113
     /**
75 114
      * Set base controller name.
115
+     * @return void
76 116
      */
77 117
     public function setBaseControllerName(string $baseControllerName): void;
78 118
 
@@ -83,14 +123,19 @@  discard block
 block discarded – undo
83 123
 
84 124
     /**
85 125
      * Sets a list of templates.
126
+     * @return void
86 127
      */
87 128
     public function setTemplates(array $templates): void;
88 129
 
89 130
     /**
90 131
      * Sets a specific template.
132
+     * @return void
91 133
      */
92 134
     public function setTemplate(string $name, string $template): void;
93 135
 
136
+    /**
137
+     * @return ModelManagerInterface
138
+     */
94 139
     public function getModelManager(): ?ModelManagerInterface;
95 140
 
96 141
     /**
@@ -110,6 +155,7 @@  discard block
 block discarded – undo
110 155
 
111 156
     /**
112 157
      * Returns a form depend on the given $object.
158
+     * @return \Symfony\Component\Form\Form|null
113 159
      */
114 160
     public function getForm(): ?FormInterface;
115 161
 
@@ -138,6 +184,9 @@  discard block
 block discarded – undo
138 184
      */
139 185
     public function getSecurityInformation(): array;
140 186
 
187
+    /**
188
+     * @return void
189
+     */
141 190
     public function setParentFieldDescription(FieldDescriptionInterface $parentFieldDescription): void;
142 191
 
143 192
     /**
@@ -177,8 +226,14 @@  discard block
 block discarded – undo
177 226
      */
178 227
     public function hasRoute(string $name): bool;
179 228
 
229
+    /**
230
+     * @return void
231
+     */
180 232
     public function setSecurityHandler(SecurityHandlerInterface $securityHandler): void;
181 233
 
234
+    /**
235
+     * @return SecurityHandlerInterface
236
+     */
182 237
     public function getSecurityHandler(): ?SecurityHandlerInterface;
183 238
 
184 239
     /**
@@ -197,15 +252,28 @@  discard block
 block discarded – undo
197 252
      * Shorthand method for templating.
198 253
      *
199 254
      * @param object $entity
255
+     * @return string
200 256
      */
201 257
     public function id($entity): ?string;
202 258
 
259
+    /**
260
+     * @return void
261
+     */
203 262
     public function setValidator(ValidatorInterface $validator): void;
204 263
 
264
+    /**
265
+     * @return ValidatorInterface
266
+     */
205 267
     public function getValidator(): ?ValidatorInterface;
206 268
 
269
+    /**
270
+     * @return FieldDescriptionCollection|null
271
+     */
207 272
     public function getShow(): ?FieldDescriptionCollection;
208 273
 
274
+    /**
275
+     * @return void
276
+     */
209 277
     public function setFormTheme(array $formTheme): void;
210 278
 
211 279
     /**
@@ -213,6 +281,9 @@  discard block
 block discarded – undo
213 281
      */
214 282
     public function getFormTheme(): array;
215 283
 
284
+    /**
285
+     * @return void
286
+     */
216 287
     public function setFilterTheme(array $filterTheme): void;
217 288
 
218 289
     /**
@@ -220,6 +291,9 @@  discard block
 block discarded – undo
220 291
      */
221 292
     public function getFilterTheme(): array;
222 293
 
294
+    /**
295
+     * @return void
296
+     */
223 297
     public function addExtension(AdminExtensionInterface $extension): void;
224 298
 
225 299
     /**
@@ -229,8 +303,14 @@  discard block
 block discarded – undo
229 303
      */
230 304
     public function getExtensions(): array;
231 305
 
306
+    /**
307
+     * @return void
308
+     */
232 309
     public function setRouteBuilder(RouteBuilderInterface $routeBuilder): void;
233 310
 
311
+    /**
312
+     * @return RouteBuilderInterface
313
+     */
234 314
     public function getRouteBuilder(): ?RouteBuilderInterface;
235 315
 
236 316
     /**
@@ -238,8 +318,14 @@  discard block
 block discarded – undo
238 318
      */
239 319
     public function toString($object): string;
240 320
 
321
+    /**
322
+     * @return void
323
+     */
241 324
     public function setLabelTranslatorStrategy(LabelTranslatorStrategyInterface $labelTranslatorStrategy): void;
242 325
 
326
+    /**
327
+     * @return LabelTranslatorStrategyInterface
328
+     */
243 329
     public function getLabelTranslatorStrategy(): ?LabelTranslatorStrategyInterface;
244 330
 
245 331
     /**
@@ -251,6 +337,9 @@  discard block
 block discarded – undo
251 337
 
252 338
     public function getNewInstance(): object;
253 339
 
340
+    /**
341
+     * @return void
342
+     */
254 343
     public function setUniqid(string $uniqId): void;
255 344
 
256 345
     /**
@@ -270,6 +359,9 @@  discard block
 block discarded – undo
270 359
      */
271 360
     public function getObject($id): ?object;
272 361
 
362
+    /**
363
+     * @return void
364
+     */
273 365
     public function setSubject(?object $subject): void;
274 366
 
275 367
     public function getSubject(): ?object;
@@ -308,6 +400,7 @@  discard block
 block discarded – undo
308 400
 
309 401
     /**
310 402
      * Call before the batch action, allow you to alter the query and the idx.
403
+     * @return void
311 404
      */
312 405
     public function preBatchAction(string $actionName, ProxyQueryInterface $query, array &$idx, bool $allElements = false): void;
313 406
 
@@ -330,6 +423,7 @@  discard block
 block discarded – undo
330 423
      *
331 424
      * @deprecated this feature cannot be stable, use a custom validator,
332 425
      *             the feature will be removed with Symfony 2.2
426
+     * @return void
333 427
      */
334 428
     public function validate(ErrorElement $errorElement, $object): void;
335 429
 
@@ -337,11 +431,18 @@  discard block
 block discarded – undo
337 431
 
338 432
     /**
339 433
      * Add object security, fe. make the current user owner of the object.
434
+     * @return void
340 435
      */
341 436
     public function createObjectSecurity(object $object): void;
342 437
 
438
+    /**
439
+     * @return AdminInterface|null
440
+     */
343 441
     public function getParent(): ?self;
344 442
 
443
+    /**
444
+     * @return void
445
+     */
345 446
     public function setParent(self $admin): void;
346 447
 
347 448
     /**
@@ -353,6 +454,7 @@  discard block
 block discarded – undo
353 454
      * Set the translation domain.
354 455
      *
355 456
      * @param string $translationDomain the translation domain
457
+     * @return void
356 458
      */
357 459
     public function setTranslationDomain(string $translationDomain): void;
358 460
 
@@ -374,6 +476,7 @@  discard block
 block discarded – undo
374 476
 
375 477
     /**
376 478
      * Set the form groups.
479
+     * @return void
377 480
      */
378 481
     public function setFormGroups(array $formGroups): void;
379 482
 
@@ -382,6 +485,9 @@  discard block
 block discarded – undo
382 485
      */
383 486
     public function getFormTabs();
384 487
 
488
+    /**
489
+     * @return void
490
+     */
385 491
     public function setFormTabs(array $formTabs): void;
386 492
 
387 493
     /**
@@ -389,10 +495,14 @@  discard block
 block discarded – undo
389 495
      */
390 496
     public function getShowTabs();
391 497
 
498
+    /**
499
+     * @return void
500
+     */
392 501
     public function setShowTabs(array $showTabs): void;
393 502
 
394 503
     /**
395 504
      * Remove a form group field.
505
+     * @return void
396 506
      */
397 507
     public function removeFieldFromFormGroup(string $key): void;
398 508
 
@@ -407,21 +517,25 @@  discard block
 block discarded – undo
407 517
 
408 518
     /**
409 519
      * Set the show groups.
520
+     * @return void
410 521
      */
411 522
     public function setShowGroups(array $showGroups): void;
412 523
 
413 524
     /**
414 525
      * Reorder items in showGroup.
526
+     * @return void
415 527
      */
416 528
     public function reorderShowGroup(string $group, array $keys): void;
417 529
 
418 530
     /**
419 531
      * add a FieldDescription.
532
+     * @return void
420 533
      */
421 534
     public function addFormFieldDescription(string $name, FieldDescriptionInterface $fieldDescription): void;
422 535
 
423 536
     /**
424 537
      * Remove a FieldDescription.
538
+     * @return void
425 539
      */
426 540
     public function removeFormFieldDescription(string $name): void;
427 541
 
@@ -439,11 +553,13 @@  discard block
 block discarded – undo
439 553
      * Adds a new class to a list of supported sub classes.
440 554
      *
441 555
      * @param $subClass
556
+     * @return void
442 557
      */
443 558
     public function addSubClass($subClass): void;
444 559
 
445 560
     /**
446 561
      * Sets the list of supported sub classes.
562
+     * @return void
447 563
      */
448 564
     public function setSubClasses(array $subClasses): void;
449 565
 
@@ -482,6 +598,7 @@  discard block
 block discarded – undo
482 598
 
483 599
     /**
484 600
      * Returns Admin`s label.
601
+     * @return string
485 602
      */
486 603
     public function getLabel(): ?string;
487 604
 
@@ -496,6 +613,7 @@  discard block
 block discarded – undo
496 613
 
497 614
     /**
498 615
      * Set the current child status.
616
+     * @return void
499 617
      */
500 618
     public function setCurrentChild(bool $currentChild): void;
501 619
 
@@ -521,6 +639,9 @@  discard block
 block discarded – undo
521 639
      */
522 640
     public function getListModes(): array;
523 641
 
642
+    /**
643
+     * @return void
644
+     */
524 645
     public function setListMode(string $mode): void;
525 646
 
526 647
     /**
@@ -545,12 +666,14 @@  discard block
 block discarded – undo
545 666
 
546 667
     /**
547 668
      * Returns the result link for an object.
669
+     * @return string|null
548 670
      */
549 671
     public function getSearchResultLink(object $object): ?string;
550 672
 
551 673
     /**
552 674
      * Setting to true will enable mosaic button for the admin screen.
553 675
      * Setting to false will hide mosaic button for the admin screen.
676
+     * @return void
554 677
      */
555 678
     public function showMosaicButton(bool $isShown): void;
556 679
 
Please login to merge, or discard this patch.
src/Admin/FieldDescriptionInterface.php 1 patch
Doc Comments   +15 added lines patch added patch discarded remove patch
@@ -20,6 +20,7 @@  discard block
 block discarded – undo
20 20
 {
21 21
     /**
22 22
      * set the field name.
23
+     * @return void
23 24
      */
24 25
     public function setFieldName(?string $fieldName): void;
25 26
 
@@ -32,6 +33,7 @@  discard block
 block discarded – undo
32 33
 
33 34
     /**
34 35
      * Set the name.
36
+     * @return void
35 37
      */
36 38
     public function setName(?string $name): void;
37 39
 
@@ -55,6 +57,7 @@  discard block
 block discarded – undo
55 57
      * Define an option, an option is has a name and a value.
56 58
      *
57 59
      * @param mixed $value
60
+     * @return void
58 61
      */
59 62
     public function setOption(string $name, $value): void;
60 63
 
@@ -66,6 +69,7 @@  discard block
 block discarded – undo
66 69
      * Then the value are copied across to the related property value.
67 70
      *
68 71
      * @param array<string, mixed> $options
72
+     * @return void
69 73
      */
70 74
     public function setOptions(array $options): void;
71 75
 
@@ -78,6 +82,7 @@  discard block
 block discarded – undo
78 82
 
79 83
     /**
80 84
      * Sets the template used to render the field.
85
+     * @return void
81 86
      */
82 87
     public function setTemplate(string $template): void;
83 88
 
@@ -91,6 +96,7 @@  discard block
 block discarded – undo
91 96
     /**
92 97
      * Sets the field type. The type is a mandatory field as it's used to select the correct template
93 98
      * or the logic associated to the current FieldDescription object.
99
+     * @return void
94 100
      */
95 101
     public function setType(?string $type): void;
96 102
 
@@ -103,11 +109,13 @@  discard block
 block discarded – undo
103 109
 
104 110
     /**
105 111
      * set the parent Admin (only used in nested admin).
112
+     * @return void
106 113
      */
107 114
     public function setParent(AdminInterface $parent);
108 115
 
109 116
     /**
110 117
      * Returns the parent Admin (only used in nested admin).
118
+     * @return AdminInterface|null
111 119
      */
112 120
     public function getParent(): ?AdminInterface;
113 121
 
@@ -123,6 +131,7 @@  discard block
 block discarded – undo
123 131
 
124 132
     /**
125 133
      * Returns the related Target Entity.
134
+     * @return string
126 135
      */
127 136
     public function getTargetEntity(): ?string;
128 137
 
@@ -154,11 +163,13 @@  discard block
 block discarded – undo
154 163
      * set the association admin instance (only used if the field is linked to an Admin).
155 164
      *
156 165
      * @param AdminInterface $associationAdmin the associated admin
166
+     * @return void
157 167
      */
158 168
     public function setAssociationAdmin(AdminInterface $associationAdmin);
159 169
 
160 170
     /**
161 171
      * Returns the associated Admin instance (only used if the field is linked to an Admin).
172
+     * @return AdminInterface
162 173
      */
163 174
     public function getAssociationAdmin(): ?AdminInterface;
164 175
 
@@ -176,6 +187,7 @@  discard block
 block discarded – undo
176 187
 
177 188
     /**
178 189
      * set the admin class linked to this FieldDescription.
190
+     * @return void
179 191
      */
180 192
     public function setAdmin(AdminInterface $admin);
181 193
 
@@ -188,11 +200,13 @@  discard block
 block discarded – undo
188 200
      * merge option values related to the provided option name.
189 201
      *
190 202
      * @throws \RuntimeException
203
+     * @return void
191 204
      */
192 205
     public function mergeOption(string $name, array $options = []): void;
193 206
 
194 207
     /**
195 208
      * merge options values.
209
+     * @return void
196 210
      */
197 211
     public function mergeOptions(array $options = []): void;
198 212
 
@@ -200,6 +214,7 @@  discard block
 block discarded – undo
200 214
      * set the original mapping type (only used if the field is linked to an entity).
201 215
      *
202 216
      * @param string|int $mappingType
217
+     * @return void
203 218
      */
204 219
     public function setMappingType($mappingType);
205 220
 
Please login to merge, or discard this patch.