Completed
Pull Request — master (#6261)
by Jordi Sala
03:16 queued 22s
created
src/Datagrid/DatagridMapper.php 1 patch
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -52,6 +52,8 @@
 block discarded – undo
52 52
      * @param array<string, mixed>             $filterOptions
53 53
      * @param array<string, mixed>|null        $fieldOptions
54 54
      * @param array<string, mixed>             $fieldDescriptionOptions
55
+     * @param string $type
56
+     * @param string $fieldType
55 57
      *
56 58
      * @throws \LogicException
57 59
      */
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
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
     }
53 53
 
54 54
     /**
55
-     * @param FieldDescriptionInterface|string $name
55
+     * @param \Sonata\AdminBundle\Admin\BaseFieldDescription $name
56 56
      * @param array<string, mixed>             $fieldDescriptionOptions
57 57
      */
58 58
     public function addIdentifier($name, ?string $type = null, array $fieldDescriptionOptions = []): self
Please login to merge, or discard this patch.
src/Datagrid/Pager.php 1 patch
Doc Comments   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -132,6 +132,7 @@  discard block
 block discarded – undo
132 132
     /**
133 133
      * Returns an array of page numbers to use in pagination links.
134 134
      *
135
+     * @param integer $nbLinks
135 136
      * @return int[]
136 137
      */
137 138
     public function getLinks(?int $nbLinks = null): array
@@ -380,7 +381,7 @@  discard block
 block discarded – undo
380 381
     /**
381 382
      * Returns a parameter.
382 383
      *
383
-     * @param mixed $default
384
+     * @param null|string $default
384 385
      *
385 386
      * @return mixed
386 387
      */
@@ -400,7 +401,7 @@  discard block
 block discarded – undo
400 401
     /**
401 402
      * Sets a parameter.
402 403
      *
403
-     * @param mixed $value
404
+     * @param string $value
404 405
      */
405 406
     public function setParameter(string $name, $value): void
406 407
     {
Please login to merge, or discard this patch.
src/Filter/Persister/FilterPersisterInterface.php 1 patch
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -41,11 +41,13 @@
 block discarded – undo
41 41
      *     "_per_page" => {int count rows per page}.
42 42
      *
43 43
      * @param array<string, int|string|array{type: int, value: mixed}> $filters
44
+     * @return void
44 45
      */
45 46
     public function set(string $adminCode, array $filters): void;
46 47
 
47 48
     /**
48 49
      * Reset persisted filters for given admin.
50
+     * @return void
49 51
      */
50 52
     public function reset(string $adminCode): void;
51 53
 }
Please login to merge, or discard this patch.
src/Filter/FilterInterface.php 1 patch
Doc Comments   +12 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,6 +43,9 @@  discard block
 block discarded – undo
43 43
 
44 44
     public function getLabel(): ?string;
45 45
 
46
+    /**
47
+     * @return void
48
+     */
46 49
     public function setLabel(string $label): void;
47 50
 
48 51
     /**
@@ -51,19 +54,21 @@  discard block
 block discarded – undo
51 54
     public function getDefaultOptions(): array;
52 55
 
53 56
     /**
54
-     * @param mixed $default
57
+     * @param boolean $default
55 58
      *
56 59
      * @return mixed
57 60
      */
58 61
     public function getOption(string $name, $default = null);
59 62
 
60 63
     /**
61
-     * @param mixed $value
64
+     * @param boolean $value
65
+     * @return void
62 66
      */
63 67
     public function setOption(string $name, $value): void;
64 68
 
65 69
     /**
66 70
      * @param array<string, mixed> $options
71
+     * @return void
67 72
      */
68 73
     public function initialize(string $name, array $options = []): void;
69 74
 
@@ -105,6 +110,7 @@  discard block
 block discarded – undo
105 110
 
106 111
     /**
107 112
      * @param mixed $value
113
+     * @return void
108 114
      */
