Completed
Pull Request — master (#6177)
by Wojciech
07:29
created
tests/Show/ShowMapperTest.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -586,6 +586,10 @@
 block discarded – undo
586 586
         $this->admin->setShowBuilder(new ShowBuilder());
587 587
     }
588 588
 
589
+    /**
590
+     * @param string $name
591
+     * @param string $label
592
+     */
589 593
     private function getFieldDescriptionMock(?string $name = null, ?string $label = null): BaseFieldDescription
590 594
     {
591 595
         $fieldDescription = $this->getMockForAbstractClass(BaseFieldDescription::class);
Please login to merge, or discard this patch.
src/Datagrid/DatagridMapper.php 1 patch
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -44,6 +44,8 @@
 block discarded – undo
44 44
 
45 45
     /**
46 46
      * @param FieldDescriptionInterface|string $name
47
+     * @param string $type
48
+     * @param string $fieldType
47 49
      *
48 50
      * @throws \LogicException
49 51
      */
Please login to merge, or discard this patch.
src/Show/ShowMapper.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -41,6 +41,7 @@
 block discarded – undo
41 41
 
42 42
     /**
43 43
      * @param FieldDescriptionInterface|string $name
44
+     * @param string $type
44 45
      *
45 46
      * @throws \LogicException
46 47
      */
Please login to merge, or discard this patch.
src/Twig/Extension/SonataAdminExtension.php 1 patch
Doc Comments   +6 added lines, -5 removed lines patch added patch discarded remove patch
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
     /**
183 183
      * render a view element.
184 184
      *
185
-     * @param object $object
185
+     * @param \stdClass $object
186 186
      *
187 187
      * @return string
188 188
      */
@@ -221,8 +221,8 @@  discard block
 block discarded – undo
221 221
     /**
222 222
      * render a compared view element.
223 223
      *
224
-     * @param mixed $baseObject
225
-     * @param mixed $compareObject
224
+     * @param \stdClass $baseObject
225
+     * @param \stdClass $compareObject
226 226
      *
227 227
      * @return string
228 228
      */
@@ -343,7 +343,8 @@  discard block
 block discarded – undo
343 343
     /**
344 344
      * Get the identifiers as a string that is safe to use in a url.
345 345
      *
346
-     * @param object $model
346
+     * @param \stdClass $model
347
+     * @param AdminInterface $admin
347 348
      *
348 349
      * @return string string representation of the id that is safe to use in a url
349 350
      */
@@ -365,7 +366,7 @@  discard block
 block discarded – undo
365 366
     }
366 367
 
367 368
     /**
368
-     * @return string|bool
369
+     * @return string|false
369 370
      */
370 371
     public function getXEditableType($type)
371 372
     {
Please login to merge, or discard this patch.
src/Datagrid/ListMapper.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
     }
44 44
 
45 45
     /**
46
-     * @param FieldDescriptionInterface|string $name
46
+     * @param \Sonata\AdminBundle\Admin\BaseFieldDescription $name
47 47
      */
48 48
     public function addIdentifier($name, ?string $type = null, array $fieldDescriptionOptions = []): self
49 49
     {
Please login to merge, or discard this patch.
tests/Datagrid/ListMapperTest.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -414,6 +414,10 @@
 block discarded – undo
414 414
         );
415 415
     }
416 416
 
417
+    /**
418
+     * @param string $name
419
+     * @param string $label
420
+     */
417 421
     private function getFieldDescriptionMock(?string $name = null, ?string $label = null): BaseFieldDescription
