Illuminate   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 8 2
1
<?php
2
namespace PortlandLabs\Slackbot\Provider;
3
4
use Illuminate\Container\Container;
5
use PortlandLabs\Slackbot\Bot;
6
use Psr\Container\ContainerInterface;
7
8
class Illuminate implements Illuminate\Provider
9
{
10
11
    /** @var string[] */
12
    protected $providers = [
13
        Illuminate\Slack::class,
14
        Illuminate\Log::class,
15
        Illuminate\Cache::class,
16
        Illuminate\Filesystem::class,
17
    ];
18
19
    /**
20
     * Register our individual providers
21
     *
22
     * @param Container $container
23
     */
24
    public function register(Container $container)
25
    {
26
        $container->instance(ContainerInterface::class, $container);
27
        $container->singleton(Bot::class);
28
29
        // Add other providers
30
        foreach ($this->providers as $provider) {
31
            $container->make($provider)->register($container);
32
        }
33
    }
34
}