109 115
     public function setFieldOption(string $name, $value): void;
110 116
 
@@ -124,9 +130,13 @@  discard block
 block discarded – undo
124 130
 
125 131
     /**
126 132
      * Set the condition to use with the left side of the query : OR or AND.
133
+     * @return void
127 134
      */
128 135
     public function setCondition(string $condition): void;
129 136
 
137
+    /**
138
+     * @return string|null
139
+     */
130 140
     public function getCondition(): ?string;
131 141
 
132 142
     public function getTranslationDomain(): ?string;
Please login to merge, or discard this patch.
src/Datagrid/DatagridInterface.php 1 patch
Doc Comments   +11 added lines patch added patch discarded remove patch
@@ -32,8 +32,14 @@  discard block
 block discarded – undo
32 32
      */
33 33
     public function getResults(): array;
34 34
 
35
+    /**
36
+     * @return void
37
+     */
35 38
     public function buildPager(): void;
36 39
 
40
+    /**
41
+     * @return void
42
+     */
37 43
     public function addFilter(FilterInterface $filter): void;
38 44
 
39 45
     /**
@@ -45,6 +51,7 @@  discard block
 block discarded – undo
45 51
      * Reorder filters.
46 52
      *
47 53
      * @param string[] $keys
54
+     * @return void
48 55
      */
49 56
     public function reorderFilters(array $keys): void;
50 57
 
@@ -57,6 +64,7 @@  discard block
 block discarded – undo
57 64
 
58 65
     /**
59 66
      * @param mixed $value
67
+     * @return void
60 68
      */
61 69
     public function setValue(string $name, ?string $operator, $value): void;
62 70
 
@@ -66,6 +74,9 @@  discard block
 block discarded – undo
66 74
 
67 75
     public function hasFilter(string $name): bool;
68 76
 
77
+    /**
78
+     * @return void
79
+     */
69 80
     public function removeFilter(string $name): void;
70 81
 
71 82
     public function hasActiveFilters(): bool;
Please login to merge, or discard this patch.
src/Admin/AdminInterface.php 1 patch
Doc Comments   +132 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 FormInterface|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
     /**
@@ -249,9 +335,13 @@  discard block
 block discarded – undo
249 335
 
250 336
     /**
251 337
      * @param mixed $id
338
+     * @return \Sonata\AdminBundle\Model\T|null
252 339
      */
253 340
     public function getObject($id): ?object;
254 341
 
342
+    /**
343
+     * @return void
344
+     */
255 345
     public function setSubject(?object $subject): void;
256 346
 
257 347
     public function getSubject(): object;
@@ -275,6 +365,7 @@  discard block
 block discarded – undo
275 365
 
276 366
     /**
277 367
      * Call before the batch action, allow you to alter the query and the idx.
368
+     * @return void
278 369
      */
279 370
     public function preBatchAction(string $actionName, ProxyQueryInterface $query, array &$idx, bool $allElements = false): void;
280 371
 
@@ -297,6 +388,7 @@  discard block
 block discarded – undo
297 388
      *
298 389
      * @deprecated this feature cannot be stable, use a custom validator,
299 390
      *             the feature will be removed with Symfony 2.2
391
+     * @return void
300 392
      */
301 393
     public function validate(ErrorElement $errorElement, $object): void;
302 394
 
@@ -304,11 +396,15 @@  discard block
 block discarded – undo
304 396
 
305 397
     /**
306 398
      * Add object security, fe. make the current user owner of the object.
399
+     * @return void
307 400
      */
308 401
     public function createObjectSecurity(object $object): void;
309 402
 
310 403
     public function getParent(): self;
311 404
 
405
+    /**
406
+     * @return void
407
+     */
312 408
     public function setParent(self $admin): void;
313 409
 
314 410
     /**
@@ -320,6 +416,7 @@  discard block
 block discarded – undo
320 416
      * Set the translation domain.
321 417
      *
322 418
      * @param string $translationDomain the translation domain
419
+     * @return void
323 420
      */
