Completed
Push — master ( e6c808...16a507 )
by Ruben
01:05
created

LinkContainer::make()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 4
1
<?php
2
3
namespace Spatie\ResourceLinks;
4
5
class LinkContainer
6
{
7
    /** @var string */
8
    public $name;
9
10
    /** @var string */
11
    public $method;
12
13
    /** @var string */
14
    public $action;
15
16
    /** @var null|string */
17
    public $prefix;
18
19
    public static function make(string $name, string $method, string $action, ?string $prefix)
20
    {
21
        return new self($name, $method, $action, $prefix);
22
    }
23
24
    public function __construct(string $name, string $method, string $action, ?string $prefix)
25
    {
26
        $this->name = $name;
27
        $this->method = $method;
28
        $this->action = $action;
29
        $this->prefix = $prefix;
30
    }
31
}
32