Completed
Push — master ( 1543ff...8389b3 )
by Jonas
05:36
created

SqlServerGrammar::compileJsonArray()   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 Staudenmeir\EloquentJsonRelations\Grammars;
4
5
use Illuminate\Database\Query\Grammars\SqlServerGrammar as Base;
6
use RuntimeException;
7
8
class SqlServerGrammar extends Base implements JsonGrammar
9
{
10
    /**
11
     * Compile a "JSON array" statement into SQL.
12
     *
13
     * @param string $column
14
     * @return string
15
     */
16 4
    public function compileJsonArray($column)
17
    {
18 4
        return $this->wrap($column);
19
    }
20
21
    /**
22
     * Compile a "JSON object" statement into SQL.
23
     *
24
     * @param string $column
25
     * @param int $levels
26
     * @return string
27
     */
28
    public function compileJsonObject($column, $levels)
29
    {
30
        throw new RuntimeException('This database is not supported.'); // @codeCoverageIgnore
31
    }
32
}
33