324 421
     public function setTranslationDomain(string $translationDomain): void;
325 422
 
@@ -339,6 +436,7 @@  discard block
 block discarded – undo
339 436
 
340 437
     /**
341 438
      * Set the form groups.
439
+     * @return void
342 440
      */
343 441
     public function setFormGroups(array $formGroups): void;
344 442
 
@@ -347,6 +445,9 @@  discard block
 block discarded – undo
347 445
      */
348 446
     public function getFormTabs(): array;
349 447
 
448
+    /**
449
+     * @return void
450
+     */
350 451
     public function setFormTabs(array $formTabs): void;
351 452
 
352 453
     /**
@@ -354,10 +455,14 @@  discard block
 block discarded – undo
354 455
      */
355 456
     public function getShowTabs(): array;
356 457
 
458
+    /**
459
+     * @return void
460
+     */
357 461
     public function setShowTabs(array $showTabs): void;
358 462
 
359 463
     /**
360 464
      * Remove a form group field.
465
+     * @return void
361 466
      */
362 467
     public function removeFieldFromFormGroup(string $key): void;
363 468
 
@@ -370,11 +475,13 @@  discard block
 block discarded – undo
370 475
 
371 476
     /**
372 477
      * Set the show groups.
478
+     * @return void
373 479
      */
374 480
     public function setShowGroups(array $showGroups): void;
375 481
 
376 482
     /**
377 483
      * Reorder items in showGroup.
484
+     * @return void
378 485
      */
379 486
     public function reorderShowGroup(string $group, array $keys): void;
380 487
 
@@ -390,6 +497,7 @@  discard block
 block discarded – undo
390 497
 
391 498
     /**
392 499
      * Sets the list of supported sub classes.
500
+     * @return void
393 501
      */
394 502
     public function setSubClasses(array $subClasses): void;
395 503
 
@@ -428,6 +536,7 @@  discard block
 block discarded – undo
428 536
 
429 537
     /**
430 538
      * Returns Admin`s label.
539
+     * @return string
431 540
      */
432 541
     public function getLabel(): ?string;
433 542
 
@@ -442,6 +551,7 @@  discard block
 block discarded – undo
442 551
 
443 552
     /**
444 553
      * Set the current child status.
554
+     * @return void
445 555
      */
446 556
     public function setCurrentChild(bool $currentChild): void;
447 557
 
@@ -465,6 +575,9 @@  discard block
 block discarded – undo
465 575
      */
466 576
     public function getListModes(): array;
467 577
 
578
+    /**
579
+     * @return void
580
+     */
468 581
     public function setListMode(string $mode): void;
469 582
 
470 583
     /**
@@ -489,12 +602,14 @@  discard block
 block discarded – undo
489 602
 
490 603
     /**
491 604
      * Returns the result link for an object.
605
+     * @return string|null
492 606
      */
493 607
     public function getSearchResultLink(object $object): ?string;
494 608
 
495 609
     /**
496 610
      * Setting to true will enable mosaic button for the admin screen.
497 611
      * Setting to false will hide mosaic button for the admin screen.
612
+     * @return void
498 613
      */
499 614
     public function showMosaicButton(bool $isShown): void;
500 615
 
@@ -515,6 +630,9 @@  discard block
 block discarded – undo
515 630
      */
516 631
     public function getRootCode(): string;
517 632
 
633
+    /**
634
+     * @return void
635
+     */
518 636
     public function setFilterPersister(?FilterPersisterInterface $filterPersister = null): void;
519 637
 
520 638
     /**
@@ -527,14 +645,24 @@  discard block
 block discarded – undo
527 645
      */
528 646
     public function getBaseRouteName(): string;
529 647
 
648
+    /**
649
+     * @param AbstractAdmin $childAdmin
650
+     */
530 651
     public function getSideMenu(string $action, ?self $childAdmin = null): ItemInterface;
