Completed
Push — master ( f1ba55...b399ca )
by Loïc
20s queued 12s
created

AppCollector::getVersion()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of AppName.
5
 *
6
 * (c) Monofony
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace App\Collector;
13
14
use App\Kernel;
15
use Symfony\Component\HttpFoundation\Request;
16
use Symfony\Component\HttpFoundation\Response;
17
use Symfony\Component\HttpKernel\DataCollector\DataCollector;
18
19
final class AppCollector extends DataCollector
20
{
21
    public function __construct()
22
    {
23
        $this->data = [
24
            'version' => Kernel::VERSION,
25
        ];
26
    }
27
28
    public function getVersion(): string
29
    {
30
        return $this->data['version'];
31
    }
32
33
    /**
34
     * {@inheritdoc}
35
     */
36
    public function collect(Request $request, Response $response, \Exception $exception = null): void
37
    {
38
    }
39
40
    /**
41
     * {@inheritdoc}
42
     */
43
    public function reset(): void
44
    {
45
    }
46
47
    /**
48
     * {@inheritdoc}
49
     */
50
    public function getName(): string
51
    {
52
        return 'app';
53
    }
54
}
55