Completed
Pull Request — master (#6005)
by Javier
03:24
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/AdminInterface.php 1 patch
Doc Comments   +121 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
     /**
@@ -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,15 +254,28 @@  discard block
 block discarded – undo
199 254
      * Shorthand method for templating.
200 255
      *
201 256
      * @param object $entity
257
+     * @return string
202 258
      */
203 259
     public function id($entity): ?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
 
213 281
     /**
@@ -215,6 +283,9 @@  discard block
 block discarded – undo
215 283
      */
216 284
     public function getFormTheme(): array;
217 285
 
286
+    /**
287
+     * @return void
288
+     */
218 289
     public function setFilterTheme(array $filterTheme): void;
219 290
 
220 291
     /**
@@ -222,6 +293,9 @@  discard block
 block discarded – undo
222 293
      */
223 294
     public function getFilterTheme(): array;
224 295
 
296
+    /**
297
+     * @return void
298
+     */
225 299
     public function addExtension(AdminExtensionInterface $extension): void;
226 300
 
227 301
     /**
@@ -231,8 +305,14 @@  discard block
 block discarded – undo
231 305
      */
232 306
     public function getExtensions(): array;
233 307
 
308
+    /**
309
+     * @return void
310
+     */
234 311
     public function setRouteBuilder(RouteBuilderInterface $routeBuilder): void;
235 312
 
313
+    /**
314
+     * @return RouteBuilderInterface
315
+     */
236 316
     public function getRouteBuilder(): ?RouteBuilderInterface;
237 317
 
238 318
     /**
@@ -240,8 +320,14 @@  discard block
 block discarded – undo
240 320
      */
241 321
     public function toString($object): string;
242 322
 
323
+    /**
324
+     * @return void
325
+     */
243 326
     public function setLabelTranslatorStrategy(LabelTranslatorStrategyInterface $labelTranslatorStrategy): void;
244 327
 
328
+    /**
329
+     * @return LabelTranslatorStrategyInterface
330
+     */
245 331
     public function getLabelTranslatorStrategy(): ?LabelTranslatorStrategyInterface;
246 332
 
247 333
     /**
@@ -256,6 +342,9 @@  discard block
 block discarded – undo
256 342
      */
257 343
     public function getNewInstance();
258 344
 
345
+    /**
346
+     * @return void
347
+     */
259 348
     public function setUniqid(string $uniqId): void;
260 349
 
261 350
     /**
@@ -275,6 +364,9 @@  discard block
 block discarded – undo
275 364
      */
276 365
     public function getObject($id): ?object;
277 366
 
367
+    /**
368
+     * @return void
369
+     */
278 370
     public function setSubject(?object $subject): void;
279 371
 
280 372
     public function getSubject(): ?object;
@@ -313,6 +405,7 @@  discard block
 block discarded – undo
313 405
 
314 406
     /**
315 407
      * Call before the batch action, allow you to alter the query and the idx.
408
+     * @return void
316 409
      */
317 410
     public function preBatchAction(string $actionName, ProxyQueryInterface $query, array &$idx, bool $allElements = false): void;
318 411
 
@@ -335,6 +428,7 @@  discard block
 block discarded – undo
335 428
      *
336 429
      * @deprecated this feature cannot be stable, use a custom validator,
337 430
      *             the feature will be removed with Symfony 2.2
431
+     * @return void
338 432
      */
339 433
     public function validate(ErrorElement $errorElement, $object): void;
340 434
 
@@ -344,11 +438,18 @@  discard block
 block discarded – undo
344 438
      * Add object security, fe. make the current user owner of the object.
345 439
      *
346 440
      * @param object $object
441
+     * @return void
347 442
      */
348 443
     public function createObjectSecurity($object): void;
349 444
 
445
+    /**
446
+     * @return AdminInterface|null
447
+     */
350 448
     public function getParent(): ?self;
351 449
 
450
+    /**
451
+     * @return void
452
+     */
352 453
     public function setParent(self $admin): void;
353 454
 
354 455
     /**
@@ -360,6 +461,7 @@  discard block
 block discarded – undo
360 461
      * Set the translation domain.
361 462
      *
362 463
      * @param string $translationDomain the translation domain
464
+     * @return void
363 465
      */
364 466
     public function setTranslationDomain(string $translationDomain): void;
365 467
 
@@ -379,19 +481,27 @@  discard block
 block discarded – undo
379 481
 
380 482
     /**
381 483
      * Set the form groups.
484
+     * @return void
382 485
      */
383 486
     public function setFormGroups(array $formGroups): void;
384 487
 
385 488
     public function getFormTabs();
386 489
 
490
+    /**
491
+     * @return void
492
+     */
387 493
     public function setFormTabs(array $formTabs): void;
388 494
 
389 495
     public function getShowTabs();
390 496
 
497
+    /**
498
+     * @return void
499
+     */
391 500
     public function setShowTabs(array $showTabs): void;
392 501
 
393 502
     /**
394 503
      * Remove a form group field.
504
+     * @return void
395 505
      */
396 506
     public function removeFieldFromFormGroup(string $key): void;
397 507
 
@@ -404,21 +514,25 @@  discard block
 block discarded – undo
404 514
 
405 515
     /**
406 516
      * Set the show groups.
517
+     * @return void
407 518
      */
408 519
     public function setShowGroups(array $showGroups): void;
409 520
 
410 521
     /**
411 522
      * Reorder items in showGroup.
523
+     * @return void
412 524
      */
413 525
     public function reorderShowGroup(string $group, array $keys): void;
414 526
 
415 527
     /**
416 528
      * add a FieldDescription.
529
+     * @return void
417 530
      */
418 531
     public function addFormFieldDescription(string $name, FieldDescriptionInterface $fieldDescription): void;
419 532
 
420 533
     /**
421 534
      * Remove a FieldDescription.
535
+     * @return void
422 536
      */
423 537
     public function removeFormFieldDescription(string $name): void;
424 538
 
@@ -436,11 +550,13 @@  discard block
 block discarded – undo
436 550
      * Adds a new class to a list of supported sub classes.
437 551
      *
438 552
      * @param $subClass
553
+     * @return void
439 554
      */
440 555
     public function addSubClass($subClass): void;
441 556
 
442 557
     /**
443 558
      * Sets the list of supported sub classes.
559
+     * @return void
444 560
      */
445 561
     public function setSubClasses(array $subClasses): void;
446 562
 
@@ -479,6 +595,7 @@  discard block
 block discarded – undo
479 595
 
480 596
     /**
481 597
      * Returns Admin`s label.
598
+     * @return string
482 599
      */
483 600
     public function getLabel(): ?string;
484 601
 
@@ -493,6 +610,7 @@  discard block
 block discarded – undo
493 610
 
494 611
     /**
495 612
      * Set the current child status.
613
+     * @return void
496 614
      */
497 615
     public function setCurrentChild(bool $currentChild): void;
498 616
 
@@ -518,6 +636,7 @@  discard block
 block discarded – undo
518 636
 
519 637
     /**
520 638
      * @param string $mode
639
+     * @return void
521 640
      */
522 641
     public function setListMode($mode): void;
523 642
 
@@ -543,12 +662,14 @@  discard block
 block discarded – undo
543 662
 
544 663
     /**
545 664
      * Returns the result link for an object.
665
+     * @return string|null
546 666
      */
547 667
     public function getSearchResultLink(object $object): ?string;
548 668
 
549 669
     /**
550 670
      * Setting to true will enable mosaic button for the admin screen.
551 671
      * Setting to false will hide mosaic button for the admin screen.
672
+     * @return void
552 673
      */
553 674
     public function showMosaicButton(bool $isShown): void;
554 675
 
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.