mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 17:58:41 +00:00
Nullable+void typehint
This commit is contained in:
parent
301aa59d61
commit
3b45692ff1
|
|
@ -222,7 +222,7 @@ class Account implements ArrayableInterface, \JsonSerializable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function addGroup($group) /* : void */
|
||||
public function addGroup($group) : void
|
||||
{
|
||||
$this->groups[] = $group;
|
||||
}
|
||||
|
|
@ -236,7 +236,7 @@ class Account implements ArrayableInterface, \JsonSerializable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setL11n(Localization $l11n) /* : void */
|
||||
public function setL11n(Localization $l11n) : void
|
||||
{
|
||||
$this->l11n = $l11n;
|
||||
}
|
||||
|
|
@ -252,7 +252,7 @@ class Account implements ArrayableInterface, \JsonSerializable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setPermissions(array $permissions) /* : void */
|
||||
public function setPermissions(array $permissions) : void
|
||||
{
|
||||
$this->permissions = $permissions;
|
||||
}
|
||||
|
|
@ -268,7 +268,7 @@ class Account implements ArrayableInterface, \JsonSerializable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function addPermissions(array $permissions) /* : void */
|
||||
public function addPermissions(array $permissions) : void
|
||||
{
|
||||
$this->permissions = array_merge($this->permissions, $permissions);
|
||||
}
|
||||
|
|
@ -284,7 +284,7 @@ class Account implements ArrayableInterface, \JsonSerializable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function addPermission(PermissionAbstract $permission) /* : void */
|
||||
public function addPermission(PermissionAbstract $permission) : void
|
||||
{
|
||||
$this->permissions[] = $permission;
|
||||
}
|
||||
|
|
@ -371,7 +371,7 @@ class Account implements ArrayableInterface, \JsonSerializable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setName1(string $name) /* : void */
|
||||
public function setName1(string $name) : void
|
||||
{
|
||||
$this->name1 = $name;
|
||||
}
|
||||
|
|
@ -397,7 +397,7 @@ class Account implements ArrayableInterface, \JsonSerializable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setName2(string $name) /* : void */
|
||||
public function setName2(string $name) : void
|
||||
{
|
||||
$this->name2 = $name;
|
||||
}
|
||||
|
|
@ -423,7 +423,7 @@ class Account implements ArrayableInterface, \JsonSerializable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setName3(string $name) /* : void */
|
||||
public function setName3(string $name) : void
|
||||
{
|
||||
$this->name3 = $name;
|
||||
}
|
||||
|
|
@ -451,7 +451,7 @@ class Account implements ArrayableInterface, \JsonSerializable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setEmail(string $email) /* : void */
|
||||
public function setEmail(string $email) : void
|
||||
{
|
||||
if (!Email::isValid($email)) {
|
||||
throw new \InvalidArgumentException();
|
||||
|
|
@ -483,7 +483,7 @@ class Account implements ArrayableInterface, \JsonSerializable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setStatus(int $status) /* : void */
|
||||
public function setStatus(int $status) : void
|
||||
{
|
||||
if (!AccountStatus::isValidValue($status)) {
|
||||
throw new \InvalidArgumentException();
|
||||
|
|
@ -515,7 +515,7 @@ class Account implements ArrayableInterface, \JsonSerializable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setType(int $type) /* : void */
|
||||
public function setType(int $type) : void
|
||||
{
|
||||
if (!AccountType::isValidValue($type)) {
|
||||
throw new \InvalidArgumentException();
|
||||
|
|
@ -559,7 +559,7 @@ class Account implements ArrayableInterface, \JsonSerializable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function generatePassword(string $password) /* : void */
|
||||
public function generatePassword(string $password) : void
|
||||
{
|
||||
$this->password = \password_hash($password, \PASSWORD_DEFAULT);
|
||||
|
||||
|
|
@ -577,7 +577,7 @@ class Account implements ArrayableInterface, \JsonSerializable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setName(string $name) /* : void */
|
||||
public function setName(string $name) : void
|
||||
{
|
||||
$this->login = $name;
|
||||
}
|
||||
|
|
@ -589,7 +589,7 @@ class Account implements ArrayableInterface, \JsonSerializable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function updateLastActive() /* : void */
|
||||
public function updateLastActive() : void
|
||||
{
|
||||
$this->lastActive = new \DateTime('NOW');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ class Group implements ArrayableInterface, \JsonSerializable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setName(string $name) /* : void */
|
||||
public function setName(string $name) : void
|
||||
{
|
||||
$this->name = $name;
|
||||
}
|
||||
|
|
@ -152,7 +152,7 @@ class Group implements ArrayableInterface, \JsonSerializable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setDescription(string $description) /* : void */
|
||||
public function setDescription(string $description) : void
|
||||
{
|
||||
$this->description = $description;
|
||||
}
|
||||
|
|
@ -180,7 +180,7 @@ class Group implements ArrayableInterface, \JsonSerializable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setStatus(int $status) /* : void */
|
||||
public function setStatus(int $status) : void
|
||||
{
|
||||
if (!GroupStatus::isValidValue($status)) {
|
||||
throw new InvalidEnumValue($status);
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ class PermissionAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getUnit() /* : ?int */
|
||||
public function getUnit() : ?int
|
||||
{
|
||||
return $this->unit;
|
||||
}
|
||||
|
|
@ -132,7 +132,7 @@ class PermissionAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setUnit(int $unit = null) /* : void */
|
||||
public function setUnit(int $unit = null) : void
|
||||
{
|
||||
$this->unit = $unit;
|
||||
}
|
||||
|
|
@ -144,7 +144,7 @@ class PermissionAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getApp() /* : ?string */
|
||||
public function getApp() : ?string
|
||||
{
|
||||
return $this->app;
|
||||
}
|
||||
|
|
@ -158,7 +158,7 @@ class PermissionAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setApp(string $app = null) /* : void */
|
||||
public function setApp(string $app = null) : void
|
||||
{
|
||||
$this->app = $app;
|
||||
}
|
||||
|
|
@ -170,7 +170,7 @@ class PermissionAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getModule() /* : ?int */
|
||||
public function getModule() : ?int
|
||||
{
|
||||
return $this->module;
|
||||
}
|
||||
|
|
@ -184,7 +184,7 @@ class PermissionAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setModule(int $module = null) /* : void */
|
||||
public function setModule(int $module = null) : void
|
||||
{
|
||||
$this->module = $module;
|
||||
}
|
||||
|
|
@ -196,7 +196,7 @@ class PermissionAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getFrom() /* : ?int */
|
||||
public function getFrom() : ?int
|
||||
{
|
||||
return $this->from;
|
||||
}
|
||||
|
|
@ -210,7 +210,7 @@ class PermissionAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setFrom(int $from = null) /* : void */
|
||||
public function setFrom(int $from = null) : void
|
||||
{
|
||||
$this->from = $from;
|
||||
}
|
||||
|
|
@ -222,7 +222,7 @@ class PermissionAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getType() /* : ?int */
|
||||
public function getType() : ?int
|
||||
{
|
||||
return $this->type;
|
||||
}
|
||||
|
|
@ -236,7 +236,7 @@ class PermissionAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setType(int $type = null) /* : void */
|
||||
public function setType(int $type = null) : void
|
||||
{
|
||||
$this->type = $type;
|
||||
}
|
||||
|
|
@ -248,7 +248,7 @@ class PermissionAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getElement() /* : ?int */
|
||||
public function getElement() : ?int
|
||||
{
|
||||
return $this->element;
|
||||
}
|
||||
|
|
@ -262,7 +262,7 @@ class PermissionAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setElement(int $element = null) /* : void */
|
||||
public function setElement(int $element = null) : void
|
||||
{
|
||||
$this->element = $element;
|
||||
}
|
||||
|
|
@ -274,7 +274,7 @@ class PermissionAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getComponent() /* : ?int */
|
||||
public function getComponent() : ?int
|
||||
{
|
||||
return $this->component;
|
||||
}
|
||||
|
|
@ -288,7 +288,7 @@ class PermissionAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setComponent(int $component = null) /* : void */
|
||||
public function setComponent(int $component = null) : void
|
||||
{
|
||||
$this->component = $component;
|
||||
}
|
||||
|
|
@ -314,7 +314,7 @@ class PermissionAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setPermission(int $permission = 0) /* : void */
|
||||
public function setPermission(int $permission = 0) : void
|
||||
{
|
||||
$this->permission = $permission;
|
||||
}
|
||||
|
|
@ -328,7 +328,7 @@ class PermissionAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function addPermission(int $permission = 0) /* : void */
|
||||
public function addPermission(int $permission = 0) : void
|
||||
{
|
||||
$this->permission |= $permission;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ class AssetManager implements \Countable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function get(string $id) /* : ?string */
|
||||
public function get(string $id) : ?string
|
||||
{
|
||||
if (isset($this->assets[$id])) {
|
||||
return $this->assets[$id];
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ class Auth
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function logout(SessionInterface $session) /* : void */
|
||||
public static function logout(SessionInterface $session) : void
|
||||
{
|
||||
$session->remove('UID');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ class Autoloader
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function defaultAutoloader(string $class) /* : void */
|
||||
public static function defaultAutoloader(string $class) : void
|
||||
{
|
||||
$class = ltrim($class, '\\');
|
||||
$class = str_replace(['_', '\\'], '/', $class);
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ class NetPromoterScore
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function add(int $score) /* : void */
|
||||
public function add(int $score) : void
|
||||
{
|
||||
$this->scores[] = $score;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ abstract class SettingsAbstract implements OptionsInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function set(array $options, bool $store = false) /* : void */
|
||||
public function set(array $options, bool $store = false) : void
|
||||
{
|
||||
$this->setOptions($options);
|
||||
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function close() /* : void */
|
||||
public function close() : void
|
||||
{
|
||||
$this->con = null;
|
||||
$this->status = CacheStatus::INACTIVE;
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ class FileCache extends ConnectionAbstract
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function connect(array $data) /* : void */
|
||||
public function connect(array $data) : void
|
||||
{
|
||||
$this->status = CacheStatus::ACTIVE;
|
||||
}
|
||||
|
|
@ -120,7 +120,7 @@ class FileCache extends ConnectionAbstract
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function set($key, $value, int $expire = -1) /* : void */
|
||||
public function set($key, $value, int $expire = -1) : void
|
||||
{
|
||||
if ($this->status !== CacheStatus::ACTIVE) {
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ class MemCached extends ConnectionAbstract
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function connect(array $data) /* : void */
|
||||
public function connect(array $data) : void
|
||||
{
|
||||
$this->status = CacheStatus::ACTIVE;
|
||||
}
|
||||
|
|
@ -76,7 +76,7 @@ class MemCached extends ConnectionAbstract
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function set($key, $value, int $expire = -1) /* : void */
|
||||
public function set($key, $value, int $expire = -1) : void
|
||||
{
|
||||
$this->memc->set($key, $value, false, $expire);
|
||||
}
|
||||
|
|
@ -175,7 +175,7 @@ class MemCached extends ConnectionAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function close() /* : void */
|
||||
public function close() : void
|
||||
{
|
||||
if ($this->memc !== null) {
|
||||
$this->memc->close();
|
||||
|
|
|
|||
|
|
@ -28,14 +28,14 @@ class NullCache extends ConnectionAbstract
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function connect(array $data) /* : void */
|
||||
public function connect(array $data) : void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function set($key, $value, int $expire = -1) /* : void */
|
||||
public function set($key, $value, int $expire = -1) : void
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -106,7 +106,7 @@ class NullCache extends ConnectionAbstract
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setStatus(int $status) /* : void */
|
||||
public function setStatus(int $status) : void
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ class RedisCache extends ConnectionAbstract
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function connect(array $data) /* : void */
|
||||
public function connect(array $data) : void
|
||||
{
|
||||
$this->status = CacheStatus::ACTIVE;
|
||||
}
|
||||
|
|
@ -38,7 +38,7 @@ class RedisCache extends ConnectionAbstract
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function set($key, $value, int $expire = -1) /* : void */
|
||||
public function set($key, $value, int $expire = -1) : void
|
||||
{
|
||||
// TODO: Implement set() method.
|
||||
}
|
||||
|
|
@ -114,7 +114,7 @@ class RedisCache extends ConnectionAbstract
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setStatus(int $status) /* : void */
|
||||
public function setStatus(int $status) : void
|
||||
{
|
||||
// TODO: Implement setStatus() method.
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class WinCache extends ConnectionAbstract
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function connect(array $data) /* : void */
|
||||
public function connect(array $data) : void
|
||||
{
|
||||
$this->status = CacheStatus::ACTIVE;
|
||||
}
|
||||
|
|
@ -37,7 +37,7 @@ class WinCache extends ConnectionAbstract
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function set($key, $value, int $expire = -1) /* : void */
|
||||
public function set($key, $value, int $expire = -1) : void
|
||||
{
|
||||
// TODO: Implement set() method.
|
||||
}
|
||||
|
|
@ -113,7 +113,7 @@ class WinCache extends ConnectionAbstract
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setStatus(int $status) /* : void */
|
||||
public function setStatus(int $status) : void
|
||||
{
|
||||
// TODO: Implement setStatus() method.
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class CookieJar
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function lock() /* : void */
|
||||
public static function lock() : void
|
||||
{
|
||||
self::$isLocked = true;
|
||||
}
|
||||
|
|
@ -170,7 +170,7 @@ class CookieJar
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function save() /* : void */
|
||||
public function save() : void
|
||||
{
|
||||
if (self::$isLocked) {
|
||||
throw new LockException('CookieJar');
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function close() /* : void */
|
||||
public function close() : void
|
||||
{
|
||||
$this->con = null;
|
||||
$this->status = DatabaseStatus::CLOSED;
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ class MysqlConnection extends ConnectionAbstract
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function connect(array $dbdata = null) /* : void */
|
||||
public function connect(array $dbdata = null) : void
|
||||
{
|
||||
$this->dbdata = isset($dbdata) ? $dbdata : $this->dbdata;
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ class SqlServerConnection extends ConnectionAbstract
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function connect(array $dbdata = null) /* : void */
|
||||
public function connect(array $dbdata = null) : void
|
||||
{
|
||||
$this->close();
|
||||
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function setConnection(ConnectionAbstract $con) /* : void */
|
||||
public static function setConnection(ConnectionAbstract $con) : void
|
||||
{
|
||||
self::$db = $con;
|
||||
}
|
||||
|
|
@ -237,7 +237,7 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private static function extend($class) /* : void */
|
||||
private static function extend($class) : void
|
||||
{
|
||||
/* todo: have to implement this in the queries, so far not used */
|
||||
self::$collection['primaryField'][] = $class::$primaryField;
|
||||
|
|
@ -262,7 +262,7 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function with(...$objects) /* : void */
|
||||
public static function with(...$objects) : void
|
||||
{
|
||||
// todo: how to handle with of parent objects/extends/relations
|
||||
|
||||
|
|
@ -278,7 +278,7 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function clear() /* : void */
|
||||
public static function clear() : void
|
||||
{
|
||||
self::$overwrite = true;
|
||||
self::$primaryField = '';
|
||||
|
|
@ -528,7 +528,7 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private static function setObjectId(\ReflectionClass $reflectionClass, $obj, $objId) /* : void */
|
||||
private static function setObjectId(\ReflectionClass $reflectionClass, $obj, $objId) : void
|
||||
{
|
||||
$reflectionProperty = $reflectionClass->getProperty(static::$columns[static::$primaryField]['internal']);
|
||||
|
||||
|
|
@ -557,7 +557,7 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private static function createHasMany(\ReflectionClass $reflectionClass, $obj, $objId) /* : void */
|
||||
private static function createHasMany(\ReflectionClass $reflectionClass, $obj, $objId) : void
|
||||
{
|
||||
foreach (static::$hasMany as $propertyName => $rel) {
|
||||
$property = $reflectionClass->getProperty($propertyName);
|
||||
|
|
@ -638,7 +638,7 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private static function createHasManyArray(array &$obj, $objId) /* : void */
|
||||
private static function createHasManyArray(array &$obj, $objId) : void
|
||||
{
|
||||
foreach (static::$hasMany as $propertyName => $rel) {
|
||||
$values = $obj[$propertyName];
|
||||
|
|
@ -885,7 +885,7 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private static function updateHasMany(\ReflectionClass $reflectionClass, $obj, $objId) /* : void */
|
||||
private static function updateHasMany(\ReflectionClass $reflectionClass, $obj, $objId) : void
|
||||
{
|
||||
$objsIds = [];
|
||||
|
||||
|
|
@ -1080,7 +1080,7 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private static function updateModel($obj, $objId, \ReflectionClass $reflectionClass = null) /* : void */
|
||||
private static function updateModel($obj, $objId, \ReflectionClass $reflectionClass = null) : void
|
||||
{
|
||||
$query = new Builder(self::$db);
|
||||
$query->prefix(self::$db->getPrefix())
|
||||
|
|
@ -1188,7 +1188,7 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private static function deleteHasMany(\ReflectionClass $reflectionClass, $obj, $objId, int $relations) /* : void */
|
||||
private static function deleteHasMany(\ReflectionClass $reflectionClass, $obj, $objId, int $relations) : void
|
||||
{
|
||||
foreach (static::$hasMany as $propertyName => $rel) {
|
||||
$property = $reflectionClass->getProperty($propertyName);
|
||||
|
|
@ -1306,7 +1306,7 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private static function deleteModel($obj, $objId, int $relations = RelationType::REFERENCE, \ReflectionClass $reflectionClass = null) /* : void */
|
||||
private static function deleteModel($obj, $objId, int $relations = RelationType::REFERENCE, \ReflectionClass $reflectionClass = null) : void
|
||||
{
|
||||
$query = new Builder(self::$db);
|
||||
$query->prefix(self::$db->getPrefix())
|
||||
|
|
@ -1474,7 +1474,7 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function populateManyToMany(array $result, &$obj, int $depth = null) /* : void */
|
||||
public static function populateManyToMany(array $result, &$obj, int $depth = null) : void
|
||||
{
|
||||
// todo: maybe pass reflectionClass as optional parameter for performance increase
|
||||
$reflectionClass = new \ReflectionClass($obj);
|
||||
|
|
@ -1510,7 +1510,7 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function populateManyToManyArray(array $result, array &$obj, int $depth = null) /* : void */
|
||||
public static function populateManyToManyArray(array $result, array &$obj, int $depth = null) : void
|
||||
{
|
||||
foreach ($result as $member => $values) {
|
||||
if (!empty($values)) {
|
||||
|
|
@ -1535,7 +1535,7 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function populateHasOne(&$obj, int $depth = null) /* : void */
|
||||
public static function populateHasOne(&$obj, int $depth = null) : void
|
||||
{
|
||||
$reflectionClass = new \ReflectionClass($obj);
|
||||
|
||||
|
|
@ -1580,7 +1580,7 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function populateHasOneArray(array &$obj, int $depth = null) /* : void */
|
||||
public static function populateHasOneArray(array &$obj, int $depth = null) : void
|
||||
{
|
||||
foreach (static::$hasOne as $member => $one) {
|
||||
/** @var string $mapper */
|
||||
|
|
@ -1601,7 +1601,7 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function populateOwnsOne(&$obj, int $depth = null) /* : void */
|
||||
public static function populateOwnsOne(&$obj, int $depth = null) : void
|
||||
{
|
||||
$reflectionClass = new \ReflectionClass($obj);
|
||||
|
||||
|
|
@ -1646,7 +1646,7 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function populateOwnsOneArray(array &$obj, int $depth = null) /* : void */
|
||||
public static function populateOwnsOneArray(array &$obj, int $depth = null) : void
|
||||
{
|
||||
foreach (static::$ownsOne as $member => $one) {
|
||||
/** @var string $mapper */
|
||||
|
|
@ -1667,7 +1667,7 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function populateBelongsTo(&$obj, int $depth = null) /* : void */
|
||||
public static function populateBelongsTo(&$obj, int $depth = null) : void
|
||||
{
|
||||
$reflectionClass = new \ReflectionClass($obj);
|
||||
|
||||
|
|
@ -1712,7 +1712,7 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function populateBelongsToArray(array &$obj, int $depth = null) /* : void */
|
||||
public static function populateBelongsToArray(array &$obj, int $depth = null) : void
|
||||
{
|
||||
foreach (static::$belongsTo as $member => $one) {
|
||||
/** @var string $mapper */
|
||||
|
|
@ -2218,7 +2218,7 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function fillRelations(array &$obj, int $relations = RelationType::ALL, int $depth = null) /* : void */
|
||||
public static function fillRelations(array &$obj, int $relations = RelationType::ALL, int $depth = null) : void
|
||||
{
|
||||
if (isset($depth) && $depth < 1) {
|
||||
return;
|
||||
|
|
@ -2268,7 +2268,7 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function fillRelationsArray(array &$obj, int $relations = RelationType::ALL, int $depth = null) /* : void */
|
||||
public static function fillRelationsArray(array &$obj, int $relations = RelationType::ALL, int $depth = null) : void
|
||||
{
|
||||
if (isset($depth) && $depth < 1) {
|
||||
return null;
|
||||
|
|
@ -2546,7 +2546,7 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private static function addInitialized(string $mapper, $id, $obj = null) /* : void */
|
||||
private static function addInitialized(string $mapper, $id, $obj = null) : void
|
||||
{
|
||||
if (!isset(self::$initObjects[$mapper])) {
|
||||
self::$initObjects[$mapper] = [];
|
||||
|
|
@ -2609,7 +2609,7 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private static function setUpParentMapper() /* : void */
|
||||
private static function setUpParentMapper() : void
|
||||
{
|
||||
self::$parentMapper = static::class;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ abstract class GrammarAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setTablePrefix(string $prefix) /* : void */
|
||||
public function setTablePrefix(string $prefix) : void
|
||||
{
|
||||
$this->tablePrefix = $prefix;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -238,7 +238,7 @@ class Builder extends BuilderAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setConnection(ConnectionAbstract $connection) /* : void */
|
||||
public function setConnection(ConnectionAbstract $connection) : void
|
||||
{
|
||||
$this->connection = $connection;
|
||||
$this->grammar = $connection->getGrammar();
|
||||
|
|
@ -528,7 +528,7 @@ class Builder extends BuilderAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getWhereByColumn($column) /* : ?array */
|
||||
public function getWhereByColumn($column) : ?array
|
||||
{
|
||||
return $this->wheres[self::getPublicColumnName($column)] ?? null;
|
||||
}
|
||||
|
|
@ -543,7 +543,7 @@ class Builder extends BuilderAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getTableOfSystem($expression, string $systemIdentifier) /* : ?string */
|
||||
public function getTableOfSystem($expression, string $systemIdentifier) : ?string
|
||||
{
|
||||
if (($pos = strpos($expression, $systemIdentifier . '.' . $systemIdentifier)) === false) {
|
||||
return null;
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ class Column
|
|||
return $this->column;
|
||||
}
|
||||
|
||||
public function setColumn(string $column) /* : void */
|
||||
public function setColumn(string $column) : void
|
||||
{
|
||||
$this->column = $column;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ class Builder extends BuilderAbstract
|
|||
$this->grammar = $connection->getSchemaGrammar();
|
||||
}
|
||||
|
||||
public function select(...$table) /* : void */
|
||||
public function select(...$table) : void
|
||||
{
|
||||
$this->type = QueryType::SELECT;
|
||||
$this->table += $table;
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ class ConsoleSession implements SessionInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setSID($sid) /* : void */
|
||||
public function setSID($sid) : void
|
||||
{
|
||||
$this->sid = $sid;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ class HttpSession implements SessionInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function setCsrfProtection() /* : void */
|
||||
private function setCsrfProtection() : void
|
||||
{
|
||||
$this->set('UID', 0, false);
|
||||
|
||||
|
|
@ -151,7 +151,7 @@ class HttpSession implements SessionInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function lock() /* : void */
|
||||
public function lock() : void
|
||||
{
|
||||
self::$isLocked = true;
|
||||
}
|
||||
|
|
@ -171,7 +171,7 @@ class HttpSession implements SessionInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function save() /* : void */
|
||||
public function save() : void
|
||||
{
|
||||
if (!self::$isLocked) {
|
||||
$_SESSION = $this->sessionData;
|
||||
|
|
@ -204,7 +204,7 @@ class HttpSession implements SessionInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setSID($sid) /* : void */
|
||||
public function setSID($sid) : void
|
||||
{
|
||||
$this->sid = $sid;
|
||||
}
|
||||
|
|
@ -216,7 +216,7 @@ class HttpSession implements SessionInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function destroy() /* : void */
|
||||
private function destroy() : void
|
||||
{
|
||||
session_destroy();
|
||||
$this->sessionData = [];
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ class SocketSession implements SessionInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setSID($sid) /* : void */
|
||||
public function setSID($sid) : void
|
||||
{
|
||||
$this->sid = $sid;
|
||||
}
|
||||
|
|
@ -87,7 +87,7 @@ class SocketSession implements SessionInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function save() /* : void */
|
||||
public function save() : void
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ class Dispatcher
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function dispatchClosure(\Closure $controller, array $data = null) /* : void */
|
||||
private function dispatchClosure(\Closure $controller, array $data = null) : void
|
||||
{
|
||||
return $controller($this->app, ...$data);
|
||||
}
|
||||
|
|
@ -194,7 +194,7 @@ class Dispatcher
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function set(ModuleAbstract $controller, string $name) /* : void */
|
||||
public function set(ModuleAbstract $controller, string $name) : void
|
||||
{
|
||||
$this->controllers[$name] = $controller;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ class EventManager
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function reset(string $group) /* : void */
|
||||
private function reset(string $group) : void
|
||||
{
|
||||
foreach ($this->groups[$group] as $id => $ok) {
|
||||
$this->groups[$group][$id] = false;
|
||||
|
|
@ -186,7 +186,7 @@ class EventManager
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function addGroup(string $group, string $id) /* : void */
|
||||
public function addGroup(string $group, string $id) : void
|
||||
{
|
||||
if (!isset($this->groups[$group])) {
|
||||
$this->groups[$group] = [];
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ class L11nManager
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function loadLanguage(string $language, string $from, array $translation) /* : void */
|
||||
public function loadLanguage(string $language, string $from, array $translation) : void
|
||||
{
|
||||
if (!isset($translation[$from])) {
|
||||
throw new \UnexpectedValueException($from);
|
||||
|
|
@ -103,7 +103,7 @@ class L11nManager
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function loadLanguageFromFile(string $language, string $from, string $file) /* : void */
|
||||
public function loadLanguageFromFile(string $language, string $from, string $file) : void
|
||||
{
|
||||
$lang = [];
|
||||
if (file_exists($file)) {
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ class Localization
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setCountry(string $country) /* : void */
|
||||
public function setCountry(string $country) : void
|
||||
{
|
||||
if (!ISO3166TwoEnum::isValidValue($country)) {
|
||||
throw new InvalidEnumValue($country);
|
||||
|
|
@ -198,7 +198,7 @@ class Localization
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setTimezone(string $timezone) /* : void */
|
||||
public function setTimezone(string $timezone) : void
|
||||
{
|
||||
if (!TimeZoneEnumArray::isValidValue($timezone)) {
|
||||
throw new InvalidEnumValue($timezone);
|
||||
|
|
@ -230,7 +230,7 @@ class Localization
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setLanguage(string $language) /* : void */
|
||||
public function setLanguage(string $language) : void
|
||||
{
|
||||
$language = strtolower($language);
|
||||
|
||||
|
|
@ -262,7 +262,7 @@ class Localization
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setCurrency(string $currency) /* : void */
|
||||
public function setCurrency(string $currency) : void
|
||||
{
|
||||
if (!ISO4217Enum::isValidValue($currency)) {
|
||||
throw new InvalidEnumValue($currency);
|
||||
|
|
@ -292,7 +292,7 @@ class Localization
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setDatetime(string $datetime) /* : void */
|
||||
public function setDatetime(string $datetime) : void
|
||||
{
|
||||
$this->datetime = $datetime;
|
||||
}
|
||||
|
|
@ -318,7 +318,7 @@ class Localization
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setDecimal(string $decimal) /* : void */
|
||||
public function setDecimal(string $decimal) : void
|
||||
{
|
||||
$this->decimal = $decimal;
|
||||
}
|
||||
|
|
@ -344,7 +344,7 @@ class Localization
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setThousands(string $thousands) /* : void */
|
||||
public function setThousands(string $thousands) : void
|
||||
{
|
||||
$this->thousands = $thousands;
|
||||
}
|
||||
|
|
@ -370,7 +370,7 @@ class Localization
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setAngle(string $angle) /* : void */
|
||||
public function setAngle(string $angle) : void
|
||||
{
|
||||
$this->angle = $angle;
|
||||
}
|
||||
|
|
@ -396,7 +396,7 @@ class Localization
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setTemperature(string $temperature) /* : void */
|
||||
public function setTemperature(string $temperature) : void
|
||||
{
|
||||
$this->temperature = $temperature;
|
||||
}
|
||||
|
|
@ -422,7 +422,7 @@ class Localization
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setSpeed(array $speed) /* : void */
|
||||
public function setSpeed(array $speed) : void
|
||||
{
|
||||
$this->speed = $speed;
|
||||
}
|
||||
|
|
@ -448,7 +448,7 @@ class Localization
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setWeight(array $weight) /* : void */
|
||||
public function setWeight(array $weight) : void
|
||||
{
|
||||
$this->weight = $weight;
|
||||
}
|
||||
|
|
@ -474,7 +474,7 @@ class Localization
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setLength(array $length) /* : void */
|
||||
public function setLength(array $length) : void
|
||||
{
|
||||
$this->length = $length;
|
||||
}
|
||||
|
|
@ -500,7 +500,7 @@ class Localization
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setArea(array $area) /* : void */
|
||||
public function setArea(array $area) : void
|
||||
{
|
||||
$this->area = $area;
|
||||
}
|
||||
|
|
@ -526,7 +526,7 @@ class Localization
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setVolume(array $volume) /* : void */
|
||||
public function setVolume(array $volume) : void
|
||||
{
|
||||
$this->volume = $volume;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ class Money implements \Serializable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setLocalization(string $thousands = ',', string $decimal = '.', string $symbol = '', int $position = 0) /* : void */
|
||||
public function setLocalization(string $thousands = ',', string $decimal = '.', string $symbol = '', int $position = 0) : void
|
||||
{
|
||||
$this->thousands = $thousands;
|
||||
$this->decimal = $decimal;
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ class FileLogger implements LoggerInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function createFile() /* : void */
|
||||
private function createFile() : void
|
||||
{
|
||||
if (!$this->created && !file_exists($this->path)) {
|
||||
File::create($this->path);
|
||||
|
|
@ -264,7 +264,7 @@ class FileLogger implements LoggerInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function write(string $message) /* : void */
|
||||
private function write(string $message) : void
|
||||
{
|
||||
$this->createFile();
|
||||
if (!is_writable($this->path)) {
|
||||
|
|
@ -289,7 +289,7 @@ class FileLogger implements LoggerInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function emergency(string $message, array $context = []) /* : void */
|
||||
public function emergency(string $message, array $context = []) : void
|
||||
{
|
||||
$message = $this->interpolate($message, $context, LogLevel::EMERGENCY);
|
||||
$this->write($message);
|
||||
|
|
@ -298,7 +298,7 @@ class FileLogger implements LoggerInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function alert(string $message, array $context = []) /* : void */
|
||||
public function alert(string $message, array $context = []) : void
|
||||
{
|
||||
$message = $this->interpolate($message, $context, LogLevel::ALERT);
|
||||
$this->write($message);
|
||||
|
|
@ -307,7 +307,7 @@ class FileLogger implements LoggerInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function critical(string $message, array $context = []) /* : void */
|
||||
public function critical(string $message, array $context = []) : void
|
||||
{
|
||||
$message = $this->interpolate($message, $context, LogLevel::CRITICAL);
|
||||
$this->write($message);
|
||||
|
|
@ -316,7 +316,7 @@ class FileLogger implements LoggerInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function error(string $message, array $context = []) /* : void */
|
||||
public function error(string $message, array $context = []) : void
|
||||
{
|
||||
$message = $this->interpolate($message, $context, LogLevel::ERROR);
|
||||
$this->write($message);
|
||||
|
|
@ -325,7 +325,7 @@ class FileLogger implements LoggerInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function warning(string $message, array $context = []) /* : void */
|
||||
public function warning(string $message, array $context = []) : void
|
||||
{
|
||||
$message = $this->interpolate($message, $context, LogLevel::WARNING);
|
||||
$this->write($message);
|
||||
|
|
@ -334,7 +334,7 @@ class FileLogger implements LoggerInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function notice(string $message, array $context = []) /* : void */
|
||||
public function notice(string $message, array $context = []) : void
|
||||
{
|
||||
$message = $this->interpolate($message, $context, LogLevel::NOTICE);
|
||||
$this->write($message);
|
||||
|
|
@ -343,7 +343,7 @@ class FileLogger implements LoggerInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function info(string $message, array $context = []) /* : void */
|
||||
public function info(string $message, array $context = []) : void
|
||||
{
|
||||
$message = $this->interpolate($message, $context, LogLevel::INFO);
|
||||
$this->write($message);
|
||||
|
|
@ -352,7 +352,7 @@ class FileLogger implements LoggerInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function debug(string $message, array $context = []) /* : void */
|
||||
public function debug(string $message, array $context = []) : void
|
||||
{
|
||||
$message = $this->interpolate($message, $context, LogLevel::DEBUG);
|
||||
$this->write($message);
|
||||
|
|
@ -361,7 +361,7 @@ class FileLogger implements LoggerInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function log(string $level, string $message, array $context = []) /* : void */
|
||||
public function log(string $level, string $message, array $context = []) : void
|
||||
{
|
||||
if (!LogLevel::isValidValue($level)) {
|
||||
throw new InvalidEnumValue($level);
|
||||
|
|
@ -550,7 +550,7 @@ class FileLogger implements LoggerInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function console(string $message, bool $verbose = true, array $context = []) /* : void */
|
||||
public function console(string $message, bool $verbose = true, array $context = []) : void
|
||||
{
|
||||
if (empty($context)) {
|
||||
$message = date('[Y-m-d H:i:s] ') . $message . "\r\n";
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ class Matrix implements \ArrayAccess, \Iterator
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function set(int $m, int $n, $value) /* : void */
|
||||
public function set(int $m, int $n, $value) : void
|
||||
{
|
||||
if (!isset($this->matrix[$m], $this->matrix[$m][$n])) {
|
||||
throw new InvalidDimensionException($m . 'x' . $n);
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ class CityPool implements \Countable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function addCity(City $city) /* : void */
|
||||
public function addCity(City $city) : void
|
||||
{
|
||||
$this->cities[$city->getName() . $city->getLatitude() . $city->getLongitude()] = $city;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class Population implements \Countable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function insertAt(int $index, Tour $tour) /* : void */
|
||||
public function insertAt(int $index, Tour $tour) : void
|
||||
{
|
||||
$this->tours = array_slice($this->tours, 0, $index) + [$tour] + array_slice($this->tours, $index);
|
||||
}
|
||||
|
|
@ -75,7 +75,7 @@ class Population implements \Countable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function set(int $index, Tour $tour) /* : void */
|
||||
public function set(int $index, Tour $tour) : void
|
||||
{
|
||||
$this->tours[$index] = $tour;
|
||||
asort($this->tours);
|
||||
|
|
@ -90,7 +90,7 @@ class Population implements \Countable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function add(Tour $tour) /* : void */
|
||||
public function add(Tour $tour) : void
|
||||
{
|
||||
$this->tours[] = $tour;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ class Tour implements \Countable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function addCity(City $city) /* : void */
|
||||
public function addCity(City $city) : void
|
||||
{
|
||||
$this->cities[] = $city;
|
||||
|
||||
|
|
@ -157,7 +157,7 @@ class Tour implements \Countable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setCity(int $index, City $city) /* : void */
|
||||
public function setCity(int $index, City $city) : void
|
||||
{
|
||||
$this->cities[$index] = $city;
|
||||
asort($this->cities);
|
||||
|
|
|
|||
|
|
@ -29,11 +29,11 @@ class NaiveBayesFilter
|
|||
{
|
||||
}
|
||||
|
||||
public function trainMatch($matched) /* : void */
|
||||
public function trainMatch($matched) : void
|
||||
{
|
||||
}
|
||||
|
||||
public function trainMismatch($mismatch) /* : void */
|
||||
public function trainMismatch($mismatch) : void
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ abstract class HeaderAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function lock() /* : void */
|
||||
public static function lock() : void
|
||||
{
|
||||
// todo: maybe pass session as member and make lock not static
|
||||
self::$isLocked = true;
|
||||
|
|
@ -114,7 +114,7 @@ abstract class HeaderAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setL11n(Localization $l11n) /* : void */
|
||||
public function setL11n(Localization $l11n) : void
|
||||
{
|
||||
$this->l11n = $l11n;
|
||||
}
|
||||
|
|
@ -140,7 +140,7 @@ abstract class HeaderAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setAccount(int $account) /* : void */
|
||||
public function setAccount(int $account) : void
|
||||
{
|
||||
$this->account = $account;
|
||||
}
|
||||
|
|
@ -154,7 +154,7 @@ abstract class HeaderAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setStatusCode(int $status) /* : void */
|
||||
public function setStatusCode(int $status) : void
|
||||
{
|
||||
$this->status = $status;
|
||||
$this->generate($status);
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@ class Header extends HeaderAbstract
|
|||
* @since 1.0.0
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function push() /* : void */
|
||||
public function push() : void
|
||||
{
|
||||
if (self::$isLocked) {
|
||||
throw new \Exception('Already locked');
|
||||
|
|
@ -247,7 +247,7 @@ class Header extends HeaderAbstract
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function generate(int $code) /* : void */
|
||||
public function generate(int $code) : void
|
||||
{
|
||||
switch ($code) {
|
||||
case RequestStatusCode::R_403:
|
||||
|
|
@ -277,7 +277,7 @@ class Header extends HeaderAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function generate403() /* : void */
|
||||
private function generate403() : void
|
||||
{
|
||||
$this->set('HTTP', 'HTTP/1.0 403 Forbidden');
|
||||
$this->set('Status', 'Status: HTTP/1.0 403 Forbidden');
|
||||
|
|
@ -291,7 +291,7 @@ class Header extends HeaderAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function generate404() /* : void */
|
||||
private function generate404() : void
|
||||
{
|
||||
$this->set('HTTP', 'HTTP/1.0 404 Not Found');
|
||||
$this->set('Status', 'Status: HTTP/1.0 404 Not Found');
|
||||
|
|
@ -305,7 +305,7 @@ class Header extends HeaderAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function generate406() /* : void */
|
||||
private function generate406() : void
|
||||
{
|
||||
$this->set('HTTP', 'HTTP/1.0 406 Not acceptable');
|
||||
$this->set('Status', 'Status: 406 Not acceptable');
|
||||
|
|
@ -319,7 +319,7 @@ class Header extends HeaderAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function generate407() /* : void */
|
||||
private function generate407() : void
|
||||
{
|
||||
\http_response_code(407);
|
||||
}
|
||||
|
|
@ -331,7 +331,7 @@ class Header extends HeaderAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function generate503() /* : void */
|
||||
private function generate503() : void
|
||||
{
|
||||
$this->set('HTTP', 'HTTP/1.0 503 Service Temporarily Unavailable');
|
||||
$this->set('Status', 'Status: 503 Service Temporarily Unavailable');
|
||||
|
|
@ -346,7 +346,7 @@ class Header extends HeaderAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function generate500() /* : void */
|
||||
private function generate500() : void
|
||||
{
|
||||
$this->set('HTTP', 'HTTP/1.0 500 Internal Server Error');
|
||||
$this->set('Status', 'Status: 500 Internal Server Error');
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ class Request extends RequestAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function init() /* : void */
|
||||
private function init() : void
|
||||
{
|
||||
if ($this->uri === null) {
|
||||
$this->initCurrentRequest();
|
||||
|
|
@ -116,7 +116,7 @@ class Request extends RequestAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function initCurrentRequest() /* : void */
|
||||
private function initCurrentRequest() : void
|
||||
{
|
||||
$this->uri = new Http(Http::getCurrent());
|
||||
$this->data = $_GET ?? [];
|
||||
|
|
@ -165,7 +165,7 @@ class Request extends RequestAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function cleanupGlobals() /* : void */
|
||||
private function cleanupGlobals() : void
|
||||
{
|
||||
unset($_FILES);
|
||||
unset($_GET);
|
||||
|
|
@ -180,7 +180,7 @@ class Request extends RequestAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function setupUriBuilder() /* : void */
|
||||
private function setupUriBuilder() : void
|
||||
{
|
||||
UriFactory::setQuery('/lang', $this->header->getL11n()->getLanguage());
|
||||
|
||||
|
|
@ -205,7 +205,7 @@ class Request extends RequestAbstract
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setUri(UriInterface $uri) /* : void */
|
||||
public function setUri(UriInterface $uri) : void
|
||||
{
|
||||
parent::setUri($uri);
|
||||
$this->data += $uri->getQueryArray();
|
||||
|
|
@ -224,7 +224,7 @@ class Request extends RequestAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function createRequestHashs(int $start = 0) /* : void */
|
||||
public function createRequestHashs(int $start = 0) : void
|
||||
{
|
||||
$this->hash = [];
|
||||
$pathArray = $this->uri->getPathElements();
|
||||
|
|
@ -307,7 +307,7 @@ class Request extends RequestAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setBrowser(string $browser) /* : void */
|
||||
public function setBrowser(string $browser) : void
|
||||
{
|
||||
$this->browser = $browser;
|
||||
}
|
||||
|
|
@ -348,7 +348,7 @@ class Request extends RequestAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setOS(string $os) /* : void */
|
||||
public function setOS(string $os) : void
|
||||
{
|
||||
$this->os = $os;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class Response extends ResponseAbstract implements RenderableInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setResponse(array $response) /* : void */
|
||||
public function setResponse(array $response) : void
|
||||
{
|
||||
$this->response = $response;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ class EmailAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function disconnect() /* : void */
|
||||
public function disconnect() : void
|
||||
{
|
||||
if ($this->con === null) {
|
||||
imap_close($this->con);
|
||||
|
|
@ -143,7 +143,7 @@ class EmailAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function connect(string $user = '', string $pass = '') /* : void */
|
||||
public function connect(string $user = '', string $pass = '') : void
|
||||
{
|
||||
$this->mailbox = substr($this->mailbox, 0, -1) . ($this->ssl ? '/ssl/validate-cert' : '/novalidate-cert') . '}';
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ class Imap extends EmailAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function connect(string $user = '', string $pass = '') /* : void */
|
||||
public function connect(string $user = '', string $pass = '') : void
|
||||
{
|
||||
$this->mailbox = '{' . $this->host . ':' . $this->port . '/imap}';
|
||||
parent::connect();
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ class Mail
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setBody(string $body) /* : void */
|
||||
public function setBody(string $body) : void
|
||||
{
|
||||
$this->body = $body;
|
||||
}
|
||||
|
|
@ -203,7 +203,7 @@ class Mail
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setOverview(string $overview) /* : void */
|
||||
public function setOverview(string $overview) : void
|
||||
{
|
||||
$this->overview = $overview;
|
||||
}
|
||||
|
|
@ -217,7 +217,7 @@ class Mail
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setEncoding(int $encoding) /* : void */
|
||||
public function setEncoding(int $encoding) : void
|
||||
{
|
||||
$this->encoding = $encoding;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ class Nntp extends EmailAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function connect(string $user = '', string $pass = '') /* : void */
|
||||
public function connect(string $user = '', string $pass = '') : void
|
||||
{
|
||||
$this->mailbox = '{' . $this->host . ':' . $this->port . '/nntp}';
|
||||
parent::connect();
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ class Pop3 extends EmailAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function connect(string $user = '', string $pass = '') /* : void */
|
||||
public function connect(string $user = '', string $pass = '') : void
|
||||
{
|
||||
$this->mailbox = '{' . $this->host . ':' . $this->port . '/pop3}';
|
||||
parent::connect();
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ abstract class RequestAbstract implements MessageInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setUri(UriInterface $uri) /* : void */
|
||||
public function setUri(UriInterface $uri) : void
|
||||
{
|
||||
$this->uri = $uri;
|
||||
}
|
||||
|
|
@ -160,7 +160,7 @@ abstract class RequestAbstract implements MessageInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setRequestSource(int $source) /* : void */
|
||||
public function setRequestSource(int $source) : void
|
||||
{
|
||||
if (!RequestSource::isValidValue($source)) {
|
||||
throw new InvalidEnumValue((string) $source);
|
||||
|
|
@ -187,7 +187,7 @@ abstract class RequestAbstract implements MessageInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setMethod(string $method) /* : void */
|
||||
public function setMethod(string $method) : void
|
||||
{
|
||||
$this->method = $method;
|
||||
}
|
||||
|
|
@ -258,7 +258,7 @@ abstract class RequestAbstract implements MessageInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function lock() /* : void */
|
||||
public function lock() : void
|
||||
{
|
||||
$this->lock = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ abstract class ResponseAbstract implements MessageInterface, \JsonSerializable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function set($key, $response, bool $overwrite = true) /* : void */
|
||||
public function set($key, $response, bool $overwrite = true) : void
|
||||
{
|
||||
// This is not working since the key kontains :: from http://
|
||||
//$this->response = ArrayUtils::setArray((string) $key, $this->response, $response, ':', $overwrite);
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ class Head implements RenderableInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setTitle(string $title) /* : void */
|
||||
public function setTitle(string $title) : void
|
||||
{
|
||||
$this->title = $title;
|
||||
}
|
||||
|
|
@ -147,7 +147,7 @@ class Head implements RenderableInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function addAsset(int $type, string $uri) /* : void */
|
||||
public function addAsset(int $type, string $uri) : void
|
||||
{
|
||||
$this->assets[$uri] = $type;
|
||||
}
|
||||
|
|
@ -161,7 +161,7 @@ class Head implements RenderableInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setLanguage(string $language) /* : void */
|
||||
public function setLanguage(string $language) : void
|
||||
{
|
||||
$this->language = $language;
|
||||
}
|
||||
|
|
@ -241,7 +241,7 @@ class Head implements RenderableInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setStyle(string $key, string $style, bool $overwrite = true) /* : void */
|
||||
public function setStyle(string $key, string $style, bool $overwrite = true) : void
|
||||
{
|
||||
if ($overwrite || !isset($this->script[$key])) {
|
||||
$this->style[$key] = $style;
|
||||
|
|
@ -259,7 +259,7 @@ class Head implements RenderableInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setScript(string $key, string $script, bool $overwrite = true) /* : void */
|
||||
public function setScript(string $key, string $script, bool $overwrite = true) : void
|
||||
{
|
||||
if ($overwrite || !isset($this->script[$key])) {
|
||||
$this->script[$key] = $script;
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ class Meta implements RenderableInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function addKeyword(string $keyword) /* : void */
|
||||
public function addKeyword(string $keyword) : void
|
||||
{
|
||||
if (!in_array($keyword, $this->keywords)) {
|
||||
$this->keywords[] = $keyword;
|
||||
|
|
@ -109,7 +109,7 @@ class Meta implements RenderableInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setAuthor(string $author) /* : void */
|
||||
public function setAuthor(string $author) : void
|
||||
{
|
||||
$this->author = $author;
|
||||
}
|
||||
|
|
@ -135,7 +135,7 @@ class Meta implements RenderableInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setCharset(string $charset) /* : void */
|
||||
public function setCharset(string $charset) : void
|
||||
{
|
||||
$this->charset = $charset;
|
||||
}
|
||||
|
|
@ -161,7 +161,7 @@ class Meta implements RenderableInterface
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setDescription(string $description) /* : void */
|
||||
public function setDescription(string $description) : void
|
||||
{
|
||||
$this->description = $description;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ class InfoManager
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function load() /* : void */
|
||||
public function load() : void
|
||||
{
|
||||
if (!file_exists($this->path)) {
|
||||
throw new PathException($this->path);
|
||||
|
|
@ -95,7 +95,7 @@ class InfoManager
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function update() /* : void */
|
||||
public function update() : void
|
||||
{
|
||||
if (!file_exists($this->path)) {
|
||||
throw new PathException((string) $this->path);
|
||||
|
|
@ -115,7 +115,7 @@ class InfoManager
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function set(string $path, $data, string $delim = '/') /* : void */
|
||||
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.');
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ class InstallerAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function registerInDatabase(DatabasePool $dbPool, InfoManager $info) /* : void */
|
||||
public static function registerInDatabase(DatabasePool $dbPool, InfoManager $info) : void
|
||||
{
|
||||
switch ($dbPool->get()->getType()) {
|
||||
case DatabaseType::MYSQL:
|
||||
|
|
@ -96,7 +96,7 @@ class InstallerAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function install(string $modulePath, DatabasePool $dbPool, InfoManager $info) /* : void */
|
||||
public static function install(string $modulePath, DatabasePool $dbPool, InfoManager $info) : void
|
||||
{
|
||||
self::registerInDatabase($dbPool, $info);
|
||||
self::initRoutes($modulePath, $info);
|
||||
|
|
@ -113,7 +113,7 @@ class InstallerAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private static function activate(DatabasePool $dbPool, InfoManager $info) /* : void */
|
||||
private static function activate(DatabasePool $dbPool, InfoManager $info) : void
|
||||
{
|
||||
/** @var ActivateAbstract $class */
|
||||
$class = '\Modules\\' . $info->getDirectory() . '\Admin\Status';
|
||||
|
|
@ -130,7 +130,7 @@ class InstallerAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function reInit(string $modulePath, InfoManager $info) /* : void */
|
||||
public static function reInit(string $modulePath, InfoManager $info) : void
|
||||
{
|
||||
self::initRoutes($modulePath, $info);
|
||||
}
|
||||
|
|
@ -147,7 +147,7 @@ class InstallerAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private static function initRoutes(string $modulePath, InfoManager $info) /* : void */
|
||||
private static function initRoutes(string $modulePath, InfoManager $info) : void
|
||||
{
|
||||
// todo: maybe use static::__DIR__ ?
|
||||
$directories = new Directory($modulePath . '/Admin/Routes');
|
||||
|
|
@ -173,7 +173,7 @@ class InstallerAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private static function installRoutes(string $destRoutePath, string $srcRoutePath) /* : void */
|
||||
private static function installRoutes(string $destRoutePath, string $srcRoutePath) : void
|
||||
{
|
||||
if (!file_exists($destRoutePath)) {
|
||||
file_put_contents($destRoutePath, '<?php return [];');
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ abstract class ModuleAbstract
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function addReceiving(string $module) /* : void */
|
||||
public function addReceiving(string $module) : void
|
||||
{
|
||||
$this->receiving[] = $module;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ class ModuleFactory
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private static function registerRequesting(ModuleAbstract $obj) /* : void */
|
||||
private static function registerRequesting(ModuleAbstract $obj) : void
|
||||
{
|
||||
foreach ($obj->getProviding() as $providing) {
|
||||
if (isset(self::$loaded[$providing])) {
|
||||
|
|
@ -119,7 +119,7 @@ class ModuleFactory
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private static function registerProvided(ModuleAbstract $obj) /* : void */
|
||||
private static function registerProvided(ModuleAbstract $obj) : void
|
||||
{
|
||||
$name = $obj->getName();
|
||||
if (isset(self::$providing[$name])) {
|
||||
|
|
|
|||
|
|
@ -361,7 +361,7 @@ class ModuleManager
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function deactivateModule(InfoManager $info) /* : void */
|
||||
private function deactivateModule(InfoManager $info) : void
|
||||
{
|
||||
$class = '\\Modules\\' . $info->getDirectory() . '\\Admin\\Status';
|
||||
|
||||
|
|
@ -419,7 +419,7 @@ class ModuleManager
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function activateModule(InfoManager $info) /* : void */
|
||||
private function activateModule(InfoManager $info) : void
|
||||
{
|
||||
$class = '\\Modules\\' . $info->getDirectory() . '\\Admin\\Status';
|
||||
|
||||
|
|
@ -442,7 +442,7 @@ class ModuleManager
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function reInit(string $module) /* : void */
|
||||
public function reInit(string $module) : void
|
||||
{
|
||||
$info = $this->loadInfo($module);
|
||||
$class = '\\Modules\\' . $info->getDirectory() . '\\Admin\\Installer';
|
||||
|
|
@ -512,7 +512,7 @@ class ModuleManager
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function installDependencies(array $dependencies) /* : void */
|
||||
private function installDependencies(array $dependencies) : void
|
||||
{
|
||||
foreach ($dependencies as $key => $version) {
|
||||
$this->install($key);
|
||||
|
|
@ -530,7 +530,7 @@ class ModuleManager
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function installModule(InfoManager $info) /* : void */
|
||||
private function installModule(InfoManager $info) : void
|
||||
{
|
||||
$class = '\\Modules\\' . $info->getDirectory() . '\\Admin\\Installer';
|
||||
|
||||
|
|
@ -554,7 +554,7 @@ class ModuleManager
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function installProviding(string $from, string $for) /* : void */
|
||||
public function installProviding(string $from, string $for) : void
|
||||
{
|
||||
if (file_exists($this->modulePath . '/' . $from . '/Admin/Install/' . $for . '.php')) {
|
||||
$class = '\\Modules\\' . $from . '\\Admin\\Install\\' . $for;
|
||||
|
|
@ -597,7 +597,7 @@ class ModuleManager
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function initModule($modules) /* : void */
|
||||
public function initModule($modules) : void
|
||||
{
|
||||
$modules = (array) $modules;
|
||||
|
||||
|
|
@ -623,7 +623,7 @@ class ModuleManager
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function initModuleController(string $module) /* : void */
|
||||
private function initModuleController(string $module) : void
|
||||
{
|
||||
try {
|
||||
$this->running[$module] = ModuleFactory::getInstance($module, $this->app);
|
||||
|
|
@ -642,7 +642,7 @@ class ModuleManager
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function initRequestModules(Request $request) /* : void */
|
||||
public function initRequestModules(Request $request) : void
|
||||
{
|
||||
$toInit = $this->getRoutedModules($request);
|
||||
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ class PackageManager
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function extract(string $path) /* : void */
|
||||
public function extract(string $path) : void
|
||||
{
|
||||
$this->extractPath = $path;
|
||||
Zip::unpack($this->path, $this->extractPath);
|
||||
|
|
@ -103,7 +103,7 @@ class PackageManager
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function load() /* : void */
|
||||
public function load() : void
|
||||
{
|
||||
if (!file_exists($this->extractPath)) {
|
||||
throw new PathException($this->extractPath);
|
||||
|
|
@ -156,7 +156,7 @@ class PackageManager
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function install() /* : void */
|
||||
public function install() : void
|
||||
{
|
||||
if (!$this->isValid()) {
|
||||
throw new \Exception();
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ class StatusAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function activate(DatabasePool $dbPool, InfoManager $info) /* : void */
|
||||
public static function activate(DatabasePool $dbPool, InfoManager $info) : void
|
||||
{
|
||||
self::activateRoutes(__DIR__ . '/../../Web/Routes.php', __DIR__ . '/../../Modules/' . $info->getDirectory() . '/Admin/Routes/http.php');
|
||||
self::activateInDatabase($dbPool, $info);
|
||||
|
|
@ -55,7 +55,7 @@ class StatusAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private static function activateRoutes(string $destRoutePath, string $srcRoutePath) /* : void */
|
||||
private static function activateRoutes(string $destRoutePath, string $srcRoutePath) : void
|
||||
{
|
||||
// todo: remove route
|
||||
}
|
||||
|
|
@ -70,7 +70,7 @@ class StatusAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function activateInDatabase(DatabasePool $dbPool, InfoManager $info) /* : void */
|
||||
public static function activateInDatabase(DatabasePool $dbPool, InfoManager $info) : void
|
||||
{
|
||||
switch ($dbPool->get()->getType()) {
|
||||
case DatabaseType::MYSQL:
|
||||
|
|
@ -102,7 +102,7 @@ class StatusAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function deactivate(DatabasePool $dbPool, InfoManager $info) /* : void */
|
||||
public static function deactivate(DatabasePool $dbPool, InfoManager $info) : void
|
||||
{
|
||||
self::deactivateRoutes(__DIR__ . '/../../Web/Routes.php', __DIR__ . '/../../Modules/' . $info->getDirectory() . '/Admin/Routes/http.php');
|
||||
self::deactivateInDatabase($dbPool, $info);
|
||||
|
|
@ -118,7 +118,7 @@ class StatusAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private static function deactivateRoutes(string $destRoutePath, string $srcRoutePath) /* : void */
|
||||
private static function deactivateRoutes(string $destRoutePath, string $srcRoutePath) : void
|
||||
{
|
||||
// todo: remove route
|
||||
}
|
||||
|
|
@ -133,7 +133,7 @@ class StatusAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function deactivateInDatabase(DatabasePool $dbPool, InfoManager $info) /* : void */
|
||||
public static function deactivateInDatabase(DatabasePool $dbPool, InfoManager $info) : void
|
||||
{
|
||||
switch ($dbPool->get()->getType()) {
|
||||
case DatabaseType::MYSQL:
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class UninstallerAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function uninstall(DatabasePool $dbPool, InfoManager $info) /* : void */
|
||||
public static function uninstall(DatabasePool $dbPool, InfoManager $info) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class UpdaterAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function update(DatabasePool $dbPool, InfoManager $info) /* : void */
|
||||
public static function update(DatabasePool $dbPool, InfoManager $info) : void
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ class Router
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function add(string $route, $destination, int $verb = RouteVerb::GET) /* : void */
|
||||
public function add(string $route, $destination, int $verb = RouteVerb::GET) : void
|
||||
{
|
||||
if (!isset($this->routes[$route])) {
|
||||
$this->routes[$route] = [];
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ class Client extends SocketAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function disconnect() /* : void */
|
||||
private function disconnect() : void
|
||||
{
|
||||
$this->run = false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ class ClientConnection
|
|||
return $this->socket;
|
||||
}
|
||||
|
||||
public function setSocket($socket) /* : void */
|
||||
public function setSocket($socket) : void
|
||||
{
|
||||
$this->socket = $socket;
|
||||
}
|
||||
|
|
@ -56,7 +56,7 @@ class ClientConnection
|
|||
return $this->handshake;
|
||||
}
|
||||
|
||||
public function setHandshake($handshake) /* : void */
|
||||
public function setHandshake($handshake) : void
|
||||
{
|
||||
$this->handshake = $handshake;
|
||||
}
|
||||
|
|
@ -66,7 +66,7 @@ class ClientConnection
|
|||
return $this->pid;
|
||||
}
|
||||
|
||||
public function setPid($pid) /* : void */
|
||||
public function setPid($pid) : void
|
||||
{
|
||||
$this->pid = $pid;
|
||||
}
|
||||
|
|
@ -76,7 +76,7 @@ class ClientConnection
|
|||
return $this->connected;
|
||||
}
|
||||
|
||||
public function setConnected(bool $connected) /* : void */
|
||||
public function setConnected(bool $connected) : void
|
||||
{
|
||||
$this->connected = $connected;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ class Header implements \Serializable
|
|||
return $this->sendFrom;
|
||||
}
|
||||
|
||||
public function setSendFrom($sendFrom) /* : void */
|
||||
public function setSendFrom($sendFrom) : void
|
||||
{
|
||||
$this->sendFrom = $sendFrom;
|
||||
}
|
||||
|
|
@ -69,7 +69,7 @@ class Header implements \Serializable
|
|||
return $this->sendTo;
|
||||
}
|
||||
|
||||
public function setSendTo($sendTo) /* : void */
|
||||
public function setSendTo($sendTo) : void
|
||||
{
|
||||
$this->sendTo = $sendTo;
|
||||
}
|
||||
|
|
@ -91,7 +91,7 @@ class Header implements \Serializable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setLength($length) /* : void */
|
||||
public function setLength($length) : void
|
||||
{
|
||||
$this->length = $length;
|
||||
}
|
||||
|
|
@ -113,7 +113,7 @@ class Header implements \Serializable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setType(int $type) /* : void */
|
||||
public function setType(int $type) : void
|
||||
{
|
||||
$this->type = $type;
|
||||
}
|
||||
|
|
@ -135,7 +135,7 @@ class Header implements \Serializable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setSubtype($subtype) /* : void */
|
||||
public function setSubtype($subtype) : void
|
||||
{
|
||||
$this->subtype = $subtype;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ abstract class PacketAbstract implements \Serializable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setHeader(Header $header) /* : void */
|
||||
public function setHeader(Header $header) : void
|
||||
{
|
||||
$this->header = $header;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ class Server extends SocketAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setLimit(int $limit) /* : void */
|
||||
public function setLimit(int $limit) : void
|
||||
{
|
||||
$this->limit = $limit;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ class Address implements \JsonSerializable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setRecipient(string $recipient) /* : void */
|
||||
public function setRecipient(string $recipient) : void
|
||||
{
|
||||
$this->recipient = $recipient;
|
||||
}
|
||||
|
|
@ -106,7 +106,7 @@ class Address implements \JsonSerializable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setFAO(string $fao) /* : void */
|
||||
public function setFAO(string $fao) : void
|
||||
{
|
||||
$this->fao = $fao;
|
||||
}
|
||||
|
|
@ -132,7 +132,7 @@ class Address implements \JsonSerializable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setLocation(Location $location) /* : void */
|
||||
public function setLocation(Location $location) : void
|
||||
{
|
||||
$this->location = $location;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ class Iban implements \Serializable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function parse(string $iban) /* : void */
|
||||
private function parse(string $iban) : void
|
||||
{
|
||||
$this->iban = self::normalize($iban);
|
||||
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ class Location implements \JsonSerializable, \Serializable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setType(int $type) /* : void */
|
||||
public function setType(int $type) : void
|
||||
{
|
||||
$this->type = $type;
|
||||
}
|
||||
|
|
@ -157,7 +157,7 @@ class Location implements \JsonSerializable, \Serializable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setPostal(string $postal) /* : void */
|
||||
public function setPostal(string $postal) : void
|
||||
{
|
||||
$this->postal = $postal;
|
||||
}
|
||||
|
|
@ -183,7 +183,7 @@ class Location implements \JsonSerializable, \Serializable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setCity(string $city) /* : void */
|
||||
public function setCity(string $city) : void
|
||||
{
|
||||
$this->city = $city;
|
||||
}
|
||||
|
|
@ -209,7 +209,7 @@ class Location implements \JsonSerializable, \Serializable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setCountry(string $country) /* : void */
|
||||
public function setCountry(string $country) : void
|
||||
{
|
||||
$this->country = $country;
|
||||
}
|
||||
|
|
@ -235,7 +235,7 @@ class Location implements \JsonSerializable, \Serializable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setAddress(string $address) /* : void */
|
||||
public function setAddress(string $address) : void
|
||||
{
|
||||
$this->address = $address;
|
||||
}
|
||||
|
|
@ -261,7 +261,7 @@ class Location implements \JsonSerializable, \Serializable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setState(string $state) /* : void */
|
||||
public function setState(string $state) : void
|
||||
{
|
||||
$this->state = $state;
|
||||
}
|
||||
|
|
@ -287,7 +287,7 @@ class Location implements \JsonSerializable, \Serializable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setGeo(array $geo) /* : void */
|
||||
public function setGeo(array $geo) : void
|
||||
{
|
||||
$this->geo = $geo;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ class BinaryTree extends Tree
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function inOrder(Node $node, \Closure $callback) /* : void */
|
||||
public function inOrder(Node $node, \Closure $callback) : void
|
||||
{
|
||||
$this->inOrder($this->getLeft($node), $callback);
|
||||
$callback($node);
|
||||
|
|
@ -145,7 +145,7 @@ class BinaryTree extends Tree
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function getVerticalOrder(Node $node, int $horizontalDistance = 0, array &$order) /* : void */
|
||||
private function getVerticalOrder(Node $node, int $horizontalDistance = 0, array &$order) : void
|
||||
{
|
||||
if (!isset($order[$horizontalDistance])) {
|
||||
$order[$horizontalDistance] = [];
|
||||
|
|
@ -174,7 +174,7 @@ class BinaryTree extends Tree
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function verticalOrder(Node $node, \Closure $callback) /* : void */
|
||||
public function verticalOrder(Node $node, \Closure $callback) : void
|
||||
{
|
||||
$order = [];
|
||||
$this->getVerticalOrder($node, 0, $order);
|
||||
|
|
|
|||
|
|
@ -214,7 +214,7 @@ class Tree extends Graph
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function preOrder(Node $node, \Closure $callback) /* : void */
|
||||
public function preOrder(Node $node, \Closure $callback) : void
|
||||
{
|
||||
if (count($this->nodes) === 0) {
|
||||
return;
|
||||
|
|
@ -239,7 +239,7 @@ class Tree extends Graph
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function postOrder(Node $node, \Closure $callback) /* : void */
|
||||
public function postOrder(Node $node, \Closure $callback) : void
|
||||
{
|
||||
if (count($this->nodes) === 0) {
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ class MultiMap implements \Countable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function garbageCollect() /* : void */
|
||||
private function garbageCollect() : void
|
||||
{
|
||||
/* garbage collect keys */
|
||||
foreach ($this->keys as $key => $keyValue) {
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ class PriorityQueue implements \Countable, \Serializable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function increaseAll(float $increase = 0.1) /* : void */
|
||||
public function increaseAll(float $increase = 0.1) : void
|
||||
{
|
||||
foreach ($this->queue as $key => &$ele) {
|
||||
$ele['priority'] += $increase;
|
||||
|
|
@ -121,7 +121,7 @@ class PriorityQueue implements \Countable, \Serializable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function delete(int $id = null) /* : void */
|
||||
public function delete(int $id = null) : void
|
||||
{
|
||||
if ($id === null) {
|
||||
$this->remove();
|
||||
|
|
@ -152,7 +152,7 @@ class PriorityQueue implements \Countable, \Serializable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setPriority(int $id, float $priority) /* : void */
|
||||
public function setPriority(int $id, float $priority) : void
|
||||
{
|
||||
$this->queue[$id]['priority'] = $priority;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ class Directory extends FileAbstract implements DirectoryInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function index() /* : void */
|
||||
public function index() : void
|
||||
{
|
||||
parent::index();
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ class File extends FileAbstract implements FileInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function index() /* : void */
|
||||
public function index() : void
|
||||
{
|
||||
parent::index();
|
||||
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ abstract class FileAbstract implements ContainerInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function index() /* : void */
|
||||
public function index() : void
|
||||
{
|
||||
$this->createdAt->setTimestamp(filemtime($this->path));
|
||||
$this->changedAt->setTimestamp(filectime($this->path));
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ final class UnhandledHandler
|
|||
* @since 1.0.0
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public static function exceptionHandler(\Throwable $e) /* : void */
|
||||
public static function exceptionHandler(\Throwable $e) : void
|
||||
{
|
||||
$logger = FileLogger::getInstance(__DIR__ . '/../Logs');
|
||||
$logger->critical(FileLogger::MSG_FULL, [
|
||||
|
|
@ -93,7 +93,7 @@ final class UnhandledHandler
|
|||
* @since 1.0.0
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public static function shutdownHandler() /* : void */
|
||||
public static function shutdownHandler() : void
|
||||
{
|
||||
$e = error_get_last();
|
||||
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ class Http implements UriInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function set(string $uri) /* : void */
|
||||
public function set(string $uri) : void
|
||||
{
|
||||
$this->uri = $uri;
|
||||
$url = parse_url($this->uri);
|
||||
|
|
@ -203,7 +203,7 @@ class Http implements UriInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setRootPath(string $root) /* : void */
|
||||
public function setRootPath(string $root) : void
|
||||
{
|
||||
$this->rootPath = $root;
|
||||
$this->set($this->uri);
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ class UriFactory
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function getQuery(string $key) /* : ?string */
|
||||
public static function getQuery(string $key) : ?string
|
||||
{
|
||||
return self::$uri[$key] ?? null;
|
||||
}
|
||||
|
|
@ -104,7 +104,7 @@ class UriFactory
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function setupUriBuilder(UriInterface $uri) /* : void */
|
||||
public static function setupUriBuilder(UriInterface $uri) : void
|
||||
{
|
||||
self::setQuery('/scheme', $uri->getScheme());
|
||||
self::setQuery('/host', $uri->getHost());
|
||||
|
|
@ -225,7 +225,7 @@ class UriFactory
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function build(string $uri, array $toMatch = []) /* : ?string */
|
||||
public static function build(string $uri, array $toMatch = []) : ?string
|
||||
{
|
||||
$parsed = preg_replace_callback('(\{[\/#\?%@\.\$][a-zA-Z0-9\-]*\})', function ($match) use ($toMatch) {
|
||||
$match = substr($match[0], 1, strlen($match[0]) - 2);
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@ class ArrayUtils
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function getArg(string $id, array $args) /* : ?string */
|
||||
public static function getArg(string $id, array $args) : ?string
|
||||
{
|
||||
if (($key = array_search($id, $args)) === false || $key === count($args) - 1) {
|
||||
return null;
|
||||
|
|
@ -303,7 +303,7 @@ class ArrayUtils
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function hasArg(string $id, array $args) /* : ?int */
|
||||
public static function hasArg(string $id, array $args) : ?int
|
||||
{
|
||||
if (($key = array_search($id, $args)) === false) {
|
||||
return null;
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ abstract class C128Abstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setDimension(int $width, int $height) /* : void */
|
||||
public function setDimension(int $width, int $height) : void
|
||||
{
|
||||
if ($width < 0) {
|
||||
throw new \OutOfBoundsException($width);
|
||||
|
|
@ -173,7 +173,7 @@ abstract class C128Abstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setMargin(int $margin) /* : void */
|
||||
public function setMargin(int $margin) : void
|
||||
{
|
||||
$this->margin = $margin;
|
||||
}
|
||||
|
|
@ -187,7 +187,7 @@ abstract class C128Abstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setOrientation(int $orientation) /* : void */
|
||||
public function setOrientation(int $orientation) : void
|
||||
{
|
||||
if (!OrientationType::isValidValue($orientation)) {
|
||||
throw new InvalidEnumValue($orientation);
|
||||
|
|
@ -217,7 +217,7 @@ abstract class C128Abstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setContent(string $content) /* : void */
|
||||
public function setContent(string $content) : void
|
||||
{
|
||||
$this->content = $content;
|
||||
}
|
||||
|
|
@ -245,7 +245,7 @@ abstract class C128Abstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function saveToPngFile(string $file) /* : void */
|
||||
public function saveToPngFile(string $file) : void
|
||||
{
|
||||
$res = $this->get();
|
||||
|
||||
|
|
@ -262,7 +262,7 @@ abstract class C128Abstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function saveToJpgFile(string $file) /* : void */
|
||||
public function saveToJpgFile(string $file) : void
|
||||
{
|
||||
$res = $this->get();
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ class C128a extends C128Abstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setContent(string $content) /* : void */
|
||||
public function setContent(string $content) : void
|
||||
{
|
||||
parent::setContent(strtoupper($content));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ class C25 extends C128Abstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setContent(string $content) /* : void */
|
||||
public function setContent(string $content) : void
|
||||
{
|
||||
if (!ctype_digit($content)) {
|
||||
throw new \InvalidArgumentException($content);
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ class C39 extends C128Abstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setContent(string $content) /* : void */
|
||||
public function setContent(string $content) : void
|
||||
{
|
||||
parent::setContent(strtoupper($content));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ class Codebar extends C128Abstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setContent(string $content) /* : void */
|
||||
public function setContent(string $content) : void
|
||||
{
|
||||
parent::setContent(strtoupper($content));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ class HIBCC
|
|||
|
||||
}
|
||||
|
||||
public function setIdentifier(string $identifier) /* : void */
|
||||
public function setIdentifier(string $identifier) : void
|
||||
{
|
||||
$this->identifier = $identifier;
|
||||
}
|
||||
|
|
@ -55,7 +55,7 @@ class HIBCC
|
|||
return $this->identifier;
|
||||
}
|
||||
|
||||
public function setProductId(string $id) /* : void */
|
||||
public function setProductId(string $id) : void
|
||||
{
|
||||
$this->productId = $id;
|
||||
}
|
||||
|
|
@ -65,7 +65,7 @@ class HIBCC
|
|||
return $this->productId;
|
||||
}
|
||||
|
||||
public function setMeasureOfUnit(int $measure) /* : void */
|
||||
public function setMeasureOfUnit(int $measure) : void
|
||||
{
|
||||
$this->measureOfUnit = $measure;
|
||||
}
|
||||
|
|
@ -75,7 +75,7 @@ class HIBCC
|
|||
return $this->measureOfUnit;
|
||||
}
|
||||
|
||||
public function setDateFormat(string $format) /* : void */
|
||||
public function setDateFormat(string $format) : void
|
||||
{
|
||||
$this->dateFormat = $format;
|
||||
}
|
||||
|
|
@ -85,7 +85,7 @@ class HIBCC
|
|||
return $this->dateFormat();
|
||||
}
|
||||
|
||||
public function setExpirationDate(\DateTime $date) /* : void */
|
||||
public function setExpirationDate(\DateTime $date) : void
|
||||
{
|
||||
$this->expirationDate = $date;
|
||||
}
|
||||
|
|
@ -95,7 +95,7 @@ class HIBCC
|
|||
return $this->expirationDate;
|
||||
}
|
||||
|
||||
public function setPrductionDate(\DateTime $date) /* : void */
|
||||
public function setPrductionDate(\DateTime $date) : void
|
||||
{
|
||||
$this->productionDate = $date;
|
||||
}
|
||||
|
|
@ -105,7 +105,7 @@ class HIBCC
|
|||
return $this->productionDate;
|
||||
}
|
||||
|
||||
public function setLot(string $lot) /* : void */
|
||||
public function setLot(string $lot) : void
|
||||
{
|
||||
$this->lot = $lot;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ class Currency
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function resetCurrencies() /* : void */
|
||||
public static function resetCurrencies() : void
|
||||
{
|
||||
self::$ecbCurrencies = null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ final class Dictionary
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function generate(string $source) /* : void */
|
||||
public function generate(string $source) : void
|
||||
{
|
||||
$this->dictionary = [];
|
||||
$this->min = -1;
|
||||
|
|
@ -105,7 +105,7 @@ final class Dictionary
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function fill(array $entry, string $value = '') /* : void */
|
||||
private function fill(array $entry, string $value = '') : void
|
||||
{
|
||||
if (!is_array($entry[0][1])) {
|
||||
$this->set($entry[0][1], $value . '0');
|
||||
|
|
@ -134,7 +134,7 @@ final class Dictionary
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function set(string $entry, string $value) /* : void */
|
||||
public function set(string $entry, string $value) : void
|
||||
{
|
||||
if (strlen($entry) !== 1) {
|
||||
throw new \InvalidArgumentException('Must be a character.');
|
||||
|
|
@ -194,7 +194,7 @@ final class Dictionary
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getEntry(&$value) /* : ?string */
|
||||
public function getEntry(&$value) : ?string
|
||||
{
|
||||
$length = strlen($value);
|
||||
if ($length < $this->min) {
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ final class Huffman
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function removeDictionary() /* : void */
|
||||
public function removeDictionary() : void
|
||||
{
|
||||
$this->dictionary = null;
|
||||
}
|
||||
|
|
@ -65,7 +65,7 @@ final class Huffman
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setDictionary(Dictionary $dictionary) /* : void */
|
||||
public function setDictionary(Dictionary $dictionary) : void
|
||||
{
|
||||
$this->dictionary = $dictionary;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ class Author
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setCommitCount(int $count) /* : void */
|
||||
public function setCommitCount(int $count) : void
|
||||
{
|
||||
$this->commitCount = $count;
|
||||
}
|
||||
|
|
@ -137,7 +137,7 @@ class Author
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setAdditionCount(int $count) /* : void */
|
||||
public function setAdditionCount(int $count) : void
|
||||
{
|
||||
$this->additionsCount = $count;
|
||||
}
|
||||
|
|
@ -163,7 +163,7 @@ class Author
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setRemovalCount(int $count) /* : void */
|
||||
public function setRemovalCount(int $count) : void
|
||||
{
|
||||
$this->removalsCount = $count;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ class Branch
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setName(string $name) /* : void */
|
||||
public function setName(string $name) : void
|
||||
{
|
||||
$this->name = $name;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ class Commit
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setMessage(string $message) /* : void */
|
||||
public function setMessage(string $message) : void
|
||||
{
|
||||
$this->message = $message;
|
||||
}
|
||||
|
|
@ -215,7 +215,7 @@ class Commit
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setAuthor(Author $author) /* : void */
|
||||
public function setAuthor(Author $author) : void
|
||||
{
|
||||
$this->author = $author;
|
||||
}
|
||||
|
|
@ -241,7 +241,7 @@ class Commit
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setBranch(Branch $branch) /* : void */
|
||||
public function setBranch(Branch $branch) : void
|
||||
{
|
||||
$this->branch = $branch;
|
||||
}
|
||||
|
|
@ -267,7 +267,7 @@ class Commit
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setTag(Tag $tag) /* : void */
|
||||
public function setTag(Tag $tag) : void
|
||||
{
|
||||
$this->tag = $tag;
|
||||
}
|
||||
|
|
@ -293,7 +293,7 @@ class Commit
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setDate(\DateTime $date) /* : void */
|
||||
public function setDate(\DateTime $date) : void
|
||||
{
|
||||
$this->date = $date;
|
||||
}
|
||||
|
|
@ -319,7 +319,7 @@ class Commit
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setRepository(Repository $repository) /* : void */
|
||||
public function setRepository(Repository $repository) : void
|
||||
{
|
||||
$this->repository = $repository;
|
||||
}
|
||||
|
|
@ -338,7 +338,7 @@ class Commit
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function addChange(string $path, int $line, string $old, string $new) /* : void */
|
||||
private function addChange(string $path, int $line, string $old, string $new) : void
|
||||
{
|
||||
if (!isset($this->files[$path])) {
|
||||
throw new \Exception();
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ class Git
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function setBin(string $path) /* : void */
|
||||
public static function setBin(string $path) : void
|
||||
{
|
||||
if (realpath($path) === false) {
|
||||
throw new PathException($path);
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ class Repository
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function setPath(string $path) /* : void */
|
||||
private function setPath(string $path) : void
|
||||
{
|
||||
if (!is_dir($path)) {
|
||||
throw new PathException($path);
|
||||
|
|
@ -601,7 +601,7 @@ class Repository
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setDescription(string $description) /* : void */
|
||||
public function setDescription(string $description) : void
|
||||
{
|
||||
file_put_contents($this->getDirectoryPath(), $description);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ class Tag
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setMessage(string $message) /* : void */
|
||||
public function setMessage(string $message) : void
|
||||
{
|
||||
$this->message = $message;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ class CsvDatabaseMapper implements IODatabaseMapper
|
|||
$this->sources = array_unique($this->sources);
|
||||
}
|
||||
|
||||
public function setSources(array $sources) /* : void */
|
||||
public function setSources(array $sources) : void
|
||||
{
|
||||
$this->sources = $sources;
|
||||
}
|
||||
|
|
@ -54,7 +54,7 @@ class CsvDatabaseMapper implements IODatabaseMapper
|
|||
$this->autoIdentifyCsvSettings = $identify;
|
||||
}
|
||||
|
||||
public function setLineBuffer(int $buffer) /* : void */
|
||||
public function setLineBuffer(int $buffer) : void
|
||||
{
|
||||
$this->lineBuffer = $buffer;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,12 +27,12 @@ class ExcelDatabaseMapper implements IODatabaseMapper
|
|||
$this->sources[] = $source;
|
||||
}
|
||||
|
||||
public function setLineBuffer(int $buffer) /* : void */
|
||||
public function setLineBuffer(int $buffer) : void
|
||||
{
|
||||
$this->lineBuffer = $buffer;
|
||||
}
|
||||
|
||||
public function setSources(array $sources) /* : void */
|
||||
public function setSources(array $sources) : void
|
||||
{
|
||||
$this->sources = $sources;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ class Job
|
|||
return $this->priority;
|
||||
}
|
||||
|
||||
public function setPriority(float $priority) /* : void */
|
||||
public function setPriority(float $priority) : void
|
||||
{
|
||||
$this->priority = $priority;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ class JobQueue
|
|||
register_shutdown_function(function() { posix_kill(posix_getpid(), SIGHUP); });
|
||||
}
|
||||
|
||||
public function setRunning(bool $run = true) /* : void */
|
||||
public function setRunning(bool $run = true) : void
|
||||
{
|
||||
$this->run = $run;
|
||||
$this->suspended = $run;
|
||||
|
|
@ -114,7 +114,7 @@ class JobQueue
|
|||
return $this->suspended;
|
||||
}
|
||||
|
||||
public function setSuspended(bool $suspended = true) /* : void */
|
||||
public function setSuspended(bool $suspended = true) : void
|
||||
{
|
||||
$this->suspended = $suspended;
|
||||
}
|
||||
|
|
@ -124,7 +124,7 @@ class JobQueue
|
|||
return $this->isTerminating;
|
||||
}
|
||||
|
||||
public function setTerminating(bool $terminating = true) /* : void */
|
||||
public function setTerminating(bool $terminating = true) : void
|
||||
{
|
||||
$this->isTerminating = $terminating;
|
||||
}
|
||||
|
|
@ -134,7 +134,7 @@ class JobQueue
|
|||
return $this->isDeamonized;
|
||||
}
|
||||
|
||||
public function setDeamonized(bool $deamonized) /* : void */
|
||||
public function setDeamonized(bool $deamonized) : void
|
||||
{
|
||||
$this->isDeamonized = $deamonized;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ class JsonBuilder implements \Serializable, \JsonSerializable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function add(string $path, $value, bool $overwrite = true) /* : void */
|
||||
public function add(string $path, $value, bool $overwrite = true) : void
|
||||
{
|
||||
$this->json = ArrayUtils::setArray($path, $this->json, $value, '/', $overwrite);
|
||||
}
|
||||
|
|
@ -79,7 +79,7 @@ class JsonBuilder implements \Serializable, \JsonSerializable
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function remove(string $path) /* : void */
|
||||
public function remove(string $path) : void
|
||||
{
|
||||
$this->json = ArrayUtils::unsetArray($path, $this->json, '/');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -355,7 +355,7 @@ class Markdown
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static function blockCode(array $lineArray, array $block = null) /* : ?array */
|
||||
protected static function blockCode(array $lineArray, array $block = null) : ?array
|
||||
{
|
||||
if ($block !== null && !isset($block['type']) && !isset($block['interrupted'])) {
|
||||
return;
|
||||
|
|
@ -387,7 +387,7 @@ class Markdown
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static function blockCodeContinue(array $lineArray, array $block) /* : ?array */
|
||||
protected static function blockCodeContinue(array $lineArray, array $block) : ?array
|
||||
{
|
||||
if ($lineArray['indent'] < 4) {
|
||||
return;
|
||||
|
|
@ -428,7 +428,7 @@ class Markdown
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static function blockFencedCode(array $lineArray) /* : ?array */
|
||||
protected static function blockFencedCode(array $lineArray) : ?array
|
||||
{
|
||||
if (!preg_match('/^[' . $lineArray['text'][0] . ']{3,}[ ]*([^`]+)?[ ]*$/', $lineArray['text'], $matches)) {
|
||||
return;
|
||||
|
|
@ -465,7 +465,7 @@ class Markdown
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static function blockFencedCodeContinue(array $lineArray, array $block) /* : ?array */
|
||||
protected static function blockFencedCodeContinue(array $lineArray, array $block) : ?array
|
||||
{
|
||||
if (isset($block['complete'])) {
|
||||
return;
|
||||
|
|
@ -512,7 +512,7 @@ class Markdown
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static function blockHeader(array $lineArray) /* : ?array */
|
||||
protected static function blockHeader(array $lineArray) : ?array
|
||||
{
|
||||
if (!isset($lineArray['text'][1])) {
|
||||
return;
|
||||
|
|
@ -545,7 +545,7 @@ class Markdown
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static function blockList(array $lineArray) /* : ?array */
|
||||
protected static function blockList(array $lineArray) : ?array
|
||||
{
|
||||
list($name, $pattern) = $lineArray['text'][0] <= '-' ? ['ul', '[*+-]'] : ['ol', '[0-9]+[.]'];
|
||||
|
||||
|
|
@ -593,7 +593,7 @@ class Markdown
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static function blockListContinue(array $lineArray, array $block) /* : ?array */
|
||||
protected static function blockListContinue(array $lineArray, array $block) : ?array
|
||||
{
|
||||
if ($block['indent'] === $lineArray['indent'] && preg_match('/^' . $block['pattern'] . '(?:[ ]+(.*)|$)/', $lineArray['text'], $matches)) {
|
||||
if (isset($block['interrupted'])) {
|
||||
|
|
@ -646,7 +646,7 @@ class Markdown
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static function blockQuote(array $lineArray) /* : ?array */
|
||||
protected static function blockQuote(array $lineArray) : ?array
|
||||
{
|
||||
if (!preg_match('/^>[ ]?(.*)/', $lineArray['text'], $matches)) {
|
||||
return;
|
||||
|
|
@ -671,7 +671,7 @@ class Markdown
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static function blockQuoteContinue(array $lineArray, array $block) /* : ?array */
|
||||
protected static function blockQuoteContinue(array $lineArray, array $block) : ?array
|
||||
{
|
||||
if ($lineArray['text'][0] === '>' && preg_match('/^>[ ]?(.*)/', $lineArray['text'], $matches)) {
|
||||
if (isset($block['interrupted'])) {
|
||||
|
|
@ -701,7 +701,7 @@ class Markdown
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static function blockRule(array $lineArray) /* : ?array */
|
||||
protected static function blockRule(array $lineArray) : ?array
|
||||
{
|
||||
if (!preg_match('/^([' . $lineArray['text'][0] . '])([ ]*\1){2,}[ ]*$/', $lineArray['text'])) {
|
||||
return;
|
||||
|
|
@ -724,7 +724,7 @@ class Markdown
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static function blockSetextHeader(array $lineArray, array $block = null) /* : ?array */
|
||||
protected static function blockSetextHeader(array $lineArray, array $block = null) : ?array
|
||||
{
|
||||
if (!isset($block) || isset($block['type']) || isset($block['interrupted'])) {
|
||||
return;
|
||||
|
|
@ -748,7 +748,7 @@ class Markdown
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static function blockReference(array $lineArray) /* : ?array */
|
||||
protected static function blockReference(array $lineArray) : ?array
|
||||
{
|
||||
if (!preg_match('/^\[(.+?)\]:[ ]*<?(\S+?)>?(?:[ ]+["\'(](.+)["\')])?[ ]*$/', $lineArray['text'], $matches)) {
|
||||
return;
|
||||
|
|
@ -774,7 +774,7 @@ class Markdown
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static function blockTable($lineArray, array $block = null) /* : ?array */
|
||||
protected static function blockTable($lineArray, array $block = null) : ?array
|
||||
{
|
||||
if (!isset($block) || isset($block['type']) || isset($block['interrupted'])) {
|
||||
return;
|
||||
|
|
@ -869,7 +869,7 @@ class Markdown
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static function blockTableContinue(array $lineArray, array $block) /* : ?array */
|
||||
protected static function blockTableContinue(array $lineArray, array $block) : ?array
|
||||
{
|
||||
if (isset($block['interrupted'])) {
|
||||
return;
|
||||
|
|
@ -989,7 +989,7 @@ class Markdown
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static function inlineCode(array $excerpt) /* : ?array */
|
||||
protected static function inlineCode(array $excerpt) : ?array
|
||||
{
|
||||
$marker = $excerpt['text'][0];
|
||||
|
||||
|
|
@ -1015,7 +1015,7 @@ class Markdown
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static function inlineEmailTag(array $excerpt) /* : ?array */
|
||||
protected static function inlineEmailTag(array $excerpt) : ?array
|
||||
{
|
||||
if (strpos($excerpt['text'], '>') === false || !preg_match('/^<((mailto:)?\S+?@\S+?)>/i', $excerpt['text'], $matches)) {
|
||||
return;
|
||||
|
|
@ -1048,7 +1048,7 @@ class Markdown
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static function inlineEmphasis(array $excerpt) /* : ?array */
|
||||
protected static function inlineEmphasis(array $excerpt) : ?array
|
||||
{
|
||||
if (!isset($excerpt['text'][1])) {
|
||||
return;
|
||||
|
|
@ -1083,7 +1083,7 @@ class Markdown
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static function inlineEscapeSequence(array $excerpt) /* : ?array */
|
||||
protected static function inlineEscapeSequence(array $excerpt) : ?array
|
||||
{
|
||||
if (!isset($excerpt['text'][1]) || !in_array($excerpt['text'][1], self::$specialCharacters)) {
|
||||
return;
|
||||
|
|
@ -1104,7 +1104,7 @@ class Markdown
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static function inlineImage(array $excerpt) /* : ?array */
|
||||
protected static function inlineImage(array $excerpt) : ?array
|
||||
{
|
||||
if (!isset($excerpt['text'][1]) || $excerpt['text'][1] !== '[') {
|
||||
return;
|
||||
|
|
@ -1144,7 +1144,7 @@ class Markdown
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static function inlineLink(array $excerpt) /* : ?array */
|
||||
protected static function inlineLink(array $excerpt) : ?array
|
||||
{
|
||||
$element = [
|
||||
'name' => 'a',
|
||||
|
|
@ -1210,7 +1210,7 @@ class Markdown
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static function inlineSpecialCharacter(array $excerpt) /* : ?array */
|
||||
protected static function inlineSpecialCharacter(array $excerpt) : ?array
|
||||
{
|
||||
if ($excerpt['text'][0] === '&' && !preg_match('/^&#?\w+;/', $excerpt['text'])) {
|
||||
return [
|
||||
|
|
@ -1238,7 +1238,7 @@ class Markdown
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static function inlineStrikethrough(array $excerpt) /* : ?array */
|
||||
protected static function inlineStrikethrough(array $excerpt) : ?array
|
||||
{
|
||||
if (!isset($excerpt['text'][1])) {
|
||||
return;
|
||||
|
|
@ -1267,7 +1267,7 @@ class Markdown
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static function inlineUrl(array $excerpt) /* : ?array */
|
||||
protected static function inlineUrl(array $excerpt) : ?array
|
||||
{
|
||||
if (!isset($excerpt['text'][2]) || $excerpt['text'][2] !== '/') {
|
||||
return;
|
||||
|
|
@ -1299,7 +1299,7 @@ class Markdown
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static function inlineUrlTag(array $excerpt) /* : ?array */
|
||||
protected static function inlineUrlTag(array $excerpt) : ?array
|
||||
{
|
||||
if (strpos($excerpt['text'], '>') === false || !preg_match('/^<(\w+:\/{2}[^ >]+)>/i', $excerpt['text'], $matches)) {
|
||||
return;
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user