Passed
Pull Request — master (#50)
by David
03:57
created

TestArticleDao   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 17
rs 10
c 1
b 0
f 0
wmc 1
lcom 0
cbo 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getArticlesByUserLogin() 0 9 1
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