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

GetInfoCommand   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 17
c 0
b 0
f 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getId() 0 4 1
A rules() 0 7 1
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