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

DatabaseTest2Model   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 6
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getData() 0 4 1
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\Postgresql", config="config/database.postgresql.ini")
9
 */
10
class DatabaseTest2Model extends CoreModel
11
{
12
    public function getData()
13
    {
14
        return $this->select("SELECT * FROM T_WebStream LIMIT :limit OFFSET :offset", ["limit" => 0, "offset" => 1])
0 ignored issues
show
Bug introduced by
The method select() does not exist on WebStream\Test\Model\DatabaseTest2Model. 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 :offset", ["limit" => 0, "offset" => 1])
Loading history...
15
            ->toEntity("WebStream\Test\Model\Entity\TestEntitiy");
16
    }
17
}
18