Passed
Pull Request — master (#2)
by Ryosuke
10:24 queued 04:17
created

SQLiteGrammar::compileGroupLimit()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 8
ccs 4
cts 4
cp 1
rs 10
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Mpyw\ComposhipsEagerLimit\Database\Query\Grammar;
4
5
use Staudenmeir\EloquentEagerLimit\Grammars\SQLiteGrammar as EagerLimitSQLiteGrammar;
6
7
class SQLiteGrammar extends EagerLimitSQLiteGrammar
8
{
9
    use Concerns\CompilesGroupLimitByMultipleColumnPartition;
10
11
    /**
12
     * Compile a group limit clause.
13
     *
14
     * @param \Illuminate\Database\Query\Builder $query
15
     * @return string
16
     */
17 31
    protected function compileGroupLimit(\Illuminate\Database\Query\Builder $query)
18
    {
19 31
        $version = $query->getConnection()->getPdo()->getAttribute(\PDO::ATTR_SERVER_VERSION);
20
21
        // FIXME: For debugging
22 31
        \Illuminate\Support\Facades\Log::channel('stderr')->debug("The PDO server version is: $version");
23
24 31
        return parent::compileGroupLimit($query);
25
    }
26
}
27