Completed
Push — master ( daff1e...e8ad81 )
by Alex
05:01
created

createAssocationFromNavigationProperty()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 21
Code Lines 18

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 21
rs 9.3142
cc 1
eloc 18
nc 1
nop 8

How to fix   Many Parameters   

Many Parameters

Methods with many parameters are not only hard to understand, but their parameters also often become inconsistent when you need more, or different data.

There are several approaches to avoid long parameter lists:

1
<?php
2
3
namespace AlgoWeb\ODataMetadata\Tests;
4
5
use AlgoWeb\ODataMetadata\MetadataManager;
6
use AlgoWeb\ODataMetadata\MetadataV3\edm\TEntityTypeType;
7
use AlgoWeb\ODataMetadata\MetadataV3\edm\TNavigationPropertyType;
8
9
class MetadataManagerDummy extends MetadataManager
10
{
11
    public function createAssocationFromNavigationProperty(
12
        TEntityTypeType $principalType,
13
        TEntityTypeType $dependentType,
14
        TNavigationPropertyType $principalNavigationProperty,
15
        TNavigationPropertyType $dependentNavigationProperty = null,
16
        $principalMultiplicity,
17
        $dependentMultiplicity,
18
        array $principalConstraintProperty = null,
19
        array $dependentConstraintProperty = null
20
    ) {
21
        return parent::createAssocationFromNavigationProperty(
22
            $principalType,
23
            $dependentType,
24
            $principalNavigationProperty,
25
            $dependentNavigationProperty,
26
            $principalMultiplicity,
27
            $dependentMultiplicity,
28
            $principalConstraintProperty,
29
            $dependentConstraintProperty
30
        );
31
    }
32
}
33