Completed
Push — master ( f20687...500eb7 )
by ARCANEDEV
03:56
created

SqlServerExpression   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 1
dl 0
loc 17
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getValue() 0 4 1
1
<?php namespace Arcanedev\LaravelMetrics\Expressions\IfNull;
2
3
use Arcanedev\LaravelMetrics\Expressions\Expression;
4
5
/**
6
 * Class     SqlServerExpression
7
 *
8
 * @package  Arcanedev\LaravelMetrics\Expressions\IfNull
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
class SqlServerExpression extends Expression
12
{
13
    /* -----------------------------------------------------------------
14
     |  Main Methods
15
     | -----------------------------------------------------------------
16
     */
17
18
    /**
19
     * Get the value of the expression.
20
     *
21
     * @return string
22
     */
23 4
    public function getValue()
24
    {
25 4
        return "CASE WHEN {$this->value} IS NULL THEN 0 ELSE 1 END";
26
    }
27
}
28