Passed
Pull Request — master (#33)
by Christopher
08:39 queued 04:23
created

TActionTrait   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A isTActionValid() 0 7 3
1
<?php
2
3
namespace AlgoWeb\ODataMetadata\MetadataV3\edm\IsOKTraits;
4
5
trait TActionTrait
6
{
7
    public function isTActionValid($string)
8
    {
9
        if (!is_string($string)) {
10
            throw new \InvalidArgumentException("Input must be a string");
11
        }
12
        return 'Cascade' == $string || 'None' == $string;
13
    }
14
}
15