Passed
Push — master ( b4a69d...029b26 )
by Harry
02:37
created

FlagTrait   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 15
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A isFlagSet() 0 3 1
1
<?php
2
3
namespace Graze\ArrayMerger;
4
5
trait FlagTrait
6
{
7
    /** @var int */
8
    protected $flags;
9
10
    /**
11
     * Is the provided flag set?
12
     *
13
     * @param int $flag
14
     *
15
     * @return bool
16
     */
17 38
    protected function isFlagSet($flag)
18
    {
19 38
        return ($this->flags & $flag) === $flag;
20
    }
21
}
22