LocalizedObjectWithFormatter   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
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