MySQLSelectQuery::calcFoundRows()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 2
c 1
b 0
f 1
nc 1
nop 0
dl 0
loc 5
ccs 3
cts 3
cp 1
crap 1
rs 10
1
<?php
2
3
namespace mindplay\sql\mysql;
4
5
use mindplay\sql\model\query\SelectQuery;
6
7
class MySQLSelectQuery extends SelectQuery
8
{
9
    const CALC_FOUND_ROWS = "SQL_CALC_FOUND_ROWS";
10
11
    /**
12
     * Applies the SQL_CALC_FOUND_ROWS flag to the query.
13
     * 
14
     * @link http://dev.mysql.com/doc/refman/5.7/en/information-functions.html#function_found-rows
15
     *
16
     * @return $this
17
     */
18 1
    public function calcFoundRows(): static
19
    {
20 1
        $this->setFlag(self::CALC_FOUND_ROWS);
21
        
22 1
        return $this;
23
    }
24
}
25