Nullable+void typehint

This commit is contained in:
Dennis Eichhorn 2018-03-13 20:55:49 +01:00
parent 301aa59d61
commit 3b45692ff1
110 changed files with 417 additions and 417 deletions

View File

@ -222,7 +222,7 @@ class Account implements ArrayableInterface, \JsonSerializable
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function addGroup($group) /* : void */ public function addGroup($group) : void
{ {
$this->groups[] = $group; $this->groups[] = $group;
} }
@ -236,7 +236,7 @@ class Account implements ArrayableInterface, \JsonSerializable
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setL11n(Localization $l11n) /* : void */ public function setL11n(Localization $l11n) : void
{ {
$this->l11n = $l11n; $this->l11n = $l11n;
} }
@ -252,7 +252,7 @@ class Account implements ArrayableInterface, \JsonSerializable
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setPermissions(array $permissions) /* : void */ public function setPermissions(array $permissions) : void
{ {
$this->permissions = $permissions; $this->permissions = $permissions;
} }
@ -268,7 +268,7 @@ class Account implements ArrayableInterface, \JsonSerializable
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function addPermissions(array $permissions) /* : void */ public function addPermissions(array $permissions) : void
{ {
$this->permissions = array_merge($this->permissions, $permissions); $this->permissions = array_merge($this->permissions, $permissions);
} }
@ -284,7 +284,7 @@ class Account implements ArrayableInterface, \JsonSerializable
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function addPermission(PermissionAbstract $permission) /* : void */ public function addPermission(PermissionAbstract $permission) : void
{ {
$this->permissions[] = $permission; $this->permissions[] = $permission;
} }
@ -371,7 +371,7 @@ class Account implements ArrayableInterface, \JsonSerializable
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setName1(string $name) /* : void */ public function setName1(string $name) : void
{ {
$this->name1 = $name; $this->name1 = $name;
} }
@ -397,7 +397,7 @@ class Account implements ArrayableInterface, \JsonSerializable
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setName2(string $name) /* : void */ public function setName2(string $name) : void
{ {
$this->name2 = $name; $this->name2 = $name;
} }
@ -423,7 +423,7 @@ class Account implements ArrayableInterface, \JsonSerializable
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setName3(string $name) /* : void */ public function setName3(string $name) : void
{ {
$this->name3 = $name; $this->name3 = $name;
} }
@ -451,7 +451,7 @@ class Account implements ArrayableInterface, \JsonSerializable
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setEmail(string $email) /* : void */ public function setEmail(string $email) : void
{ {
if (!Email::isValid($email)) { if (!Email::isValid($email)) {
throw new \InvalidArgumentException(); throw new \InvalidArgumentException();
@ -483,7 +483,7 @@ class Account implements ArrayableInterface, \JsonSerializable
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setStatus(int $status) /* : void */ public function setStatus(int $status) : void
{ {
if (!AccountStatus::isValidValue($status)) { if (!AccountStatus::isValidValue($status)) {
throw new \InvalidArgumentException(); throw new \InvalidArgumentException();
@ -515,7 +515,7 @@ class Account implements ArrayableInterface, \JsonSerializable
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setType(int $type) /* : void */ public function setType(int $type) : void
{ {
if (!AccountType::isValidValue($type)) { if (!AccountType::isValidValue($type)) {
throw new \InvalidArgumentException(); throw new \InvalidArgumentException();
@ -559,7 +559,7 @@ class Account implements ArrayableInterface, \JsonSerializable
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function generatePassword(string $password) /* : void */ public function generatePassword(string $password) : void
{ {
$this->password = \password_hash($password, \PASSWORD_DEFAULT); $this->password = \password_hash($password, \PASSWORD_DEFAULT);
@ -577,7 +577,7 @@ class Account implements ArrayableInterface, \JsonSerializable
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setName(string $name) /* : void */ public function setName(string $name) : void
{ {
$this->login = $name; $this->login = $name;
} }
@ -589,7 +589,7 @@ class Account implements ArrayableInterface, \JsonSerializable
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function updateLastActive() /* : void */ public function updateLastActive() : void
{ {
$this->lastActive = new \DateTime('NOW'); $this->lastActive = new \DateTime('NOW');
} }

View File

@ -126,7 +126,7 @@ class Group implements ArrayableInterface, \JsonSerializable
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setName(string $name) /* : void */ public function setName(string $name) : void
{ {
$this->name = $name; $this->name = $name;
} }
@ -152,7 +152,7 @@ class Group implements ArrayableInterface, \JsonSerializable
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setDescription(string $description) /* : void */ public function setDescription(string $description) : void
{ {
$this->description = $description; $this->description = $description;
} }
@ -180,7 +180,7 @@ class Group implements ArrayableInterface, \JsonSerializable
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setStatus(int $status) /* : void */ public function setStatus(int $status) : void
{ {
if (!GroupStatus::isValidValue($status)) { if (!GroupStatus::isValidValue($status)) {
throw new InvalidEnumValue($status); throw new InvalidEnumValue($status);

View File

@ -118,7 +118,7 @@ class PermissionAbstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getUnit() /* : ?int */ public function getUnit() : ?int
{ {
return $this->unit; return $this->unit;
} }
@ -132,7 +132,7 @@ class PermissionAbstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setUnit(int $unit = null) /* : void */ public function setUnit(int $unit = null) : void
{ {
$this->unit = $unit; $this->unit = $unit;
} }
@ -144,7 +144,7 @@ class PermissionAbstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getApp() /* : ?string */ public function getApp() : ?string
{ {
return $this->app; return $this->app;
} }
@ -158,7 +158,7 @@ class PermissionAbstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setApp(string $app = null) /* : void */ public function setApp(string $app = null) : void
{ {
$this->app = $app; $this->app = $app;
} }
@ -170,7 +170,7 @@ class PermissionAbstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getModule() /* : ?int */ public function getModule() : ?int
{ {
return $this->module; return $this->module;
} }
@ -184,7 +184,7 @@ class PermissionAbstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setModule(int $module = null) /* : void */ public function setModule(int $module = null) : void
{ {
$this->module = $module; $this->module = $module;
} }
@ -196,7 +196,7 @@ class PermissionAbstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getFrom() /* : ?int */ public function getFrom() : ?int
{ {
return $this->from; return $this->from;
} }
@ -210,7 +210,7 @@ class PermissionAbstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setFrom(int $from = null) /* : void */ public function setFrom(int $from = null) : void
{ {
$this->from = $from; $this->from = $from;
} }
@ -222,7 +222,7 @@ class PermissionAbstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getType() /* : ?int */ public function getType() : ?int
{ {
return $this->type; return $this->type;
} }
@ -236,7 +236,7 @@ class PermissionAbstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setType(int $type = null) /* : void */ public function setType(int $type = null) : void
{ {
$this->type = $type; $this->type = $type;
} }
@ -248,7 +248,7 @@ class PermissionAbstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getElement() /* : ?int */ public function getElement() : ?int
{ {
return $this->element; return $this->element;
} }
@ -262,7 +262,7 @@ class PermissionAbstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setElement(int $element = null) /* : void */ public function setElement(int $element = null) : void
{ {
$this->element = $element; $this->element = $element;
} }
@ -274,7 +274,7 @@ class PermissionAbstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getComponent() /* : ?int */ public function getComponent() : ?int
{ {
return $this->component; return $this->component;
} }
@ -288,7 +288,7 @@ class PermissionAbstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setComponent(int $component = null) /* : void */ public function setComponent(int $component = null) : void
{ {
$this->component = $component; $this->component = $component;
} }
@ -314,7 +314,7 @@ class PermissionAbstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setPermission(int $permission = 0) /* : void */ public function setPermission(int $permission = 0) : void
{ {
$this->permission = $permission; $this->permission = $permission;
} }
@ -328,7 +328,7 @@ class PermissionAbstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function addPermission(int $permission = 0) /* : void */ public function addPermission(int $permission = 0) : void
{ {
$this->permission |= $permission; $this->permission |= $permission;
} }

View File

@ -93,7 +93,7 @@ class AssetManager implements \Countable
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function get(string $id) /* : ?string */ public function get(string $id) : ?string
{ {
if (isset($this->assets[$id])) { if (isset($this->assets[$id])) {
return $this->assets[$id]; return $this->assets[$id];

View File

@ -63,7 +63,7 @@ class Auth
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function logout(SessionInterface $session) /* : void */ public static function logout(SessionInterface $session) : void
{ {
$session->remove('UID'); $session->remove('UID');
} }

View File

@ -40,7 +40,7 @@ class Autoloader
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function defaultAutoloader(string $class) /* : void */ public static function defaultAutoloader(string $class) : void
{ {
$class = ltrim($class, '\\'); $class = ltrim($class, '\\');
$class = str_replace(['_', '\\'], '/', $class); $class = str_replace(['_', '\\'], '/', $class);

View File

@ -54,7 +54,7 @@ class NetPromoterScore
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function add(int $score) /* : void */ public function add(int $score) : void
{ {
$this->scores[] = $score; $this->scores[] = $score;
} }

View File

@ -128,7 +128,7 @@ abstract class SettingsAbstract implements OptionsInterface
* *
* @since 1.0.0 * @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); $this->setOptions($options);

View File

@ -153,7 +153,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function close() /* : void */ public function close() : void
{ {
$this->con = null; $this->con = null;
$this->status = CacheStatus::INACTIVE; $this->status = CacheStatus::INACTIVE;

View File

@ -76,7 +76,7 @@ class FileCache extends ConnectionAbstract
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function connect(array $data) /* : void */ public function connect(array $data) : void
{ {
$this->status = CacheStatus::ACTIVE; $this->status = CacheStatus::ACTIVE;
} }
@ -120,7 +120,7 @@ class FileCache extends ConnectionAbstract
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function set($key, $value, int $expire = -1) /* : void */ public function set($key, $value, int $expire = -1) : void
{ {
if ($this->status !== CacheStatus::ACTIVE) { if ($this->status !== CacheStatus::ACTIVE) {
return; return;

View File

@ -54,7 +54,7 @@ class MemCached extends ConnectionAbstract
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function connect(array $data) /* : void */ public function connect(array $data) : void
{ {
$this->status = CacheStatus::ACTIVE; $this->status = CacheStatus::ACTIVE;
} }
@ -76,7 +76,7 @@ class MemCached extends ConnectionAbstract
/** /**
* {@inheritdoc} * {@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); $this->memc->set($key, $value, false, $expire);
} }
@ -175,7 +175,7 @@ class MemCached extends ConnectionAbstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function close() /* : void */ public function close() : void
{ {
if ($this->memc !== null) { if ($this->memc !== null) {
$this->memc->close(); $this->memc->close();

View File

@ -28,14 +28,14 @@ class NullCache extends ConnectionAbstract
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function connect(array $data) /* : void */ public function connect(array $data) : void
{ {
} }
/** /**
* {@inheritdoc} * {@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} * {@inheritdoc}
*/ */
public function setStatus(int $status) /* : void */ public function setStatus(int $status) : void
{ {
} }
} }

View File

@ -30,7 +30,7 @@ class RedisCache extends ConnectionAbstract
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function connect(array $data) /* : void */ public function connect(array $data) : void
{ {
$this->status = CacheStatus::ACTIVE; $this->status = CacheStatus::ACTIVE;
} }
@ -38,7 +38,7 @@ class RedisCache extends ConnectionAbstract
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function set($key, $value, int $expire = -1) /* : void */ public function set($key, $value, int $expire = -1) : void
{ {
// TODO: Implement set() method. // TODO: Implement set() method.
} }
@ -114,7 +114,7 @@ class RedisCache extends ConnectionAbstract
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function setStatus(int $status) /* : void */ public function setStatus(int $status) : void
{ {
// TODO: Implement setStatus() method. // TODO: Implement setStatus() method.
} }

View File

@ -29,7 +29,7 @@ class WinCache extends ConnectionAbstract
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function connect(array $data) /* : void */ public function connect(array $data) : void
{ {
$this->status = CacheStatus::ACTIVE; $this->status = CacheStatus::ACTIVE;
} }
@ -37,7 +37,7 @@ class WinCache extends ConnectionAbstract
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function set($key, $value, int $expire = -1) /* : void */ public function set($key, $value, int $expire = -1) : void
{ {
// TODO: Implement set() method. // TODO: Implement set() method.
} }
@ -113,7 +113,7 @@ class WinCache extends ConnectionAbstract
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function setStatus(int $status) /* : void */ public function setStatus(int $status) : void
{ {
// TODO: Implement setStatus() method. // TODO: Implement setStatus() method.
} }

View File

@ -60,7 +60,7 @@ class CookieJar
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function lock() /* : void */ public static function lock() : void
{ {
self::$isLocked = true; self::$isLocked = true;
} }
@ -170,7 +170,7 @@ class CookieJar
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function save() /* : void */ public function save() : void
{ {
if (self::$isLocked) { if (self::$isLocked) {
throw new LockException('CookieJar'); throw new LockException('CookieJar');

View File

@ -197,7 +197,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function close() /* : void */ public function close() : void
{ {
$this->con = null; $this->con = null;
$this->status = DatabaseStatus::CLOSED; $this->status = DatabaseStatus::CLOSED;

View File

@ -54,7 +54,7 @@ class MysqlConnection extends ConnectionAbstract
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function connect(array $dbdata = null) /* : void */ public function connect(array $dbdata = null) : void
{ {
$this->dbdata = isset($dbdata) ? $dbdata : $this->dbdata; $this->dbdata = isset($dbdata) ? $dbdata : $this->dbdata;

View File

@ -52,7 +52,7 @@ class SqlServerConnection extends ConnectionAbstract
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function connect(array $dbdata = null) /* : void */ public function connect(array $dbdata = null) : void
{ {
$this->close(); $this->close();

View File

@ -199,7 +199,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function setConnection(ConnectionAbstract $con) /* : void */ public static function setConnection(ConnectionAbstract $con) : void
{ {
self::$db = $con; self::$db = $con;
} }
@ -237,7 +237,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @since 1.0.0 * @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 */ /* todo: have to implement this in the queries, so far not used */
self::$collection['primaryField'][] = $class::$primaryField; self::$collection['primaryField'][] = $class::$primaryField;
@ -262,7 +262,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @since 1.0.0 * @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 // todo: how to handle with of parent objects/extends/relations
@ -278,7 +278,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function clear() /* : void */ public static function clear() : void
{ {
self::$overwrite = true; self::$overwrite = true;
self::$primaryField = ''; self::$primaryField = '';
@ -528,7 +528,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @since 1.0.0 * @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']); $reflectionProperty = $reflectionClass->getProperty(static::$columns[static::$primaryField]['internal']);
@ -557,7 +557,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @since 1.0.0 * @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) { foreach (static::$hasMany as $propertyName => $rel) {
$property = $reflectionClass->getProperty($propertyName); $property = $reflectionClass->getProperty($propertyName);
@ -638,7 +638,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @since 1.0.0 * @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) { foreach (static::$hasMany as $propertyName => $rel) {
$values = $obj[$propertyName]; $values = $obj[$propertyName];
@ -885,7 +885,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function updateHasMany(\ReflectionClass $reflectionClass, $obj, $objId) /* : void */ private static function updateHasMany(\ReflectionClass $reflectionClass, $obj, $objId) : void
{ {
$objsIds = []; $objsIds = [];
@ -1080,7 +1080,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @since 1.0.0 * @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 = new Builder(self::$db);
$query->prefix(self::$db->getPrefix()) $query->prefix(self::$db->getPrefix())
@ -1188,7 +1188,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @since 1.0.0 * @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) { foreach (static::$hasMany as $propertyName => $rel) {
$property = $reflectionClass->getProperty($propertyName); $property = $reflectionClass->getProperty($propertyName);
@ -1306,7 +1306,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @since 1.0.0 * @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 = new Builder(self::$db);
$query->prefix(self::$db->getPrefix()) $query->prefix(self::$db->getPrefix())
@ -1474,7 +1474,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @since 1.0.0 * @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 // todo: maybe pass reflectionClass as optional parameter for performance increase
$reflectionClass = new \ReflectionClass($obj); $reflectionClass = new \ReflectionClass($obj);
@ -1510,7 +1510,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @since 1.0.0 * @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) { foreach ($result as $member => $values) {
if (!empty($values)) { if (!empty($values)) {
@ -1535,7 +1535,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @since 1.0.0 * @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); $reflectionClass = new \ReflectionClass($obj);
@ -1580,7 +1580,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @since 1.0.0 * @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) { foreach (static::$hasOne as $member => $one) {
/** @var string $mapper */ /** @var string $mapper */
@ -1601,7 +1601,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @since 1.0.0 * @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); $reflectionClass = new \ReflectionClass($obj);
@ -1646,7 +1646,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @since 1.0.0 * @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) { foreach (static::$ownsOne as $member => $one) {
/** @var string $mapper */ /** @var string $mapper */
@ -1667,7 +1667,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @since 1.0.0 * @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); $reflectionClass = new \ReflectionClass($obj);
@ -1712,7 +1712,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @since 1.0.0 * @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) { foreach (static::$belongsTo as $member => $one) {
/** @var string $mapper */ /** @var string $mapper */
@ -2218,7 +2218,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @since 1.0.0 * @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) { if (isset($depth) && $depth < 1) {
return; return;
@ -2268,7 +2268,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @since 1.0.0 * @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) { if (isset($depth) && $depth < 1) {
return null; return null;
@ -2546,7 +2546,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @since 1.0.0 * @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])) { if (!isset(self::$initObjects[$mapper])) {
self::$initObjects[$mapper] = []; self::$initObjects[$mapper] = [];
@ -2609,7 +2609,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function setUpParentMapper() /* : void */ private static function setUpParentMapper() : void
{ {
self::$parentMapper = static::class; self::$parentMapper = static::class;
} }

View File

@ -149,7 +149,7 @@ abstract class GrammarAbstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setTablePrefix(string $prefix) /* : void */ public function setTablePrefix(string $prefix) : void
{ {
$this->tablePrefix = $prefix; $this->tablePrefix = $prefix;
} }

View File

@ -238,7 +238,7 @@ class Builder extends BuilderAbstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setConnection(ConnectionAbstract $connection) /* : void */ public function setConnection(ConnectionAbstract $connection) : void
{ {
$this->connection = $connection; $this->connection = $connection;
$this->grammar = $connection->getGrammar(); $this->grammar = $connection->getGrammar();
@ -528,7 +528,7 @@ class Builder extends BuilderAbstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getWhereByColumn($column) /* : ?array */ public function getWhereByColumn($column) : ?array
{ {
return $this->wheres[self::getPublicColumnName($column)] ?? null; return $this->wheres[self::getPublicColumnName($column)] ?? null;
} }
@ -543,7 +543,7 @@ class Builder extends BuilderAbstract
* *
* @since 1.0.0 * @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) { if (($pos = strpos($expression, $systemIdentifier . '.' . $systemIdentifier)) === false) {
return null; return null;

View File

@ -57,7 +57,7 @@ class Column
return $this->column; return $this->column;
} }
public function setColumn(string $column) /* : void */ public function setColumn(string $column) : void
{ {
$this->column = $column; $this->column = $column;
} }

View File

@ -44,7 +44,7 @@ class Builder extends BuilderAbstract
$this->grammar = $connection->getSchemaGrammar(); $this->grammar = $connection->getSchemaGrammar();
} }
public function select(...$table) /* : void */ public function select(...$table) : void
{ {
$this->type = QueryType::SELECT; $this->type = QueryType::SELECT;
$this->table += $table; $this->table += $table;

View File

@ -79,7 +79,7 @@ class ConsoleSession implements SessionInterface
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function setSID($sid) /* : void */ public function setSID($sid) : void
{ {
$this->sid = $sid; $this->sid = $sid;
} }

View File

@ -114,7 +114,7 @@ class HttpSession implements SessionInterface
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private function setCsrfProtection() /* : void */ private function setCsrfProtection() : void
{ {
$this->set('UID', 0, false); $this->set('UID', 0, false);
@ -151,7 +151,7 @@ class HttpSession implements SessionInterface
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function lock() /* : void */ public function lock() : void
{ {
self::$isLocked = true; self::$isLocked = true;
} }
@ -171,7 +171,7 @@ class HttpSession implements SessionInterface
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function save() /* : void */ public function save() : void
{ {
if (!self::$isLocked) { if (!self::$isLocked) {
$_SESSION = $this->sessionData; $_SESSION = $this->sessionData;
@ -204,7 +204,7 @@ class HttpSession implements SessionInterface
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function setSID($sid) /* : void */ public function setSID($sid) : void
{ {
$this->sid = $sid; $this->sid = $sid;
} }
@ -216,7 +216,7 @@ class HttpSession implements SessionInterface
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private function destroy() /* : void */ private function destroy() : void
{ {
session_destroy(); session_destroy();
$this->sessionData = []; $this->sessionData = [];

View File

@ -79,7 +79,7 @@ class SocketSession implements SessionInterface
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function setSID($sid) /* : void */ public function setSID($sid) : void
{ {
$this->sid = $sid; $this->sid = $sid;
} }
@ -87,7 +87,7 @@ class SocketSession implements SessionInterface
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function save() /* : void */ public function save() : void
{ {
} }

View File

@ -153,7 +153,7 @@ class Dispatcher
* *
* @since 1.0.0 * @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); return $controller($this->app, ...$data);
} }
@ -194,7 +194,7 @@ class Dispatcher
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function set(ModuleAbstract $controller, string $name) /* : void */ public function set(ModuleAbstract $controller, string $name) : void
{ {
$this->controllers[$name] = $controller; $this->controllers[$name] = $controller;
} }

View File

@ -119,7 +119,7 @@ class EventManager
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private function reset(string $group) /* : void */ private function reset(string $group) : void
{ {
foreach ($this->groups[$group] as $id => $ok) { foreach ($this->groups[$group] as $id => $ok) {
$this->groups[$group][$id] = false; $this->groups[$group][$id] = false;
@ -186,7 +186,7 @@ class EventManager
* *
* @since 1.0.0 * @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])) { if (!isset($this->groups[$group])) {
$this->groups[$group] = []; $this->groups[$group] = [];

View File

@ -75,7 +75,7 @@ class L11nManager
* *
* @since 1.0.0 * @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])) { if (!isset($translation[$from])) {
throw new \UnexpectedValueException($from); throw new \UnexpectedValueException($from);
@ -103,7 +103,7 @@ class L11nManager
* *
* @since 1.0.0 * @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 = []; $lang = [];
if (file_exists($file)) { if (file_exists($file)) {

View File

@ -166,7 +166,7 @@ class Localization
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setCountry(string $country) /* : void */ public function setCountry(string $country) : void
{ {
if (!ISO3166TwoEnum::isValidValue($country)) { if (!ISO3166TwoEnum::isValidValue($country)) {
throw new InvalidEnumValue($country); throw new InvalidEnumValue($country);
@ -198,7 +198,7 @@ class Localization
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setTimezone(string $timezone) /* : void */ public function setTimezone(string $timezone) : void
{ {
if (!TimeZoneEnumArray::isValidValue($timezone)) { if (!TimeZoneEnumArray::isValidValue($timezone)) {
throw new InvalidEnumValue($timezone); throw new InvalidEnumValue($timezone);
@ -230,7 +230,7 @@ class Localization
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setLanguage(string $language) /* : void */ public function setLanguage(string $language) : void
{ {
$language = strtolower($language); $language = strtolower($language);
@ -262,7 +262,7 @@ class Localization
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setCurrency(string $currency) /* : void */ public function setCurrency(string $currency) : void
{ {
if (!ISO4217Enum::isValidValue($currency)) { if (!ISO4217Enum::isValidValue($currency)) {
throw new InvalidEnumValue($currency); throw new InvalidEnumValue($currency);
@ -292,7 +292,7 @@ class Localization
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setDatetime(string $datetime) /* : void */ public function setDatetime(string $datetime) : void
{ {
$this->datetime = $datetime; $this->datetime = $datetime;
} }
@ -318,7 +318,7 @@ class Localization
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setDecimal(string $decimal) /* : void */ public function setDecimal(string $decimal) : void
{ {
$this->decimal = $decimal; $this->decimal = $decimal;
} }
@ -344,7 +344,7 @@ class Localization
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setThousands(string $thousands) /* : void */ public function setThousands(string $thousands) : void
{ {
$this->thousands = $thousands; $this->thousands = $thousands;
} }
@ -370,7 +370,7 @@ class Localization
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setAngle(string $angle) /* : void */ public function setAngle(string $angle) : void
{ {
$this->angle = $angle; $this->angle = $angle;
} }
@ -396,7 +396,7 @@ class Localization
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setTemperature(string $temperature) /* : void */ public function setTemperature(string $temperature) : void
{ {
$this->temperature = $temperature; $this->temperature = $temperature;
} }
@ -422,7 +422,7 @@ class Localization
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setSpeed(array $speed) /* : void */ public function setSpeed(array $speed) : void
{ {
$this->speed = $speed; $this->speed = $speed;
} }
@ -448,7 +448,7 @@ class Localization
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setWeight(array $weight) /* : void */ public function setWeight(array $weight) : void
{ {
$this->weight = $weight; $this->weight = $weight;
} }
@ -474,7 +474,7 @@ class Localization
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setLength(array $length) /* : void */ public function setLength(array $length) : void
{ {
$this->length = $length; $this->length = $length;
} }
@ -500,7 +500,7 @@ class Localization
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setArea(array $area) /* : void */ public function setArea(array $area) : void
{ {
$this->area = $area; $this->area = $area;
} }
@ -526,7 +526,7 @@ class Localization
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setVolume(array $volume) /* : void */ public function setVolume(array $volume) : void
{ {
$this->volume = $volume; $this->volume = $volume;
} }

View File

@ -132,7 +132,7 @@ class Money implements \Serializable
* *
* @since 1.0.0 * @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->thousands = $thousands;
$this->decimal = $decimal; $this->decimal = $decimal;

View File

@ -117,7 +117,7 @@ class FileLogger implements LoggerInterface
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private function createFile() /* : void */ private function createFile() : void
{ {
if (!$this->created && !file_exists($this->path)) { if (!$this->created && !file_exists($this->path)) {
File::create($this->path); File::create($this->path);
@ -264,7 +264,7 @@ class FileLogger implements LoggerInterface
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private function write(string $message) /* : void */ private function write(string $message) : void
{ {
$this->createFile(); $this->createFile();
if (!is_writable($this->path)) { if (!is_writable($this->path)) {
@ -289,7 +289,7 @@ class FileLogger implements LoggerInterface
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function emergency(string $message, array $context = []) /* : void */ public function emergency(string $message, array $context = []) : void
{ {
$message = $this->interpolate($message, $context, LogLevel::EMERGENCY); $message = $this->interpolate($message, $context, LogLevel::EMERGENCY);
$this->write($message); $this->write($message);
@ -298,7 +298,7 @@ class FileLogger implements LoggerInterface
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function alert(string $message, array $context = []) /* : void */ public function alert(string $message, array $context = []) : void
{ {
$message = $this->interpolate($message, $context, LogLevel::ALERT); $message = $this->interpolate($message, $context, LogLevel::ALERT);
$this->write($message); $this->write($message);
@ -307,7 +307,7 @@ class FileLogger implements LoggerInterface
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function critical(string $message, array $context = []) /* : void */ public function critical(string $message, array $context = []) : void
{ {
$message = $this->interpolate($message, $context, LogLevel::CRITICAL); $message = $this->interpolate($message, $context, LogLevel::CRITICAL);
$this->write($message); $this->write($message);
@ -316,7 +316,7 @@ class FileLogger implements LoggerInterface
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function error(string $message, array $context = []) /* : void */ public function error(string $message, array $context = []) : void
{ {
$message = $this->interpolate($message, $context, LogLevel::ERROR); $message = $this->interpolate($message, $context, LogLevel::ERROR);
$this->write($message); $this->write($message);
@ -325,7 +325,7 @@ class FileLogger implements LoggerInterface
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function warning(string $message, array $context = []) /* : void */ public function warning(string $message, array $context = []) : void
{ {
$message = $this->interpolate($message, $context, LogLevel::WARNING); $message = $this->interpolate($message, $context, LogLevel::WARNING);
$this->write($message); $this->write($message);
@ -334,7 +334,7 @@ class FileLogger implements LoggerInterface
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function notice(string $message, array $context = []) /* : void */ public function notice(string $message, array $context = []) : void
{ {
$message = $this->interpolate($message, $context, LogLevel::NOTICE); $message = $this->interpolate($message, $context, LogLevel::NOTICE);
$this->write($message); $this->write($message);
@ -343,7 +343,7 @@ class FileLogger implements LoggerInterface
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function info(string $message, array $context = []) /* : void */ public function info(string $message, array $context = []) : void
{ {
$message = $this->interpolate($message, $context, LogLevel::INFO); $message = $this->interpolate($message, $context, LogLevel::INFO);
$this->write($message); $this->write($message);
@ -352,7 +352,7 @@ class FileLogger implements LoggerInterface
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function debug(string $message, array $context = []) /* : void */ public function debug(string $message, array $context = []) : void
{ {
$message = $this->interpolate($message, $context, LogLevel::DEBUG); $message = $this->interpolate($message, $context, LogLevel::DEBUG);
$this->write($message); $this->write($message);
@ -361,7 +361,7 @@ class FileLogger implements LoggerInterface
/** /**
* {@inheritdoc} * {@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)) { if (!LogLevel::isValidValue($level)) {
throw new InvalidEnumValue($level); throw new InvalidEnumValue($level);
@ -550,7 +550,7 @@ class FileLogger implements LoggerInterface
* *
* @since 1.0.0 * @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)) { if (empty($context)) {
$message = date('[Y-m-d H:i:s] ') . $message . "\r\n"; $message = date('[Y-m-d H:i:s] ') . $message . "\r\n";

View File

@ -89,7 +89,7 @@ class Matrix implements \ArrayAccess, \Iterator
* *
* @since 1.0.0 * @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])) { if (!isset($this->matrix[$m], $this->matrix[$m][$n])) {
throw new InvalidDimensionException($m . 'x' . $n); throw new InvalidDimensionException($m . 'x' . $n);

View File

@ -53,7 +53,7 @@ class CityPool implements \Countable
* *
* @since 1.0.0 * @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; $this->cities[$city->getName() . $city->getLatitude() . $city->getLongitude()] = $city;
} }

View File

@ -60,7 +60,7 @@ class Population implements \Countable
* *
* @since 1.0.0 * @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); $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 * @since 1.0.0
*/ */
public function set(int $index, Tour $tour) /* : void */ public function set(int $index, Tour $tour) : void
{ {
$this->tours[$index] = $tour; $this->tours[$index] = $tour;
asort($this->tours); asort($this->tours);
@ -90,7 +90,7 @@ class Population implements \Countable
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function add(Tour $tour) /* : void */ public function add(Tour $tour) : void
{ {
$this->tours[] = $tour; $this->tours[] = $tour;
} }

View File

@ -139,7 +139,7 @@ class Tour implements \Countable
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function addCity(City $city) /* : void */ public function addCity(City $city) : void
{ {
$this->cities[] = $city; $this->cities[] = $city;
@ -157,7 +157,7 @@ class Tour implements \Countable
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setCity(int $index, City $city) /* : void */ public function setCity(int $index, City $city) : void
{ {
$this->cities[$index] = $city; $this->cities[$index] = $city;
asort($this->cities); asort($this->cities);

View File

@ -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
{ {
} }

View File

@ -75,7 +75,7 @@ abstract class HeaderAbstract
* *
* @since 1.0.0 * @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 // todo: maybe pass session as member and make lock not static
self::$isLocked = true; self::$isLocked = true;
@ -114,7 +114,7 @@ abstract class HeaderAbstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setL11n(Localization $l11n) /* : void */ public function setL11n(Localization $l11n) : void
{ {
$this->l11n = $l11n; $this->l11n = $l11n;
} }
@ -140,7 +140,7 @@ abstract class HeaderAbstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setAccount(int $account) /* : void */ public function setAccount(int $account) : void
{ {
$this->account = $account; $this->account = $account;
} }
@ -154,7 +154,7 @@ abstract class HeaderAbstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setStatusCode(int $status) /* : void */ public function setStatusCode(int $status) : void
{ {
$this->status = $status; $this->status = $status;
$this->generate($status); $this->generate($status);

View File

@ -227,7 +227,7 @@ class Header extends HeaderAbstract
* @since 1.0.0 * @since 1.0.0
* @codeCoverageIgnore * @codeCoverageIgnore
*/ */
public function push() /* : void */ public function push() : void
{ {
if (self::$isLocked) { if (self::$isLocked) {
throw new \Exception('Already locked'); throw new \Exception('Already locked');
@ -247,7 +247,7 @@ class Header extends HeaderAbstract
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function generate(int $code) /* : void */ public function generate(int $code) : void
{ {
switch ($code) { switch ($code) {
case RequestStatusCode::R_403: case RequestStatusCode::R_403:
@ -277,7 +277,7 @@ class Header extends HeaderAbstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private function generate403() /* : void */ private function generate403() : void
{ {
$this->set('HTTP', 'HTTP/1.0 403 Forbidden'); $this->set('HTTP', 'HTTP/1.0 403 Forbidden');
$this->set('Status', 'Status: 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 * @since 1.0.0
*/ */
private function generate404() /* : void */ private function generate404() : void
{ {
$this->set('HTTP', 'HTTP/1.0 404 Not Found'); $this->set('HTTP', 'HTTP/1.0 404 Not Found');
$this->set('Status', 'Status: 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 * @since 1.0.0
*/ */
private function generate406() /* : void */ private function generate406() : void
{ {
$this->set('HTTP', 'HTTP/1.0 406 Not acceptable'); $this->set('HTTP', 'HTTP/1.0 406 Not acceptable');
$this->set('Status', 'Status: 406 Not acceptable'); $this->set('Status', 'Status: 406 Not acceptable');
@ -319,7 +319,7 @@ class Header extends HeaderAbstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private function generate407() /* : void */ private function generate407() : void
{ {
\http_response_code(407); \http_response_code(407);
} }
@ -331,7 +331,7 @@ class Header extends HeaderAbstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private function generate503() /* : void */ private function generate503() : void
{ {
$this->set('HTTP', 'HTTP/1.0 503 Service Temporarily Unavailable'); $this->set('HTTP', 'HTTP/1.0 503 Service Temporarily Unavailable');
$this->set('Status', 'Status: 503 Service Temporarily Unavailable'); $this->set('Status', 'Status: 503 Service Temporarily Unavailable');
@ -346,7 +346,7 @@ class Header extends HeaderAbstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private function generate500() /* : void */ private function generate500() : void
{ {
$this->set('HTTP', 'HTTP/1.0 500 Internal Server Error'); $this->set('HTTP', 'HTTP/1.0 500 Internal Server Error');
$this->set('Status', 'Status: 500 Internal Server Error'); $this->set('Status', 'Status: 500 Internal Server Error');

View File

@ -95,7 +95,7 @@ class Request extends RequestAbstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private function init() /* : void */ private function init() : void
{ {
if ($this->uri === null) { if ($this->uri === null) {
$this->initCurrentRequest(); $this->initCurrentRequest();
@ -116,7 +116,7 @@ class Request extends RequestAbstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private function initCurrentRequest() /* : void */ private function initCurrentRequest() : void
{ {
$this->uri = new Http(Http::getCurrent()); $this->uri = new Http(Http::getCurrent());
$this->data = $_GET ?? []; $this->data = $_GET ?? [];
@ -165,7 +165,7 @@ class Request extends RequestAbstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private function cleanupGlobals() /* : void */ private function cleanupGlobals() : void
{ {
unset($_FILES); unset($_FILES);
unset($_GET); unset($_GET);
@ -180,7 +180,7 @@ class Request extends RequestAbstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private function setupUriBuilder() /* : void */ private function setupUriBuilder() : void
{ {
UriFactory::setQuery('/lang', $this->header->getL11n()->getLanguage()); UriFactory::setQuery('/lang', $this->header->getL11n()->getLanguage());
@ -205,7 +205,7 @@ class Request extends RequestAbstract
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function setUri(UriInterface $uri) /* : void */ public function setUri(UriInterface $uri) : void
{ {
parent::setUri($uri); parent::setUri($uri);
$this->data += $uri->getQueryArray(); $this->data += $uri->getQueryArray();
@ -224,7 +224,7 @@ class Request extends RequestAbstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function createRequestHashs(int $start = 0) /* : void */ public function createRequestHashs(int $start = 0) : void
{ {
$this->hash = []; $this->hash = [];
$pathArray = $this->uri->getPathElements(); $pathArray = $this->uri->getPathElements();
@ -307,7 +307,7 @@ class Request extends RequestAbstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setBrowser(string $browser) /* : void */ public function setBrowser(string $browser) : void
{ {
$this->browser = $browser; $this->browser = $browser;
} }
@ -348,7 +348,7 @@ class Request extends RequestAbstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setOS(string $os) /* : void */ public function setOS(string $os) : void
{ {
$this->os = $os; $this->os = $os;
} }

View File

@ -60,7 +60,7 @@ class Response extends ResponseAbstract implements RenderableInterface
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setResponse(array $response) /* : void */ public function setResponse(array $response) : void
{ {
$this->response = $response; $this->response = $response;
} }

View File

@ -125,7 +125,7 @@ class EmailAbstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function disconnect() /* : void */ public function disconnect() : void
{ {
if ($this->con === null) { if ($this->con === null) {
imap_close($this->con); imap_close($this->con);
@ -143,7 +143,7 @@ class EmailAbstract
* *
* @since 1.0.0 * @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') . '}'; $this->mailbox = substr($this->mailbox, 0, -1) . ($this->ssl ? '/ssl/validate-cert' : '/novalidate-cert') . '}';

View File

@ -49,7 +49,7 @@ class Imap extends EmailAbstract
* *
* @since 1.0.0 * @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}'; $this->mailbox = '{' . $this->host . ':' . $this->port . '/imap}';
parent::connect(); parent::connect();

View File

@ -189,7 +189,7 @@ class Mail
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setBody(string $body) /* : void */ public function setBody(string $body) : void
{ {
$this->body = $body; $this->body = $body;
} }
@ -203,7 +203,7 @@ class Mail
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setOverview(string $overview) /* : void */ public function setOverview(string $overview) : void
{ {
$this->overview = $overview; $this->overview = $overview;
} }
@ -217,7 +217,7 @@ class Mail
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setEncoding(int $encoding) /* : void */ public function setEncoding(int $encoding) : void
{ {
$this->encoding = $encoding; $this->encoding = $encoding;
} }

View File

@ -49,7 +49,7 @@ class Nntp extends EmailAbstract
* *
* @since 1.0.0 * @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}'; $this->mailbox = '{' . $this->host . ':' . $this->port . '/nntp}';
parent::connect(); parent::connect();

View File

@ -49,7 +49,7 @@ class Pop3 extends EmailAbstract
* *
* @since 1.0.0 * @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}'; $this->mailbox = '{' . $this->host . ':' . $this->port . '/pop3}';
parent::connect(); parent::connect();

View File

@ -122,7 +122,7 @@ abstract class RequestAbstract implements MessageInterface
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setUri(UriInterface $uri) /* : void */ public function setUri(UriInterface $uri) : void
{ {
$this->uri = $uri; $this->uri = $uri;
} }
@ -160,7 +160,7 @@ abstract class RequestAbstract implements MessageInterface
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setRequestSource(int $source) /* : void */ public function setRequestSource(int $source) : void
{ {
if (!RequestSource::isValidValue($source)) { if (!RequestSource::isValidValue($source)) {
throw new InvalidEnumValue((string) $source); throw new InvalidEnumValue((string) $source);
@ -187,7 +187,7 @@ abstract class RequestAbstract implements MessageInterface
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setMethod(string $method) /* : void */ public function setMethod(string $method) : void
{ {
$this->method = $method; $this->method = $method;
} }
@ -258,7 +258,7 @@ abstract class RequestAbstract implements MessageInterface
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function lock() /* : void */ public function lock() : void
{ {
$this->lock = true; $this->lock = true;
} }

View File

@ -65,7 +65,7 @@ abstract class ResponseAbstract implements MessageInterface, \JsonSerializable
* *
* @since 1.0.0 * @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 is not working since the key kontains :: from http://
//$this->response = ArrayUtils::setArray((string) $key, $this->response, $response, ':', $overwrite); //$this->response = ArrayUtils::setArray((string) $key, $this->response, $response, ':', $overwrite);

View File

@ -132,7 +132,7 @@ class Head implements RenderableInterface
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setTitle(string $title) /* : void */ public function setTitle(string $title) : void
{ {
$this->title = $title; $this->title = $title;
} }
@ -147,7 +147,7 @@ class Head implements RenderableInterface
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function addAsset(int $type, string $uri) /* : void */ public function addAsset(int $type, string $uri) : void
{ {
$this->assets[$uri] = $type; $this->assets[$uri] = $type;
} }
@ -161,7 +161,7 @@ class Head implements RenderableInterface
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setLanguage(string $language) /* : void */ public function setLanguage(string $language) : void
{ {
$this->language = $language; $this->language = $language;
} }
@ -241,7 +241,7 @@ class Head implements RenderableInterface
* *
* @since 1.0.0 * @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])) { if ($overwrite || !isset($this->script[$key])) {
$this->style[$key] = $style; $this->style[$key] = $style;
@ -259,7 +259,7 @@ class Head implements RenderableInterface
* *
* @since 1.0.0 * @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])) { if ($overwrite || !isset($this->script[$key])) {
$this->script[$key] = $script; $this->script[$key] = $script;

View File

@ -69,7 +69,7 @@ class Meta implements RenderableInterface
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function addKeyword(string $keyword) /* : void */ public function addKeyword(string $keyword) : void
{ {
if (!in_array($keyword, $this->keywords)) { if (!in_array($keyword, $this->keywords)) {
$this->keywords[] = $keyword; $this->keywords[] = $keyword;
@ -109,7 +109,7 @@ class Meta implements RenderableInterface
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setAuthor(string $author) /* : void */ public function setAuthor(string $author) : void
{ {
$this->author = $author; $this->author = $author;
} }
@ -135,7 +135,7 @@ class Meta implements RenderableInterface
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setCharset(string $charset) /* : void */ public function setCharset(string $charset) : void
{ {
$this->charset = $charset; $this->charset = $charset;
} }
@ -161,7 +161,7 @@ class Meta implements RenderableInterface
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setDescription(string $description) /* : void */ public function setDescription(string $description) : void
{ {
$this->description = $description; $this->description = $description;
} }

View File

@ -79,7 +79,7 @@ class InfoManager
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function load() /* : void */ public function load() : void
{ {
if (!file_exists($this->path)) { if (!file_exists($this->path)) {
throw new PathException($this->path); throw new PathException($this->path);
@ -95,7 +95,7 @@ class InfoManager
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function update() /* : void */ public function update() : void
{ {
if (!file_exists($this->path)) { if (!file_exists($this->path)) {
throw new PathException((string) $this->path); throw new PathException((string) $this->path);
@ -115,7 +115,7 @@ class InfoManager
* *
* @since 1.0.0 * @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)) { if (!is_scalar($data) && !is_array($data) && !($data instanceof \JsonSerializable)) {
throw new \InvalidArgumentException('Type of $data "' . gettype($data) . '" is not supported.'); throw new \InvalidArgumentException('Type of $data "' . gettype($data) . '" is not supported.');

View File

@ -42,7 +42,7 @@ class InstallerAbstract
* *
* @since 1.0.0 * @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()) { switch ($dbPool->get()->getType()) {
case DatabaseType::MYSQL: case DatabaseType::MYSQL:
@ -96,7 +96,7 @@ class InstallerAbstract
* *
* @since 1.0.0 * @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::registerInDatabase($dbPool, $info);
self::initRoutes($modulePath, $info); self::initRoutes($modulePath, $info);
@ -113,7 +113,7 @@ class InstallerAbstract
* *
* @since 1.0.0 * @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 */ /** @var ActivateAbstract $class */
$class = '\Modules\\' . $info->getDirectory() . '\Admin\Status'; $class = '\Modules\\' . $info->getDirectory() . '\Admin\Status';
@ -130,7 +130,7 @@ class InstallerAbstract
* *
* @since 1.0.0 * @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); self::initRoutes($modulePath, $info);
} }
@ -147,7 +147,7 @@ class InstallerAbstract
* *
* @since 1.0.0 * @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__ ? // todo: maybe use static::__DIR__ ?
$directories = new Directory($modulePath . '/Admin/Routes'); $directories = new Directory($modulePath . '/Admin/Routes');
@ -173,7 +173,7 @@ class InstallerAbstract
* *
* @since 1.0.0 * @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)) { if (!file_exists($destRoutePath)) {
file_put_contents($destRoutePath, '<?php return [];'); file_put_contents($destRoutePath, '<?php return [];');

View File

@ -129,7 +129,7 @@ abstract class ModuleAbstract
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function addReceiving(string $module) /* : void */ public function addReceiving(string $module) : void
{ {
$this->receiving[] = $module; $this->receiving[] = $module;
} }

View File

@ -99,7 +99,7 @@ class ModuleFactory
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function registerRequesting(ModuleAbstract $obj) /* : void */ private static function registerRequesting(ModuleAbstract $obj) : void
{ {
foreach ($obj->getProviding() as $providing) { foreach ($obj->getProviding() as $providing) {
if (isset(self::$loaded[$providing])) { if (isset(self::$loaded[$providing])) {
@ -119,7 +119,7 @@ class ModuleFactory
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function registerProvided(ModuleAbstract $obj) /* : void */ private static function registerProvided(ModuleAbstract $obj) : void
{ {
$name = $obj->getName(); $name = $obj->getName();
if (isset(self::$providing[$name])) { if (isset(self::$providing[$name])) {

View File

@ -361,7 +361,7 @@ class ModuleManager
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private function deactivateModule(InfoManager $info) /* : void */ private function deactivateModule(InfoManager $info) : void
{ {
$class = '\\Modules\\' . $info->getDirectory() . '\\Admin\\Status'; $class = '\\Modules\\' . $info->getDirectory() . '\\Admin\\Status';
@ -419,7 +419,7 @@ class ModuleManager
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private function activateModule(InfoManager $info) /* : void */ private function activateModule(InfoManager $info) : void
{ {
$class = '\\Modules\\' . $info->getDirectory() . '\\Admin\\Status'; $class = '\\Modules\\' . $info->getDirectory() . '\\Admin\\Status';
@ -442,7 +442,7 @@ class ModuleManager
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function reInit(string $module) /* : void */ public function reInit(string $module) : void
{ {
$info = $this->loadInfo($module); $info = $this->loadInfo($module);
$class = '\\Modules\\' . $info->getDirectory() . '\\Admin\\Installer'; $class = '\\Modules\\' . $info->getDirectory() . '\\Admin\\Installer';
@ -512,7 +512,7 @@ class ModuleManager
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private function installDependencies(array $dependencies) /* : void */ private function installDependencies(array $dependencies) : void
{ {
foreach ($dependencies as $key => $version) { foreach ($dependencies as $key => $version) {
$this->install($key); $this->install($key);
@ -530,7 +530,7 @@ class ModuleManager
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private function installModule(InfoManager $info) /* : void */ private function installModule(InfoManager $info) : void
{ {
$class = '\\Modules\\' . $info->getDirectory() . '\\Admin\\Installer'; $class = '\\Modules\\' . $info->getDirectory() . '\\Admin\\Installer';
@ -554,7 +554,7 @@ class ModuleManager
* *
* @since 1.0.0 * @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')) { if (file_exists($this->modulePath . '/' . $from . '/Admin/Install/' . $for . '.php')) {
$class = '\\Modules\\' . $from . '\\Admin\\Install\\' . $for; $class = '\\Modules\\' . $from . '\\Admin\\Install\\' . $for;
@ -597,7 +597,7 @@ class ModuleManager
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function initModule($modules) /* : void */ public function initModule($modules) : void
{ {
$modules = (array) $modules; $modules = (array) $modules;
@ -623,7 +623,7 @@ class ModuleManager
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private function initModuleController(string $module) /* : void */ private function initModuleController(string $module) : void
{ {
try { try {
$this->running[$module] = ModuleFactory::getInstance($module, $this->app); $this->running[$module] = ModuleFactory::getInstance($module, $this->app);
@ -642,7 +642,7 @@ class ModuleManager
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function initRequestModules(Request $request) /* : void */ public function initRequestModules(Request $request) : void
{ {
$toInit = $this->getRoutedModules($request); $toInit = $this->getRoutedModules($request);

View File

@ -88,7 +88,7 @@ class PackageManager
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function extract(string $path) /* : void */ public function extract(string $path) : void
{ {
$this->extractPath = $path; $this->extractPath = $path;
Zip::unpack($this->path, $this->extractPath); Zip::unpack($this->path, $this->extractPath);
@ -103,7 +103,7 @@ class PackageManager
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function load() /* : void */ public function load() : void
{ {
if (!file_exists($this->extractPath)) { if (!file_exists($this->extractPath)) {
throw new PathException($this->extractPath); throw new PathException($this->extractPath);
@ -156,7 +156,7 @@ class PackageManager
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function install() /* : void */ public function install() : void
{ {
if (!$this->isValid()) { if (!$this->isValid()) {
throw new \Exception(); throw new \Exception();

View File

@ -39,7 +39,7 @@ class StatusAbstract
* *
* @since 1.0.0 * @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::activateRoutes(__DIR__ . '/../../Web/Routes.php', __DIR__ . '/../../Modules/' . $info->getDirectory() . '/Admin/Routes/http.php');
self::activateInDatabase($dbPool, $info); self::activateInDatabase($dbPool, $info);
@ -55,7 +55,7 @@ class StatusAbstract
* *
* @since 1.0.0 * @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 // todo: remove route
} }
@ -70,7 +70,7 @@ class StatusAbstract
* *
* @since 1.0.0 * @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()) { switch ($dbPool->get()->getType()) {
case DatabaseType::MYSQL: case DatabaseType::MYSQL:
@ -102,7 +102,7 @@ class StatusAbstract
* *
* @since 1.0.0 * @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::deactivateRoutes(__DIR__ . '/../../Web/Routes.php', __DIR__ . '/../../Modules/' . $info->getDirectory() . '/Admin/Routes/http.php');
self::deactivateInDatabase($dbPool, $info); self::deactivateInDatabase($dbPool, $info);
@ -118,7 +118,7 @@ class StatusAbstract
* *
* @since 1.0.0 * @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 // todo: remove route
} }
@ -133,7 +133,7 @@ class StatusAbstract
* *
* @since 1.0.0 * @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()) { switch ($dbPool->get()->getType()) {
case DatabaseType::MYSQL: case DatabaseType::MYSQL:

View File

@ -37,7 +37,7 @@ class UninstallerAbstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function uninstall(DatabasePool $dbPool, InfoManager $info) /* : void */ public static function uninstall(DatabasePool $dbPool, InfoManager $info) : void
{ {
} }

View File

@ -37,7 +37,7 @@ class UpdaterAbstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function update(DatabasePool $dbPool, InfoManager $info) /* : void */ public static function update(DatabasePool $dbPool, InfoManager $info) : void
{ {
} }
} }

View File

@ -76,7 +76,7 @@ class Router
* *
* @since 1.0.0 * @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])) { if (!isset($this->routes[$route])) {
$this->routes[$route] = []; $this->routes[$route] = [];

View File

@ -51,7 +51,7 @@ class Client extends SocketAbstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private function disconnect() /* : void */ private function disconnect() : void
{ {
$this->run = false; $this->run = false;
} }

View File

@ -46,7 +46,7 @@ class ClientConnection
return $this->socket; return $this->socket;
} }
public function setSocket($socket) /* : void */ public function setSocket($socket) : void
{ {
$this->socket = $socket; $this->socket = $socket;
} }
@ -56,7 +56,7 @@ class ClientConnection
return $this->handshake; return $this->handshake;
} }
public function setHandshake($handshake) /* : void */ public function setHandshake($handshake) : void
{ {
$this->handshake = $handshake; $this->handshake = $handshake;
} }
@ -66,7 +66,7 @@ class ClientConnection
return $this->pid; return $this->pid;
} }
public function setPid($pid) /* : void */ public function setPid($pid) : void
{ {
$this->pid = $pid; $this->pid = $pid;
} }
@ -76,7 +76,7 @@ class ClientConnection
return $this->connected; return $this->connected;
} }
public function setConnected(bool $connected) /* : void */ public function setConnected(bool $connected) : void
{ {
$this->connected = $connected; $this->connected = $connected;
} }

View File

@ -59,7 +59,7 @@ class Header implements \Serializable
return $this->sendFrom; return $this->sendFrom;
} }
public function setSendFrom($sendFrom) /* : void */ public function setSendFrom($sendFrom) : void
{ {
$this->sendFrom = $sendFrom; $this->sendFrom = $sendFrom;
} }
@ -69,7 +69,7 @@ class Header implements \Serializable
return $this->sendTo; return $this->sendTo;
} }
public function setSendTo($sendTo) /* : void */ public function setSendTo($sendTo) : void
{ {
$this->sendTo = $sendTo; $this->sendTo = $sendTo;
} }
@ -91,7 +91,7 @@ class Header implements \Serializable
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setLength($length) /* : void */ public function setLength($length) : void
{ {
$this->length = $length; $this->length = $length;
} }
@ -113,7 +113,7 @@ class Header implements \Serializable
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setType(int $type) /* : void */ public function setType(int $type) : void
{ {
$this->type = $type; $this->type = $type;
} }
@ -135,7 +135,7 @@ class Header implements \Serializable
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setSubtype($subtype) /* : void */ public function setSubtype($subtype) : void
{ {
$this->subtype = $subtype; $this->subtype = $subtype;
} }

View File

@ -91,7 +91,7 @@ abstract class PacketAbstract implements \Serializable
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setHeader(Header $header) /* : void */ public function setHeader(Header $header) : void
{ {
$this->header = $header; $this->header = $header;
} }

View File

@ -120,7 +120,7 @@ class Server extends SocketAbstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setLimit(int $limit) /* : void */ public function setLimit(int $limit) : void
{ {
$this->limit = $limit; $this->limit = $limit;
} }

View File

@ -80,7 +80,7 @@ class Address implements \JsonSerializable
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setRecipient(string $recipient) /* : void */ public function setRecipient(string $recipient) : void
{ {
$this->recipient = $recipient; $this->recipient = $recipient;
} }
@ -106,7 +106,7 @@ class Address implements \JsonSerializable
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setFAO(string $fao) /* : void */ public function setFAO(string $fao) : void
{ {
$this->fao = $fao; $this->fao = $fao;
} }
@ -132,7 +132,7 @@ class Address implements \JsonSerializable
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setLocation(Location $location) /* : void */ public function setLocation(Location $location) : void
{ {
$this->location = $location; $this->location = $location;
} }

View File

@ -55,7 +55,7 @@ class Iban implements \Serializable
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private function parse(string $iban) /* : void */ private function parse(string $iban) : void
{ {
$this->iban = self::normalize($iban); $this->iban = self::normalize($iban);

View File

@ -131,7 +131,7 @@ class Location implements \JsonSerializable, \Serializable
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setType(int $type) /* : void */ public function setType(int $type) : void
{ {
$this->type = $type; $this->type = $type;
} }
@ -157,7 +157,7 @@ class Location implements \JsonSerializable, \Serializable
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setPostal(string $postal) /* : void */ public function setPostal(string $postal) : void
{ {
$this->postal = $postal; $this->postal = $postal;
} }
@ -183,7 +183,7 @@ class Location implements \JsonSerializable, \Serializable
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setCity(string $city) /* : void */ public function setCity(string $city) : void
{ {
$this->city = $city; $this->city = $city;
} }
@ -209,7 +209,7 @@ class Location implements \JsonSerializable, \Serializable
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setCountry(string $country) /* : void */ public function setCountry(string $country) : void
{ {
$this->country = $country; $this->country = $country;
} }
@ -235,7 +235,7 @@ class Location implements \JsonSerializable, \Serializable
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setAddress(string $address) /* : void */ public function setAddress(string $address) : void
{ {
$this->address = $address; $this->address = $address;
} }
@ -261,7 +261,7 @@ class Location implements \JsonSerializable, \Serializable
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setState(string $state) /* : void */ public function setState(string $state) : void
{ {
$this->state = $state; $this->state = $state;
} }
@ -287,7 +287,7 @@ class Location implements \JsonSerializable, \Serializable
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setGeo(array $geo) /* : void */ public function setGeo(array $geo) : void
{ {
$this->geo = $geo; $this->geo = $geo;
} }

View File

@ -127,7 +127,7 @@ class BinaryTree extends Tree
* *
* @since 1.0.0 * @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); $this->inOrder($this->getLeft($node), $callback);
$callback($node); $callback($node);
@ -145,7 +145,7 @@ class BinaryTree extends Tree
* *
* @since 1.0.0 * @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])) { if (!isset($order[$horizontalDistance])) {
$order[$horizontalDistance] = []; $order[$horizontalDistance] = [];
@ -174,7 +174,7 @@ class BinaryTree extends Tree
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function verticalOrder(Node $node, \Closure $callback) /* : void */ public function verticalOrder(Node $node, \Closure $callback) : void
{ {
$order = []; $order = [];
$this->getVerticalOrder($node, 0, $order); $this->getVerticalOrder($node, 0, $order);

View File

@ -214,7 +214,7 @@ class Tree extends Graph
* *
* @since 1.0.0 * @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) { if (count($this->nodes) === 0) {
return; return;
@ -239,7 +239,7 @@ class Tree extends Graph
* *
* @since 1.0.0 * @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) { if (count($this->nodes) === 0) {
return; return;

View File

@ -119,7 +119,7 @@ class MultiMap implements \Countable
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private function garbageCollect() /* : void */ private function garbageCollect() : void
{ {
/* garbage collect keys */ /* garbage collect keys */
foreach ($this->keys as $key => $keyValue) { foreach ($this->keys as $key => $keyValue) {

View File

@ -93,7 +93,7 @@ class PriorityQueue implements \Countable, \Serializable
* *
* @since 1.0.0 * @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) { foreach ($this->queue as $key => &$ele) {
$ele['priority'] += $increase; $ele['priority'] += $increase;
@ -121,7 +121,7 @@ class PriorityQueue implements \Countable, \Serializable
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function delete(int $id = null) /* : void */ public function delete(int $id = null) : void
{ {
if ($id === null) { if ($id === null) {
$this->remove(); $this->remove();
@ -152,7 +152,7 @@ class PriorityQueue implements \Countable, \Serializable
* *
* @since 1.0.0 * @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; $this->queue[$id]['priority'] = $priority;
} }

View File

@ -124,7 +124,7 @@ class Directory extends FileAbstract implements DirectoryInterface
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function index() /* : void */ public function index() : void
{ {
parent::index(); parent::index();

View File

@ -52,7 +52,7 @@ class File extends FileAbstract implements FileInterface
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function index() /* : void */ public function index() : void
{ {
parent::index(); parent::index();

View File

@ -183,7 +183,7 @@ abstract class FileAbstract implements ContainerInterface
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function index() /* : void */ public function index() : void
{ {
$this->createdAt->setTimestamp(filemtime($this->path)); $this->createdAt->setTimestamp(filemtime($this->path));
$this->changedAt->setTimestamp(filectime($this->path)); $this->changedAt->setTimestamp(filectime($this->path));

View File

@ -35,7 +35,7 @@ final class UnhandledHandler
* @since 1.0.0 * @since 1.0.0
* @codeCoverageIgnore * @codeCoverageIgnore
*/ */
public static function exceptionHandler(\Throwable $e) /* : void */ public static function exceptionHandler(\Throwable $e) : void
{ {
$logger = FileLogger::getInstance(__DIR__ . '/../Logs'); $logger = FileLogger::getInstance(__DIR__ . '/../Logs');
$logger->critical(FileLogger::MSG_FULL, [ $logger->critical(FileLogger::MSG_FULL, [
@ -93,7 +93,7 @@ final class UnhandledHandler
* @since 1.0.0 * @since 1.0.0
* @codeCoverageIgnore * @codeCoverageIgnore
*/ */
public static function shutdownHandler() /* : void */ public static function shutdownHandler() : void
{ {
$e = error_get_last(); $e = error_get_last();

View File

@ -142,7 +142,7 @@ class Http implements UriInterface
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function set(string $uri) /* : void */ public function set(string $uri) : void
{ {
$this->uri = $uri; $this->uri = $uri;
$url = parse_url($this->uri); $url = parse_url($this->uri);
@ -203,7 +203,7 @@ class Http implements UriInterface
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function setRootPath(string $root) /* : void */ public function setRootPath(string $root) : void
{ {
$this->rootPath = $root; $this->rootPath = $root;
$this->set($this->uri); $this->set($this->uri);

View File

@ -54,7 +54,7 @@ class UriFactory
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getQuery(string $key) /* : ?string */ public static function getQuery(string $key) : ?string
{ {
return self::$uri[$key] ?? null; return self::$uri[$key] ?? null;
} }
@ -104,7 +104,7 @@ class UriFactory
* *
* @since 1.0.0 * @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('/scheme', $uri->getScheme());
self::setQuery('/host', $uri->getHost()); self::setQuery('/host', $uri->getHost());
@ -225,7 +225,7 @@ class UriFactory
* *
* @since 1.0.0 * @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) { $parsed = preg_replace_callback('(\{[\/#\?%@\.\$][a-zA-Z0-9\-]*\})', function ($match) use ($toMatch) {
$match = substr($match[0], 1, strlen($match[0]) - 2); $match = substr($match[0], 1, strlen($match[0]) - 2);

View File

@ -284,7 +284,7 @@ class ArrayUtils
* *
* @since 1.0.0 * @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) { if (($key = array_search($id, $args)) === false || $key === count($args) - 1) {
return null; return null;
@ -303,7 +303,7 @@ class ArrayUtils
* *
* @since 1.0.0 * @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) { if (($key = array_search($id, $args)) === false) {
return null; return null;

View File

@ -150,7 +150,7 @@ abstract class C128Abstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setDimension(int $width, int $height) /* : void */ public function setDimension(int $width, int $height) : void
{ {
if ($width < 0) { if ($width < 0) {
throw new \OutOfBoundsException($width); throw new \OutOfBoundsException($width);
@ -173,7 +173,7 @@ abstract class C128Abstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setMargin(int $margin) /* : void */ public function setMargin(int $margin) : void
{ {
$this->margin = $margin; $this->margin = $margin;
} }
@ -187,7 +187,7 @@ abstract class C128Abstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setOrientation(int $orientation) /* : void */ public function setOrientation(int $orientation) : void
{ {
if (!OrientationType::isValidValue($orientation)) { if (!OrientationType::isValidValue($orientation)) {
throw new InvalidEnumValue($orientation); throw new InvalidEnumValue($orientation);
@ -217,7 +217,7 @@ abstract class C128Abstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setContent(string $content) /* : void */ public function setContent(string $content) : void
{ {
$this->content = $content; $this->content = $content;
} }
@ -245,7 +245,7 @@ abstract class C128Abstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function saveToPngFile(string $file) /* : void */ public function saveToPngFile(string $file) : void
{ {
$res = $this->get(); $res = $this->get();
@ -262,7 +262,7 @@ abstract class C128Abstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function saveToJpgFile(string $file) /* : void */ public function saveToJpgFile(string $file) : void
{ {
$res = $this->get(); $res = $this->get();

View File

@ -91,7 +91,7 @@ class C128a extends C128Abstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setContent(string $content) /* : void */ public function setContent(string $content) : void
{ {
parent::setContent(strtoupper($content)); parent::setContent(strtoupper($content));
} }

View File

@ -92,7 +92,7 @@ class C25 extends C128Abstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setContent(string $content) /* : void */ public function setContent(string $content) : void
{ {
if (!ctype_digit($content)) { if (!ctype_digit($content)) {
throw new \InvalidArgumentException($content); throw new \InvalidArgumentException($content);

View File

@ -70,7 +70,7 @@ class C39 extends C128Abstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setContent(string $content) /* : void */ public function setContent(string $content) : void
{ {
parent::setContent(strtoupper($content)); parent::setContent(strtoupper($content));
} }

View File

@ -71,7 +71,7 @@ class Codebar extends C128Abstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setContent(string $content) /* : void */ public function setContent(string $content) : void
{ {
parent::setContent(strtoupper($content)); parent::setContent(strtoupper($content));
} }

View File

@ -45,7 +45,7 @@ class HIBCC
} }
public function setIdentifier(string $identifier) /* : void */ public function setIdentifier(string $identifier) : void
{ {
$this->identifier = $identifier; $this->identifier = $identifier;
} }
@ -55,7 +55,7 @@ class HIBCC
return $this->identifier; return $this->identifier;
} }
public function setProductId(string $id) /* : void */ public function setProductId(string $id) : void
{ {
$this->productId = $id; $this->productId = $id;
} }
@ -65,7 +65,7 @@ class HIBCC
return $this->productId; return $this->productId;
} }
public function setMeasureOfUnit(int $measure) /* : void */ public function setMeasureOfUnit(int $measure) : void
{ {
$this->measureOfUnit = $measure; $this->measureOfUnit = $measure;
} }
@ -75,7 +75,7 @@ class HIBCC
return $this->measureOfUnit; return $this->measureOfUnit;
} }
public function setDateFormat(string $format) /* : void */ public function setDateFormat(string $format) : void
{ {
$this->dateFormat = $format; $this->dateFormat = $format;
} }
@ -85,7 +85,7 @@ class HIBCC
return $this->dateFormat(); return $this->dateFormat();
} }
public function setExpirationDate(\DateTime $date) /* : void */ public function setExpirationDate(\DateTime $date) : void
{ {
$this->expirationDate = $date; $this->expirationDate = $date;
} }
@ -95,7 +95,7 @@ class HIBCC
return $this->expirationDate; return $this->expirationDate;
} }
public function setPrductionDate(\DateTime $date) /* : void */ public function setPrductionDate(\DateTime $date) : void
{ {
$this->productionDate = $date; $this->productionDate = $date;
} }
@ -105,7 +105,7 @@ class HIBCC
return $this->productionDate; return $this->productionDate;
} }
public function setLot(string $lot) /* : void */ public function setLot(string $lot) : void
{ {
$this->lot = $lot; $this->lot = $lot;
} }

View File

@ -58,7 +58,7 @@ class Currency
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function resetCurrencies() /* : void */ public static function resetCurrencies() : void
{ {
self::$ecbCurrencies = null; self::$ecbCurrencies = null;
} }

View File

@ -71,7 +71,7 @@ final class Dictionary
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function generate(string $source) /* : void */ public function generate(string $source) : void
{ {
$this->dictionary = []; $this->dictionary = [];
$this->min = -1; $this->min = -1;
@ -105,7 +105,7 @@ final class Dictionary
* *
* @since 1.0.0 * @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])) { if (!is_array($entry[0][1])) {
$this->set($entry[0][1], $value . '0'); $this->set($entry[0][1], $value . '0');
@ -134,7 +134,7 @@ final class Dictionary
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function set(string $entry, string $value) /* : void */ public function set(string $entry, string $value) : void
{ {
if (strlen($entry) !== 1) { if (strlen($entry) !== 1) {
throw new \InvalidArgumentException('Must be a character.'); throw new \InvalidArgumentException('Must be a character.');
@ -194,7 +194,7 @@ final class Dictionary
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getEntry(&$value) /* : ?string */ public function getEntry(&$value) : ?string
{ {
$length = strlen($value); $length = strlen($value);
if ($length < $this->min) { if ($length < $this->min) {

View File

@ -39,7 +39,7 @@ final class Huffman
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function removeDictionary() /* : void */ public function removeDictionary() : void
{ {
$this->dictionary = null; $this->dictionary = null;
} }
@ -65,7 +65,7 @@ final class Huffman
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setDictionary(Dictionary $dictionary) /* : void */ public function setDictionary(Dictionary $dictionary) : void
{ {
$this->dictionary = $dictionary; $this->dictionary = $dictionary;
} }

View File

@ -123,7 +123,7 @@ class Author
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setCommitCount(int $count) /* : void */ public function setCommitCount(int $count) : void
{ {
$this->commitCount = $count; $this->commitCount = $count;
} }
@ -137,7 +137,7 @@ class Author
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setAdditionCount(int $count) /* : void */ public function setAdditionCount(int $count) : void
{ {
$this->additionsCount = $count; $this->additionsCount = $count;
} }
@ -163,7 +163,7 @@ class Author
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setRemovalCount(int $count) /* : void */ public function setRemovalCount(int $count) : void
{ {
$this->removalsCount = $count; $this->removalsCount = $count;
} }

View File

@ -65,7 +65,7 @@ class Branch
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setName(string $name) /* : void */ public function setName(string $name) : void
{ {
$this->name = $name; $this->name = $name;
} }

View File

@ -157,7 +157,7 @@ class Commit
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setMessage(string $message) /* : void */ public function setMessage(string $message) : void
{ {
$this->message = $message; $this->message = $message;
} }
@ -215,7 +215,7 @@ class Commit
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setAuthor(Author $author) /* : void */ public function setAuthor(Author $author) : void
{ {
$this->author = $author; $this->author = $author;
} }
@ -241,7 +241,7 @@ class Commit
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setBranch(Branch $branch) /* : void */ public function setBranch(Branch $branch) : void
{ {
$this->branch = $branch; $this->branch = $branch;
} }
@ -267,7 +267,7 @@ class Commit
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setTag(Tag $tag) /* : void */ public function setTag(Tag $tag) : void
{ {
$this->tag = $tag; $this->tag = $tag;
} }
@ -293,7 +293,7 @@ class Commit
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setDate(\DateTime $date) /* : void */ public function setDate(\DateTime $date) : void
{ {
$this->date = $date; $this->date = $date;
} }
@ -319,7 +319,7 @@ class Commit
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setRepository(Repository $repository) /* : void */ public function setRepository(Repository $repository) : void
{ {
$this->repository = $repository; $this->repository = $repository;
} }
@ -338,7 +338,7 @@ class Commit
* *
* @since 1.0.0 * @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])) { if (!isset($this->files[$path])) {
throw new \Exception(); throw new \Exception();

View File

@ -80,7 +80,7 @@ class Git
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function setBin(string $path) /* : void */ public static function setBin(string $path) : void
{ {
if (realpath($path) === false) { if (realpath($path) === false) {
throw new PathException($path); throw new PathException($path);

View File

@ -83,7 +83,7 @@ class Repository
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private function setPath(string $path) /* : void */ private function setPath(string $path) : void
{ {
if (!is_dir($path)) { if (!is_dir($path)) {
throw new PathException($path); throw new PathException($path);
@ -601,7 +601,7 @@ class Repository
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setDescription(string $description) /* : void */ public function setDescription(string $description) : void
{ {
file_put_contents($this->getDirectoryPath(), $description); file_put_contents($this->getDirectoryPath(), $description);
} }

View File

@ -73,7 +73,7 @@ class Tag
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setMessage(string $message) /* : void */ public function setMessage(string $message) : void
{ {
$this->message = $message; $this->message = $message;
} }

View File

@ -44,7 +44,7 @@ class CsvDatabaseMapper implements IODatabaseMapper
$this->sources = array_unique($this->sources); $this->sources = array_unique($this->sources);
} }
public function setSources(array $sources) /* : void */ public function setSources(array $sources) : void
{ {
$this->sources = $sources; $this->sources = $sources;
} }
@ -54,7 +54,7 @@ class CsvDatabaseMapper implements IODatabaseMapper
$this->autoIdentifyCsvSettings = $identify; $this->autoIdentifyCsvSettings = $identify;
} }
public function setLineBuffer(int $buffer) /* : void */ public function setLineBuffer(int $buffer) : void
{ {
$this->lineBuffer = $buffer; $this->lineBuffer = $buffer;
} }

View File

@ -27,12 +27,12 @@ class ExcelDatabaseMapper implements IODatabaseMapper
$this->sources[] = $source; $this->sources[] = $source;
} }
public function setLineBuffer(int $buffer) /* : void */ public function setLineBuffer(int $buffer) : void
{ {
$this->lineBuffer = $buffer; $this->lineBuffer = $buffer;
} }
public function setSources(array $sources) /* : void */ public function setSources(array $sources) : void
{ {
$this->sources = $sources; $this->sources = $sources;
} }

View File

@ -44,7 +44,7 @@ class Job
return $this->priority; return $this->priority;
} }
public function setPriority(float $priority) /* : void */ public function setPriority(float $priority) : void
{ {
$this->priority = $priority; $this->priority = $priority;
} }

View File

@ -98,7 +98,7 @@ class JobQueue
register_shutdown_function(function() { posix_kill(posix_getpid(), SIGHUP); }); 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->run = $run;
$this->suspended = $run; $this->suspended = $run;
@ -114,7 +114,7 @@ class JobQueue
return $this->suspended; return $this->suspended;
} }
public function setSuspended(bool $suspended = true) /* : void */ public function setSuspended(bool $suspended = true) : void
{ {
$this->suspended = $suspended; $this->suspended = $suspended;
} }
@ -124,7 +124,7 @@ class JobQueue
return $this->isTerminating; return $this->isTerminating;
} }
public function setTerminating(bool $terminating = true) /* : void */ public function setTerminating(bool $terminating = true) : void
{ {
$this->isTerminating = $terminating; $this->isTerminating = $terminating;
} }
@ -134,7 +134,7 @@ class JobQueue
return $this->isDeamonized; return $this->isDeamonized;
} }
public function setDeamonized(bool $deamonized) /* : void */ public function setDeamonized(bool $deamonized) : void
{ {
$this->isDeamonized = $deamonized; $this->isDeamonized = $deamonized;
} }

View File

@ -65,7 +65,7 @@ class JsonBuilder implements \Serializable, \JsonSerializable
* *
* @since 1.0.0 * @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); $this->json = ArrayUtils::setArray($path, $this->json, $value, '/', $overwrite);
} }
@ -79,7 +79,7 @@ class JsonBuilder implements \Serializable, \JsonSerializable
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function remove(string $path) /* : void */ public function remove(string $path) : void
{ {
$this->json = ArrayUtils::unsetArray($path, $this->json, '/'); $this->json = ArrayUtils::unsetArray($path, $this->json, '/');
} }

View File

@ -355,7 +355,7 @@ class Markdown
* *
* @since 1.0.0 * @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'])) { if ($block !== null && !isset($block['type']) && !isset($block['interrupted'])) {
return; return;
@ -387,7 +387,7 @@ class Markdown
* *
* @since 1.0.0 * @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) { if ($lineArray['indent'] < 4) {
return; return;
@ -428,7 +428,7 @@ class Markdown
* *
* @since 1.0.0 * @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)) { if (!preg_match('/^[' . $lineArray['text'][0] . ']{3,}[ ]*([^`]+)?[ ]*$/', $lineArray['text'], $matches)) {
return; return;
@ -465,7 +465,7 @@ class Markdown
* *
* @since 1.0.0 * @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'])) { if (isset($block['complete'])) {
return; return;
@ -512,7 +512,7 @@ class Markdown
* *
* @since 1.0.0 * @since 1.0.0
*/ */
protected static function blockHeader(array $lineArray) /* : ?array */ protected static function blockHeader(array $lineArray) : ?array
{ {
if (!isset($lineArray['text'][1])) { if (!isset($lineArray['text'][1])) {
return; return;
@ -545,7 +545,7 @@ class Markdown
* *
* @since 1.0.0 * @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]+[.]']; list($name, $pattern) = $lineArray['text'][0] <= '-' ? ['ul', '[*+-]'] : ['ol', '[0-9]+[.]'];
@ -593,7 +593,7 @@ class Markdown
* *
* @since 1.0.0 * @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 ($block['indent'] === $lineArray['indent'] && preg_match('/^' . $block['pattern'] . '(?:[ ]+(.*)|$)/', $lineArray['text'], $matches)) {
if (isset($block['interrupted'])) { if (isset($block['interrupted'])) {
@ -646,7 +646,7 @@ class Markdown
* *
* @since 1.0.0 * @since 1.0.0
*/ */
protected static function blockQuote(array $lineArray) /* : ?array */ protected static function blockQuote(array $lineArray) : ?array
{ {
if (!preg_match('/^>[ ]?(.*)/', $lineArray['text'], $matches)) { if (!preg_match('/^>[ ]?(.*)/', $lineArray['text'], $matches)) {
return; return;
@ -671,7 +671,7 @@ class Markdown
* *
* @since 1.0.0 * @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 ($lineArray['text'][0] === '>' && preg_match('/^>[ ]?(.*)/', $lineArray['text'], $matches)) {
if (isset($block['interrupted'])) { if (isset($block['interrupted'])) {
@ -701,7 +701,7 @@ class Markdown
* *
* @since 1.0.0 * @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'])) { if (!preg_match('/^([' . $lineArray['text'][0] . '])([ ]*\1){2,}[ ]*$/', $lineArray['text'])) {
return; return;
@ -724,7 +724,7 @@ class Markdown
* *
* @since 1.0.0 * @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'])) { if (!isset($block) || isset($block['type']) || isset($block['interrupted'])) {
return; return;
@ -748,7 +748,7 @@ class Markdown
* *
* @since 1.0.0 * @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)) { if (!preg_match('/^\[(.+?)\]:[ ]*<?(\S+?)>?(?:[ ]+["\'(](.+)["\')])?[ ]*$/', $lineArray['text'], $matches)) {
return; return;
@ -774,7 +774,7 @@ class Markdown
* *
* @since 1.0.0 * @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'])) { if (!isset($block) || isset($block['type']) || isset($block['interrupted'])) {
return; return;
@ -869,7 +869,7 @@ class Markdown
* *
* @since 1.0.0 * @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'])) { if (isset($block['interrupted'])) {
return; return;
@ -989,7 +989,7 @@ class Markdown
* *
* @since 1.0.0 * @since 1.0.0
*/ */
protected static function inlineCode(array $excerpt) /* : ?array */ protected static function inlineCode(array $excerpt) : ?array
{ {
$marker = $excerpt['text'][0]; $marker = $excerpt['text'][0];
@ -1015,7 +1015,7 @@ class Markdown
* *
* @since 1.0.0 * @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)) { if (strpos($excerpt['text'], '>') === false || !preg_match('/^<((mailto:)?\S+?@\S+?)>/i', $excerpt['text'], $matches)) {
return; return;
@ -1048,7 +1048,7 @@ class Markdown
* *
* @since 1.0.0 * @since 1.0.0
*/ */
protected static function inlineEmphasis(array $excerpt) /* : ?array */ protected static function inlineEmphasis(array $excerpt) : ?array
{ {
if (!isset($excerpt['text'][1])) { if (!isset($excerpt['text'][1])) {
return; return;
@ -1083,7 +1083,7 @@ class Markdown
* *
* @since 1.0.0 * @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)) { if (!isset($excerpt['text'][1]) || !in_array($excerpt['text'][1], self::$specialCharacters)) {
return; return;
@ -1104,7 +1104,7 @@ class Markdown
* *
* @since 1.0.0 * @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] !== '[') { if (!isset($excerpt['text'][1]) || $excerpt['text'][1] !== '[') {
return; return;
@ -1144,7 +1144,7 @@ class Markdown
* *
* @since 1.0.0 * @since 1.0.0
*/ */
protected static function inlineLink(array $excerpt) /* : ?array */ protected static function inlineLink(array $excerpt) : ?array
{ {
$element = [ $element = [
'name' => 'a', 'name' => 'a',
@ -1210,7 +1210,7 @@ class Markdown
* *
* @since 1.0.0 * @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'])) { if ($excerpt['text'][0] === '&' && !preg_match('/^&#?\w+;/', $excerpt['text'])) {
return [ return [
@ -1238,7 +1238,7 @@ class Markdown
* *
* @since 1.0.0 * @since 1.0.0
*/ */
protected static function inlineStrikethrough(array $excerpt) /* : ?array */ protected static function inlineStrikethrough(array $excerpt) : ?array
{ {
if (!isset($excerpt['text'][1])) { if (!isset($excerpt['text'][1])) {
return; return;
@ -1267,7 +1267,7 @@ class Markdown
* *
* @since 1.0.0 * @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] !== '/') { if (!isset($excerpt['text'][2]) || $excerpt['text'][2] !== '/') {
return; return;
@ -1299,7 +1299,7 @@ class Markdown
* *
* @since 1.0.0 * @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)) { if (strpos($excerpt['text'], '>') === false || !preg_match('/^<(\w+:\/{2}[^ >]+)>/i', $excerpt['text'], $matches)) {
return; return;

Some files were not shown because too many files have changed in this diff Show More