Passed
Push — add-with-all-to-modules-list ( 82b81d...0edb38 )
by Chema
03:40
created

GacelaConfigTransfer::getFileCacheDirectory()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

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
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Gacela\Framework\Bootstrap\Setup;
6
7
use Closure;
8
use Gacela\Framework\Config\GacelaConfigBuilder\AppConfigBuilder;
9
use Gacela\Framework\Config\GacelaConfigBuilder\BindingsBuilder;
10
use Gacela\Framework\Config\GacelaConfigBuilder\SuffixTypesBuilder;
11
12
final class GacelaConfigTransfer
13
{
14
    /**
15
     * @param ?array<string, class-string|object|callable> $externalServices
16
     * @param ?list<string> $projectNamespaces
17
     * @param ?array<string,mixed> $configKeyValues
18
     * @param ?list<callable> $genericListeners
19
     * @param ?array<class-string,list<callable>> $specificListeners
20
     * @param ?list<class-string> $gacelaConfigsToExtend
21
     * @param ?list<class-string|callable> $plugins
22
     * @param ?array<string,list<Closure>> $servicesToExtend
23
     */
24 94
    public function __construct(
25
        private AppConfigBuilder $appConfigBuilder,
26
        private SuffixTypesBuilder $suffixTypesBuilder,
27
        private BindingsBuilder $bindingsBuilder,
28
        private ?array $externalServices,
29
        private ?bool $shouldResetInMemoryCache,
30
        private ?bool $fileCacheEnabled,
31
        private ?string $fileCacheDirectory,
32
        private ?array $projectNamespaces,
33
        private ?array $configKeyValues,
34
        private ?array $genericListeners,
35
        private ?array $specificListeners,
36
        private ?bool $areEventListenersEnabled,
37
        private ?array $gacelaConfigsToExtend,
38
        private ?array $plugins,
39
        private ?array $servicesToExtend,
40
    ) {
41 94
    }
42
43 94
    public function getAppConfigBuilder(): AppConfigBuilder
44
    {
45 94
        return $this->appConfigBuilder;
46
    }
47
48 94
    public function getSuffixTypesBuilder(): SuffixTypesBuilder
49
    {
50 94
        return $this->suffixTypesBuilder;
51
    }
52
53 94
    public function getBindingsBuilder(): BindingsBuilder
54
    {
55 94
        return $this->bindingsBuilder;
56
    }
57
58
    /**
59
     * @return ?array<string, class-string|object|callable>
60
     */
61 94
    public function getExternalServices(): ?array
62
    {
63 94
        return $this->externalServices;
64
    }
65
66 94
    public function getShouldResetInMemoryCache(): ?bool
67
    {
68 94
        return $this->shouldResetInMemoryCache;
69
    }
70
71 94
    public function getFileCacheEnabled(): ?bool
72
    {
73 94
        return $this->fileCacheEnabled;
74
    }
75
76 94
    public function getFileCacheDirectory(): ?string
77
    {
78 94
        return $this->fileCacheDirectory;
79
    }
80
81
    /**
82
     * @return ?list<string>
83
     */
84 94
    public function getProjectNamespaces(): ?array
85
    {
86 94
        return $this->projectNamespaces;
87
    }
88
89
    /**
90
     * @return ?array<string,mixed>
91
     */
92 94
    public function getConfigKeyValues(): ?array
93
    {
94 94
        return $this->configKeyValues;
95
    }
96
97 94
    public function getAreEventListenersEnabled(): ?bool
98
    {
99 94
        return $this->areEventListenersEnabled;
100
    }
101
102
    /**
103
     * @return ?list<callable>
104
     */
105 94
    public function getGenericListeners(): ?array
106
    {
107 94
        return $this->genericListeners;
108
    }
109
110
    /**
111
     * @return ?array<class-string,list<callable>>
112
     */
113 94
    public function getSpecificListeners(): ?array
114
    {
115 94
        return $this->specificListeners;
116
    }
117
118
    /**
119
     * @return ?list<class-string>
120
     */
121 94
    public function getGacelaConfigsToExtend(): ?array
122
    {
123 94
        return $this->gacelaConfigsToExtend;
124
    }
125
126
    /**
127
     * @return ?list<class-string|callable>
128
     */
129 94
    public function getPlugins(): ?array
130
    {
131 94
        return $this->plugins;
132
    }
133
134
    /**
135
     * @return ?array<string,list<Closure>>
136
     */
137 94
    public function getServicesToExtend(): ?array
138
    {
139 94
        return $this->servicesToExtend;
140
    }
141
}
142