Skip to content

Commit 50d52d7

Browse files
committed
Missing setters/getters on clients
1 parent 1a189a6 commit 50d52d7

File tree

2 files changed

+50
-4
lines changed

2 files changed

+50
-4
lines changed

src/Clients/CLIClient.php

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,61 @@ public function __construct($path = null, $java = null)
4444
{
4545
if($path)
4646
{
47-
$this->path = $path;
47+
$this->setPath($path);
4848
}
4949

5050
if($java)
5151
{
52-
$this->java = $java;
52+
$this->setJava($java);
5353
}
5454
}
5555

56+
/**
57+
* Get the path
58+
*
59+
* @return null|string
60+
*/
61+
public function getPath()
62+
{
63+
return $this->path;
64+
}
65+
66+
/**
67+
* Set the path
68+
*
69+
* @param string $path
70+
* @return $this
71+
*/
72+
public function setPath($path)
73+
{
74+
$this->path = $path;
75+
76+
return $this;
77+
}
78+
79+
/**
80+
* Get the Java path
81+
*
82+
* @return null|int
83+
*/
84+
public function getJava()
85+
{
86+
return $this->java;
87+
}
88+
89+
/**
90+
* Set the Java path
91+
*
92+
* @param string $java
93+
* @return $this
94+
*/
95+
public function setJava($java)
96+
{
97+
$this->java = $java;
98+
99+
return $this;
100+
}
101+
56102
/**
57103
* Configure and make a request and return its results
58104
*

src/Clients/WebClient.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ public function __construct($host = null, $port = null, $options = [])
7171
{
7272
if($host)
7373
{
74-
$this->host = $host;
74+
$this->setHost($host);
7575
}
7676

7777
if($port)
7878
{
79-
$this->port = $port;
79+
$this->setPort($port);
8080
}
8181

8282
if(!empty($options))

0 commit comments

Comments
 (0)