Ownable   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 1
c 2
b 0
f 1
lcom 0
cbo 1
dl 0
loc 19
ccs 3
cts 3
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
getAssociation() 0 1 ?
A ownedBy() 0 6 1
1
<?php
2
3
namespace LaravelDoctrine\Fluent\Relations\Traits;
4
5
trait Ownable
6
{
7
    /**
8
     * @param string $relation
9
     *
10
     * @return $this
11
     */
12 8
    public function ownedBy($relation)
13
    {
14 8
        $this->getAssociation()->mappedBy($relation);
15
16 8
        return $this;
17
    }
18
19
    /**
20
     * @return \Doctrine\ORM\Mapping\Builder\AssociationBuilder
21
     */
22
    abstract public function getAssociation();
23
}
24