Aggregate::mysql_bit_or()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 7
ccs 5
cts 5
cp 1
rs 10
cc 2
nc 2
nop 0
crap 2
1
<?php
2
3
namespace Vectorface\MySQLite\MySQL;
4
5
/**
6
 * Provides Aggregate (Group By) MySQL compatibility functions for SQLite.
7
 *
8
 * http://dev.mysql.com/doc/refman/5.7/en/group-by-functions.html
9
 */
10
trait Aggregate
11
{
12
    /**
13
     * BIT_OR - Return bitwise or
14
     *
15
     * @param int ... Values to which bitwise OR should be applied.
16
     * @return int The value of all input arguments bitwise OR'ed together.
17
     */
18 3
    public static function mysql_bit_or()
19
    {
20 3
        $result = 0;
21 3
        foreach (func_get_args() as $arg) {
22 3
            $result |= $arg;
23
        }
24 3
        return $result;
25
    }
26
}
27