Failed Conditions
Pull Request — develop (#6724)
by Marco
122:37 queued 57:31
created

Owning::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 5
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\Tests\Models\UniDirectionalManyToMany;
6
7
use Doctrine\Common\Collections\ArrayCollection;
8
use Doctrine\Common\Collections\Collection;
9
use Doctrine\ORM\Annotation as ORM;
10
11
/**
12
 * @ORM\Entity
13
 * @ORM\Table(name="uni_directional_many_to_many_owning")
14
 */
15
class Owning
16
{
17
    /**
18
     * @ORM\Column(type="string")
19
     * @ORM\Id
20
     */
21
    public $id;
22
23
    /**
24
     * @var Inverse[]|Collection
25
     *
26
     * @ORM\ManyToMany(targetEntity=Inverse::class)
27
     */
28
    public $inverse;
29
30
    public function __construct()
31
    {
32
        $this->id      = \uniqid(self::class, true);
33
        $this->inverse = new ArrayCollection();
34
    }
35
}
36