Completed
Pull Request — master (#6005)
by Javier
02:47
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()) {
@@ -1306,6 +1310,9 @@  discard block
 block discarded – undo
1306 1310
         return $this->baseControllerName;
1307 1311
     }
1308 1312
 
1313
+    /**
1314
+     * @param string $label
1315
+     */
1309 1316
     public function setLabel(?string $label): void
1310 1317
     {
1311 1318
         $this->label = $label;
@@ -1800,6 +1807,7 @@  discard block
 block discarded – undo
1800 1807
      *
1801 1808
      * NEXT_MAJOR: remove this method
1802 1809
      *
1810
+     * @param string $domain
1803 1811
      * @return string the translated string
1804 1812
      *
1805 1813
      * @deprecated since sonata-project/admin-bundle 3.9, to be removed with 4.0
@@ -1980,6 +1988,9 @@  discard block
 block discarded – undo
1980 1988
         return $this->managerType;
1981 1989
     }
1982 1990
 
1991
+    /**
1992
+     * @param string $type
1993
+     */
1983 1994
     public function setManagerType(?string $type): void
1984 1995
     {
1985 1996
         $this->managerType = $type;
@@ -2387,6 +2398,7 @@  discard block
 block discarded – undo
2387 2398
 
2388 2399
     /**
2389 2400
      * {@inheritdoc}
2401
+     * @param boolean $isShown
2390 2402
      */
2391 2403
     final public function showMosaicButton($isShown): void
2392 2404
     {
@@ -2513,6 +2525,7 @@  discard block
 block discarded – undo
2513 2525
      * NEXT_MAJOR: remove this method.
2514 2526
      *
2515 2527
      * @deprecated Use configureTabMenu instead
2528
+     * @param string $action
2516 2529
      */
2517 2530
     protected function configureSideMenu(ItemInterface $menu, $action, AdminInterface $childAdmin = null): void
2518 2531
     {
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,6 +123,7 @@  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
 
@@ -91,9 +132,13 @@  discard block
 block discarded – undo
91 132
      *
92 133
      * @param string $name
93 134
      * @param string $template
135
+     * @return void
94 136
      */
95 137
     public function setTemplate($name, $template): void;
96 138
 
139
+    /**
140
+     * @return ModelManagerInterface
141
+     */
97 142
     public function getModelManager(): ?ModelManagerInterface;
98 143
 
99 144
     /**
@@ -113,6 +158,7 @@  discard block
 block discarded – undo
113 158
 
114 159
     /**
115 160
      * Returns a form depend on the given $object.
161
+     * @return \Symfony\Component\Form\Form|null
116 162
      */
117 163
     public function getForm(): ?FormInterface;
118 164
 
@@ -143,6 +189,9 @@  discard block
 block discarded – undo
143 189
      */
144 190
     public function getSecurityInformation(): array;
145 191
 
192
+    /**
193
+     * @return void
194
+     */
146 195
     public function setParentFieldDescription(FieldDescriptionInterface $parentFieldDescription): void;
147 196
 
148 197
     /**
@@ -184,8 +233,14 @@  discard block
 block discarded – undo
184 233
      */
185 234
     public function hasRoute(string $name): bool;
186 235
 
236
+    /**
237
+     * @return void
238
+     */
187 239
     public function setSecurityHandler(SecurityHandlerInterface $securityHandler): void;
188 240
 
241
+    /**
242
+     * @return SecurityHandlerInterface
243
+     */
189 244
     public function getSecurityHandler(): ?SecurityHandlerInterface;
190 245
 
191 246
     /**
@@ -204,15 +259,28 @@  discard block
 block discarded – undo
204 259
      * Shorthand method for templating.
205 260
      *
206 261
      * @param object $entity
262
+     * @return string
207 263
      */
208 264
     public function id($entity): ?string;
209 265
 
266
+    /**
267
+     * @return void
268
+     */
210 269
     public function setValidator(ValidatorInterface $validator): void;
211 270
 
271
+    /**
272
+     * @return ValidatorInterface
273
+     */
212 274
     public function getValidator(): ?ValidatorInterface;
213 275
 
276
+    /**
277
+     * @return FieldDescriptionCollection|null
278
+     */
214 279
     public function getShow(): ?FieldDescriptionCollection;
215 280
 
281
+    /**
282
+     * @return void
283
+     */
216 284
     public function setFormTheme(array $formTheme): void;
217 285
 
218 286
     /**
@@ -220,6 +288,9 @@  discard block
 block discarded – undo
220 288
      */
221 289
     public function getFormTheme(): array;
222 290
 
291
+    /**
292
+     * @return void
293
+     */
223 294
     public function setFilterTheme(array $filterTheme): void;
224 295
 
225 296
     /**
@@ -227,6 +298,9 @@  discard block
 block discarded – undo
227 298
      */
228 299
     public function getFilterTheme(): array;
229 300
 
301
+    /**
302
+     * @return void
303
+     */
230 304
     public function addExtension(AdminExtensionInterface $extension): void;
231 305
 
232 306
     /**
@@ -236,8 +310,14 @@  discard block
 block discarded – undo
236 310
      */
237 311
     public function getExtensions(): array;
238 312
 
313
+    /**
314
+     * @return void
315
+     */
239 316
     public function setRouteBuilder(RouteBuilderInterface $routeBuilder): void;
240 317
 
318
+    /**
319
+     * @return RouteBuilderInterface
320
+     */
241 321
     public function getRouteBuilder(): ?RouteBuilderInterface;
242 322
 
243 323
     /**
@@ -245,8 +325,14 @@  discard block
 block discarded – undo
245 325
      */
246 326
     public function toString($object): string;
247 327
 
328
+    /**
329
+     * @return void
330
+     */
248 331
     public function setLabelTranslatorStrategy(LabelTranslatorStrategyInterface $labelTranslatorStrategy): void;
249 332
 
333
+    /**
334
+     * @return LabelTranslatorStrategyInterface
335
+     */
250 336
     public function getLabelTranslatorStrategy(): ?LabelTranslatorStrategyInterface;
251 337
 
252 338
     /**
@@ -261,6 +347,9 @@  discard block
 block discarded – undo
261 347
      */
262 348
     public function getNewInstance();
263 349
 
350
+    /**
351
+     * @return void
352
+     */
264 353
     public function setUniqid(string $uniqId): void;
265 354
 
266 355
     /**
@@ -280,6 +369,9 @@  discard block
 block discarded – undo
280 369
      */
281 370
     public function getObject($id): ?object;
282 371
 
372
+    /**
373
+     * @return void
374
+     */
283 375
     public function setSubject(?object $subject): void;
284 376
 
285 377
     public function getSubject(): ?object;
@@ -318,6 +410,7 @@  discard block
 block discarded – undo
318 410
 
319 411
     /**
320 412
      * Call before the batch action, allow you to alter the query and the idx.
413
+     * @return void
321 414
      */
322 415
     public function preBatchAction(string $actionName, ProxyQueryInterface $query, array &$idx, bool $allElements = false): void;
323 416
 
@@ -340,6 +433,7 @@  discard block
 block discarded – undo
340 433
      *
341 434
      * @deprecated this feature cannot be stable, use a custom validator,
342 435
      *             the feature will be removed with Symfony 2.2
436
+     * @return void
343 437
      */
344 438
     public function validate(ErrorElement $errorElement, $object): void;
345 439
 
@@ -349,11 +443,18 @@  discard block
 block discarded – undo
349 443
      * Add object security, fe. make the current user owner of the object.
350 444
      *
351 445
      * @param object $object
446
+     * @return void
352 447
      */
353 448
     public function createObjectSecurity($object): void;
354 449
 
450
+    /**
451
+     * @return AdminInterface|null
452
+     */
355 453
     public function getParent(): ?self;
356 454
 
455
+    /**
456
+     * @return void
457
+     */
357 458
     public function setParent(self $admin): void;
358 459
 
359 460
     /**
@@ -365,6 +466,7 @@  discard block
 block discarded – undo
365 466
      * Set the translation domain.
366 467
      *
367 468
      * @param string $translationDomain the translation domain
469
+     * @return void
368 470
      */
369 471
     public function setTranslationDomain(string $translationDomain): void;
370 472
 
@@ -384,19 +486,27 @@  discard block
 block discarded – undo
384 486
 
385 487
     /**
386 488
      * Set the form groups.
489
+     * @return void
387 490
      */
388 491
     public function setFormGroups(array $formGroups): void;
389 492
 
390 493
     public function getFormTabs();
391 494
 
495
+    /**
496
+     * @return void
497
+     */
392 498
     public function setFormTabs(array $formTabs): void;
393 499
 
394 500
     public function getShowTabs();
395 501
 
502
+    /**
503
+     * @return void
504
+     */
396 505
     public function setShowTabs(array $showTabs): void;
397 506
 
398 507
     /**
399 508
      * Remove a form group field.
509
+     * @return void
400 510
      */
401 511
     public function removeFieldFromFormGroup(string $key): void;
402 512
 
@@ -409,21 +519,25 @@  discard block
 block discarded – undo
409 519
 
410 520
     /**
411 521
      * Set the show groups.
522
+     * @return void
412 523
      */
413 524
     public function setShowGroups(array $showGroups): void;
414 525
 
415 526
     /**
416 527
      * Reorder items in showGroup.
528
+     * @return void
417 529
      */
418 530
     public function reorderShowGroup(string $group, array $keys): void;
419 531
 
420 532
     /**
421 533
      * add a FieldDescription.
534
+     * @return void
422 535
      */
423 536
     public function addFormFieldDescription(string $name, FieldDescriptionInterface $fieldDescription): void;
424 537
 
425 538
     /**
426 539
      * Remove a FieldDescription.
540
+     * @return void
427 541
      */
428 542
     public function removeFormFieldDescription(string $name): void;
429 543
 
@@ -441,11 +555,13 @@  discard block
 block discarded – undo
441 555
      * Adds a new class to a list of supported sub classes.
442 556
      *
443 557
      * @param $subClass
558
+     * @return void
444 559
      */
445 560
     public function addSubClass($subClass): void;
446 561
 
447 562
     /**
448 563
      * Sets the list of supported sub classes.
564
+     * @return void
449 565
      */
450 566
     public function setSubClasses(array $subClasses): void;
451 567
 
@@ -484,6 +600,7 @@  discard block
 block discarded – undo
484 600
 
485 601
     /**
486 602
      * Returns Admin`s label.
603
+     * @return string
487 604
      */
488 605
     public function getLabel(): ?string;
489 606
 
@@ -498,6 +615,7 @@  discard block
 block discarded – undo
498 615
 
499 616
     /**
500 617
      * Set the current child status.
618
+     * @return void
501 619
      */
502 620
     public function setCurrentChild(bool $currentChild): void;
503 621
 
@@ -523,6 +641,7 @@  discard block
 block discarded – undo
523 641
 
524 642
     /**
525 643
      * @param string $mode
644
+     * @return void
526 645
      */
527 646
     public function setListMode($mode): void;
528 647
 
@@ -548,12 +667,14 @@  discard block
 block discarded – undo
548 667
 
549 668
     /**
550 669
      * Returns the result link for an object.
670
+     * @return string|null
551 671
      */
552 672
     public function getSearchResultLink(object $object): ?string;
553 673
 
554 674
     /**
555 675
      * Setting to true will enable mosaic button for the admin screen.
556 676
      * Setting to false will hide mosaic button for the admin screen.
677
+     * @return void
557 678
      */
558 679
     public function showMosaicButton(bool $isShown): void;
559 680
 
Please login to merge, or discard this patch.