ZikulaUsersBundle   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getMetaData() 0 3 1
A getInitializer() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Zikula package.
7
 *
8
 * Copyright Zikula - https://ziku.la/
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Zikula\UsersBundle;
15
16
use Symfony\Component\HttpKernel\Bundle\Bundle;
17
use Zikula\CoreBundle\Bundle\Initializer\BundleInitializerInterface;
18
use Zikula\CoreBundle\Bundle\Initializer\InitializableBundleInterface;
19
use Zikula\CoreBundle\Bundle\MetaData\BundleMetaDataInterface;
20
use Zikula\CoreBundle\Bundle\MetaData\MetaDataAwareBundleInterface;
21
use Zikula\UsersBundle\Bundle\Initializer\UsersInitializer;
22
use Zikula\UsersBundle\Bundle\MetaData\UsersBundleMetaData;
23
24
class ZikulaUsersBundle extends Bundle implements InitializableBundleInterface, MetaDataAwareBundleInterface
25
{
26
    public function getMetaData(): BundleMetaDataInterface
27
    {
28
        return $this->container->get(UsersBundleMetaData::class);
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->container-...sBundleMetaData::class) could return the type null which is incompatible with the type-hinted return Zikula\CoreBundle\Bundle...BundleMetaDataInterface. Consider adding an additional type-check to rule them out.
Loading history...
Bug introduced by
The method get() does not exist on null. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

28
        return $this->container->/** @scrutinizer ignore-call */ get(UsersBundleMetaData::class);

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
29
    }
30
31
    public function getInitializer(): BundleInitializerInterface
32
    {
33
        return $this->container->get(UsersInitializer::class);
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->container-...sersInitializer::class) could return the type null which is incompatible with the type-hinted return Zikula\CoreBundle\Bundle...dleInitializerInterface. Consider adding an additional type-check to rule them out.
Loading history...
34
    }
35
}
36