Skip to content

Commit 34792be

Browse files
committed
add parameter type declarations #8
1 parent 157ddbf commit 34792be

File tree

5 files changed

+34
-34
lines changed

5 files changed

+34
-34
lines changed

src/Config/IConfigCommon.php

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,11 @@ public function getUser();
9191

9292
/**
9393
* Set the username to use for authentication.
94-
* @param string $user The username.
94+
* @param string $user The username.
9595
* @return $this
9696
* @throws IInvalidArgumentException
9797
*/
98-
public function setUser($user);
98+
public function setUser(string $user);
9999

100100
/**
101101
* Get the password to use for authentication.
@@ -106,11 +106,11 @@ public function getPasswd();
106106

107107
/**
108108
* Set the password to use for authentication.
109-
* @param string $passwd The password.
109+
* @param string $passwd The password.
110110
* @return $this
111111
* @throws IInvalidArgumentException
112112
*/
113-
public function setPasswd($passwd);
113+
public function setPasswd(string $passwd);
114114

115115
/**
116116
* Get the client.
@@ -121,11 +121,11 @@ public function getClient();
121121

122122
/**
123123
* Set the client.
124-
* @param string $client The client.
124+
* @param string $client The client.
125125
* @return $this
126126
* @throws IInvalidArgumentException
127127
*/
128-
public function setClient($client);
128+
public function setClient(string $client);
129129

130130
/**
131131
* Get the SAPRouter in case the connection needs to be made through a firewall.
@@ -137,11 +137,11 @@ public function getSaprouter();
137137
* In case the connection needs to be made through a firewall using a SAPRouter,
138138
* specify the SAPRouter parameters in the following format:
139139
* /H/hostname/S/portnumber/H/
140-
* @param string $saprouter The saprouter.
140+
* @param string $saprouter The saprouter.
141141
* @return $this
142142
* @throws IInvalidArgumentException
143143
*/
144-
public function setSaprouter($saprouter);
144+
public function setSaprouter(string $saprouter);
145145

146146
/**
147147
* Get the trace level. See constants TRACE_*.
@@ -151,11 +151,11 @@ public function getTrace();
151151

152152
/**
153153
* Set the trace level. See constants TRACE_*.
154-
* @param int $trace The trace level.
154+
* @param int $trace The trace level.
155155
* @return $this
156156
* @throws IInvalidArgumentException
157157
*/
158-
public function setTrace($trace);
158+
public function setTrace(int $trace);
159159

160160
/**
161161
* Only needed it if you want to connect to a non-Unicode backend using a
@@ -171,11 +171,11 @@ public function getCodepage();
171171
* non-ISO-Latin-1 user name or password. The RFC library will then use that
172172
* codepage for the initial handshake, thus preserving the characters in
173173
* username/password.
174-
* @param int $codepage The codepage.
174+
* @param int $codepage The codepage.
175175
* @return $this
176176
* @throws IInvalidArgumentException
177177
*/
178-
public function setCodepage($codepage);
178+
public function setCodepage(int $codepage);
179179

180180
/**
181181
* Get the logon Language.
@@ -185,11 +185,11 @@ public function getLang();
185185

186186
/**
187187
* Set the logon language.
188-
* @param string $lang The logon language.
188+
* @param string $lang The logon language.
189189
* @return $this
190190
* @throws IInvalidArgumentException
191191
*/
192-
public function setLang($lang);
192+
public function setLang(string $lang);
193193

194194
/**
195195
* Get the destination in RfcOpenConnection.
@@ -199,9 +199,9 @@ public function getDest();
199199

200200
/**
201201
* Set the destination in RfcOpenConnection.
202-
* @param string $dest The destination in RfcOpenConnection.
202+
* @param string $dest The destination in RfcOpenConnection.
203203
* @return $this
204204
* @throws IInvalidArgumentException
205205
*/
206-
public function setDest($dest);
206+
public function setDest(string $dest);
207207
}

src/Config/IConfigTypeA.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ public function getAshost();
4646

4747
/**
4848
* Set the hostname of a specific SAP application server.
49-
* @param string $ashost The hostname of a specific SAP application server.
49+
* @param string $ashost The hostname of a specific SAP application server.
5050
* @return $this
5151
* @throws IInvalidArgumentException
5252
*/
53-
public function setAshost($ashost);
53+
public function setAshost(string $ashost);
5454

