Completed
Pull Request — master (#8)
by Alessandro
06:57
created

NullLogger::hasLoggedEvents()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
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 1
    public function logQuery(LogEvent $event)
18
    {
19 1
    }
20
21
    /**
22
     * @return LogEvent
23
     */
24 1
    public function getLoggedEvent(): LogEvent
25
    {
26 1
        throw new \LogicException('No logged events from null logger!');
27
    }
28
29
    /**
30
     * @return bool
31
     */
32 2
    public function hasLoggedEvents(): bool
33
    {
34 2
        return false;
35
    }
36
37
    /**
38
     * @param string $connection
39
     */
40 1
    public function addConnection(string $connection)
41
    {
42 1
    }
43
44
    /**
45
     * @return array|\string[]
46
     */
47 2
    public function getConnections(): array
48
    {
49 2
        return [];
50
    }
51
52 1
    public function startLogging(LogEvent $event)
53
    {
54 1
    }
55
}
56