Passed
Push — 2.6 ( 90d19b...c2f698 )
by Luís
09:48
created

ParentClass   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 21
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php
2
3
namespace Doctrine\Tests\Models\ManyToManyPersister;
4
5
use Doctrine\Common\Collections\ArrayCollection;
6
use Doctrine\Common\Collections\Collection;
7
use Doctrine\ORM\Mapping\Entity;
8
use Doctrine\ORM\Mapping\Table;
9
use Doctrine\ORM\Mapping\Column;
10
use Doctrine\ORM\Mapping\Id;
11
use Doctrine\ORM\Mapping\ManyToMany;
12
13
/**
14
 * @Entity
15
 * @Table(name="manytomanypersister_parent")
16
 */
17
class ParentClass
18
{
19
    /**
20
     * @Id
21
     * @Column(name="id", type="integer")
22
     *
23
     * @var integer
24
     */
25
    public $id;
26
27
    /**
28
     * @ManyToMany(targetEntity=ChildClass::class, mappedBy="parents", orphanRemoval=true, cascade={"persist"})
29
     *
30
     * @var Collection|ChildClass[]
31
     */
32
    public $children;
33
34
    public function __construct(int $id)
35
    {
36
        $this->id       = $id;
37
        $this->children = new ArrayCollection();
38
    }
39
}
40