GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Container   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 27
rs 10
c 0
b 0
f 0
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A hydrateEventConfigItems() 0 9 2
A __construct() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Teebot\Configuration;
6
7
use Teebot\Configuration\ValueObject\EventConfig;
8
9
class Container extends AbstractContainer
10
{
11
    const ENV_PREFIX = 'TEEBOT__';
12
13
    public function __construct(array $config)
14
    {
15
        parent::__construct($config);
16
17
        $this->values['events'] = $this->hydrateEventConfigItems($this->values['events']);
18
    }
19
20
    /**
21
     * Creates an event configuration item value objects from plain arrays
22
     *
23
     * @param array $events
24
     *
25
     * @return array
26
     */
27
    protected function hydrateEventConfigItems(array $events)
28
    {
29
        $hydratedEvents = [];
30
31
        foreach ($events as $event) {
32
            $hydratedEvents[] = new EventConfig($event);
33
        }
34
35
        return $hydratedEvents;
36
    }
37
}
38