Passed
Push — feature/0.7.0 ( 49f0a6...c2b907 )
by Ryuichi
44:54
created

Test1Model::test2()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
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
use WebStream\Annotation\Attributes\Query;
7
8
/**
9
 * @Database(driver="WebStream\Database\Driver\Mysql", config="config/database.mysql.ini")
10
 */
11
class Test1Model extends CoreModel
12
{
13
    public function test1()
14
    {
15
        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\Test1Model. 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

15
        return $this->/** @scrutinizer ignore-call */ select("SELECT * FROM T_WebStream LIMIT :limit, :offset", ["limit" => 0, "offset" => 1])
Loading history...
16
            ->toEntity("WebStream\Test\Model\Entity\Test1Entitiy");
17
    }
18
19
    /**
20
     * @Query(file="query/webstream-test-mysql-mapper.xml")
21
     */
22
    public function test2()
23
    {
24
        return $this->querySelect(["limit" => 0, "offset" => 1]);
0 ignored issues
show
Bug introduced by
The method querySelect() does not exist on WebStream\Test\Model\Test1Model. 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

24
        return $this->/** @scrutinizer ignore-call */ querySelect(["limit" => 0, "offset" => 1]);
Loading history...
25
    }
26
}
27