Completed
Push — master ( 1f1d6f...d17677 )
by De Cramer
9s
created

ChatCommandPlugin::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
ccs 3
cts 3
cp 1
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
namespace eXpansion\Core\Model\ChatCommand;
4
5
6
/**
7
 * Class AbstractChatCommandPlugin
8
 *
9
 * @package eXpansion\Core\Model\ChatCommand;
10
 * @author oliver de Cramer <[email protected]>
11
 */
12
class ChatCommandPlugin implements \eXpansion\Core\DataProviders\Listener\ChatCommandInterface
13
{
14
15
    protected $chatCommands;
16
17
    /**
18
     * ChatCommands constructor.
19
     * @param $chatCommands
20
     */
21 3
    public function __construct(array $chatCommands)
22
    {
23 3
        $this->chatCommands = $chatCommands;
24 3
    }
25
26
    /**
27
     * Get list of chat commands available.
28
     *
29
     * @return \eXpansion\Core\Model\ChatCommand\ChatCommandInterface[]
30
     */
31 2
    public function getChatCommands()
32
    {
33 2
        return $this->chatCommands;
34
    }
35
}