Repo::rules()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 13

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 13
ccs 2
cts 2
cp 1
rs 9.8333
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 * GitHub API implementation for yii2-hiart.
4
 *
5
 * @link      https://github.com/hiqdev/yii2-hiart-github
6
 * @package   yii2-hiart-github
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2017, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hiqdev\hiart\github\models;
12
13
use hiqdev\hiart\github\ActiveRecord;
14
15
/**
16
 * GitHub repository.
17
 * See [documentation](https://developer.github.com/v3/repos/).
18
 *
19
 * @author Andrii Vasyliev <[email protected]>
20
 */
21
class Repo extends ActiveRecord
22
{
23 2
    public function rules()
24
    {
25
        return [
26 2
            ['id', 'integer'],
27
            ['name', 'string'],
28
            ['description', 'string'],
29
            ['homepage', 'string'],
30
            ['forks_count', 'number'],
31
            ['stargazers_count', 'number'],
32
            ['watchers_count', 'number'],
33
            ['open_issues_count', 'number'],
34
        ];
35
    }
36
}
37