Release   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 40
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A isValid() 0 4 2
1
<?php
2
/**
3
 * Asset Packagist.
4
 *
5
 * @link      https://github.com/hiqdev/asset-packagist
6
 * @package   asset-packagist
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2016-2017, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hiqdev\assetpackagist\models;
12
13
use yii\base\Model;
14
15
class Release extends Model
16
{
17
    /**
18
     * @var string release UID
19
     */
20
    public $uid;
21
22
    /**
23
     * @var string release name
24
     */
25
    public $name;
26
27
    /**
28
     * @var string the release version
29
     */
30
    public $version;
31
32
    /**
33
     * @var array
34
     */
35
    public $dist;
36
37
    /**
38
     * @var array
39
     */
40
    public $source;
41
42
    /**
43
     * @var array release requirements
44
     */
45
    public $require;
46
47
    /**
48
     * @return bool whether the release is valid and can be used generally used
49
     */
50
    public function isValid()
51
    {
52
        return !empty($this->dist) || !empty($this->source);
53
    }
54
}
55