Comparison   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
eloc 5
c 2
b 0
f 0
dl 0
loc 16
ccs 5
cts 5
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A mysql_least() 0 8 2
1
<?php
2
3
namespace Vectorface\MySQLite\MySQL;
4
5
use InvalidArgumentException;
6
7
/**
8
 * Provides Comparison MySQL compatibility functions for SQLite.
9
 *
10
 * http://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html
11
 */
12
trait Comparison
13
{
14
    /**
15
     * LEAST - Return the smallest argument
16
     *
17
     * @param mixed ... One or more numeric arguments.
18
     * @return mixed The argument whose value is considered lowest.
19
     */
20 1
    public static function mysql_least()
21
    {
22 1
        $args = func_get_args();
23 1
        if (!count($args)) {
24 1
            throw new InvalidArgumentException('No arguments provided to SQLite LEAST');
25
        }
26
27 1
        return min($args);
28
    }
29
}
30