Issues (291)

tests/Dao/TestArticleDao.php (2 issues)

Labels
Severity
1
<?php
2
3
declare(strict_types=1);
4
5
namespace TheCodingMachine\TDBM\Dao;
6
7
use TheCodingMachine\TDBM\ResultIterator;
8
use TheCodingMachine\TDBM\Test\Dao\Bean\ArticleBean;
0 ignored issues
show
The type TheCodingMachine\TDBM\Test\Dao\Bean\ArticleBean 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...
9
use TheCodingMachine\TDBM\Test\Dao\Generated\ArticleBaseDao;
0 ignored issues
show
The type TheCodingMachine\TDBM\Te...enerated\ArticleBaseDao 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...
10
11
/**
12
 * The UserDao class will maintain the persistence of UserBean class into the users table.
13
 */
14
class TestArticleDao extends ArticleBaseDao
15
{
16
    /**
17
     * Used to test a findFromSql with an order by clause on an inherited table.
18
     *
19
     * @return ResultIterator&ArticleBean[]
20
     */
21
    public function getArticlesByUserLogin(): ResultIterator
22
    {
23
        return $this->findFromSql(
24
            'article JOIN users ON article.author_id = users.id',
25
            null,
26
            [],
27
            'users.login'
28
        );
29
    }
30
}
31