Skip to content

Commit

Permalink
replace fully qualified class names with use #6
Browse files Browse the repository at this point in the history
  • Loading branch information
gregor-j committed Oct 10, 2023
1 parent 7bbed21 commit beb4dbc
Show file tree
Hide file tree
Showing 8 changed files with 78 additions and 57 deletions.
8 changes: 4 additions & 4 deletions src/Api/IApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,26 @@ interface IApi extends IJsonSerializable
{
/**
* Add a value, struct or table of the remote function.
* @param \phpsap\interfaces\Api\IValue $value
* @param IValue $value
* @return $this
*/
public function add(IValue $value);

/**
* Get all input values of the remote function.
* @return \phpsap\interfaces\Api\IValue[]
* @return IValue[]
*/
public function getInputValues();

/**
* Get all output values of the remote function.
* @return \phpsap\interfaces\Api\IValue[]
* @return IValue[]
*/
public function getOutputValues();

/**
* Get all tables of the remote function.
* @return \phpsap\interfaces\Api\ITable[]
* @return ITable[]
*/
public function getTables();
}
9 changes: 6 additions & 3 deletions src/Api/IArray.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

namespace phpsap\interfaces\Api;

use phpsap\interfaces\exceptions\IArrayElementMissingException;
use phpsap\interfaces\exceptions\IInvalidArgumentException;

/**
* Interface IArray
*
Expand All @@ -22,14 +25,14 @@ interface IArray extends IValue
* Cast a given output value to the implemented value.
* @param array $value The output array to typecast.
* @return array
* @throws \phpsap\interfaces\exceptions\IArrayElementMissingException
* @throws \phpsap\interfaces\exceptions\IInvalidArgumentException
* @throws IArrayElementMissingException
* @throws IInvalidArgumentException
*/
public function cast($value);

/**
* Return an array of member elements.
* @return \phpsap\interfaces\Api\IElement[]
* @return IElement[]
*/
public function getMembers();
}
7 changes: 5 additions & 2 deletions src/Api/IElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

namespace phpsap\interfaces\Api;

use phpsap\DateTime\SapDateInterval;
use phpsap\DateTime\SapDateTime;
use phpsap\interfaces\exceptions\IInvalidArgumentException;
use phpsap\interfaces\Util\IJsonSerializable;

/**
Expand Down Expand Up @@ -87,8 +90,8 @@ public function getName();
/**
* Cast a given output value to the implemented value.
* @param bool|int|float|string $value The output to typecast.
* @return bool|int|float|string|\phpsap\DateTime\SapDateTime|\phpsap\DateTime\SapDateInterval
* @throws \phpsap\interfaces\exceptions\IInvalidArgumentException
* @return bool|int|float|string|SapDateTime|SapDateInterval
* @throws IInvalidArgumentException
*/
public function cast($value);
}
25 changes: 14 additions & 11 deletions src/Config/IConfigCommon.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

namespace phpsap\interfaces\Config;

use phpsap\interfaces\exceptions\IIncompleteConfigException;
use phpsap\interfaces\exceptions\IInvalidArgumentException;

/**
* Interface IConfig
*
Expand Down Expand Up @@ -82,45 +85,45 @@ interface IConfigCommon extends IConfiguration
/**
* Get the username to use for authentication.
* @return string The username.
* @throws \phpsap\interfaces\exceptions\IIncompleteConfigException
* @throws IIncompleteConfigException
*/
public function getUser();

/**
* Set the username to use for authentication.
* @param string $user The username.
* @return $this
* @throws \phpsap\interfaces\exceptions\IInvalidArgumentException
* @throws IInvalidArgumentException
*/
public function setUser($user);

/**
* Get the password to use for authentication.
* @return string The password.
* @throws \phpsap\interfaces\exceptions\IIncompleteConfigException
* @throws IIncompleteConfigException
*/
public function getPasswd();

/**
* Set the password to use for authentication.
* @param string $passwd The password.
* @return $this
* @throws \phpsap\interfaces\exceptions\IInvalidArgumentException
* @throws IInvalidArgumentException
*/
public function setPasswd($passwd);

/**
* Get the client.
* @return string The client
* @throws \phpsap\interfaces\exceptions\IIncompleteConfigException
* @throws IIncompleteConfigException
*/
public function getClient();

/**
* Set the client.
* @param string $client The client.
* @return $this
* @throws \phpsap\interfaces\exceptions\IInvalidArgumentException
* @throws IInvalidArgumentException
*/
public function setClient($client);

Expand All @@ -136,7 +139,7 @@ public function getSaprouter();
* /H/hostname/S/portnumber/H/
* @param string $saprouter The saprouter.
* @return $this
* @throws \phpsap\interfaces\exceptions\IInvalidArgumentException
* @throws IInvalidArgumentException
*/
public function setSaprouter($saprouter);

