Completed
Push — 3.x ( e5eb1c...76cecd )
by Paul
9s
created

Select::applyLimit()   B

Complexity

Conditions 5
Paths 3

Size

Total Lines 23
Code Lines 12

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 8
CRAP Score 5

Importance

Changes 0
Metric Value
dl 0
loc 23
ccs 8
cts 8
cp 1
rs 8.5906
c 0
b 0
f 0
cc 5
eloc 12
nc 3
nop 1
crap 5
1
<?php
2
/**
3
 *
4
 * This file is part of Aura for PHP.
5
 *
6
 * @license http://opensource.org/licenses/bsd-license.php BSD
7
 *
8
 */
9
namespace Aura\SqlQuery\Sqlsrv;
10
11
use Aura\SqlQuery\Common;
12
13
/**
14
 *
15
 * An object for Sqlsrv SELECT queries.
16
 *
17
 * @package Aura.SqlQuery
18
 *
19
 */
20
class Select extends Common\Select
21
{
22
    /**
23
     *
24
     * Builds this query object into a string.
25
     *
26
     * @return string
27
     *
28
     */
29 36
    protected function build()
30
    {
31 36
        return $this->builder->applyLimit(parent::build(), $this->getLimit(), $this->offset);
0 ignored issues
show
Bug introduced by
The property builder does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
32
    }
33
}
34