Total Complexity | 11 |
Total Lines | 70 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
13 | class Typeset implements Typed |
||
14 | { |
||
15 | /** |
||
16 | * @var Typed[] |
||
17 | */ |
||
18 | private $table = []; |
||
19 | |||
20 | /** |
||
21 | * Typeset constructor. |
||
22 | * @param Typed ...$defaults |
||
23 | */ |
||
24 | public function __construct(Typed ...$defaults) |
||
28 | } |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * @param Typed $typing |
||
33 | * @return static |
||
34 | */ |
||
35 | public function extend(Typed $typing) : self |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * @param string $typing |
||
43 | * @return static |
||
44 | */ |
||
45 | public function forget(string $typing) : self |
||
49 | } |
||
50 | |||
51 | /** |
||
52 | * @param string ...$tags |
||
53 | * @return Endpoint[] |
||
54 | */ |
||
55 | public function picked(string ...$tags) : array |
||
63 | } |
||
64 | |||
65 | /** |
||
66 | * @param string $tag |
||
67 | * @param Endpoint $node |
||
68 | */ |
||
69 | public function classify(string $tag, Endpoint $node) : void |
||
70 | { |
||
71 | foreach ($this->table as $typed) { |
||
72 | $typed->classify($tag, $node); |
||
73 | } |
||
74 | } |
||
75 | |||
76 | /** |
||
77 | * @param Endpoint $node |
||
78 | */ |
||
79 | public function release(Endpoint $node) : void |
||
83 | } |
||
84 | } |
||
86 |