418 422
     {
419 423
         $fieldDescription = $this->getMockForAbstractClass(BaseFieldDescription::class);
Please login to merge, or discard this patch.
src/Admin/Pool.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -70,6 +70,9 @@
 block discarded – undo
70 70
      */
71 71
     protected $propertyAccessor;
72 72
 
73
+    /**
74
+     * @param PropertyAccessorInterface $propertyAccessor
75
+     */
73 76
     public function __construct(
74 77
         ContainerInterface $container,
75 78
         string $title,
Please login to merge, or discard this patch.
src/Admin/FieldDescriptionInterface.php 1 patch
Doc Comments   +14 added lines patch added patch discarded remove patch
@@ -25,6 +25,7 @@  discard block
 block discarded – undo
25 25
 {
26 26
     /**
27 27
      * set the field name.
28
+     * @return void
28 29
      */
29 30
     public function setFieldName(?string $fieldName): void;
30 31
 
@@ -37,6 +38,7 @@  discard block
 block discarded – undo
37 38
 
38 39
     /**
39 40
      * Set the name.
41
+     * @return void
40 42
      */
41 43
     public function setName(?string $name): void;
42 44
 
@@ -60,6 +62,7 @@  discard block
 block discarded – undo
60 62
      * Define an option, an option is has a name and a value.
61 63
      *
62 64
      * @param mixed $value
65
+     * @return void
63 66
      */
64 67
     public function setOption(string $name, $value): void;
65 68
 
@@ -71,6 +74,7 @@  discard block
 block discarded – undo
71 74
      * Then the value are copied across to the related property value.
72 75
      *
73 76
      * @param array<string, mixed> $options
77
+     * @return void
74 78
      */
75 79
     public function setOptions(array $options): void;
76 80
 
@@ -83,6 +87,7 @@  discard block
 block discarded – undo
83 87
 
84 88
     /**
85 89
      * Sets the template used to render the field.
90
+     * @return void
86 91
      */
87 92
     public function setTemplate(string $template): void;
88 93
 
@@ -96,16 +101,19 @@  discard block
 block discarded – undo
96 101
     /**
97 102
      * Sets the field type. The type is a mandatory field as it's used to select the correct template
98 103
      * or the logic associated to the current FieldDescription object.
104
+     * @return void
99 105
      */
100 106
     public function setType(?string $type): void;
101 107
 
102 108
     /**
103 109
      * Returns the type.
110
+     * @return string
104 111
      */
105 112
     public function getType(): ?string;
106 113
 
107 114
     /**
108 115
      * set the parent Admin (only used in nested admin).
116
+     * @return void
109 117
      */
110 118
     public function setParent(AdminInterface $parent);
111 119
 
@@ -135,6 +143,7 @@  discard block
 block discarded – undo
135 143
      * Returns the related Target object model.
136 144
      *
137 145
      * @deprecated since sonata-project/admin-bundle 3.69. Use `getTargetModel()` instead.
146
+     * @return string
138 147
      */
139 148
     public function getTargetEntity(): ?string;
140 149
 
@@ -168,6 +177,7 @@  discard block
 block discarded – undo
168 177
      * set the association admin instance (only used if the field is linked to an Admin).
169 178
      *
170 179
      * @param AdminInterface $associationAdmin the associated admin
180
+     * @return void
171 181
      */
172 182
     public function setAssociationAdmin(AdminInterface $associationAdmin);
173 183
 
@@ -195,6 +205,7 @@  discard block
 block discarded – undo
195 205
 
196 206
     /**
197 207
      * set the admin class linked to this FieldDescription.
208
+     * @return void
198 209
      */
199 210
     public function setAdmin(AdminInterface $admin);
200 211
 
@@ -210,11 +221,13 @@  discard block
 block discarded – undo
210 221
      * merge option values related to the provided option name.
211 222
      *
212 223
      * @throws \RuntimeException
224
+     * @return void
213 225
      */
214 226
     public function mergeOption(string $name, array $options = []): void;
215 227
 
216 228
     /**
217 229
      * merge options values.
230
+     * @return void
218 231
      */
219 232
     public function mergeOptions(array $options = []): void;
220 233
 
@@ -222,6 +235,7 @@  discard block
 block discarded – undo
222 235
      * set the original mapping type (only used if the field is linked to an entity).
223 236
      *
224 237
      * @param string|int $mappingType
238
+     * @return void
225 239
      */
226 240
     public function setMappingType($mappingType);
227 241
 
Please login to merge, or discard this patch.
src/Admin/AdminInterface.php 1 patch
Doc Comments   +124 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
 
@@ -140,6 +186,9 @@  discard block
 block discarded – undo
140 186
      */
141 187
     public function getSecurityInformation(): array;
142 188
 
189
+    /**
190
+     * @return void
191
+     */
143 192
     public function setParentFieldDescription(FieldDescriptionInterface $parentFieldDescription): void;
144 193
 
145 194
     /**
@@ -179,8 +228,14 @@  discard block
 block discarded – undo
179 228
      */
180 229
     public function hasRoute(string $name): bool;
181 230
 
231
+    /**
232
+     * @return void
233
+     */
182 234
     public function setSecurityHandler(SecurityHandlerInterface $securityHandler): void;
183 235
 
236
+    /**
237
+     * @return SecurityHandlerInterface
238
+     */
184 239
     public function getSecurityHandler(): ?SecurityHandlerInterface;
185 240
 
186 241
     /**
@@ -199,17 +254,33 @@  discard block
 block discarded – undo
199 254
      * Shorthand method for templating.
200 255
      *
201 256
      * @param object $model
257
+     * @return string
202 258
      */
203 259
     public function id($model): ?string;
204 260
 
261
+    /**
262
+     * @return void
263
+     */
205 264
     public function setValidator(ValidatorInterface $validator): void;
206 265
 
266
+    /**
267
+     * @return ValidatorInterface
268
+     */
207 269
     public function getValidator(): ?ValidatorInterface;
208 270
 
271
+    /**
272
+     * @return FieldDescriptionCollection|null
273
+     */
209 274
     public function getShow(): ?FieldDescriptionCollection;
210 275
 
276
+    /**
277
+     * @return void
278
+     */
211 279
     public function setFormTheme(array $formTheme): void;
212 280
 
281
+    /**
282
+     * @return FieldDescriptionCollection|null
283
+     */
213 284
     public function getList(): ?FieldDescriptionCollection;
214 285
 
215 286
     /**
@@ -217,6 +288,9 @@  discard block
 block discarded – undo
217 288
      */
218 289
     public function getFormTheme(): array;
219 290
 
291
+    /**
292
+     * @return void
293
+     */
220 294
     public function setFilterTheme(array $filterTheme): void;
221 295
 
222 296
     /**
@@ -224,6 +298,9 @@  discard block
 block discarded – undo
224 298
      */
225 299
     public function getFilterTheme(): array;
226 300
 
301
+    /**
302
+     * @return void
303
+     */
227 304
     public function addExtension(AdminExtensionInterface $extension): void;
228 305
 
229 306
     /**
@@ -233,8 +310,14 @@  discard block
 block discarded – undo
233 310
      */
234 311
     public function getExtensions(): array;
235 312
 
313
+    /**
314
+     * @return void
315
+     */
236 316
     public function setRouteBuilder(RouteBuilderInterface $routeBuilder): void;
237 317
 
318
+    /**
319
+     * @return RouteBuilderInterface
320
+     */
238 321
     public function getRouteBuilder(): ?RouteBuilderInterface;
239 322
 
240 323
     /**
@@ -242,8 +325,14 @@  discard block
 block discarded – undo
242 325
      */
243 326
     public function toString($object): string;
244 327
 
328
+    /**
329
+     * @return void
330
+     */
245 331
     public function setLabelTranslatorStrategy(LabelTranslatorStrategyInterface $labelTranslatorStrategy): void;
246 332
 
333
+    /**
334
+     * @return LabelTranslatorStrategyInterface
335
+     */
247 336
     public function getLabelTranslatorStrategy(): ?LabelTranslatorStrategyInterface;
248 337
 
249 338
     /**
@@ -255,6 +344,9 @@  discard block
 block discarded – undo
255 344
 
256 345
     public function getNewInstance(): object;
257 346
 
347
+    /**
348
+     * @return void
349
+     */
258 350
     public function setUniqid(string $uniqId): void;
259 351
 
260 352
     /**
@@ -274,6 +366,9 @@  discard block
 block discarded – undo
274 366
      */
275 367
     public function getObject($id): ?object;
276 368
 
369
+    /**
370
+     * @return void
371
+     */
277 372
     public function setSubject(?object $subject): void;
278 373
 
279 374
     /**
@@ -285,6 +380,7 @@  discard block
 block discarded – undo
285 380
      * NEXT_MAJOR: Remove this method, since it's already in FieldDescriptionRegistryInterface.
286 381
      *
287 382
      * Returns a list FieldDescription.
383
+     * @return null|FieldDescriptionInterface
288 384
      */
289 385
     public function getListFieldDescription(string $name): ?FieldDescriptionInterface;
290 386
 
@@ -321,6 +417,7 @@  discard block
 block discarded – undo
321 417
 
322 418
     /**
323 419
      * Call before the batch action, allow you to alter the query and the idx.
420
+     * @return void
324 421
      */
325 422
     public function preBatchAction(string $actionName, ProxyQueryInterface $query, array &$idx, bool $allElements = false): void;
326 423
 
@@ -343,6 +440,7 @@  discard block
 block discarded – undo
343 440
      *
344 441
      * @deprecated this feature cannot be stable, use a custom validator,
345 442
      *             the feature will be removed with Symfony 2.2
443
+     * @return void
346 444
      */
347 445
     public function validate(ErrorElement $errorElement, $object): void;
348 446
 
@@ -350,6 +448,7 @@  discard block
 block discarded – undo
350 448
 
351 449
     /**
352 450
      * Add object security, fe. make the current user owner of the object.
451
+     * @return void
353 452
      */
354 453
     public function createObjectSecurity(object $object): void;
355 454
 
@@ -358,6 +457,9 @@  discard block
 block discarded – undo
358 457
      */
359 458
     public function getParent(): ?self;
360 459
 
460
+    /**
461
+     * @return void
462
+     */
361 463
     public function setParent(self $admin): void;
362 464
 
363 465
     /**
@@ -369,6 +471,7 @@  discard block
 block discarded – undo
369 471
      * Set the translation domain.
370 472
      *
371 473
      * @param string $translationDomain the translation domain
474
+     * @return void
372 475
      */
373 476
     public function setTranslationDomain(string $translationDomain): void;
374 477
 
@@ -388,6 +491,7 @@  discard block
 block discarded – undo
388 491
 
389 492
     /**
390 493
      * Set the form groups.
494
+     * @return void
391 495
      */
392 496
     public function setFormGroups(array $formGroups): void;
393 497
 
@@ -396,6 +500,9 @@  discard block
 block discarded – undo
396 500
      */
397 501
     public function getFormTabs(): array;
398 502
 
503
+    /**
504
+     * @return void
505
+     */
399 506
     public function setFormTabs(array $formTabs): void;
400 507
 
401 508
     /**
@@ -403,10 +510,14 @@  discard block
 block discarded – undo
403 510
      */
404 511
     public function getShowTabs(): array;
405 512
 
513
+    /**
514
+     * @return void
515
+     */
406 516
     public function setShowTabs(array $showTabs): void;
407 517
 
408 518
     /**
409 519
      * Remove a form group field.
520
+     * @return void
410 521
      */
411 522
     public function removeFieldFromFormGroup(string $key): void;
412 523
 
@@ -419,11 +530,13 @@  discard block
 block discarded – undo
419 530
 
420 531
     /**
421 532
      * Set the show groups.
533
+     * @return void
422 534
      */
423 535
     public function setShowGroups(array $showGroups): void;
424 536
 
425 537
     /**
426 538
      * Reorder items in showGroup.
539
+     * @return void
427 540
      */
428 541
     public function reorderShowGroup(string $group, array $keys): void;
429 542
 
@@ -431,6 +544,7 @@  discard block
 block discarded – undo
431 544
      * NEXT_MAJOR: Remove this method, since it's already in FieldDescriptionRegistryInterface.
432 545
      *
433 546
      * add a FieldDescription.
547
+     * @return void
434 548
      */
435 549
     public function addFormFieldDescription(string $name, FieldDescriptionInterface $fieldDescription): void;
436 550
 
@@ -438,6 +552,7 @@  discard block
 block discarded – undo
438 552
      * NEXT_MAJOR: Remove this method, since it's already in FieldDescriptionRegistryInterface.
439 553
      *
440 554
      * Remove a FieldDescription.
555
+     * @return void
441 556
      */
442 557
     public function removeFormFieldDescription(string $name): void;
443 558
 
@@ -455,11 +570,13 @@  discard block
 block discarded – undo
455 570
      * Adds a new class to a list of supported sub classes.
456 571
      *
457 572
      * @param $subClass
573
+     * @return void
458 574
      */
459 575
     public function addSubClass($subClass): void;
460 576
 
461 577
     /**
462 578
      * Sets the list of supported sub classes.
579
+     * @return void
463 580
      */
464 581
     public function setSubClasses(array $subClasses): void;
465 582
 
@@ -498,6 +615,7 @@  discard block
 block discarded – undo
498 615
 
499 616
     /**
500 617
      * Returns Admin`s label.
618
+     * @return string
501 619
      */
502 620
     public function getLabel(): ?string;
503 621
 
@@ -512,6 +630,7 @@  discard block
 block discarded – undo
512 630
 
513 631
     /**
514 632
      * Set the current child status.
633
+     * @return void
515 634
      */
516 635
     public function setCurrentChild(bool $currentChild): void;
517 636
 
@@ -537,6 +656,9 @@  discard block
 block discarded – undo
537 656
      */
538 657
     public function getListModes(): array;
539 658
 
659
+    /**
660
+     * @return void
661
+     */
540 662
     public function setListMode(string $mode): void;
541 663
 
542 664
     /**
@@ -561,12 +683,14 @@  discard block
 block discarded – undo
561 683
 
562 684
     /**
563 685
      * Returns the result link for an object.
686
+     * @return string|null
564 687
      */
565 688
     public function getSearchResultLink(object $object): ?string;
566 689
 
567 690
     /**
568 691
      * Setting to true will enable mosaic button for the admin screen.
569 692
      * Setting to false will hide mosaic button for the admin screen.
693
+     * @return void
570 694
      */
571 695
     public function showMosaicButton(bool $isShown): void;
572 696
 
Please login to merge, or discard this patch.