ProfileWithConstructor   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

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

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\Tests\Stubs\ActiveRecord;
8
use Yiisoft\Aliases\Aliases;
9
use Yiisoft\Db\Connection\ConnectionInterface;
10
11
/**
12
 * Class Profile.
13
 */
14
final class ProfileWithConstructor extends ActiveRecord
15
{
16
    protected int $id;
17
    protected string $description;
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