Total Complexity | 3 |
Total Lines | 32 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
21 | trait SpecificationFacadeTrait |
||
22 | { |
||
23 | /** |
||
24 | * @var SpecificationInterface |
||
25 | */ |
||
26 | protected SpecificationInterface $spec; |
||
27 | |||
28 | /** |
||
29 | * @param SpecificationInterface|null $spec |
||
30 | * @return $this |
||
31 | */ |
||
32 | public function setSpecification(SpecificationInterface $spec = null): self |
||
33 | { |
||
34 | $this->spec = $spec ?? new Railt(); |
||
35 | |||
36 | return $this; |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * @return void |
||
41 | */ |
||
42 | private function bootSpecificationFacadeTrait(): void |
||
43 | { |
||
44 | $this->spec->load($this); |
||
|
|||
45 | } |
||
46 | |||
47 | /** |
||
48 | * @return SpecificationInterface |
||
49 | */ |
||
50 | public function getSpecification(): SpecificationInterface |
||
53 | } |
||
54 | } |
||
55 |