Passed
Pull Request — master (#660)
by butschster
07:38
created

NullBroadcast   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A publish() 0 2 1
A authorize() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Spiral\Broadcasting\Driver;
6
7
use Psr\Http\Message\ServerRequestInterface;
8
use Spiral\Broadcasting\BroadcastInterface;
9
10
final class NullBroadcast implements BroadcastInterface
11
{
12
    public function publish($topics, $messages): void
13
    {
14
        // Do nothing
15
    }
16
17
    public function authorize(ServerRequestInterface $request): bool
18
    {
19
        return true;
20
    }
21
}
22