sonata-project / SonataAdminBundle

@@ -27,6 +27,7 @@
Loading
27 27
{
28 28
    /**
29 29
     * @var ModelManagerInterface
30 +
     * @phpstan-var ModelManagerInterface<T>
30 31
     */
31 32
    protected $modelManager;
32 33
@@ -40,7 +41,8 @@
Loading
40 41
    /**
41 42
     * @param string $className
42 43
     *
43 -
     * @phpstan-param class-string<T> $className
44 +
     * @phpstan-param ModelManagerInterface<T> $modelManager
45 +
     * @phpstan-param class-string<T>          $className
44 46
     */
45 47
    public function __construct(ModelManagerInterface $modelManager, $className)
46 48
    {

@@ -37,6 +37,7 @@
Loading
37 37
{
38 38
    /**
39 39
     * @var ModelManagerInterface
40 +
     * @phpstan-var ModelManagerInterface<T>
40 41
     */
41 42
    protected $modelManager;
42 43
@@ -60,7 +61,8 @@
Loading
60 61
     * @param ModelManagerInterface            $modelManager
61 62
     * @param string                           $class
62 63
     *
63 -
     * @phpstan-param class-string<T> $class
64 +
     * @phpstan-param ModelManagerInterface<T> $modelManager
65 +
     * @phpstan-param class-string<T>          $class
64 66
     *
65 67
     * @throws RuntimeException
66 68
     */

@@ -28,6 +28,8 @@
Loading
28 28
 *
29 29
 * @method bool supportsQuery(object $query)
30 30
 * @method void reverseTransform(object $object, array $array = [])
31 +
 *
32 +
 * @phpstan-template T of object
31 33
 */
32 34
interface ModelManagerInterface extends DatagridManagerInterface
33 35
{
@@ -72,7 +74,6 @@
Loading
72 74
     *
73 75
     * @return object[] all objects matching the criteria
74 76
     *
75 -
     * @phpstan-template T of object
76 77
     * @phpstan-param class-string<T> $class
77 78
     * @phpstan-return T[]
78 79
     */
@@ -84,7 +85,6 @@
Loading
84 85
     *
85 86
     * @return object|null an object matching the criteria or null if none match
86 87
     *
87 -
     * @phpstan-template T of object
88 88
     * @phpstan-param class-string<T> $class
89 89
     * @phpstan-return T|null
90 90
     */
@@ -96,7 +96,6 @@
Loading
96 96
     *
97 97
     * @return object|null the object with id or null if not found
98 98
     *
99 -
     * @phpstan-template T of object
100 99
     * @phpstan-param class-string<T> $class
101 100
     * @phpstan-return T|null
102 101
     */
@@ -204,7 +203,6 @@
Loading
204 203
     *
205 204
     * @return object
206 205
     *
207 -
     * @phpstan-template T of object
208 206
     * @phpstan-param class-string<T> $class
209 207
     * @phpstan-return T
210 208
     */
@@ -291,7 +289,6 @@
Loading
291 289
     *
292 290
     * @return object
293 291
     *
294 -
     * @phpstan-template T of object
295 292
     * @phpstan-param class-string<T> $class
296 293
     * @phpstan-return T
297 294
     */
@@ -310,7 +307,6 @@
Loading
310 307
     *
311 308
     * @return object
312 309
     *
313 -
     * @phpstan-template T of object
314 310
     * @phpstan-param class-string<T> $class
315 311
     * @phpstan-return T
316 312
     */
@@ -346,7 +342,7 @@
Loading
346 342
     *
347 343
     * @return string[]
348 344
     *
349 -
     * @phpstan-param class-string $class
345 +
     * @phpstan-param class-string<T> $class
350 346
     */
351 347
    public function getExportFields($class);
352 348
@@ -366,7 +362,7 @@
Loading
366 362
     * @param string                 $class
367 363
     * @param array<int, int|string> $idx
368 364
     *
369 -
     * @phpstan-param class-string $class
365 +
     * @phpstan-param class-string<T> $class
370 366
     */
371 367
    public function addIdentifiersToQuery($class, ProxyQueryInterface $query, array $idx);
372 368
}

@@ -33,6 +33,7 @@
Loading
33 33
34 34
/**
35 35
 * @phpstan-template T of object
36 +
 * @phpstan-implements TaggedAdminInterface<T>
36 37
 */
37 38
abstract class AbstractTaggedAdmin implements TaggedAdminInterface
38 39
{
@@ -117,6 +118,7 @@
Loading
117 118
     * The Entity or Document manager.
118 119
     *
119 120
     * @var ModelManagerInterface|null
121 +
     * @phpstan-var ModelManagerInterface<T>|null
120 122
     */
121 123
    protected $modelManager;
122 124
@@ -372,7 +374,10 @@
Loading
372 374
    }
373 375
374 376
    /**
377 +
     * NEXT_MAJOR: Move the phpdoc to the interface.
378 +
     *
375 379
     * @final since sonata-admin/admin-bundle 3.84
380 +
     * @phpstan-param ModelManagerInterface<T> $modelManager
376 381
     */
377 382
    public function setModelManager(ModelManagerInterface $modelManager)
378 383
    {

@@ -33,6 +33,7 @@
Loading
33 33
{
34 34
    /**
35 35
     * @var ModelManagerInterface
36 +
     * @phpstan-var ModelManagerInterface<T>
36 37
     */
37 38
    protected $modelManager;
38 39
@@ -65,7 +66,8 @@
Loading
65 66
     * @param callable|null   $toStringCallback
66 67
     *
67 68
     * @phpstan-template P
68 -
     * @phpstan-param class-string<T> $className
69 +
     * @phpstan-param ModelManagerInterface<T>         $modelManager
70 +
     * @phpstan-param class-string<T>                  $className
69 71
     * @phpstan-param null|callable(object, P): string $toStringCallback
70 72
     */
71 73
    public function __construct(

@@ -28,6 +28,7 @@
Loading
28 28
{
29 29
    /**
30 30
     * @var ModelManagerInterface
31 +
     * @phpstan-var ModelManagerInterface<T>
31 32
     */
32 33
    protected $modelManager;
33 34
@@ -41,7 +42,8 @@
Loading
41 42
    /**
42 43
     * @param string $className
43 44
     *
44 -
     * @phpstan-param class-string<T> $className
45 +
     * @phpstan-param ModelManagerInterface<T> $modelManager
46 +
     * @phpstan-param class-string<T>          $className
45 47
     */
46 48
    public function __construct(ModelManagerInterface $modelManager, $className)
47 49
    {

@@ -58,6 +58,7 @@
Loading
58 58
 * @phpstan-extends AccessRegistryInterface<T>
59 59
 * @phpstan-extends UrlGeneratorInterface<T>
60 60
 * @phpstan-extends LifecycleHookProviderInterface<T>
61 +
 * @phpstan-extends TaggedAdminInterface<T>
61 62
 */
62 63
interface AdminInterface extends TaggedAdminInterface, AccessRegistryInterface, FieldDescriptionRegistryInterface, LifecycleHookProviderInterface, MenuBuilderInterface, ParentAdminInterface, UrlGeneratorInterface, MutableTemplateRegistryAwareInterface
63 64
{
Files Complexity Coverage
src 2,852 80.48%
Project Totals (191 files) 2852 80.48%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading