Completed
Push — feature/test-commands ( 25501a...5e2e6d )
by Oguzhan
02:26
created

Pbxg33kMusicInfoBundle   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getNamespace() 0 4 1
A getContainerExtension() 0 8 2
1
<?php
2
/*******************************************************************************
3
 * This file is part of the Pbxg33k\MusicInfo package.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 *
8
 * (c) 2017 Oguzhan uysal. All rights reserved
9
 ******************************************************************************/
10
11
namespace Pbxg33k\MusicInfo;
12
13
use Pbxg33k\MusicInfo\DependencyInjection\MusicInfoExtension;
14
use Symfony\Component\HttpKernel\Bundle\Bundle;
15
16
/**
17
 * Class Pbxg33kMusicInfoBundle
18
 *
19
 * @package Pbxg33k\MusicInfo
20
 */
21
class Pbxg33kMusicInfoBundle extends Bundle
22
{
23
    /**
24
     * {@inheritdoc}
25
     */
26
    public function getNamespace()
27
    {
28
        return __NAMESPACE__;
29
    }
30
31
    /**
32
     * {@inheritdoc}
33
     */
34
    public function getContainerExtension()
35
    {
36
        if (null === $this->extension) {
37
            $this->extension = new MusicInfoExtension();
38
        }
39
40
        return $this->extension;
0 ignored issues
show
Comprehensibility Best Practice introduced by
The expression $this->extension; of type Symfony\Component\Depend...xtensionInterface|false adds false to the return on line 40 which is incompatible with the return type declared by the interface Symfony\Component\HttpKe...::getContainerExtension of type Symfony\Component\Depend...ExtensionInterface|null. It seems like you forgot to handle an error condition.
Loading history...
41
    }
42
}