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

FlagTrait::isFlagSet()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
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