AssociationPath   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getNestedAssociationTree() 0 3 1
A getAssociations() 0 3 1
1
<?php
2
3
namespace Malef\Associate\DoctrineOrm\Association;
4
5
class AssociationPath
6
{
7
    /**
8
     * @var Association[]
9
     */
10
    protected $associations = [];
11
12
    /**
13
     * @var AssociationTree|null
14
     */
15
    protected $nestedAssociationTree;
16
17
    public function __construct(array $associations, ?AssociationTree $nestedAssociationTree = null)
18
    {
19
        $this->associations = $associations;
20
        $this->nestedAssociationTree = $nestedAssociationTree;
21
    }
22
23
    /**
24
     * @return Association[]
25
     */
26
    public function getAssociations(): array
27
    {
28
        return $this->associations;
29
    }
30
31
    public function getNestedAssociationTree(): ?AssociationTree
32
    {
33
        return $this->nestedAssociationTree;
34
    }
35
}
36