Completed
Push — master ( 932cc5...b796f0 )
by Andrii
12:16
created

GetInfoCommand::getId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * HiAPI Yii2 base project for building API
4
 *
5
 * @link      https://github.com/hiqdev/hiapi
6
 * @package   hiapi
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2017, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hiapi\commands;
12
13
abstract class GetInfoCommand extends EntityCommand
14
{
15
    public $id;
16
17
    public function getId()
18
    {
19
        return $this->id;
20
    }
21
22
    public function rules()
23
    {
24
        return [
25
            ['id', 'integer', 'min' => 1],
26
            ['id', 'required'],
27
        ];
28
    }
29
}
30