VersionsBundle::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
c 3
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace kujaff\VersionsBundle;
4
5
use kujaff\VersionsBundle\Model\VersionnedBundle;
6
use kujaff\VersionsBundle\DependencyInjection\Compiler\TaggedServicesPass;
7
use kujaff\VersionsBundle\Entity\Version;
8
use Symfony\Component\DependencyInjection\ContainerBuilder;
9
10
class VersionsBundle extends VersionnedBundle
11
{
12
    /**
13
     * Constructor
14
     */
15
    public function __construct()
16
    {
17
        $this->version = new Version('2.0.1');
0 ignored issues
show
Documentation Bug introduced by
It seems like new \kujaff\VersionsBund...Entity\Version('2.0.1') of type object<kujaff\VersionsBundle\Entity\Version> is incompatible with the declared type object<kujaff\VersionsBundle\Model\Version> of property $version.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
18
    }
19
20
    /**
21
     * @inherited
22
     */
23
    public function build(ContainerBuilder $container)
24
    {
25
        parent::build($container);
26
27
        $container->addCompilerPass(new TaggedServicesPass());
28
    }
29
}
30