Passed
Push — master ( d2da49...fac384 )
by Alex
03:51
created

TParameterModeTrait   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 0
dl 0
loc 19
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
B isTParameterModeValid() 0 16 5
1
<?php
2
3
namespace AlgoWeb\ODataMetadata\MetadataV3\edm\ssdl\IsOKTraits;
4
5
trait TParameterModeTrait
6
{
7
    public function isTParameterModeValid($string)
8
    {
9
        if (!is_string($string)) {
10
            return false;
11
        }
12
        if ("In" == $string) {
13
            return true;
14
        }
15
        if ("Out" == $string) {
16
            return true;
17
        }
18
        if ("InOut" == $string) {
19
            return true;
20
        }
21
        return false;
22
    }
23
}