Total Complexity | 7 |
Total Lines | 69 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
16 | class PromiseOne implements PromiseInterface |
||
17 | { |
||
18 | /** @var ORMInterface|null @internal */ |
||
19 | private $orm; |
||
20 | |||
21 | /** @var string|null */ |
||
22 | private $target; |
||
23 | |||
24 | /** @var array */ |
||
25 | private $scope; |
||
26 | |||
27 | /** @var mixed */ |
||
28 | private $resolved; |
||
29 | |||
30 | /** |
||
31 | * @param ORMInterface $orm |
||
32 | * @param string $target |
||
33 | * @param array $scope |
||
34 | */ |
||
35 | public function __construct(ORMInterface $orm, string $target, array $scope) |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * @inheritdoc |
||
44 | */ |
||
45 | public function __loaded(): bool |
||
46 | { |
||
47 | return empty($this->orm); |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * @inheritdoc |
||
52 | */ |
||
53 | public function __role(): string |
||
54 | { |
||
55 | return $this->target; |
||
|
|||
56 | } |
||
57 | |||
58 | /** |
||
59 | * @inheritdoc |
||
60 | */ |
||
61 | public function __scope(): array |
||
62 | { |
||
63 | return $this->scope; |
||
64 | } |
||
65 | |||
66 | /** |
||
67 | * @inheritdoc |
||
68 | */ |
||
69 | public function __resolve() |
||
85 | } |
||
86 | } |