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

TParameterModeTrait::isTParameterModeValid()   B

Complexity

Conditions 5
Paths 5

Size

Total Lines 16
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 16
rs 8.8571
c 0
b 0
f 0
cc 5
eloc 10
nc 5
nop 1
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
}