Skip to content

Commit 18415fc

Browse files
authored
Increase testability by providing getters.
1 parent 137c48b commit 18415fc

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

lib/Client.php

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,38 @@ public function __construct($host, $headers = null, $version = null, $path = nul
4848
// These are the supported HTTP verbs
4949
$this->methods = ['delete', 'get', 'patch', 'post', 'put'];
5050
}
51+
52+
/**
53+
* @return string
54+
*/
55+
public function getHost()
56+
{
57+
return $this->host;
58+
}
59+
60+
/**
61+
* @return array
62+
*/
63+
public function getHeaders()
64+
{
65+
return $this->headers;
66+
}
67+
68+
/**
69+
* @return string|null
70+
*/
71+
public function getVersion()
72+
{
73+
return $this->version;
74+
}
75+
76+
/**
77+
* @return array
78+
*/
79+
public function getPath()
80+
{
81+
return $this->path;
82+
}
5183

5284
/**
5385
* Make a new Client object

0 commit comments

Comments
 (0)