Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
DecimalPropertyAttribute
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2namespace Apie\StorageMetadata\Attributes;
3
4use Attribute;
5
6#[Attribute(Attribute::TARGET_PROPERTY)]
7class DecimalPropertyAttribute extends PropertyAttribute
8{
9    /**
10     * @param class-string<object>|null $declaredClass
11     */
12    public function __construct(
13        string $propertyName,
14        ?string $declaredClass = null,
15        public readonly int $decimals = 2
16    ) {
17        parent::__construct($propertyName, $declaredClass, false);
18    }
19}