PluginMatcher::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 9.8333
c 0
b 0
f 0
cc 1
nc 1
nop 5
1
<?php
2
3
namespace Nopolabs\Yabot\Plugin;
4
5
6
use Nopolabs\Yabot\Helpers\LogTrait;
7
use Nopolabs\Yabot\Helpers\MatcherTrait;
8
use Nopolabs\Yabot\Message\Message;
9
use Psr\Log\LoggerInterface;
10
use Psr\Log\LogLevel;
11
12
class PluginMatcher
13
{
14
    use LogTrait;
15
    use MatcherTrait;
16
17
    public function __construct(
18
        string $pluginId,
19
        bool $isBot = null,
20
        array $channels,
21
        array $users,
22
        LoggerInterface $logger = null)
23
    {
24
        $this->setName($pluginId);
25
        $this->setIsBot($isBot);
26
        $this->setChannels($channels);
27
        $this->setUsers($users);
28
        $this->setLog($logger);
29
    }
30
}
31