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

NullDriver   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 9
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A push() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Spiral\Queue\Driver;
6
7
use Ramsey\Uuid\Uuid;
8
use Spiral\Queue\OptionsInterface;
9
use Spiral\Queue\QueueInterface;
10
use Spiral\Queue\QueueTrait;
11
12
final class NullDriver implements QueueInterface
13
{
14
    use QueueTrait;
15
16
    public function push(string $name, array $payload = [], OptionsInterface $options = null): string
17
    {
18
        // Do nothing
19
20
        return (string) Uuid::uuid4();
21
    }
22
}
23