Completed
Pull Request — master (#8)
by Alessandro
03:55
created

NullLogger::getLoggedEvent()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Facile\MongoDbBundle\Services\Loggers;
6
7
use Facile\MongoDbBundle\Services\Loggers\Model\LogEvent;
8
9
/**
10
 * Class NullLogger
11
 */
12
class NullLogger implements DataCollectorLoggerInterface
13
{
14
    /**
15
     * @param LogEvent $event
16
     */
17
    public function logQuery(LogEvent $event)
18
    {
19
        return;
20
    }
21
22
    /**
23
     * @return LogEvent
24
     */
25
    public function getLoggedEvent(): LogEvent
26
    {
27
        throw new \LogicException('No logged events from null logger!');
28
    }
29
30
    /**
31
     * @return bool
32
     */
33
    public function hasLoggedEvents(): bool
34
    {
35
        return false;
36
    }
37
38
    /**
39
     * @param string $connection
40
     */
41
    public function addConnection(string $connection)
42
    {
43
    }
44
45
    /**
46
     * @return array|\string[]
47
     */
48
    public function getConnections(): array
49
    {
50
        return [];
51
    }
52
53
    public function startLogging()
54
    {
55
    }
56
}
57