Completed
Pull Request — master (#6005)
by Javier
02:47
created
src/Security/Handler/SecurityHandlerInterface.php 1 patch
Doc Comments   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 interface SecurityHandlerInterface
22 22
 {
23 23
     /**
24
-     * @param string|array $attributes
24
+     * @param string $attributes
25 25
      * @param mixed|null   $object
26 26
      *
27 27
      * @return bool
@@ -44,6 +44,7 @@  discard block
 block discarded – undo
44 44
      * Create object security, fe. make the current user owner of the object.
45 45
      *
46 46
      * @param object $object
47
+     * @return void
47 48
      */
48 49
     public function createObjectSecurity(AdminInterface $admin, $object);
49 50
 
@@ -51,6 +52,7 @@  discard block
 block discarded – undo
51 52
      * Remove object security.
52 53
      *
53 54
      * @param object $object
55
+     * @return void
54 56
      */
55 57
     public function deleteObjectSecurity(AdminInterface $admin, $object);
56 58
 }
Please login to merge, or discard this patch.
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   +117 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,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
     /**
@@ -186,8 +235,14 @@  discard block
 block discarded – undo
186 235
      */
187 236
     public function hasRoute(string $name): bool;
188 237
 
238
+    /**
239
+     * @return void
240
+     */
189 241
     public function setSecurityHandler(SecurityHandlerInterface $securityHandler): void;
190 242
 
243
+    /**
244
+     * @return SecurityHandlerInterface
245
+     */
191 246
     public function getSecurityHandler(): ?SecurityHandlerInterface;
192 247
 
193 248
     /**
@@ -206,15 +261,28 @@  discard block
 block discarded – undo
206 261
      * Shorthand method for templating.
207 262
      *
208 263
      * @param object $entity
264
+     * @return string
209 265
      */
210 266
     public function id($entity): ?string;
211 267
 
268
+    /**
269
+     * @return void
270
+     */
212 271
     public function setValidator(ValidatorInterface $validator): void;
213 272
 
273
+    /**
274
+     * @return ValidatorInterface
275
+     */
214 276
     public function getValidator(): ?ValidatorInterface;
215 277
 
278
+    /**
279
+     * @return FieldDescriptionCollection|null
280
+     */
216 281
     public function getShow(): ?FieldDescriptionCollection;
217 282
 
283
+    /**
284
+     * @return void
285
+     */
218 286
     public function setFormTheme(array $formTheme): void;
219 287
 
220 288
     /**
@@ -222,6 +290,9 @@  discard block
 block discarded – undo
222 290
      */
223 291
     public function getFormTheme(): array;
224 292
 
293
+    /**
294
+     * @return void
295
+     */
225 296
     public function setFilterTheme(array $filterTheme): void;
226 297
 
227 298
     /**
@@ -229,6 +300,9 @@  discard block
 block discarded – undo
229 300
      */
230 301
     public function getFilterTheme(): array;
231 302
 
303
+    /**
304
+     * @return void
305
+     */
232 306
     public function addExtension(AdminExtensionInterface $extension): void;
233 307
 
234 308
     /**
@@ -238,8 +312,14 @@  discard block
 block discarded – undo
238 312
      */
239 313
     public function getExtensions(): array;
240 314
 
315
+    /**
316
+     * @return void
317
+     */
241 318
     public function setRouteBuilder(RouteBuilderInterface $routeBuilder): void;
242 319
 
320
+    /**
321
+     * @return RouteBuilderInterface
322
+     */
243 323
     public function getRouteBuilder(): ?RouteBuilderInterface;
244 324
 
245 325
     /**
@@ -247,8 +327,14 @@  discard block
 block discarded – undo
247 327
      */
248 328
     public function toString($object): string;
249 329
 
330
+    /**
331
+     * @return void
332
+     */
250 333
     public function setLabelTranslatorStrategy(LabelTranslatorStrategyInterface $labelTranslatorStrategy): void;
251 334
 
335
+    /**
336
+     * @return LabelTranslatorStrategyInterface
337
+     */
252 338
     public function getLabelTranslatorStrategy(): ?LabelTranslatorStrategyInterface;
253 339
 
254 340
     /**
@@ -265,6 +351,7 @@  discard block
 block discarded – undo
265 351
 
266 352
     /**
267 353
      * @param string $uniqId
354
+     * @return void
268 355
      */
269 356
     public function setUniqid($uniqId): void;
270 357
 
@@ -287,6 +374,7 @@  discard block
 block discarded – undo
287 374
 
288 375
     /**
289 376
      * @param object|null $subject
377
+     * @return void
290 378
      */
291 379
     public function setSubject($subject): void;
292 380
 
@@ -333,6 +421,7 @@  discard block
 block discarded – undo
333 421
      *
334 422
      * @param string $actionName
335 423
      * @param bool   $allElements
424
+     * @return void
336 425
      */
337 426
     public function preBatchAction($actionName, ProxyQueryInterface $query, array &$idx, $allElements): void;
338 427
 
@@ -355,6 +444,7 @@  discard block
 block discarded – undo
355 444
      *
356 445
      * @deprecated this feature cannot be stable, use a custom validator,
357 446
      *             the feature will be removed with Symfony 2.2
447
+     * @return void
358 448
      */
359 449
     public function validate(ErrorElement $errorElement, $object): void;
360 450
 
@@ -367,11 +457,18 @@  discard block
 block discarded – undo
367 457
      * Add object security, fe. make the current user owner of the object.
368 458
      *
369 459
      * @param object $object
460
+     * @return void
370 461
      */
371 462
     public function createObjectSecurity($object): void;
372 463
 
464
+    /**
465
+     * @return AdminInterface|null
466
+     */
373 467
     public function getParent(): ?self;
374 468
 
469
+    /**
470
+     * @return void
471
+     */
375 472
     public function setParent(self $admin): void;
376 473
 
377 474
     /**
@@ -383,6 +480,7 @@  discard block
 block discarded – undo
383 480
      * Set the translation domain.
384 481
      *
385 482
      * @param string $translationDomain the translation domain
483
+     * @return void
386 484
      */
387 485
     public function setTranslationDomain($translationDomain): void;
388 486
 
@@ -402,21 +500,29 @@  discard block
 block discarded – undo
402 500
 
403 501
     /**
404 502
      * Set the form groups.
503
+     * @return void
405 504
      */
406 505
     public function setFormGroups(array $formGroups): void;
407 506
 
408 507
     public function getFormTabs();
409 508
 
509
+    /**
510
+     * @return void
511
+     */
410 512
     public function setFormTabs(array $formTabs): void;
411 513
 
412 514
     public function getShowTabs();
413 515
 
516
+    /**
517
+     * @return void
518
+     */
414 519
     public function setShowTabs(array $showTabs): void;
415 520
 
416 521
     /**
417 522
      * Remove a form group field.
418 523
      *
419 524
      * @param string $key
525
+     * @return void
420 526
      */
421 527
     public function removeFieldFromFormGroup($key): void;
422 528
 
@@ -429,6 +535,7 @@  discard block
 block discarded – undo
429 535
 
430 536
     /**
431 537
      * Set the show groups.
538
+     * @return void
432 539
      */
433 540
     public function setShowGroups(array $showGroups): void;
434 541
 
@@ -436,6 +543,7 @@  discard block
 block discarded – undo
436 543
      * Reorder items in showGroup.
437 544
      *
438 545
      * @param string $group
546
+     * @return void
439 547
      */
440 548
     public function reorderShowGroup($group, array $keys): void;
441 549
 
@@ -443,6 +551,7 @@  discard block
 block discarded – undo
443 551
      * add a FieldDescription.
444 552
      *
445 553
      * @param string $name
554
+     * @return void
446 555
      */
447 556
     public function addFormFieldDescription($name, FieldDescriptionInterface $fieldDescription): void;
448 557
 
@@ -450,6 +559,7 @@  discard block
 block discarded – undo
450 559
      * Remove a FieldDescription.
451 560
      *
452 561
      * @param string $name
562
+     * @return void
453 563
      */
454 564
     public function removeFormFieldDescription($name): void;
455 565
 
@@ -467,11 +577,13 @@  discard block
 block discarded – undo
467 577
      * Adds a new class to a list of supported sub classes.
468 578
      *
469 579
      * @param $subClass
580
+     * @return void
470 581
      */
471 582
     public function addSubClass($subClass): void;
472 583
 
473 584
     /**
474 585
      * Sets the list of supported sub classes.
586
+     * @return void
475 587
      */
476 588
     public function setSubClasses(array $subClasses): void;
477 589
 
@@ -510,6 +622,7 @@  discard block
 block discarded – undo
510 622
 
511 623
     /**
512 624
      * Returns Admin`s label.
625
+     * @return string
513 626
      */
514 627
     public function getLabel(): ?string;
515 628
 
@@ -524,6 +637,7 @@  discard block
 block discarded – undo
524 637
 
525 638
     /**
526 639
      * Set the current child status.
640
+     * @return void
527 641
      */
528 642
     public function setCurrentChild(bool $currentChild): void;
529 643
 
@@ -549,6 +663,7 @@  discard block
 block discarded – undo
549 663
 
550 664
     /**
551 665
      * @param string $mode
666
+     * @return void
552 667
      */
553 668
     public function setListMode($mode): void;
554 669
 
@@ -574,12 +689,14 @@  discard block
 block discarded – undo
574 689
 
575 690
     /**
576 691
      * Returns the result link for an object.
692
+     * @return string|null
577 693
      */
578 694
     public function getSearchResultLink(object $object): ?string;
579 695
 
580 696
     /**
581 697
      * Setting to true will enable mosaic button for the admin screen.
582 698
      * Setting to false will hide mosaic button for the admin screen.
699
+     * @return void
583 700
      */
584 701
     public function showMosaicButton(bool $isShown): void;
585 702
 
Please login to merge, or discard this patch.