Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
77.78% covered (warning)
77.78%
7 / 9
77.78% covered (warning)
77.78%
7 / 9
CRAP
0.00% covered (danger)
0.00%
0 / 1
FieldOwner
77.78% covered (warning)
77.78%
7 / 9
77.78% covered (warning)
77.78%
7 / 9
9.89
0.00% covered (danger)
0.00%
0 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 uid
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 locale
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 defaultLocale
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 locales
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 origin
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 config
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 assets
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 paths
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3declare(strict_types=1);
4
5namespace Cosray\Node;
6
7use Cosray\Assets\Repository;
8use Cosray\Config;
9use Cosray\Context;
10use Cosray\Field\Owner;
11use Cosray\Locale;
12use Cosray\Locales;
13
14class FieldOwner implements Owner
15{
16    public function __construct(
17        private readonly Context $context,
18        private readonly string $nodeUid,
19    ) {}
20
21    public function uid(): string
22    {
23        return $this->nodeUid;
24    }
25
26    public function locale(): Locale
27    {
28        return $this->context->locale();
29    }
30
31    public function defaultLocale(): Locale
32    {
33        return $this->context->defaultLocale();
34    }
35
36    public function locales(): Locales
37    {
38        return $this->context->locales();
39    }
40
41    public function origin(): string
42    {
43        return $this->context->origin();
44    }
45
46    public function config(): Config
47    {
48        return $this->context->config;
49    }
50
51    public function assets(): Repository
52    {
53        return $this->context->assets();
54    }
55
56    public function paths(): UrlPaths
57    {
58        return $this->context->paths();
59    }
60}