Links::current()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php declare(strict_types=1);
2
3
namespace Stratadox\RestResource;
4
5
use Stratadox\ImmutableCollection\ImmutableCollection;
6
7
final class Links extends ImmutableCollection
8
{
9
    private function __construct(Link ...$links)
10
    {
11
        parent::__construct(...$links);
12
    }
13
14
    public static function none(): Links
15
    {
16
        return new self();
17
    }
18
19
    public static function provide(Link ...$links): Links
20
    {
21
        return new self(...$links);
22
    }
23
24
    /** @codeCoverageIgnore used for type safety and IDE auto completion */
25
    public function current(): Link
26
    {
27
        return parent::current();
28
    }
29
}
30