Expand All @@ -150,7 +153,7 @@ public function getTrace();
* Set the trace level. See constants TRACE_*.
* @param int $trace The trace level.
* @return $this
* @throws \phpsap\interfaces\exceptions\IInvalidArgumentException
* @throws IInvalidArgumentException
*/
public function setTrace($trace);

Expand All @@ -170,7 +173,7 @@ public function getCodepage();
* username/password.
* @param int $codepage The codepage.
* @return $this
* @throws \phpsap\interfaces\exceptions\IInvalidArgumentException
* @throws IInvalidArgumentException
*/
public function setCodepage($codepage);

Expand All @@ -184,7 +187,7 @@ public function getLang();
* Set the logon language.
* @param string $lang The logon language.
* @return $this
* @throws \phpsap\interfaces\exceptions\IInvalidArgumentException
* @throws IInvalidArgumentException
*/
public function setLang($lang);

Expand All @@ -198,7 +201,7 @@ public function getDest();
* Set the destination in RfcOpenConnection.
* @param string $dest The destination in RfcOpenConnection.
* @return $this
* @throws \phpsap\interfaces\exceptions\IInvalidArgumentException
* @throws IInvalidArgumentException
*/
public function setDest($dest);
}
15 changes: 9 additions & 6 deletions src/Config/IConfigTypeA.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

namespace phpsap\interfaces\Config;

use phpsap\interfaces\exceptions\IIncompleteConfigException;
use phpsap\interfaces\exceptions\IInvalidArgumentException;

/**
* Interface IConfigTypeA
*
Expand Down Expand Up @@ -37,30 +40,30 @@ interface IConfigTypeA extends IConfigCommon
/**
* Get the hostname of a specific SAP application server.
* @return string The hostname of a specific SAP application server.
* @throws \phpsap\interfaces\exceptions\IIncompleteConfigException
* @throws IIncompleteConfigException
*/
public function getAshost();

/**
* Set the hostname of a specific SAP application server.
* @param string $ashost The hostname of a specific SAP application server.
* @return $this
* @throws \phpsap\interfaces\exceptions\IInvalidArgumentException
* @throws IInvalidArgumentException
*/
public function setAshost($ashost);

/**
* Get the SAP system number.
* @return string The SAP system number.
* @throws \phpsap\interfaces\exceptions\IIncompleteConfigException
* @throws IIncompleteConfigException
*/
public function getSysnr();

/**
* Set the SAP system number.
* @param string $sysnr The SAP system number.
* @return $this
* @throws \phpsap\interfaces\exceptions\IInvalidArgumentException
* @throws IInvalidArgumentException
*/
public function setSysnr($sysnr);

Expand All @@ -74,7 +77,7 @@ public function getGwhost();
* Set the gateway host on the application server.
* @param string $gwhost The gateway host.
* @return $this
* @throws \phpsap\interfaces\exceptions\IInvalidArgumentException
* @throws IInvalidArgumentException
*/
public function setGwhost($gwhost);

Expand All @@ -88,7 +91,7 @@ public function getGwserv();
* Set the gateway service on the application server.
* @param string $gwserv The gateway service on the application server.
* @return $this
* @throws \phpsap\interfaces\exceptions\IInvalidArgumentException
* @throws IInvalidArgumentException
*/
public function setGwserv($gwserv);
}
11 changes: 7 additions & 4 deletions src/Config/IConfigTypeB.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

namespace phpsap\interfaces\Config;

use phpsap\interfaces\exceptions\IIncompleteConfigException;
use phpsap\interfaces\exceptions\IInvalidArgumentException;

/**
* Interface IConfigTypeB
*
Expand Down Expand Up @@ -33,15 +36,15 @@ interface IConfigTypeB extends IConfigCommon
/**
* Get the host name of the message server.
* @return string
* @throws \phpsap\interfaces\exceptions\IIncompleteConfigException
* @throws IIncompleteConfigException
*/
public function getMshost();

/**
* Set the host name of the message server.
* @param string $mshost The host name of the message server.
* @return $this
* @throws \phpsap\interfaces\exceptions\IInvalidArgumentException
* @throws IInvalidArgumentException
*/
public function setMshost($mshost);

Expand All @@ -55,7 +58,7 @@ public function getR3name();
* Set the name of SAP system, optional; default: destination
* @param string $r3name The name of the SAP system.
* @return $this
* @throws \phpsap\interfaces\exceptions\IInvalidArgumentException
* @throws IInvalidArgumentException
*/
public function setR3name($r3name);

Expand All @@ -69,7 +72,7 @@ public function getGroup();
* Set the group name of the application servers, optional; default: PUBLIC.
* @param string $group The group name of the application servers.
* @return $this
* @throws \phpsap\interfaces\exceptions\IInvalidArgumentException
* @throws IInvalidArgumentException
*/
public function setGroup($group);
}
Loading

0 comments on commit beb4dbc

Please sign in to comment.