WebHookMatcher   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 3
c 2
b 0
f 0
lcom 1
cbo 1
dl 0
loc 12
ccs 4
cts 4
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A matches() 0 6 3
1
<?php
2
3
namespace Crummy\Phlack\Common\Matcher;
4
5
use Crummy\Phlack\WebHook\CommandInterface;
6
use Crummy\Phlack\WebHook\WebHookInterface;
7
8
class WebHookMatcher extends CommandNameMatcher
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13 2
    public function matches(CommandInterface $command)
14
    {
15 2
        return null === $this->commandName
16 2
            ? $command instanceof WebHookInterface
17 2
            : $command instanceof WebHookInterface && parent::matches($command);
18
    }
19
}
20