Completed
Push — master ( d5f261...ed671f )
by Joseph
01:44
created

UploadResponse::incrementStatusCheck()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
nc 1
cc 1
nop 0
1
<?php
2
3
namespace STS\StorageConnect;
4
5
class UploadResponse
6
{
7
    /**
8
     * @var UploadRequest
9
     */
10
    protected $request;
11
12
    /**
13
     * Original response from storage provider
14
     *
15
     * @var mixed
16
     */
17
    protected $original;
18
19
    /**
20
     * @var bool
21
     */
22
    protected $async = false;
23
24
    /**
25
     * @var int
26
     */
27
    protected $statusChecks = 0;
28
29
    public function __construct( UploadRequest $request, $original, $async = false )
0 ignored issues
show
Unused Code introduced by
The parameter $original is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
30
    {
31
        $this->request = $request;
32
        $this->original;
33
        $this->async = $async;
34
    }
35
36
    /**
37
     * @return bool
38
     */
39
    public function isAsync()
40
    {
41
        return $this->async;
42
    }
43
44
    /**
45
     *
46
     */
47
    public function incrementStatusCheck()
48
    {
49
        $this->statusChecks++;
50
    }
51
52
    /**
53
     * @return int
54
     */
55
    public function getStatusChecks()
56
    {
57
        return $this->statusChecks;
58
    }
59
60
    /**
61
     * @return UploadRequest
62
     */
63
    public function getRequest()
64
    {
65
        return $this->request;
66
    }
67
68
    /**
69
     * @return mixed
70
     */
71
    public function getOriginal()
72
    {
73
        return $this->original;
74
    }
75
}