Passed
Pull Request — master (#203)
by Alexander
05:12 queued 02:19
created

ProfileWithConstructor   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
dl 0
loc 10
rs 10
c 1
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getTableName() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\ActiveRecord\Tests\Stubs\ActiveRecord;
6
7
use Yiisoft\ActiveRecord\ActiveRecord;
8
use Yiisoft\Aliases\Aliases;
9
use Yiisoft\Db\Connection\ConnectionInterface;
10
11
/**
12
 * Class Profile.
13
 *
14
 * @property int $id
15
 * @property string $description
16
 */
17
final class ProfileWithConstructor extends ActiveRecord
18
{
19
    public function __construct(ConnectionInterface $db, private Aliases $aliases)
20
    {
21
        parent::__construct($db);
22
    }
23
24
    public function getTableName(): string
25
    {
26
        return 'profile';
27
    }
28
}
29