Passed
Pull Request — 5.1 (#198)
by ARP
07:39
created

TestPersonDao::testFindFromRawSQLONInherited()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 10
rs 10
cc 1
nc 1
nop 0
1
<?php
2
/*
3
 * This file has been automatically generated by TDBM.
4
 * You can edit this file as it will not be overwritten.
5
 */
6
7
declare(strict_types=1);
8
9
namespace TheCodingMachine\TDBM\Dao;
10
11
use TheCodingMachine\TDBM\ResultIterator;
12
use TheCodingMachine\TDBM\Test\Dao\Generated\PersonBaseDao;
0 ignored issues
show
Bug introduced by
The type TheCodingMachine\TDBM\Te...Generated\PersonBaseDao was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
13
14
/**
15
 * The ContactDao class will maintain the persistence of ContactBean class into the contact table.
16
 */
17
class TestPersonDao extends PersonBaseDao
18
{
19
    public function testFindFromRawSQLONInherited(): ResultIterator
20
    {
21
        $sql = '
22
            SELECT DISTINCT  person.*, contact.*, users.*
23
            FROM person JOIN contact ON person.id = contact.id
24
             JOIN users ON contact.id = users.id
25
            WHERE 1
26
        ';
27
28
        return $this->findFromRawSql($sql, []);
29
    }
30
}