Passed
Push — 6.0 ( e6360e...a5ddb0 )
by Olivier
01:38
created

LocalizedObjectWithFormatter   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 11
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
1
<?php
2
3
namespace ICanBoogie\CLDR;
4
5
/**
6
 * A localized object with a formatter.
7
 *
8
 * @template TTarget of object
9
 * @template TFormatter of Formatter
10
 *
11
 * @extends LocalizedObject<TTarget>
12
 *
13
 * @property-read TFormatter $formatter The formatter used to format the target object.
14
 *
15
 * @method string format() Formats the instance's target. Although the method is not
16
 * defined by the class, it should be implemented by subclasses.
17
 */
18
abstract class LocalizedObjectWithFormatter extends LocalizedObject
19
{
20
    /**
21
     * @phpstan-param TFormatter $formatter
22
     */
23
    public function __construct(
24
        object $target,
25
        Locale $locale,
26
        public readonly Formatter $formatter,
27
    ) {
28
        parent::__construct($target, $locale);
29
    }
30
}
31