LocalizedObjectWithFormatter::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 3
1
<?php
2
3
namespace ICanBoogie\CLDR\Core;
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
 * @method string format() Formats the instance's target. Although the method is not
14
 * defined by the class, it should be implemented by subclasses.
15
 */
16
abstract class LocalizedObjectWithFormatter extends LocalizedObject
17
{
18
    /**
19
     * @phpstan-param TFormatter $formatter
20
     *     The formatter used to format the target object.
21
     */
22
    public function __construct(
23
        object $target,
24
        Locale $locale,
25
        public readonly Formatter $formatter,
26
    ) {
27
        parent::__construct($target, $locale);
28
    }
29
}
30