Completed
Push — master ( dca6dc...178b4a )
by Richard
06:29
created

RunInfo   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 3
c 2
b 0
f 0
lcom 0
cbo 0
dl 0
loc 31
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A commit_hash() 0 3 1
A rule_set() 0 3 1
1
<?php
2
/******************************************************************************
3
 * An implementation of dicto (scg.unibe.ch/dicto) in and for PHP.
4
 * 
5
 * Copyright (c) 2016 Richard Klees <[email protected]>
6
 *
7
 * This software is licensed under The MIT License. You should have received 
8
 * a copy of the licence along with the code.
9
 */
10
11
namespace Lechimp\Dicto\App;
12
13
/**
14
 * Information about one run of the analysis.
15
 */
16
class RunInfo {
17
    /**
18
     * @var string
19
     */
20
    private $commit_hash;
21
22
    /**
23
     * @var RuleSetInfo
24
     */
25
    private $rule_set;
26
27
    public function __construct($commit_hash, RuleSetInfo $rule_set) {
28
        assert('is_string($commit_hash)');
29
        $this->commit_hash = $commit_hash;
30
        $this->rule_set = $rule_set;
31
    }
32
33
    /**
34
     * @return  string
35
     */
36
    public function commit_hash() {
37
        return $this->commit_hash;
38
    }
39
40
    /**
41
     * @return  RuleSetInfo
42
     */
43
    public function rule_set() {
44
        return $this->rule_set;
45
    }
46
}
47