MySQLSelectQuery   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 4
c 1
b 0
f 1
dl 0
loc 16
ccs 3
cts 3
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A calcFoundRows() 0 5 1
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