PrimeDataCollector   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A collect() 0 18 1
1
<?php
2
3
namespace Bdf\PrimeBundle\Collector;
4
5
use Doctrine\Bundle\DoctrineBundle\DataCollector\DoctrineDataCollector;
6
use Symfony\Component\HttpFoundation\Request;
7
use Symfony\Component\HttpFoundation\Response;
8
9
/**
10
 * Adapt the doctrine data collector to prime.
11
 */
12
class PrimeDataCollector extends DoctrineDataCollector
13
{
14
    /**
15
     * {@inheritdoc}
16
     */
17 1
    public function collect(Request $request, Response $response, \Throwable $exception = null): void
18
    {
19 1
        \Symfony\Bridge\Doctrine\DataCollector\DoctrineDataCollector::collect($request, $response, $exception);
20
21 1
        $this->data['entities'] = [];
22 1
        $this->data['errors'] = [];
23 1
        $this->data['caches'] = [
24 1
            'enabled' => false,
25 1
            'log_enabled' => false,
26 1
            'counts' => [
27 1
                'puts' => 0,
28 1
                'hits' => 0,
29 1
                'misses' => 0,
30 1
            ],
31 1
            'regions' => [
32 1
                'puts' => [],
33 1
                'hits' => [],
34 1
                'misses' => [],
35 1
            ],
36 1
        ];
37
    }
38
}
39