Use global namespace+minor fixes

This commit is contained in:
Dennis Eichhorn 2019-02-04 22:29:55 +01:00
parent 5bee2262c3
commit 30ef848aa5
3 changed files with 23 additions and 23 deletions

View File

@ -89,7 +89,7 @@ final class GSDCostCenter implements \JsonSerializable
/**
* Get created by
*
* @return mixed
* @return int|\phpOMS\Account\Account
*
* @since 1.0.0
*/

View File

@ -89,7 +89,7 @@ final class GSDCostObject implements \JsonSerializable
/**
* Get created by
*
* @return mixed
* @return int|\phpOMS\Account\Account
*
* @since 1.0.0
*/

View File

@ -32,7 +32,7 @@ class InterfaceManager
/**
* Interface ID.
*
* @var int
* @var int
* @since 1.0.0
*/
private $id = 0;
@ -40,7 +40,7 @@ class InterfaceManager
/**
* File path.
*
* @var string
* @var string
* @since 1.0.0
*/
private $path = '';
@ -48,7 +48,7 @@ class InterfaceManager
/**
* Info data.
*
* @var array<string, mixed>
* @var array<string, mixed>
* @since 1.0.0
*/
private $info = [];
@ -56,7 +56,7 @@ class InterfaceManager
/**
* Object constructor.
*
* @param string $path Info file path
* @param string $path Info file path
*
* @since 1.0.0
*/
@ -68,7 +68,7 @@ class InterfaceManager
/**
* Get id
*
* @return string
* @return string
*
* @since 1.0.0
*/
@ -80,7 +80,7 @@ class InterfaceManager
/**
* Get info path
*
* @return string
* @return string
*
* @since 1.0.0
*/
@ -92,7 +92,7 @@ class InterfaceManager
/**
* Get info path
*
* @return string
* @return string
*
* @since 1.0.0
*/
@ -104,7 +104,7 @@ class InterfaceManager
/**
* Get info name
*
* @return string
* @return string
*
* @since 1.0.0
*/
@ -116,7 +116,7 @@ class InterfaceManager
/**
* Provides import interface
*
* @return string
* @return string
*
* @since 1.0.0
*/
@ -128,7 +128,7 @@ class InterfaceManager
/**
* Provides export interface
*
* @return string
* @return string
*
* @since 1.0.0
*/
@ -140,9 +140,9 @@ class InterfaceManager
/**
* Load info data from path.
*
* @return void
* @return void
*
* @throws PathException This exception is thrown in case the info file path doesn't exist.
* @throws PathException This exception is thrown in case the info file path doesn't exist.
*
* @since 1.0.0
*/
@ -152,13 +152,13 @@ class InterfaceManager
throw new PathException($this->path);
}
$this->info = \json_decode(file_get_contents($this->path), true);
$this->info = \json_decode(\file_get_contents($this->path), true);
}
/**
* Update info file
*
* @return void
* @return void
*
* @since 1.0.0
*/
@ -174,18 +174,18 @@ class InterfaceManager
/**
* Set data
*
* @param string $path Value path
* @param mixed $data Scalar or array of data to set
* @param string $delim Delimiter of path
* @param string $path Value path
* @param mixed $data Scalar or array of data to set
* @param string $delim Delimiter of path
*
* @return void
* @return void
*
* @since 1.0.0
*/
public function set(string $path, $data, string $delim = '/') : void
{
if (!is_scalar($data) && !is_array($data) && !($data instanceof \JsonSerializable)) {
throw new \InvalidArgumentException('Type of $data "' . gettype($data) . '" is not supported.');
if (!\is_scalar($data) && !\is_array($data) && !($data instanceof \JsonSerializable)) {
throw new \InvalidArgumentException('Type of $data "' . \gettype($data) . '" is not supported.');
}
ArrayUtils::setArray($path, $this->info, $data, $delim, true);
@ -194,7 +194,7 @@ class InterfaceManager
/**
* Get info data.
*
* @return array<string, mixed>
* @return array<string, mixed>
*
* @since 1.0.0
*/