Completed
Push — master ( 3fc24c...3178a4 )
by David
13s
created

TestArticleDao::getArticlesByUserLogin()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 5
nc 1
nop 0
dl 0
loc 9
rs 9.6666
c 1
b 0
f 0
1
<?php
2
3
namespace TheCodingMachine\TDBM\Dao;
4
5
use TheCodingMachine\TDBM\Test\Dao\Bean\ArticleBean;
6
use TheCodingMachine\TDBM\Test\Dao\Generated\ArticleBaseDao;
7
8
/**
9
 * The UserDao class will maintain the persistence of UserBean class into the users table.
10
 */
11
class TestArticleDao extends ArticleBaseDao
12
{
13
    /**
14
     * Used to test a findFromSql with an order by clause on an inherited table.
15
     *
16
     * @return ArticleBean[]
17
     */
18
    public function getArticlesByUserLogin()
19
    {
20
        return $this->findFromSql(
21
            'article JOIN users ON article.author_id = users.id',
22
            null,
23
            [],
24
            'users.login'
25
        );
26
    }
27
}
28