ConfigurationConfigs   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 28
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getConfigurationConfig() 0 3 1
A __construct() 0 2 1
A setConfigurationConfig() 0 3 1
A hasConfigurationConfig() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Arp\LaminasDoctrine\Config;
6
7
class ConfigurationConfigs
8
{
9
    /**
10
     * @param array<mixed> $configs
11
     */
12
    public function __construct(private array $configs)
13
    {
14
    }
15
16
    public function hasConfigurationConfig(string $name): bool
17
    {
18
        return isset($this->configs[$name]);
19
    }
20
21
    /**
22
     * @return array<string, mixed>
23
     */
24
    public function getConfigurationConfig(string $name): array
25
    {
26
        return $this->configs[$name] ?? [];
27
    }
28
29
    /**
30
     * @param array<string, mixed> $config
31
     */
32
    public function setConfigurationConfig(string $name, array $config): void
33
    {
34
        $this->configs[$name] = $config;
35
    }
36
}
37