OneToMany   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 5

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A createAssociation() 0 4 1
1
<?php
2
3
namespace LaravelDoctrine\Fluent\Relations;
4
5
use Doctrine\ORM\Mapping\Builder\ClassMetadataBuilder;
6
use Doctrine\ORM\Mapping\Builder\OneToManyAssociationBuilder;
7
use LaravelDoctrine\Fluent\Relations\Traits\Indexable;
8
use LaravelDoctrine\Fluent\Relations\Traits\Orderable;
9
use LaravelDoctrine\Fluent\Relations\Traits\Ownable;
10
11
/**
12
 * @method $this mappedBy($fieldName)
13
 */
14
class OneToMany extends AbstractRelation
15
{
16
    use Ownable, Orderable, Indexable;
17
18
    /**
19
     * @var OneToManyAssociationBuilder
20
     */
21
    protected $association;
22
23
    /**
24
     * @param ClassMetadataBuilder $builder
25
     * @param string               $relation
26
     * @param string               $entity
27
     *
28
     * @return OneToManyAssociationBuilder
29
     */
30 24
    protected function createAssociation(ClassMetadataBuilder $builder, $relation, $entity)
31
    {
32 24
        return $this->builder->createOneToMany($relation, $entity);
33
    }
34
}
35