Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
50.00% covered (danger)
50.00%
1 / 2
50.00% covered (danger)
50.00%
1 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 1
AclLinkAttribute
50.00% covered (danger)
50.00%
1 / 2
50.00% covered (danger)
50.00%
1 / 2
2.50
0.00% covered (danger)
0.00%
0 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getReflectionProperty
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2namespace Apie\StorageMetadata\Attributes;
3
4use Apie\StorageMetadata\Interfaces\StorageDtoInterface;
5use Attribute;
6use ReflectionClass;
7use ReflectionProperty;
8
9#[Attribute(Attribute::TARGET_PROPERTY)]
10class AclLinkAttribute
11{
12    /**
13     * @param class-string<StorageDtoInterface> $storageClass
14     * @param class-string<object>|null $declaredClass
15     */
16    public function __construct(
17        public readonly string $storageClass,
18        public readonly ?string $declaredClass = null
19    ) {
20    }
21
22    /**
23     * @template T of object
24     * @param ReflectionClass<T> $targetClass
25     * @param T $instance
26     */
27    public function getReflectionProperty(ReflectionClass $targetClass, object $instance): ?ReflectionProperty
28    {
29        return null;
30    }
31}