mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-09 13:38:41 +00:00
Docblock improvements
This commit is contained in:
parent
fdcc81a3d1
commit
65be63862f
|
|
@ -366,89 +366,111 @@ class Localization
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return array
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function getSpeed() : string
|
public function getSpeed() : array
|
||||||
{
|
{
|
||||||
return $this->speed;
|
return $this->speed;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $speed
|
* @param array $speed
|
||||||
*
|
*
|
||||||
* @return string
|
* @return array
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function setSpeed(string $speed) /* : void */
|
public function setSpeed(array $speed) /* : void */
|
||||||
{
|
{
|
||||||
$this->speed = $speed;
|
$this->speed = $speed;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return array
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function getLength() : string
|
public function getWeight() : array
|
||||||
|
{
|
||||||
|
return $this->weight;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param array $weight
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function setWeight(array $weight) /* : void */
|
||||||
|
{
|
||||||
|
$this->weight= $weight;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function getLength() : array
|
||||||
{
|
{
|
||||||
return $this->length;
|
return $this->length;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $length
|
* @param array $length
|
||||||
*
|
*
|
||||||
* @return string
|
* @return array
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function setLength(string $length) /* : void */
|
public function setLength(array $length) /* : void */
|
||||||
{
|
{
|
||||||
$this->length = $length;
|
$this->length = $length;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return array
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function getArea() : string
|
public function getArea() : array
|
||||||
{
|
{
|
||||||
return $this->area;
|
return $this->area;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $area
|
* @param array $area
|
||||||
*
|
*
|
||||||
* @return string
|
* @return array
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function setArea(string $area) /* : void */
|
public function setArea(array $area) /* : void */
|
||||||
{
|
{
|
||||||
$this->area = $area;
|
$this->area = $area;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return array
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function getVolume() : string
|
public function getVolume() : array
|
||||||
{
|
{
|
||||||
return $this->volume;
|
return $this->volume;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $volume
|
* @param array $volume
|
||||||
*
|
*
|
||||||
* @return string
|
* @return array
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function setVolume(string $volume) /* : void */
|
public function setVolume(array $volume) /* : void */
|
||||||
{
|
{
|
||||||
$this->volume = $volume;
|
$this->volume = $volume;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,13 +32,13 @@ class InvalidEnumValue extends \UnexpectedValueException
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
* @param string $message Exception message
|
* @param mixed $message Exception message
|
||||||
* @param int $code Exception code
|
* @param int $code Exception code
|
||||||
* @param \Exception $previous Previous exception
|
* @param \Exception $previous Previous exception
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function __construct(string $message, int $code = 0, \Exception $previous = null)
|
public function __construct($message, int $code = 0, \Exception $previous = null)
|
||||||
{
|
{
|
||||||
parent::__construct('The enum value "' . $message . '" is not valid.', $code, $previous);
|
parent::__construct('The enum value "' . $message . '" is not valid.', $code, $previous);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,12 +30,30 @@ use phpOMS\System\File\PathException;
|
||||||
*/
|
*/
|
||||||
class LocalStorage extends StorageAbstract
|
class LocalStorage extends StorageAbstract
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Storage instance.
|
||||||
|
*
|
||||||
|
* @var LocalStorage
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
private static $instance = null;
|
private static $instance = null;
|
||||||
|
|
||||||
public function __construct() {
|
/**
|
||||||
|
* Constructor.
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get instance.
|
||||||
|
*
|
||||||
|
* @return StorageAbstract
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public static function getInstance() : StorageAbstract
|
public static function getInstance() : StorageAbstract
|
||||||
{
|
{
|
||||||
if (!isset(self::$instance)) {
|
if (!isset(self::$instance)) {
|
||||||
|
|
@ -45,6 +63,15 @@ class LocalStorage extends StorageAbstract
|
||||||
return self::$instance;
|
return self::$instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the internal class type (directory or file) based on path.
|
||||||
|
*
|
||||||
|
* @param string $path Path to the directory or file
|
||||||
|
*
|
||||||
|
* @return string Class namespace
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
protected static function getClassType(string $path) : string
|
protected static function getClassType(string $path) : string
|
||||||
{
|
{
|
||||||
return is_dir($path) || (!is_file($path) && stripos($path, '.') === false) ? Directory::class : File::class;
|
return is_dir($path) || (!is_file($path) && stripos($path, '.') === false) ? Directory::class : File::class;
|
||||||
|
|
|
||||||
|
|
@ -288,6 +288,8 @@ class Repository
|
||||||
*
|
*
|
||||||
* @param string|array $files Files to remove
|
* @param string|array $files Files to remove
|
||||||
*
|
*
|
||||||
|
* @return string
|
||||||
|
*
|
||||||
* @throws \InvalidArgumentException
|
* @throws \InvalidArgumentException
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user