Completed
Push — master ( 084e6b...eff98c )
by Guillaume
05:15
created

Result::getHandlerError()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
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
    protected $handlerError;
27
28
    /**
29
     * Constructor.
30
     *
31
     * @param UrlInfo $urlInfo
32
     * @param string  $statusCode
33
     * @param float   $responseTime
34
     * @param string  $handlerError Get a string error from the handler
35
     */
36
    public function __construct(UrlInfo $urlInfo, $statusCode, $responseTime, $handlerError = null)
37
    {
38
        $this->urlInfo = $urlInfo;
39
        $this->statusCode = $statusCode;
40
        $this->responseTime = $responseTime;
41
        $this->handlerError = $handlerError;
42
    }
43
44
    /**
45
     * getUrl.
46
     *
47
     * @return UrlInfo
48
     */
49
    public function getUrl()
50
    {
51
        return $this->urlInfo;
52
    }
53
54
    /**
55
     * getStatusCode.
56
     *
57
     * @return int
58
     */
59
    public function getStatusCode()
60
    {
61
        return $this->statusCode;
62
    }
63
64
    /**
65
     * getReponseTime.
66
     *
67
     * @return float
68
     */
69
    public function getReponseTime()
70
    {
71
        return $this->responseTime;
72
    }
73
74
    /**
75
     * getHandlerError.
76
     *
77
     * @return string
78
     */
79
    public function getHandlerError()
80
    {
81
        return $this->handlerError;
82
    }
83
}
84