Passed
Pull Request — master (#154)
by Alex
07:05
created

Association   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
dl 0
loc 43
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setFirst() 0 3 1
A getFirst() 0 3 1
1
<?php
2
3
namespace AlgoWeb\PODataLaravel\Models\ObjectMap\Entities\Associations;
4
5
abstract class Association
6
{
7
    protected $multArray = [
8
        AssociationStubRelationType::MANY => '*',
9
        AssociationStubRelationType::ONE => '1',
10
        AssociationStubRelationType::NULL_ONE => '0..1',
11
    ];
12
13
    /**
14
     * @var AssociationStubBase
15
     */
16
    protected $first;
17
18
    /**
19
     * @return AssociationStubBase
20
     */
21
    public function getFirst()
22
    {
23
        return $this->first;
24
    }
25
26
    /**
27
     * @param AssociationStubBase $first
28
     */
29
    public function setFirst(AssociationStubBase $first)
30
    {
31
        $this->first = $first;
32
    }
33
34
    /**
35
     * @return AssociationStubBase|AssociationStubBase[]
36
     */
37
    abstract public function getLast();
38
39
    /**
40
     * @return bool
41
     */
42
    abstract public function isOk();
43
44
    /**
45
     * @return AssociationType|AssociationType[]
46
     */
47
    abstract public function getAssociationType();
48
}
49