Passed
Branch add-rector-actions (5668b1)
by Wilmer
03:26
created

Customer   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 5
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getOrders() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\ActiveRecord\Tests\Oracle\Stubs;
6
7
use Yiisoft\ActiveRecord\ActiveQuery;
8
use Yiisoft\ActiveRecord\Tests\Stubs\ActiveRecord\Customer as AbstractCustomer;
9
10
/**
11
 * Class Customer.
12
 *
13
 * @property int $id
14
 * @property string $name
15
 * @property string $email
16
 * @property string $address
17
 * @property int $status
18
 *
19
 * @method CustomerQuery findBySql($sql, $params = []) static.
20
 */
21
final class Customer extends AbstractCustomer
22
{
23
    public function getOrders(): ActiveQuery
24
    {
25
        return $this->hasMany(Order::class, ['customer_id' => 'id'])->orderBy('{{customer}}.[[id]]');
26
    }
27
}
28