531 652
 
653
+    /**
654
+     * @return void
655
+     */
532 656
     public function addParentAssociationMapping(string $code, string $value): void;
533 657
 
658
+    /**
659
+     * @return RouteGeneratorInterface|null
660
+     */
534 661
     public function getRouteGenerator(): ?RouteGeneratorInterface;
535 662
 
536 663
     /**
537 664
      * Returns the current child admin instance.
665
+     * @return AdminInterface|null
538 666
      */
539 667
     public function getCurrentChildAdmin(): ?self;
540 668
 
@@ -544,11 +672,15 @@  discard block
 block discarded – undo
544 672
      */
545 673
     public function getParentAssociationMapping(): ?string;
546 674
 
675
+    /**
676
+     * @return void
677
+     */
547 678
     public function reorderFormGroup(string $group, array $keys): void;
548 679
 
549 680
     /**
550 681
      * This method is being called by the main admin class and the child class,
551 682
      * the getFormBuilder is only call by the main admin class.
683
+     * @return void
552 684
      */
553 685
     public function defineFormBuilder(FormBuilderInterface $formBuilder): void;
554 686
 }
Please login to merge, or discard this patch.
src/Model/AuditManagerInterface.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -22,6 +22,7 @@
 block discarded – undo
22 22
      * Set AuditReaderInterface service id for array of $classes.
23 23
      *
24 24
      * @param class-string[] $classes
25
+     * @return void
25 26
      */
26 27
     public function setReader(string $serviceId, array $classes): void;
27 28
 
Please login to merge, or discard this patch.
src/Model/ModelManagerInterface.php 1 patch
Doc Comments   +8 added lines patch added patch discarded remove patch
@@ -33,16 +33,19 @@  discard block
 block discarded – undo
33 33
 
34 34
     /**
35 35
      * @throws ModelManagerException
36
+     * @return void
36 37
      */
37 38
     public function create(object $object): void;
38 39
 
39 40
     /**
40 41
      * @throws ModelManagerException
42
+     * @return void
41 43
      */
42 44
     public function update(object $object): void;
43 45
 
44 46
     /**
45 47
      * @throws ModelManagerException
48
+     * @return void
46 49
      */
47 50
     public function delete(object $object): void;
48 51
 
@@ -80,6 +83,7 @@  discard block
 block discarded – undo
80 83
      * @param class-string $class
81 84
      *
82 85
      * @throws ModelManagerException
86
+     * @return void
83 87
      */
84 88
     public function batchDelete(string $class, ProxyQueryInterface $queryProxy): void;
85 89
 
@@ -149,6 +153,7 @@  discard block
 block discarded – undo
149 153
      *
150 154
      * @param Collection<array-key, T> $collection
151 155
      * @param T                        $element
156
+     * @return void
152 157
      */
153 158
     public function collectionRemoveElement(Collection $collection, object $element): void;
154 159
 
@@ -159,6 +164,7 @@  discard block
 block discarded – undo
159 164
      *
160 165
      * @param Collection<array-key, object> $collection
161 166
      * @param T                             $element
167
+     * @return void
162 168
      */
163 169
     public function collectionAddElement(Collection $collection, object $element): void;
164 170
 
@@ -176,6 +182,7 @@  discard block
 block discarded – undo
176 182
      * Clear the collection.
177 183
      *
178 184
      * @param Collection<array-key, object> $collection
185
+     * @return void
179 186
      */
180 187
     public function collectionClear(Collection $collection): void;
181 188
 
@@ -226,6 +233,7 @@  discard block
 block discarded – undo
226 233
     /**
227 234
      * @param class-string $class
228 235
      * @param string[]     $idx
236
+     * @return void
229 237
      */
230 238
     public function addIdentifiersToQuery(string $class, ProxyQueryInterface $query, array $idx): void;
231 239
 }
Please login to merge, or discard this patch.