Completed
Pull Request — master (#6005)
by Javier
03:00
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.
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/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/Model/ModelManagerInterface.php 1 patch
Doc Comments   +12 added lines, -3 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
 
@@ -236,7 +244,7 @@  discard block
 block discarded – undo
236 244
      * @param int|null $firstResult
237 245
      * @param int|null $maxResult
238 246
      *
239
-     * @return SourceIteratorInterface
247
+     * @return SourceIteratorInterface|null
240 248
      */
241 249
     public function getDataSourceIterator(
242 250
         DatagridInterface $datagrid,
@@ -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/Admin/AdminInterface.php 1 patch
Doc Comments   +108 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,26 +37,53 @@  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
 
42 45
     public function getMenuFactory(): ?MenuFactoryInterface;
43 46
 
47
+    /**
48
+     * @return void
49
+     */
44 50
     public function setFormContractor(FormContractorInterface $formContractor): void;
45 51
 
52
+    /**
53
+     * @return void
54
+     */
46 55
     public function setListBuilder(ListBuilderInterface $listBuilder): void;
47 56
 
57
+    /**
58
+     * @return ListBuilderInterface
59
+     */
48 60
     public function getListBuilder(): ?ListBuilderInterface;
49 61
 
62
+    /**
63
+     * @return void
64
+     */
50 65
     public function setDatagridBuilder(DatagridBuilderInterface $datagridBuilder): void;
51 66
 
67
+    /**
68
+     * @return DatagridBuilderInterface
69
+     */
52 70
     public function getDatagridBuilder(): ?DatagridBuilderInterface;
53 71
 
72
+    /**
73
+     * @return void
74
+     */
54 75
     public function setTranslator(TranslatorInterface $translator): void;
55 76
 
56 77
     public function getTranslator(): ?TranslatorInterface;
57 78
 
79
+    /**
80
+     * @return void
81
+     */
58 82
     public function setRequest(Request $request): void;
59 83
 
84
+    /**
85
+     * @return void
86
+     */
60 87
     public function setConfigurationPool(Pool $pool): void;
61 88
 
62 89
     /**
@@ -67,14 +94,21 @@  discard block
 block discarded – undo
67 94
      */
68 95
     public function getClass(): string;
69 96
 
97
+    /**
98
+     * @return void
99
+     */
70 100
     public function attachAdminClass(FieldDescriptionInterface $fieldDescription): void;
71 101
 
102
+    /**
103
+     * @return DatagridInterface|null
104
+     */
72 105
     public function getDatagrid(): ?DatagridInterface;
73 106
 
74 107
     /**
75 108
      * Set base controller name.
76 109
      *
77 110
      * @param string $baseControllerName
111
+     * @return void
78 112
      */
79 113
     public function setBaseControllerName($baseControllerName): void;
80 114
 
@@ -85,6 +119,7 @@  discard block
 block discarded – undo
85 119
 
86 120
     /**
87 121
      * Sets a list of templates.
122
+     * @return void
88 123
      */
89 124
     public function setTemplates(array $templates): void;
90 125
 
@@ -93,9 +128,13 @@  discard block
 block discarded – undo
93 128
      *
94 129
      * @param string $name
95 130
      * @param string $template
131
+     * @return void
96 132
      */
97 133
     public function setTemplate($name, $template): void;
98 134
 
135
+    /**
136
+     * @return ModelManagerInterface
137
+     */
99 138
     public function getModelManager(): ?ModelManagerInterface;
100 139
 
101 140
     /**
@@ -115,6 +154,7 @@  discard block
 block discarded – undo
115 154
 
116 155
     /**
117 156
      * Returns a form depend on the given $object.
157
+     * @return \Symfony\Component\Form\Form|null
118 158
      */
119 159
     public function getForm(): ?FormInterface;
120 160
 
@@ -145,6 +185,9 @@  discard block
 block discarded – undo
145 185
      */
146 186
     public function getSecurityInformation(): array;
147 187
 
188
+    /**
189
+     * @return void
190
+     */
148 191
     public function setParentFieldDescription(FieldDescriptionInterface $parentFieldDescription): void;
149 192
 
150 193
     /**
@@ -188,8 +231,14 @@  discard block
 block discarded – undo
188 231
      */
189 232
     public function hasRoute($name): bool;
190 233
 
234
+    /**
235
+     * @return void
236
+     */
191 237
     public function setSecurityHandler(SecurityHandlerInterface $securityHandler): void;
192 238
 
239
+    /**
240
+     * @return SecurityHandlerInterface
241
+     */
193 242
     public function getSecurityHandler(): ?SecurityHandlerInterface;
194 243
 
195 244
     /**
@@ -210,16 +259,25 @@  discard block
 block discarded – undo
210 259
      *
211 260
      * @param object $entity
212 261
      *
213
-     * @return mixed
262
+     * @return string
214 263
      */
215 264
     public function id($entity);
216 265
 
266
+    /**
267
+     * @return void
268
+     */
217 269
     public function setValidator(ValidatorInterface $validator): void;
218 270
 
219 271
     public function getValidator(): ?ValidatorInterface;
220 272
 
273
+    /**
274
+     * @return FieldDescriptionCollection|null
275
+     */
221 276
     public function getShow(): ?FieldDescriptionCollection;
222 277
 
278
+    /**
279
+     * @return void
280
+     */
223 281
     public function setFormTheme(array $formTheme): void;
224 282
 
225 283
     /**
@@ -227,6 +285,9 @@  discard block
 block discarded – undo
227 285
      */
228 286
     public function getFormTheme(): array;
229 287
 
288
+    /**
289
+     * @return void
290
+     */
230 291
     public function setFilterTheme(array $filterTheme): void;
231 292
 
232 293
     /**
@@ -234,6 +295,9 @@  discard block
 block discarded – undo
234 295
      */
235 296
     public function getFilterTheme(): array;
236 297
 
298
+    /**
299
+     * @return void
300
+     */
237 301
     public function addExtension(AdminExtensionInterface $extension): void;
238 302
 
239 303
     /**
@@ -243,8 +307,14 @@  discard block
 block discarded – undo
243 307
      */
244 308
     public function getExtensions(): array;
245 309
 
310
+    /**
311
+     * @return void
312
+     */
246 313
     public function setRouteBuilder(RouteBuilderInterface $routeBuilder): void;
247 314
 
315
+    /**
316
+     * @return RouteBuilderInterface
317
+     */
248 318
     public function getRouteBuilder(): ?RouteBuilderInterface;
249 319
 
250 320
     /**
@@ -252,8 +322,14 @@  discard block
 block discarded – undo
252 322
      */
253 323
     public function toString($object): string;
254 324
 
325
+    /**
326
+     * @return void
327
+     */
255 328
     public function setLabelTranslatorStrategy(LabelTranslatorStrategyInterface $labelTranslatorStrategy): void;
256 329
 
330
+    /**
331
+     * @return LabelTranslatorStrategyInterface
332
+     */
257 333
     public function getLabelTranslatorStrategy(): ?LabelTranslatorStrategyInterface;
258 334
 
259 335
     /**
@@ -270,6 +346,7 @@  discard block
 block discarded – undo
270 346
 
271 347
     /**
272 348
      * @param string $uniqId
349
+     * @return void
273 350
      */
274 351
     public function setUniqid($uniqId): void;
275 352
 
@@ -292,6 +369,7 @@  discard block
 block discarded – undo
292 369
 
293 370
     /**
294 371
      * @param object|null $subject
372
+     * @return void
295 373
      */
296 374
     public function setSubject($subject): void;
297 375
 
@@ -340,6 +418,7 @@  discard block
 block discarded – undo
340 418
      *
341 419
      * @param string $actionName
342 420
      * @param bool   $allElements
421
+     * @return void
343 422
      */
344 423
     public function preBatchAction($actionName, ProxyQueryInterface $query, array &$idx, $allElements): void;
345 424
 
@@ -362,6 +441,7 @@  discard block
 block discarded – undo
362 441
      *
363 442
      * @deprecated this feature cannot be stable, use a custom validator,
364 443
      *             the feature will be removed with Symfony 2.2
444
+     * @return void
365 445
      */
366 446
     public function validate(ErrorElement $errorElement, $object): void;
367 447
 
@@ -374,11 +454,18 @@  discard block
 block discarded – undo
374 454
      * Add object security, fe. make the current user owner of the object.
375 455
      *
376 456
      * @param object $object
457
+     * @return void
377 458
      */
378 459
     public function createObjectSecurity($object): void;
379 460
 
461
+    /**
462
+     * @return AdminInterface|null
463
+     */
380 464
     public function getParent(): ?self;
381 465
 
466
+    /**
467
+     * @return void
468
+     */
382 469
     public function setParent(self $admin): void;
383 470
 
384 471
     /**
@@ -390,6 +477,7 @@  discard block
 block discarded – undo
390 477
      * Set the translation domain.
391 478
      *
392 479
      * @param string $translationDomain the translation domain
480
+     * @return void
393 481
      */
394 482
     public function setTranslationDomain($translationDomain): void;
395 483
 
@@ -409,21 +497,29 @@  discard block
 block discarded – undo
409 497
 
410 498
     /**
411 499
      * Set the form groups.
500
+     * @return void
412 501
      */
413 502
     public function setFormGroups(array $formGroups): void;
414 503
 
415 504
     public function getFormTabs();
416 505
 
506
+    /**
507
+     * @return void
508
+     */
417 509
     public function setFormTabs(array $formTabs): void;
418 510
 
419 511
     public function getShowTabs();
420 512
 
513
+    /**
514
+     * @return void
515
+     */
421 516
     public function setShowTabs(array $showTabs): void;
422 517
 
423 518
     /**
424 519
      * Remove a form group field.
425 520
      *
426 521
      * @param string $key
522
+     * @return void
427 523
      */
428 524
     public function removeFieldFromFormGroup($key): void;
429 525
 
@@ -436,6 +532,7 @@  discard block
 block discarded – undo
436 532
 
437 533
     /**
438 534
      * Set the show groups.
535
+     * @return void
439 536
      */
440 537
     public function setShowGroups(array $showGroups): void;
441 538
 
@@ -443,6 +540,7 @@  discard block
 block discarded – undo
443 540
      * Reorder items in showGroup.
444 541
      *
445 542
      * @param string $group
543
+     * @return void
446 544
      */
447 545
     public function reorderShowGroup($group, array $keys): void;
448 546
 
@@ -450,6 +548,7 @@  discard block
 block discarded – undo
450 548
      * add a FieldDescription.
451 549
      *
452 550
      * @param string $name
551
+     * @return void
453 552
      */
454 553
     public function addFormFieldDescription($name, FieldDescriptionInterface $fieldDescription): void;
455 554
 
@@ -457,6 +556,7 @@  discard block
 block discarded – undo
457 556
      * Remove a FieldDescription.
458 557
      *
459 558
      * @param string $name
559
+     * @return void
460 560
      */
461 561
     public function removeFormFieldDescription($name): void;
462 562
 
@@ -474,11 +574,13 @@  discard block
 block discarded – undo
474 574
      * Adds a new class to a list of supported sub classes.
475 575
      *
476 576
      * @param $subClass
577
+     * @return void
477 578
      */
478 579
     public function addSubClass($subClass): void;
479 580
 
480 581
     /**
481 582
      * Sets the list of supported sub classes.
583
+     * @return void
482 584
      */
483 585
     public function setSubClasses(array $subClasses): void;
484 586
 
@@ -517,6 +619,7 @@  discard block
 block discarded – undo
517 619
 
518 620
     /**
519 621
      * Returns Admin`s label.
622
+     * @return string
520 623
      */
521 624
     public function getLabel(): ?string;
522 625
 
@@ -531,6 +634,7 @@  discard block
 block discarded – undo
531 634
 
532 635
     /**
533 636
      * Set the current child status.
637
+     * @return void
534 638
      */
535 639
     public function setCurrentChild(bool $currentChild): void;
536 640
 
@@ -560,6 +664,7 @@  discard block
 block discarded – undo
560 664
 
561 665
     /**
562 666
      * @param string $mode
667
+     * @return void
563 668
      */
564 669
     public function setListMode($mode): void;
565 670
 
@@ -589,12 +694,14 @@  discard block
 block discarded – undo
589 694
      * Returns the result link for an object.
590 695
      *
591 696
      * @param object $object
697
+     * @return string|null
592 698
      */
593 699
     public function getSearchResultLink($object): ?string;
594 700
 
595 701
     /**
596 702
      * Setting to true will enable mosaic button for the admin screen.
597 703
      * Setting to false will hide mosaic button for the admin screen.
704
+     * @return void
598 705
      */
599 706
     public function showMosaicButton(bool $isShown): void;
600 707
 
Please login to merge, or discard this patch.