1 | <?php |
||
8 | class NamespacedRepository extends NamespacedItemResolver implements ArrayAccess |
||
9 | { |
||
10 | /** |
||
11 | * The loader implementation. |
||
12 | * |
||
13 | * @var \LaravelPlus\Extension\Repository\LoaderInterface |
||
14 | */ |
||
15 | protected $loader; |
||
16 | |||
17 | /** |
||
18 | * All of the configuration items. |
||
19 | * |
||
20 | * @var array |
||
21 | */ |
||
22 | protected $items = []; |
||
23 | |||
24 | /** |
||
25 | * Create a new configuration repository. |
||
26 | * |
||
27 | * @param \LaravelPlus\Extension\Repository\LoaderInterface $loader |
||
28 | */ |
||
29 | 6 | public function __construct(LoaderInterface $loader) |
|
33 | |||
34 | /** |
||
35 | * Determine if the given configuration value exists. |
||
36 | * |
||
37 | * @param string $key |
||
38 | * |
||
39 | * @return bool |
||
40 | */ |
||
41 | 1 | public function has($key) |
|
47 | |||
48 | /** |
||
49 | * Determine if a configuration group exists. |
||
50 | * |
||
51 | * @param string $key |
||
52 | * |
||
53 | * @return bool |
||
54 | */ |
||
55 | 1 | public function hasGroup($key) |
|
61 | |||
62 | /** |
||
63 | * Get the specified configuration value. |
||
64 | * |
||
65 | * @param string $key |
||
66 | * @param mixed $default |
||
67 | * |
||
68 | * @return mixed |
||
69 | */ |
||
70 | 5 | public function get($key, $default = null) |
|
83 | |||
84 | /** |
||
85 | * Set a given configuration value. |
||
86 | * |
||
87 | * @param string $key |
||
88 | * @param mixed $value |
||
89 | */ |
||
90 | 1 | public function set($key, $value) |
|
107 | |||
108 | /** |
||
109 | * Load the configuration group for the key. |
||
110 | * |
||
111 | * @param string $group |
||
112 | * @param string $namespace |
||
113 | * @param string $collection |
||
114 | */ |
||
115 | 5 | protected function load($group, $namespace, $collection) |
|
128 | |||
129 | /** |
||
130 | * Get the configuration namespace for a package. |
||
131 | * |
||
132 | * @param string $package |
||
133 | * @param string $namespace |
||
134 | * |
||
135 | * @return string |
||
136 | */ |
||
137 | protected function getPackageNamespace($package, $namespace) |
||
145 | |||
146 | /** |
||
147 | * Get the collection identifier. |
||
148 | * |
||
149 | * @param string $group |
||
150 | * @param string $namespace |
||
151 | * |
||
152 | * @return string |
||
153 | */ |
||
154 | 5 | protected function getCollection($group, $namespace = null) |
|
160 | |||
161 | /** |
||
162 | * Add a new namespace to the loader. |
||
163 | * |
||
164 | * @param string $namespace |
||
165 | * @param string $hint |
||
166 | */ |
||
167 | public function addNamespace($namespace, $hint) |
||
171 | |||
172 | /** |
||
173 | * Returns all registered namespaces with the config |
||
174 | * loader. |
||
175 | * |
||
176 | * @return array |
||
177 | */ |
||
178 | public function getNamespaces() |
||
182 | |||
183 | /** |
||
184 | * Get the loader implementation. |
||
185 | * |
||
186 | * @return \LaravelPlus\Extension\Repository\LoaderInterface |
||
187 | */ |
||
188 | 6 | public function getLoader() |
|
192 | |||
193 | /** |
||
194 | * Set the loader implementation. |
||
195 | * |
||
196 | * @param \LaravelPlus\Extension\Repository\LoaderInterface $loader |
||
197 | */ |
||
198 | public function setLoader(LoaderInterface $loader) |
||
202 | |||
203 | /** |
||
204 | * Get all of the configuration items. |
||
205 | * |
||
206 | * @return array |
||
207 | */ |
||
208 | public function getItems() |
||
212 | |||
213 | /** |
||
214 | * Determine if the given configuration option exists. |
||
215 | * |
||
216 | * @param string $key |
||
217 | * |
||
218 | * @return bool |
||
219 | */ |
||
220 | public function offsetExists($key) |
||
224 | |||
225 | /** |
||
226 | * Get a configuration option. |
||
227 | * |
||
228 | * @param string $key |
||
229 | * |
||
230 | * @return mixed |
||
231 | */ |
||
232 | public function offsetGet($key) |
||
236 | |||
237 | /** |
||
238 | * Set a configuration option. |
||
239 | * |
||
240 | * @param string $key |
||
241 | * @param mixed $value |
||
242 | */ |
||
243 | public function offsetSet($key, $value) |
||
247 | |||
248 | /** |
||
249 | * Unset a configuration option. |
||
250 | * |
||
251 | * @param string $key |
||
252 | */ |
||
253 | public function offsetUnset($key) |
||
257 | } |
||
258 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..