Completed
Push — master ( 3592ed...983069 )
by Guillaume
02:39
created

Result   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 50
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 4
Bugs 0 Features 1
Metric Value
wmc 4
c 4
b 0
f 1
lcom 0
cbo 0
dl 0
loc 50
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getUrl() 0 4 1
A getStatusCode() 0 4 1
A getReponseTime() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the hogosha-monitor package
5
 *
6
 * Copyright (c) 2016 Guillaume Cavana
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 *
11
 * Feel free to edit as you please, and have fun.
12
 *
13
 * @author Guillaume Cavana <[email protected]>
14
 */
15
16
namespace Hogosha\Monitor\Model;
17
18
/**
19
 * @author Guillaume Cavana <[email protected]>
20
 */
21
class Result
22
{
23
    protected $urlInfo;
24
    protected $statusCode;
25
    protected $responseTime;
26
27
    /**
28
     * Constructor.
29
     *
30
     * @param UrlInfo $urlInfo
31
     * @param string  $statusCode
32
     * @param float   $responseTime
33
     */
34
    public function __construct(UrlInfo $urlInfo, $statusCode, $responseTime)
35
    {
36
        $this->urlInfo = $urlInfo;
37
        $this->statusCode = $statusCode;
38
        $this->responseTime = $responseTime;
39
    }
40
41
    /**
42
     * getUrl.
43
     *
44
     * @return UrlInfo
45
     */
46
    public function getUrl()
47
    {
48
        return $this->urlInfo;
49
    }
50
51
    /**
52
     * getStatusCode.
53
     *
54
     * @return int
55
     */
56
    public function getStatusCode()
57
    {
58
        return $this->statusCode;
59
    }
60
61
    /**
62
     * getReponseTime.
63
     *
64
     * @return float
65
     */
66
    public function getReponseTime()
67
    {
68
        return $this->responseTime;
69
    }
70
}
71