Completed
Push — master ( 832bbc...8568db )
by Vladimir
03:10
created

ConversationServiceProvider::register()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 6
ccs 4
cts 4
cp 1
crap 1
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace FondBot\Conversation;
6
7
use League\Container\ServiceProvider\AbstractServiceProvider;
8
9
class ConversationServiceProvider extends AbstractServiceProvider
10
{
11
    protected $provides = [
12
        ConversationManager::class,
13
    ];
14
15
    /**
16
     * Use the register method to register items with the container via the
17
     * protected $this->container property or the `getContainer` method
18
     * from the ContainerAwareTrait.
19
     *
20
     * @return void
21
     */
22
    public function register()
23
    {
24 1
        $this->container->share(ConversationManager::class, function () {
25 1
            return new ConversationManager;
26 1
        });
27 1
    }
28
}
29