Passed
Push — feature/0.7.0 ( 3ab1bc...ee8bff )
by Ryuichi
46:08
created

DatabaseTest1Model::getData()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
namespace WebStream\Test\Model;
3
4
use WebStream\Core\CoreModel;
5
use WebStream\Annotation\Attributes\Database;
6
7
/**
8
 * @Database(driver="WebStream\Database\Driver\Mysql", config="config/database.mysql.ini")
9
 */
10
class DatabaseTest1Model extends CoreModel
11
{
12
    public function getData()
13
    {
14
        return $this->select("SELECT * FROM T_WebStream LIMIT :limit, :offset", ["limit" => 0, "offset" => 1])
0 ignored issues
show
Bug introduced by
The method select() does not exist on WebStream\Test\Model\DatabaseTest1Model. Since you implemented __call, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

14
        return $this->/** @scrutinizer ignore-call */ select("SELECT * FROM T_WebStream LIMIT :limit, :offset", ["limit" => 0, "offset" => 1])
Loading history...
15
            ->toEntity("WebStream\Test\Model\Entity\TestEntitiy");
16
    }
17
}
18