Completed
Pull Request — master (#6005)
by Javier
03:27
created
tests/Datagrid/PagerTest.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -647,6 +647,9 @@
 block discarded – undo
647 647
         $this->assertNull($this->pager->getQuery());
648 648
     }
649 649
 
650
+    /**
651
+     * @param Pager $obj
652
+     */
650 653
     protected function callMethod($obj, string $name, array $args = [])
651 654
     {
652 655
         $class = new \ReflectionClass($obj);
Please login to merge, or discard this patch.
src/Command/QuestionableCommand.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 {
25 25
     /**
26 26
      * @param string   $questionText
27
-     * @param mixed    $default
27
+     * @param string    $default
28 28
      * @param callable $validator
29 29
      *
30 30
      * @return mixed
Please login to merge, or discard this patch.
tests/Form/Widget/FormSonataFilterChoiceWidgetTest.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -56,6 +56,9 @@
 block discarded – undo
56 56
         );
57 57
     }
58 58
 
59
+    /**
60
+     * @return string
61
+     */
59 62
     protected function getChoiceClass()
60 63
     {
61 64
         return ChoiceType::class;
Please login to merge, or discard this patch.
src/Twig/Extension/SonataAdminExtension.php 1 patch
Doc Comments   +3 added lines, -3 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
      */
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
     /**
320 320
      * Get the identifiers as a string that is safe to use in a url.
321 321
      *
322
-     * @param object $model
322
+     * @param \stdClass $model
323 323
      *
324 324
      * @return string string representation of the id that is safe to use in a url
325 325
      */
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
     }
342 342
 
343 343
     /**
344
-     * @return string|bool
344
+     * @return string|false
345 345
      */
346 346
     public function getXEditableType($type)
347 347
     {
Please login to merge, or discard this patch.
src/Controller/CRUDController.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -743,8 +743,8 @@
 block discarded – undo
743 743
     /**
744 744
      * Compare history revisions of object.
745 745
      *
746
-     * @param int|string|null $baseRevision
747
-     * @param int|string|null $compareRevision
746
+     * @param null|integer $baseRevision
747
+     * @param null|integer $compareRevision
748 748
      *
749 749
      * @throws AccessDeniedException If access is not granted
750 750
      * @throws NotFoundHttpException If the object or revision does not exist or the audit reader is not available
Please login to merge, or discard this patch.
src/Model/ModelManagerInterface.php 1 patch
Doc Comments   +11 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,6 +37,7 @@  discard block
 block discarded – undo
37 37
      * @param object $object
38 38
      *
39 39
      * @throws ModelManagerException
40
+     * @return void
40 41
      */
41 42
     public function create($object);
42 43
 
@@ -44,6 +45,7 @@  discard block
 block discarded – undo
44 45
      * @param object $object
45 46
      *
46 47
      * @throws ModelManagerException
48
+     * @return void
47 49
      */
48 50
     public function update($object);
49 51
 
@@ -51,6 +53,7 @@  discard block
 block discarded – undo
51 53
      * @param object $object
52 54
      *
53 55
      * @throws ModelManagerException
56
+     * @return void
54 57
      */
55 58
     public function delete($object);
56 59
 
@@ -72,7 +75,7 @@  discard block
 block discarded – undo
72 75
      * @param string $class
73 76
      * @param mixed  $id
74 77
      *
75
-     * @return object|null the object with id or null if not found
78
+     * @return \Sonata\AdminBundle\Tests\App\Model\Foo|null the object with id or null if not found
76 79
      */
77 80
     public function find($class, $id);
78 81
 
@@ -80,6 +83,7 @@  discard block
 block discarded – undo
80 83
      * @param string $class
81 84
      *
82 85
      * @throws ModelManagerException
86
+     * @return void
83 87
      */
84 88
     public function batchDelete($class, ProxyQueryInterface $queryProxy);
85 89
 
@@ -156,7 +160,7 @@  discard block
 block discarded – undo
156 160
      *
157 161
      * @param string $class
158 162
      *
159
-     * @return object
163
+     * @return \Sonata\AdminBundle\Tests\App\Model\Foo
160 164
      */
161 165
     public function getModelInstance($class);
162 166
 
@@ -172,6 +176,7 @@  discard block
 block discarded – undo
172 176
      *
173 177
      * @param array  $collection
174 178
      * @param object $element
179
+     * @return void
175 180
      */
176 181
     public function collectionRemoveElement(&$collection, &$element);
177 182
 
@@ -180,6 +185,7 @@  discard block
 block discarded – undo
180 185
      *
181 186
      * @param array  $collection
182 187
      * @param object $element
188
+     * @return void
183 189
      */
184 190
     public function collectionAddElement(&$collection, &$element);
185 191
 
@@ -197,6 +203,7 @@  discard block
 block discarded – undo
197 203
      * Clear the collection.
198 204
      *
199 205
      * @param array $collection
206
+     * @return void
200 207
      */
201 208
     public function collectionClear(&$collection);
202 209
 
@@ -229,6 +236,7 @@  discard block
 block discarded – undo
229 236
 
230 237
     /**
231 238
      * @param mixed $query
239
+     * @return void
232 240
      */
233 241
     public function executeQuery($query);
234 242
 
@@ -261,6 +269,7 @@  discard block
 block discarded – undo
261 269
 
262 270
     /**
263 271
      * @param string $class
272
+     * @return void
264 273
      */
265 274
     public function addIdentifiersToQuery($class, ProxyQueryInterface $query, array $idx);
266 275
 }
Please login to merge, or discard this patch.
src/Filter/FilterInterface.php 1 patch
Doc Comments   +7 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,6 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
     /**
64 64
      * @param string $label
65
+     * @return void
65 66
      */
66 67
     public function setLabel($label);
67 68
 
@@ -72,7 +73,7 @@  discard block
 block discarded – undo
72 73
 
73 74
     /**
74 75
      * @param string     $name
75
-     * @param mixed|null $default
76
+     * @param boolean $default
76 77
      *
77 78
      * @return mixed
78 79
      */
@@ -80,12 +81,14 @@  discard block
 block discarded – undo
80 81
 
81 82
     /**
82 83
      * @param string $name
83
-     * @param mixed  $value
84
+     * @param boolean  $value
85
+     * @return void
84 86
      */
85 87
     public function setOption($name, $value);
86 88
 
87 89
     /**
88 90
      * @param string $name
91
+     * @return void
89 92
      */
90 93
     public function initialize($name, array $options = []);
91 94
 
@@ -129,6 +132,7 @@  discard block
 block discarded – undo
129 132
      *
130 133
      * @param string $name
131 134
      * @param mixed  $value
135
+     * @return void
132 136
      */
133 137
     public function setFieldOption($name, $value);
134 138
 
@@ -155,6 +159,7 @@  discard block
 block discarded – undo
155 159
      * Set the condition to use with the left side of the query : OR or AND.
156 160
      *
157 161
      * @param string $condition
162
+     * @return void
158 163
      */
159 164
     public function setCondition($condition);
160 165
 
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
     {
@@ -1064,6 +1065,9 @@  discard block
 block discarded – undo
1064 1065
         return $this->routeGenerator->hasAdminRoute($this, $name);
1065 1066
     }
1066 1067
 
1068
+    /**
1069
+     * @param string $adminCode
1070
+     */
1067 1071
     public function isCurrentRoute(string $name, ?string $adminCode = null): bool
1068 1072
     {
1069 1073
         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;
@@ -1809,6 +1816,7 @@  discard block
 block discarded – undo
1809 1816
      *
1810 1817
      * NEXT_MAJOR: remove this method
1811 1818
      *
1819
+     * @param string $domain
1812 1820
      * @return string the translated string
1813 1821
      *
1814 1822
      * @deprecated since sonata-project/admin-bundle 3.9, to be removed with 4.0
@@ -1989,6 +1997,9 @@  discard block
 block discarded – undo
1989 1997
         return $this->managerType;
1990 1998
     }
1991 1999
 
2000
+    /**
2001
+     * @param string $type
2002
+     */
1992 2003
     public function setManagerType(?string $type): void
1993 2004
     {
1994 2005
         $this->managerType = $type;
@@ -2399,6 +2410,7 @@  discard block
 block discarded – undo
2399 2410
 
2400 2411
     /**
2401 2412
      * {@inheritdoc}
2413
+     * @param boolean $isShown
2402 2414
      */
2403 2415
     final public function showMosaicButton($isShown): void
2404 2416
     {
@@ -2528,6 +2540,7 @@  discard block
 block discarded – undo
2528 2540
      * NEXT_MAJOR: remove this method.
2529 2541
      *
2530 2542
      * @deprecated Use configureTabMenu instead
2543
+     * @param string $action
2531 2544
      */
2532 2545
     protected function configureSideMenu(MenuItemInterface $menu, $action, AdminInterface $childAdmin = null): void
2533 2546
     {
Please login to merge, or discard this patch.
src/Admin/AdminInterface.php 1 patch
Doc Comments   +117 added lines, -1 removed 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,14 +100,21 @@  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.
76 115
      *
77 116
      * @param string $baseControllerName
117
+     * @return void
78 118
      */
79 119
     public function setBaseControllerName($baseControllerName): void;
80 120
 
@@ -85,6 +125,7 @@  discard block
 block discarded – undo
85 125
 
86 126
     /**
87 127
      * Sets a list of templates.
128
+     * @return void
88 129
      */
89 130
     public function setTemplates(array $templates): void;
90 131
 
@@ -93,9 +134,13 @@  discard block
 block discarded – undo
93 134
      *
94 135
      * @param string $name
95 136
      * @param string $template
137
+     * @return void
96 138
      */
97 139
     public function setTemplate($name, $template): void;
98 140
 
141
+    /**
142
+     * @return ModelManagerInterface
143
+     */
99 144
     public function getModelManager(): ?ModelManagerInterface;
100 145
 
101 146
     /**
@@ -115,6 +160,7 @@  discard block
 block discarded – undo
115 160
 
116 161
     /**
117 162
      * Returns a form depend on the given $object.
163
+     * @return \Symfony\Component\Form\Form|null
118 164
      */
119 165
     public function getForm(): ?FormInterface;
120 166
 
@@ -145,6 +191,9 @@  discard block
 block discarded – undo
145 191
      */
146 192
     public function getSecurityInformation(): array;
147 193
 
194
+    /**
195
+     * @return void
196
+     */
148 197
     public function setParentFieldDescription(FieldDescriptionInterface $parentFieldDescription): void;
149 198
 
150 199
     /**
@@ -188,8 +237,14 @@  discard block
 block discarded – undo
188 237
      */
189 238
     public function hasRoute($name): bool;
190 239
 
240
+    /**
241
+     * @return void
242
+     */
191 243
     public function setSecurityHandler(SecurityHandlerInterface $securityHandler): void;
192 244
 
245
+    /**
246
+     * @return SecurityHandlerInterface
247
+     */
193 248
     public function getSecurityHandler(): ?SecurityHandlerInterface;
194 249
 
195 250
     /**
@@ -209,16 +264,28 @@  discard block
 block discarded – undo
209 264
      *
210 265
      * @param object $entity
211 266
      *
212
-     * @return mixed
267
+     * @return string
213 268
      */
214 269
     public function id($entity);
215 270
 
271
+    /**
272
+     * @return void
273
+     */
216 274
     public function setValidator(ValidatorInterface $validator): void;
217 275
 
276
+    /**
277
+     * @return ValidatorInterface
278
+     */
218 279
     public function getValidator(): ?ValidatorInterface;
219 280
 
281
+    /**
282
+     * @return FieldDescriptionCollection|null
283
+     */
220 284
     public function getShow(): ?FieldDescriptionCollection;
221 285
 
286
+    /**
287
+     * @return void
288
+     */
222 289
     public function setFormTheme(array $formTheme): void;
223 290
 
224 291
     /**
@@ -226,6 +293,9 @@  discard block
 block discarded – undo
226 293
      */
227 294
     public function getFormTheme(): array;
228 295
 
296
+    /**
297
+     * @return void
298
+     */
229 299
     public function setFilterTheme(array $filterTheme): void;
230 300
 
231 301
     /**
@@ -233,6 +303,9 @@  discard block
 block discarded – undo
233 303
      */
234 304
     public function getFilterTheme(): array;
235 305
 
306
+    /**
307
+     * @return void
308
+     */
236 309
     public function addExtension(AdminExtensionInterface $extension): void;
237 310
 
238 311
     /**
@@ -242,8 +315,14 @@  discard block
 block discarded – undo
242 315
      */
243 316
     public function getExtensions(): array;
244 317
 
318
+    /**
319
+     * @return void
320
+     */
245 321
     public function setRouteBuilder(RouteBuilderInterface $routeBuilder): void;
246 322
 
323
+    /**
324
+     * @return RouteBuilderInterface
325
+     */
247 326
     public function getRouteBuilder(): ?RouteBuilderInterface;
248 327
 
249 328
     /**
@@ -251,8 +330,14 @@  discard block
 block discarded – undo
251 330
      */
252 331
     public function toString($object): string;
253 332
 
333
+    /**
334
+     * @return void
335
+     */
254 336
     public function setLabelTranslatorStrategy(LabelTranslatorStrategyInterface $labelTranslatorStrategy): void;
255 337
 
338
+    /**
339
+     * @return LabelTranslatorStrategyInterface
340
+     */
256 341
     public function getLabelTranslatorStrategy(): ?LabelTranslatorStrategyInterface;
257 342
 
258 343
     /**
@@ -269,6 +354,7 @@  discard block
 block discarded – undo
269 354
 
270 355
     /**
271 356
      * @param string $uniqId
357
+     * @return void
272 358
      */
273 359
     public function setUniqid($uniqId): void;
274 360
 
@@ -291,6 +377,7 @@  discard block
 block discarded – undo
291 377
 
292 378
     /**
293 379
      * @param object|null $subject
380
+     * @return void
294 381
      */
295 382
     public function setSubject($subject): void;
296 383
 
@@ -337,6 +424,7 @@  discard block
 block discarded – undo
337 424
      *
338 425
      * @param string $actionName
339 426
      * @param bool   $allElements
427
+     * @return void
340 428
      */
341 429
     public function preBatchAction($actionName, ProxyQueryInterface $query, array &$idx, $allElements): void;
342 430
 
@@ -359,6 +447,7 @@  discard block
 block discarded – undo
359 447
      *
360 448
      * @deprecated this feature cannot be stable, use a custom validator,
361 449
      *             the feature will be removed with Symfony 2.2
450
+     * @return void
362 451
      */
363 452
     public function validate(ErrorElement $errorElement, $object): void;
364 453
 
@@ -371,11 +460,18 @@  discard block
 block discarded – undo
371 460
      * Add object security, fe. make the current user owner of the object.
372 461
      *
373 462
      * @param object $object
463
+     * @return void
374 464
      */
375 465
     public function createObjectSecurity($object): void;
376 466
 
467
+    /**
468
+     * @return AdminInterface|null
469
+     */
377 470
     public function getParent(): ?self;
378 471
 
472
+    /**
473
+     * @return void
474
+     */
379 475
     public function setParent(self $admin): void;
380 476
 
381 477
     /**
@@ -387,6 +483,7 @@  discard block
 block discarded – undo
387 483
      * Set the translation domain.
388 484
      *
389 485
      * @param string $translationDomain the translation domain
486
+     * @return void
390 487
      */
391 488
     public function setTranslationDomain($translationDomain): void;
392 489
 
@@ -406,21 +503,29 @@  discard block
 block discarded – undo
406 503
 
407 504
     /**
408 505
      * Set the form groups.
506
+     * @return void
409 507
      */
410 508
     public function setFormGroups(array $formGroups): void;
411 509
 
412 510
     public function getFormTabs();
413 511
 
512
+    /**
513
+     * @return void
514
+     */
414 515
     public function setFormTabs(array $formTabs): void;
415 516
 
416 517
     public function getShowTabs();
417 518
 
519
+    /**
520
+     * @return void
521
+     */
418 522
     public function setShowTabs(array $showTabs): void;
419 523
 
420 524
     /**
421 525
      * Remove a form group field.
422 526
      *
423 527
      * @param string $key
528
+     * @return void
424 529
      */
425 530
     public function removeFieldFromFormGroup($key): void;
426 531
 
@@ -433,6 +538,7 @@  discard block
 block discarded – undo
433 538
 
434 539
     /**
435 540
      * Set the show groups.
541
+     * @return void
436 542
      */
437 543
     public function setShowGroups(array $showGroups): void;
438 544
 
@@ -440,6 +546,7 @@  discard block
 block discarded – undo
440 546
      * Reorder items in showGroup.
441 547
      *
442 548
      * @param string $group
549
+     * @return void
443 550
      */
444 551
     public function reorderShowGroup($group, array $keys): void;
445 552
 
@@ -447,6 +554,7 @@  discard block
 block discarded – undo
447 554
      * add a FieldDescription.
448 555
      *
449 556
      * @param string $name
557
+     * @return void
450 558
      */
451 559
     public function addFormFieldDescription($name, FieldDescriptionInterface $fieldDescription): void;
452 560
 
@@ -454,6 +562,7 @@  discard block
 block discarded – undo
454 562
      * Remove a FieldDescription.
455 563
      *
456 564
      * @param string $name
565
+     * @return void
457 566
      */
458 567
     public function removeFormFieldDescription($name): void;
459 568
 
@@ -471,11 +580,13 @@  discard block
 block discarded – undo
471 580
      * Adds a new class to a list of supported sub classes.
472 581
      *
473 582
      * @param $subClass
583
+     * @return void
474 584
      */
475 585
     public function addSubClass($subClass): void;
476 586
 
477 587
     /**
478 588
      * Sets the list of supported sub classes.
589
+     * @return void
479 590
      */
480 591
     public function setSubClasses(array $subClasses): void;
481 592
 
@@ -514,6 +625,7 @@  discard block
 block discarded – undo
514 625
 
515 626
     /**
516 627
      * Returns Admin`s label.
628
+     * @return string
517 629
      */
518 630
     public function getLabel(): ?string;
519 631
 
@@ -528,6 +640,7 @@  discard block
 block discarded – undo
528 640
 
529 641
     /**
530 642
      * Set the current child status.
643
+     * @return void
531 644
      */
532 645
     public function setCurrentChild(bool $currentChild): void;
533 646
 
@@ -557,6 +670,7 @@  discard block
 block discarded – undo
557 670
 
558 671
     /**
559 672
      * @param string $mode
673
+     * @return void
560 674
      */
561 675
     public function setListMode($mode): void;
562 676
 
@@ -582,12 +696,14 @@  discard block
 block discarded – undo
582 696
 
583 697
     /**
584 698
      * Returns the result link for an object.
699
+     * @return string|null
585 700
      */
586 701
     public function getSearchResultLink(object $object): ?string;
587 702
 
588 703
     /**
589 704
      * Setting to true will enable mosaic button for the admin screen.
590 705
      * Setting to false will hide mosaic button for the admin screen.
706
+     * @return void
591 707
      */
592 708
     public function showMosaicButton(bool $isShown): void;
593 709
 
Please login to merge, or discard this patch.