5555
/**
5656
* Get the SAP system number.
@@ -61,11 +61,11 @@ public function getSysnr();
6161

6262
/**
6363
* Set the SAP system number.
64-
* @param string $sysnr The SAP system number.
64+
* @param string $sysnr The SAP system number.
6565
* @return $this
6666
* @throws IInvalidArgumentException
6767
*/
68-
public function setSysnr($sysnr);
68+
public function setSysnr(string $sysnr);
6969

7070
/**
7171
* Get the gateway host on the application server.
@@ -75,11 +75,11 @@ public function getGwhost();
7575

7676
/**
7777
* Set the gateway host on the application server.
78-
* @param string $gwhost The gateway host.
78+
* @param string $gwhost The gateway host.
7979
* @return $this
8080
* @throws IInvalidArgumentException
8181
*/
82-
public function setGwhost($gwhost);
82+
public function setGwhost(string $gwhost);
8383

8484
/**
8585
* Get the gateway service on the application server.
@@ -89,9 +89,9 @@ public function getGwserv();
8989

9090
/**
9191
* Set the gateway service on the application server.
92-
* @param string $gwserv The gateway service on the application server.
92+
* @param string $gwserv The gateway service on the application server.
9393
* @return $this
9494
* @throws IInvalidArgumentException
9595
*/
96-
public function setGwserv($gwserv);
96+
public function setGwserv(string $gwserv);
9797
}

src/Config/IConfigTypeB.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ public function getMshost();
4242

4343
/**
4444
* Set the host name of the message server.
45-
* @param string $mshost The host name of the message server.
45+
* @param string $mshost The host name of the message server.
4646
* @return $this
4747
* @throws IInvalidArgumentException
4848
*/
49-
public function setMshost($mshost);
49+
public function setMshost(string $mshost);
5050

5151
/**
5252
* Get the name of SAP system, optional; default: destination
@@ -56,11 +56,11 @@ public function getR3name();
5656

5757
/**
5858
* Set the name of SAP system, optional; default: destination
59-
* @param string $r3name The name of the SAP system.
59+
* @param string $r3name The name of the SAP system.
6060
* @return $this
6161
* @throws IInvalidArgumentException
6262
*/
63-
public function setR3name($r3name);
63+
public function setR3name(string $r3name);
6464

6565
/**
6666
* Get the group name of the application servers, optional; default: PUBLIC.
@@ -70,9 +70,9 @@ public function getGroup();
7070

7171
/**
7272
* Set the group name of the application servers, optional; default: PUBLIC.
73-
* @param string $group The group name of the application servers.
73+
* @param string $group The group name of the application servers.
7474
* @return $this
7575
* @throws IInvalidArgumentException
7676
*/
77-
public function setGroup($group);
77+
public function setGroup(string $group);
7878
}

src/IFunction.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ interface IFunction extends IJsonSerializable
4949
* connect to the SAP remote system, a SAP connection configuration needs to be
5050
* present.
5151
*
52-
* @param string $name SAP remote function name.
52+
* @param string $name SAP remote function name.
5353
* @param array|null $params SAP remote function call parameters. Default: null
5454
* @param IConfiguration|null $config SAP connection configuration. Default: null
5555
* @param IApi|null $api SAP remote function call API. Default: null
@@ -58,7 +58,7 @@ interface IFunction extends IJsonSerializable
5858
* @throws IConnectionFailedException
5959
* @throws IUnknownFunctionException
6060
*/
61-
public function __construct($name, array $params = null, IConfiguration $config = null, IApi $api = null);
61+
public function __construct(string $name, array $params = null, IConfiguration $config = null, IApi $api = null);
6262

6363
/**
6464
* Get the SAP remote function name.

src/Util/IJsonSerializable.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ interface IJsonSerializable extends JsonSerializable
1818
{
1919
/**
2020
* Decode a formerly JSON encoded object.
21-
* @param string $json JSON encoded object.
21+
* @param string $json JSON encoded object.
2222
* @return IJsonSerializable
2323
* @throws IInvalidArgumentException
2424
*/
25-
public static function jsonDecode($json);
25+
public static function jsonDecode(string $json);
2626
}

0 commit comments

Comments
 (0)