DataCollector   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 1
cbo 2
dl 0
loc 22
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A collect() 0 5 1
1
<?php
2
/**
3
 * @author Dolgov_M <[email protected]>
4
 * @date   11.11.2016 15:26
5
 */
6
7
namespace SilexDoctrineHydrationProfile\Fix;
8
9
use Debesha\DoctrineProfileExtraBundle\DataCollector\HydrationDataCollector;
10
use Debesha\DoctrineProfileExtraBundle\ORM\HydrationLogger;
11
use Symfony\Component\HttpFoundation\Request;
12
use Symfony\Component\HttpFoundation\Response;
13
14
15
class DataCollector extends HydrationDataCollector
16
{
17
18
    /**
19
     * @var HydrationLogger
20
     */
21
    private $hydrationLogger = array ();
0 ignored issues
show
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
22
23
    public function __construct(HydrationLogger $logger)
24
    {
25
        $this->hydrationLogger = $logger;
26
    }
27
28
    /**
29
     * @inheritdoc
30
     */
31
    public function collect(Request $request, Response $response, \Exception $exception = null)
32
    {
33
34
        $this->data['hydrations'] = $this->hydrationLogger->hydrations;
35
    }
36
}