diff --git a/src/Acl/Adapter/AbstractAdapter.php b/src/Acl/Adapter/AbstractAdapter.php index 5f40dca5..4d0cc899 100644 --- a/src/Acl/Adapter/AbstractAdapter.php +++ b/src/Acl/Adapter/AbstractAdapter.php @@ -59,7 +59,7 @@ abstract class AbstractAdapter extends AbstractEventsAware implements \Phalcon\A * * @return string|null */ - public function getActiveAccess(): string|null + public function getActiveAccess(): ?string { } @@ -68,7 +68,7 @@ public function getActiveAccess(): string|null * * @return string|null */ - public function getActiveComponent(): string|null + public function getActiveComponent(): ?string { } @@ -78,7 +78,7 @@ public function getActiveComponent(): string|null * * @return string|null */ - public function getActiveRole(): string|null + public function getActiveRole(): ?string { } diff --git a/src/Acl/Adapter/AdapterInterface.php b/src/Acl/Adapter/AdapterInterface.php index 851d7d7a..3ebef211 100644 --- a/src/Acl/Adapter/AdapterInterface.php +++ b/src/Acl/Adapter/AdapterInterface.php @@ -93,7 +93,7 @@ public function dropComponentAccess(string $componentName, $accessList): void; * * @return string|null */ - public function getActiveAccess(): string|null; + public function getActiveAccess(): ?string; /** * Returns the role which the list is checking if it's allowed to certain @@ -101,7 +101,7 @@ public function getActiveAccess(): string|null; * * @return string|null */ - public function getActiveRole(): string|null; + public function getActiveRole(): ?string; /** * Returns the component which the list is checking if some role can access @@ -109,7 +109,7 @@ public function getActiveRole(): string|null; * * @return string|null */ - public function getActiveComponent(): string|null; + public function getActiveComponent(): ?string; /** * Return an array with every component registered in the list diff --git a/src/Acl/Adapter/Memory.php b/src/Acl/Adapter/Memory.php index ac536ab6..d2fc64f8 100644 --- a/src/Acl/Adapter/Memory.php +++ b/src/Acl/Adapter/Memory.php @@ -329,7 +329,7 @@ public function dropComponentAccess(string $componentName, $accessList): void * * @return mixed */ - public function getActiveFunction(): mixed + public function getActiveFunction() { } @@ -347,7 +347,7 @@ public function getActiveFunctionCustomArgumentsCount(): int * * @return string|null */ - public function getActiveKey(): string|null + public function getActiveKey(): ?string { } @@ -466,7 +466,7 @@ private function allowOrDeny(string $roleName, string $componentName, $access, $ * @param string $access * @return string|bool */ - private function canAccess(string $roleName, string $componentName, string $access): bool|string + private function canAccess(string $roleName, string $componentName, string $access) { } diff --git a/src/Annotations/Adapter/Apcu.php b/src/Annotations/Adapter/Apcu.php index 7560a18a..7cb1d60b 100644 --- a/src/Annotations/Adapter/Apcu.php +++ b/src/Annotations/Adapter/Apcu.php @@ -50,7 +50,7 @@ public function __construct(array $options = []) * @param string $key * @return bool|Reflection */ - public function read(string $key): Reflection|bool + public function read(string $key) { } diff --git a/src/Annotations/Adapter/Memory.php b/src/Annotations/Adapter/Memory.php index 3a76055e..7e4194ec 100644 --- a/src/Annotations/Adapter/Memory.php +++ b/src/Annotations/Adapter/Memory.php @@ -28,7 +28,7 @@ class Memory extends \Phalcon\Annotations\Adapter\AbstractAdapter * @param string $key * @return bool|Reflection */ - public function read(string $key): Reflection|bool + public function read(string $key) { } diff --git a/src/Annotations/Adapter/Stream.php b/src/Annotations/Adapter/Stream.php index 59f08df5..ead578fb 100644 --- a/src/Annotations/Adapter/Stream.php +++ b/src/Annotations/Adapter/Stream.php @@ -50,7 +50,7 @@ public function __construct(array $options = []) * @param string $key * @return bool|int|Reflection */ - public function read(string $key): Reflection|int|bool + public function read(string $key) { } diff --git a/src/Annotations/Annotation.php b/src/Annotations/Annotation.php index 56342289..daa1d03a 100644 --- a/src/Annotations/Annotation.php +++ b/src/Annotations/Annotation.php @@ -50,7 +50,7 @@ public function __construct(array $reflectionData) * @param mixed $position * @return mixed|null */ - public function getArgument($position): mixed + public function getArgument($position) { } @@ -78,7 +78,7 @@ public function getExprArguments(): array * @param array $expr * @return mixed */ - public function getExpression(array $expr): mixed + public function getExpression(array $expr) { } @@ -87,7 +87,7 @@ public function getExpression(array $expr): mixed * * @return string|null */ - public function getName(): string|null + public function getName(): ?string { } @@ -97,7 +97,7 @@ public function getName(): string|null * @param string $name * @return mixed|null */ - public function getNamedArgument(string $name): mixed + public function getNamedArgument(string $name) { } @@ -107,7 +107,7 @@ public function getNamedArgument(string $name): mixed * @param string $name * @return mixed */ - public function getNamedParameter(string $name): mixed + public function getNamedParameter(string $name) { } diff --git a/src/Annotations/AnnotationsFactory.php b/src/Annotations/AnnotationsFactory.php index 27bcfdc5..94105e4d 100644 --- a/src/Annotations/AnnotationsFactory.php +++ b/src/Annotations/AnnotationsFactory.php @@ -40,7 +40,7 @@ public function __construct(array $services = []) * Factory to create an instance from a Config object * @return mixed */ - public function load($config): mixed + public function load($config) { } diff --git a/src/Annotations/Collection.php b/src/Annotations/Collection.php index db5deef4..36300ede 100644 --- a/src/Annotations/Collection.php +++ b/src/Annotations/Collection.php @@ -64,7 +64,7 @@ public function count(): int * * @return mixed */ - public function current(): mixed + public function current() { } diff --git a/src/Annotations/Reflection.php b/src/Annotations/Reflection.php index f5679926..38069236 100644 --- a/src/Annotations/Reflection.php +++ b/src/Annotations/Reflection.php @@ -66,7 +66,7 @@ public function __construct(array $reflectionData = []) * * @return Collection|null */ - public function getClassAnnotations(): Collection|null + public function getClassAnnotations(): ?Collection { } diff --git a/src/Application/AbstractApplication.php b/src/Application/AbstractApplication.php index 0b3061ff..b7a17fd1 100644 --- a/src/Application/AbstractApplication.php +++ b/src/Application/AbstractApplication.php @@ -62,7 +62,7 @@ public function getDefaultModule(): string * * @return ManagerInterface|null */ - public function getEventsManager(): ManagerInterface|null + public function getEventsManager(): ?ManagerInterface { } @@ -72,7 +72,7 @@ public function getEventsManager(): ManagerInterface|null * @param string $name * * @return array|mixed */ - public function getModule(string $name): object|array + public function getModule(string $name) { } diff --git a/src/Assets/Asset.php b/src/Assets/Asset.php index 808febad..01030196 100644 --- a/src/Assets/Asset.php +++ b/src/Assets/Asset.php @@ -194,7 +194,7 @@ public function getType(): string * * @return string|null */ - public function getVersion(): string|null + public function getVersion(): ?string { } diff --git a/src/Assets/AssetInterface.php b/src/Assets/AssetInterface.php index 96840289..d16d8a78 100644 --- a/src/Assets/AssetInterface.php +++ b/src/Assets/AssetInterface.php @@ -26,7 +26,7 @@ public function getAssetKey(): string; * * @return array|null */ - public function getAttributes(): array|null; + public function getAttributes(): ?array; /** * Gets if the asset must be filtered or not. diff --git a/src/Assets/Manager.php b/src/Assets/Manager.php index 1e463562..8dd8923b 100644 --- a/src/Assets/Manager.php +++ b/src/Assets/Manager.php @@ -272,7 +272,7 @@ public function has(string $name): bool * @return string|null * @throws Exception */ - public function output(Collection $collection, string $type): string|null + public function output(Collection $collection, string $type): ?string { } diff --git a/src/Autoload/Loader.php b/src/Autoload/Loader.php index 24fd0eab..b11e3f0e 100644 --- a/src/Autoload/Loader.php +++ b/src/Autoload/Loader.php @@ -155,7 +155,7 @@ public function autoload(string $className): bool * * @return string|null */ - public function getCheckedPath(): string|null + public function getCheckedPath(): ?string { } @@ -209,7 +209,7 @@ public function getFiles(): array * * @return string|null */ - public function getFoundPath(): string|null + public function getFoundPath(): ?string { } diff --git a/src/Cache/AbstractCache.php b/src/Cache/AbstractCache.php index 0db74cb1..9f3253ae 100644 --- a/src/Cache/AbstractCache.php +++ b/src/Cache/AbstractCache.php @@ -12,12 +12,14 @@ use DateInterval; use Phalcon\Cache\Adapter\AdapterInterface; use Phalcon\Cache\Exception\InvalidArgumentException; +use Phalcon\Events\EventsAwareInterface; +use Phalcon\Events\ManagerInterface; use Traversable; /** * This component offers caching capabilities for your application. */ -abstract class AbstractCache implements \Phalcon\Cache\CacheInterface +abstract class AbstractCache implements \Phalcon\Cache\CacheInterface, \Phalcon\Events\EventsAwareInterface { /** * The adapter @@ -26,6 +28,13 @@ abstract class AbstractCache implements \Phalcon\Cache\CacheInterface */ protected $adapter; + /** + * Event Manager + * + * @var ManagerInterface|null + */ + protected $eventsManager = null; + /** * Constructor. * @@ -44,6 +53,25 @@ public function getAdapter(): AdapterInterface { } + /** + * Sets the event manager + * + * @param \Phalcon\Events\ManagerInterface $eventsManager + * @return void + */ + public function setEventsManager(\Phalcon\Events\ManagerInterface $eventsManager): void + { + } + + /** + * Get the event manager + * + * @return ManagerInterface|null + */ + public function getEventsManager(): ?ManagerInterface + { + } + /** * Checks the key. If it contains invalid characters an exception is thrown * @@ -114,7 +142,7 @@ protected function doDeleteMultiple($keys): bool * @throws InvalidArgumentException MUST be thrown if the $key string is * not a legal value. */ - protected function doGet(string $key, $defaultValue = null): mixed + protected function doGet(string $key, $defaultValue = null) { } @@ -176,6 +204,17 @@ protected function doSetMultiple($values, $ttl = null): bool { } + /** + * Trigger an event for the eventsManager. + * + * @param string $eventName + * @param mixed $keys + * @return void + */ + protected function fire(string $eventName, $keys): void + { + } + /** * Returns the exception class that will be used for exceptions thrown * diff --git a/src/Cache/Adapter/Apcu.php b/src/Cache/Adapter/Apcu.php index 63cd8413..8003d91d 100644 --- a/src/Cache/Adapter/Apcu.php +++ b/src/Cache/Adapter/Apcu.php @@ -17,4 +17,5 @@ */ class Apcu extends \Phalcon\Storage\Adapter\Apcu implements CacheAdapterInterface { + protected $eventType = 'cache'; } diff --git a/src/Cache/Adapter/Libmemcached.php b/src/Cache/Adapter/Libmemcached.php index 8d9bc0b3..bae8057a 100644 --- a/src/Cache/Adapter/Libmemcached.php +++ b/src/Cache/Adapter/Libmemcached.php @@ -17,4 +17,5 @@ */ class Libmemcached extends \Phalcon\Storage\Adapter\Libmemcached implements CacheAdapterInterface { + protected $eventType = 'cache'; } diff --git a/src/Cache/Adapter/Memory.php b/src/Cache/Adapter/Memory.php index e615a152..9b7a47e3 100644 --- a/src/Cache/Adapter/Memory.php +++ b/src/Cache/Adapter/Memory.php @@ -17,4 +17,5 @@ */ class Memory extends \Phalcon\Storage\Adapter\Memory implements CacheAdapterInterface { + protected $eventType = 'cache'; } diff --git a/src/Cache/Adapter/Redis.php b/src/Cache/Adapter/Redis.php index f8d676f2..5edd6854 100644 --- a/src/Cache/Adapter/Redis.php +++ b/src/Cache/Adapter/Redis.php @@ -17,4 +17,5 @@ */ class Redis extends \Phalcon\Storage\Adapter\Redis implements CacheAdapterInterface { + protected $eventType = 'cache'; } diff --git a/src/Cache/Adapter/Stream.php b/src/Cache/Adapter/Stream.php index 37ddff08..4b7c078e 100644 --- a/src/Cache/Adapter/Stream.php +++ b/src/Cache/Adapter/Stream.php @@ -17,4 +17,5 @@ */ class Stream extends \Phalcon\Storage\Adapter\Stream implements CacheAdapterInterface { + protected $eventType = 'cache'; } diff --git a/src/Cache/Adapter/Weak.php b/src/Cache/Adapter/Weak.php index e429aafb..84e8781d 100644 --- a/src/Cache/Adapter/Weak.php +++ b/src/Cache/Adapter/Weak.php @@ -17,4 +17,5 @@ */ class Weak extends \Phalcon\Storage\Adapter\Weak implements CacheAdapterInterface { + protected $eventType = 'cache'; } diff --git a/src/Cli/Dispatcher.php b/src/Cli/Dispatcher.php index 77eedc2f..c556e575 100644 --- a/src/Cli/Dispatcher.php +++ b/src/Cli/Dispatcher.php @@ -66,7 +66,7 @@ class Dispatcher extends \Phalcon\Dispatcher\AbstractDispatcher implements \Phal * @param array $params * @return mixed */ - public function callActionMethod($handler, string $actionMethod, array $params = []): mixed + public function callActionMethod($handler, string $actionMethod, array $params = []) { } @@ -96,7 +96,7 @@ public function getLastTask(): TaskInterface * @param mixed $defaultValue * @return mixed */ - public function getOption($option, $filters = null, $defaultValue = null): mixed + public function getOption($option, $filters = null, $defaultValue = null) { } diff --git a/src/Cli/Router.php b/src/Cli/Router.php index dc1f8aa3..999b515c 100644 --- a/src/Cli/Router.php +++ b/src/Cli/Router.php @@ -14,7 +14,6 @@ use Phalcon\Cli\Router\Route; use Phalcon\Cli\Router\Exception; use Phalcon\Cli\Router\RouteInterface; -use Phalcon\Cli\RouterInterface; /** * Phalcon\Cli\Router is the standard framework router. Routing is the process @@ -36,7 +35,7 @@ * echo $router->getTaskName(); * ``` */ -class Router extends AbstractInjectionAware implements \Phalcon\Cli\RouterInterface +class Router extends AbstractInjectionAware { /** * @var string @@ -114,8 +113,8 @@ public function __construct(bool $defaultRoutes = true) * $router->add("/about", "About::main"); * ``` * - * @param string $pattern - * @param mixed|null $paths + * @param string|array $paths + * @param string $pattern * @return RouteInterface */ public function add(string $pattern, $paths = null): RouteInterface @@ -136,7 +135,7 @@ public function getActionName(): string * * @return RouteInterface|null */ - public function getMatchedRoute(): RouteInterface|null + public function getMatchedRoute(): ?RouteInterface { } @@ -180,10 +179,10 @@ public function getParameters(): array /** * Returns a route object by its id * - * @param mixed $id + * @param int $id * @return bool|RouteInterface */ - public function getRouteById($id): RouteInterface|bool + public function getRouteById($id) { } @@ -193,7 +192,7 @@ public function getRouteById($id): RouteInterface|bool * @param string $name * @return bool|RouteInterface */ - public function getRouteByName(string $name): RouteInterface|bool + public function getRouteByName(string $name) { } @@ -228,9 +227,9 @@ public function handle($arguments = null) * Sets the default action name * * @param string $actionName - * @return RouterInterface + * @return Router */ - public function setDefaultAction(string $actionName): RouterInterface + public function setDefaultAction(string $actionName): Router { } @@ -238,9 +237,9 @@ public function setDefaultAction(string $actionName): RouterInterface * Sets the name of the default module * * @param string $moduleName - * @return RouterInterface + * @return Router */ - public function setDefaultModule(string $moduleName): RouterInterface + public function setDefaultModule(string $moduleName): Router { } @@ -259,9 +258,9 @@ public function setDefaultModule(string $moduleName): RouterInterface * ``` * * @param array $defaults - * @return RouterInterface + * @return Router */ - public function setDefaults(array $defaults): RouterInterface + public function setDefaults(array $defaults): Router { } diff --git a/src/Cli/Router/Route.php b/src/Cli/Router/Route.php index f6a9a637..20c2ff6f 100644 --- a/src/Cli/Router/Route.php +++ b/src/Cli/Router/Route.php @@ -130,7 +130,7 @@ public static function delimiter(string $delimiter = null): void * @param string $pattern * @return array|bool */ - public function extractNamedParams(string $pattern): bool|array + public function extractNamedParams(string $pattern) { } @@ -139,7 +139,7 @@ public function extractNamedParams(string $pattern): bool|array * * @return mixed */ - public function getBeforeMatch(): mixed + public function getBeforeMatch() { } diff --git a/src/Cli/RouterInterface.php b/src/Cli/RouterInterface.php index 97ba6edc..2393d25b 100644 --- a/src/Cli/RouterInterface.php +++ b/src/Cli/RouterInterface.php @@ -37,7 +37,7 @@ public function getActionName(): string; * * @return RouteInterface|null */ - public function getMatchedRoute(): RouteInterface|null; + public function getMatchedRoute(): ?RouteInterface; /** * Return the sub expressions in the regular expression matched @@ -72,17 +72,17 @@ public function getParameters(): array; * Returns a route object by its id * * @param mixed $id - * @return bool|RouteInterface + * @return RouteInterface */ - public function getRouteById($id): RouteInterface|bool; + public function getRouteById($id): RouteInterface; /** * Returns a route object by its name * * @param string $name - * @return bool|RouteInterface + * @return RouteInterface */ - public function getRouteByName(string $name): RouteInterface|bool; + public function getRouteByName(string $name): RouteInterface; /** * Return all the routes defined in the router @@ -109,25 +109,25 @@ public function handle($arguments = null); * Sets the default action name * * @param string $actionName - * @return RouterInterface + * @return void */ - public function setDefaultAction(string $actionName): RouterInterface; + public function setDefaultAction(string $actionName): void; /** * Sets the name of the default module * * @param string $moduleName - * @return RouterInterface + * @return void */ - public function setDefaultModule(string $moduleName): RouterInterface; + public function setDefaultModule(string $moduleName): void; /** * Sets an array of default paths * * @param array $defaults - * @return RouterInterface + * @return void */ - public function setDefaults(array $defaults): RouterInterface; + public function setDefaults(array $defaults): void; /** * Sets the default task name diff --git a/src/Cli/Task.php b/src/Cli/Task.php index 7ae41b08..96885d53 100644 --- a/src/Cli/Task.php +++ b/src/Cli/Task.php @@ -56,7 +56,7 @@ final public function __construct() * * @return ManagerInterface|null */ - public function getEventsManager(): ManagerInterface|null + public function getEventsManager(): ?ManagerInterface { } diff --git a/src/Config/Adapter/Ini.php b/src/Config/Adapter/Ini.php index 219cf4f3..bed83dd4 100644 --- a/src/Config/Adapter/Ini.php +++ b/src/Config/Adapter/Ini.php @@ -77,7 +77,7 @@ public function __construct(string $filePath, int $mode = 1) * * @return mixed */ - protected function cast($ini): mixed + protected function cast($ini) { } diff --git a/src/Config/Config.php b/src/Config/Config.php index 1cf7863a..e31b4262 100644 --- a/src/Config/Config.php +++ b/src/Config/Config.php @@ -91,7 +91,7 @@ public function merge($toMerge): ConfigInterface * * @return mixed */ - public function path(string $path, $defaultValue = null, string $delimiter = null): mixed + public function path(string $path, $defaultValue = null, string $delimiter = null) { } diff --git a/src/Config/ConfigInterface.php b/src/Config/ConfigInterface.php index 690ec4a3..9445c4d1 100644 --- a/src/Config/ConfigInterface.php +++ b/src/Config/ConfigInterface.php @@ -37,7 +37,7 @@ public function merge($toMerge): ConfigInterface; * * @return mixed */ - public function path(string $path, $defaultValue = null, string $delimiter = null): mixed; + public function path(string $path, $defaultValue = null, string $delimiter = null); /** * @param string|null $delimiter diff --git a/src/DataMapper/Pdo/Connection/AbstractConnection.php b/src/DataMapper/Pdo/Connection/AbstractConnection.php index 8bc3addc..2de1d6ce 100644 --- a/src/DataMapper/Pdo/Connection/AbstractConnection.php +++ b/src/DataMapper/Pdo/Connection/AbstractConnection.php @@ -82,7 +82,7 @@ abstract public function disconnect(): void; * * @return string|null */ - public function errorCode(): string|null + public function errorCode(): ?string { } @@ -195,7 +195,7 @@ public function fetchGroup(string $statement, array $values = [], int $flags = \ * @return object * @param string $className */ - public function fetchObject(string $statement, array $values = [], string $className = 'stdClass', array $arguments = []): object + public function fetchObject(string $statement, array $values = [], string $className = 'stdClass', array $arguments = []) { } @@ -274,7 +274,7 @@ public function getAdapter(): \PDO * * @return mixed */ - public function getAttribute(int $attribute): mixed + public function getAttribute(int $attribute) { } @@ -371,7 +371,7 @@ public function perform(string $statement, array $values = []): \PDOStatement * * @return \PDOStatement|false */ - public function prepare(string $statement, array $options = []): \PDOStatement|bool + public function prepare(string $statement, array $options = []) { } @@ -384,7 +384,7 @@ public function prepare(string $statement, array $options = []): \PDOStatement|b * * @return \PDOStatement|false */ - public function query(string $statement): \PDOStatement|bool + public function query(string $statement) { } diff --git a/src/DataMapper/Pdo/Connection/ConnectionInterface.php b/src/DataMapper/Pdo/Connection/ConnectionInterface.php index 09f9e2b0..20bba058 100644 --- a/src/DataMapper/Pdo/Connection/ConnectionInterface.php +++ b/src/DataMapper/Pdo/Connection/ConnectionInterface.php @@ -111,7 +111,7 @@ public function fetchGroup(string $statement, array $values = [], int $flags = \ * @return object * @param string $className */ - public function fetchObject(string $statement, array $values = [], string $className = 'stdClass', array $arguments = []): object; + public function fetchObject(string $statement, array $values = [], string $className = 'stdClass', array $arguments = []); /** * Fetches a sequential array of rows from the database; the rows are @@ -162,7 +162,7 @@ public function fetchPairs(string $statement, array $values = []): array; * * @return mixed */ - public function fetchValue(string $statement, array $values = []): mixed; + public function fetchValue(string $statement, array $values = []); /** * Return the inner PDO (if any) diff --git a/src/DataMapper/Pdo/Connection/PdoInterface.php b/src/DataMapper/Pdo/Connection/PdoInterface.php index 25680ebe..14b42be3 100644 --- a/src/DataMapper/Pdo/Connection/PdoInterface.php +++ b/src/DataMapper/Pdo/Connection/PdoInterface.php @@ -35,7 +35,7 @@ public function commit(): bool; * * @return string|null */ - public function errorCode(): string|null; + public function errorCode(): ?string; /** * Gets the most recent error info. @@ -61,7 +61,7 @@ public function exec(string $statement): int; * * @return mixed */ - public function getAttribute(int $attribute): mixed; + public function getAttribute(int $attribute); /** * Return an array of available PDO drivers (empty array if none available) @@ -97,7 +97,7 @@ public function lastInsertId(string $name = null): string; * * @return \PDOStatement|false */ - public function prepare(string $statement, array $options = []): \PDOStatement|bool; + public function prepare(string $statement, array $options = []); /** * Queries the database and returns a PDOStatement. If the profiler is @@ -108,7 +108,7 @@ public function prepare(string $statement, array $options = []): \PDOStatement|b * * @return \PDOStatement|false */ - public function query(string $statement): \PDOStatement|bool; + public function query(string $statement); /** * Quotes a value for use in an SQL statement. This differs from diff --git a/src/Db/Adapter/AbstractAdapter.php b/src/Db/Adapter/AbstractAdapter.php index ad4b5c48..c8ae39b8 100644 --- a/src/Db/Adapter/AbstractAdapter.php +++ b/src/Db/Adapter/AbstractAdapter.php @@ -470,7 +470,7 @@ public function fetchAll(string $sqlQuery, int $fetchMode = Enum::FETCH_ASSOC, a * @param mixed $column * @return string|bool */ - public function fetchColumn(string $sqlQuery, array $placeholders = [], $column = 0): bool|string + public function fetchColumn(string $sqlQuery, array $placeholders = [], $column = 0) { } @@ -623,7 +623,7 @@ public function getDialectType(): string * * @return ManagerInterface|null */ - public function getEventsManager(): ManagerInterface|null + public function getEventsManager(): ?ManagerInterface { } diff --git a/src/Db/Adapter/AdapterInterface.php b/src/Db/Adapter/AdapterInterface.php index a2a7a5ab..5441886f 100644 --- a/src/Db/Adapter/AdapterInterface.php +++ b/src/Db/Adapter/AdapterInterface.php @@ -287,7 +287,7 @@ public function fetchAll(string $sqlQuery, int $fetchMode = 2, array $bindParams * @param mixed $column * @return string|bool */ - public function fetchColumn(string $sqlQuery, array $placeholders = [], $column = 0): bool|string; + public function fetchColumn(string $sqlQuery, array $placeholders = [], $column = 0); /** * Returns the first row in a SQL query result @@ -388,7 +388,7 @@ public function getDefaultValue(): RawValue; * * @return mixed */ - public function getInternalHandler(): mixed; + public function getInternalHandler(); /** * Returns the savepoint name to use for nested transactions @@ -488,7 +488,7 @@ public function isUnderTransaction(): bool; * @param string|null $name Name of the sequence object from which the ID should be returned. * @return string|bool */ - public function lastInsertId(string $name = null): bool|string; + public function lastInsertId(string $name = null); /** * Appends a LIMIT clause to sqlQuery argument @@ -536,7 +536,7 @@ public function modifyColumn(string $tableName, string $schemaName, \Phalcon\Db\ * @param array $bindTypes * @return bool|ResultInterface */ - public function query(string $sqlStatement, array $bindParams = [], array $bindTypes = []): ResultInterface|bool; + public function query(string $sqlStatement, array $bindParams = [], array $bindTypes = []); /** * Releases given savepoint diff --git a/src/Db/Adapter/Pdo/AbstractPdo.php b/src/Db/Adapter/Pdo/AbstractPdo.php index f5c8f894..c89ae7b5 100644 --- a/src/Db/Adapter/Pdo/AbstractPdo.php +++ b/src/Db/Adapter/Pdo/AbstractPdo.php @@ -259,7 +259,7 @@ public function getErrorInfo(): array * * @return mixed */ - public function getInternalHandler(): mixed + public function getInternalHandler() { } @@ -315,7 +315,7 @@ public function isUnderTransaction(): bool * @param string|null $name * @return string|bool */ - public function lastInsertId(string $name = null): bool|string + public function lastInsertId(string $name = null) { } @@ -371,7 +371,7 @@ public function prepare(string $sqlStatement): \PDOStatement * @param array $bindTypes * @return bool|ResultInterface */ - public function query(string $sqlStatement, array $bindParams = [], array $bindTypes = []): ResultInterface|bool + public function query(string $sqlStatement, array $bindParams = [], array $bindTypes = []) { } diff --git a/src/Db/Column.php b/src/Db/Column.php index dd352d2d..36830e9c 100644 --- a/src/Db/Column.php +++ b/src/Db/Column.php @@ -344,7 +344,7 @@ public function __construct(string $name, array $definition) * * @return string|null */ - public function getAfterPosition(): string|null + public function getAfterPosition(): ?string { } @@ -362,7 +362,7 @@ public function getBindType(): int * * @return string|null */ - public function getComment(): string|null + public function getComment(): ?string { } @@ -371,7 +371,7 @@ public function getComment(): string|null * * @return mixed */ - public function getDefault(): mixed + public function getDefault() { } @@ -398,7 +398,7 @@ public function getScale(): int * * @return int|string */ - public function getSize(): int|string + public function getSize() { } @@ -425,7 +425,7 @@ public function getTypeReference(): int * * @return array|string */ - public function getTypeValues(): string|array + public function getTypeValues() { } diff --git a/src/Db/ColumnInterface.php b/src/Db/ColumnInterface.php index b0850240..105a05aa 100644 --- a/src/Db/ColumnInterface.php +++ b/src/Db/ColumnInterface.php @@ -19,7 +19,7 @@ interface ColumnInterface * * @return string|null */ - public function getAfterPosition(): string|null; + public function getAfterPosition(): ?string; /** * Returns the type of bind handling @@ -33,7 +33,7 @@ public function getBindType(): int; * * @return mixed */ - public function getDefault(): mixed; + public function getDefault(); /** * Returns column name @@ -54,7 +54,7 @@ public function getScale(): int; * * @return int|string */ - public function getSize(): int|string; + public function getSize(); /** * Returns column type @@ -75,7 +75,7 @@ public function getTypeReference(): int; * * @return array|string */ - public function getTypeValues(): string|array; + public function getTypeValues(); /** * Check whether column has default value diff --git a/src/Db/ResultInterface.php b/src/Db/ResultInterface.php index 34247cd8..e080f615 100644 --- a/src/Db/ResultInterface.php +++ b/src/Db/ResultInterface.php @@ -38,7 +38,7 @@ public function execute(): bool; * * @return mixed */ - public function fetch(): mixed; + public function fetch(); /** * Returns an array of arrays containing all the records in the result. This @@ -56,7 +56,7 @@ public function fetchAll(): array; * * @return mixed */ - public function fetchArray(): mixed; + public function fetchArray(); /** * Gets the internal PDO result object diff --git a/src/Di/Di.php b/src/Di/Di.php index 1dbf9696..ba3669e6 100644 --- a/src/Di/Di.php +++ b/src/Di/Di.php @@ -104,7 +104,7 @@ public function __construct() * @param array $arguments * @return mixed|null */ - public function __call(string $method, array $arguments = []): mixed + public function __call(string $method, array $arguments = []) { } @@ -118,7 +118,7 @@ public function __call(string $method, array $arguments = []): mixed * @param bool $shared * @return bool|ServiceInterface */ - public function attempt(string $name, $definition, bool $shared = false): ServiceInterface|bool + public function attempt(string $name, $definition, bool $shared = false) { } @@ -129,7 +129,7 @@ public function attempt(string $name, $definition, bool $shared = false): Servic * @param mixed $parameters * @return mixed */ - public function get(string $name, $parameters = null): mixed + public function get(string $name, $parameters = null) { } @@ -138,7 +138,7 @@ public function get(string $name, $parameters = null): mixed * * @return DiInterface|null */ - public static function getDefault(): DiInterface|null + public static function getDefault(): ?DiInterface { } @@ -147,7 +147,7 @@ public static function getDefault(): DiInterface|null * * @return ManagerInterface|null */ - public function getInternalEventsManager(): ManagerInterface|null + public function getInternalEventsManager(): ?ManagerInterface { } @@ -157,7 +157,7 @@ public function getInternalEventsManager(): ManagerInterface|null * @param string $name * @return mixed */ - public function getRaw(string $name): mixed + public function getRaw(string $name) { } @@ -188,7 +188,7 @@ public function getServices(): array * @param mixed $parameters * @return mixed */ - public function getShared(string $name, $parameters = null): mixed + public function getShared(string $name, $parameters = null) { } @@ -300,7 +300,7 @@ public function has(string $name): bool * @param mixed $name * @return mixed */ - public function offsetGet($name): mixed + public function offsetGet($name) { } diff --git a/src/Di/DiInterface.php b/src/Di/DiInterface.php index 129a3627..45848f56 100644 --- a/src/Di/DiInterface.php +++ b/src/Di/DiInterface.php @@ -26,7 +26,7 @@ interface DiInterface extends \ArrayAccess * @param bool $shared * @return bool|ServiceInterface */ - public function attempt(string $name, $definition, bool $shared = false): ServiceInterface|bool; + public function attempt(string $name, $definition, bool $shared = false); /** * Resolves the service based on its configuration @@ -35,14 +35,14 @@ public function attempt(string $name, $definition, bool $shared = false): Servic * @param mixed $parameters * @return mixed */ - public function get(string $name, $parameters = null): mixed; + public function get(string $name, $parameters = null); /** * Return the last DI created * * @return DiInterface|null */ - public static function getDefault(): DiInterface|null; + public static function getDefault(): ?DiInterface; /** * Returns a service definition without resolving @@ -50,7 +50,7 @@ public static function getDefault(): DiInterface|null; * @param string $name * @return mixed */ - public function getRaw(string $name): mixed; + public function getRaw(string $name); /** * Returns the corresponding Phalcon\Di\Service instance for a service @@ -74,7 +74,7 @@ public function getServices(): array; * @param mixed $parameters * @return mixed */ - public function getShared(string $name, $parameters = null): mixed; + public function getShared(string $name, $parameters = null); /** * Check whether the DI contains a service by a name diff --git a/src/Di/Injectable.php b/src/Di/Injectable.php index 17acd61a..1d60e5a2 100644 --- a/src/Di/Injectable.php +++ b/src/Di/Injectable.php @@ -57,7 +57,7 @@ abstract class Injectable extends stdClass implements \Phalcon\Di\InjectionAware * @param string $propertyName * @return mixed|null */ - public function __get(string $propertyName): mixed + public function __get(string $propertyName) { } diff --git a/src/Di/Service.php b/src/Di/Service.php index 4b476eb2..2c38e312 100644 --- a/src/Di/Service.php +++ b/src/Di/Service.php @@ -62,7 +62,7 @@ final public function __construct($definition, bool $shared = false) * * @return mixed */ - public function getDefinition(): mixed + public function getDefinition() { } @@ -101,7 +101,7 @@ public function isShared(): bool * @param DiInterface $container * @return mixed */ - public function resolve($parameters = null, DiInterface $container = null): mixed + public function resolve($parameters = null, DiInterface $container = null) { } diff --git a/src/Di/ServiceInterface.php b/src/Di/ServiceInterface.php index caae26ab..7d6db4dc 100644 --- a/src/Di/ServiceInterface.php +++ b/src/Di/ServiceInterface.php @@ -19,7 +19,7 @@ interface ServiceInterface * * @return mixed */ - public function getDefinition(): mixed; + public function getDefinition(); /** * Returns a parameter in a specific position @@ -50,7 +50,7 @@ public function isShared(): bool; * @param DiInterface $container * @return mixed */ - public function resolve($parameters = null, DiInterface $container = null): mixed; + public function resolve($parameters = null, DiInterface $container = null); /** * Set the service definition diff --git a/src/Dispatcher/AbstractDispatcher.php b/src/Dispatcher/AbstractDispatcher.php index 85a14b7a..29adc1d9 100644 --- a/src/Dispatcher/AbstractDispatcher.php +++ b/src/Dispatcher/AbstractDispatcher.php @@ -170,7 +170,7 @@ public function callActionMethod($handler, string $actionMethod, array $params = * * @throws \Exception if any uncaught or unhandled exception occurs during the dispatcher process. */ - public function dispatch(): mixed + public function dispatch() { } @@ -255,7 +255,7 @@ public function getDefaultNamespace(): string * * @return ManagerInterface|null */ - public function getEventsManager(): ManagerInterface|null + public function getEventsManager(): ?ManagerInterface { } @@ -273,7 +273,7 @@ public function getHandlerSuffix(): string * * @return BinderInterface|null */ - public function getModelBinder(): BinderInterface|null + public function getModelBinder(): ?BinderInterface { } @@ -282,7 +282,7 @@ public function getModelBinder(): BinderInterface|null * * @return string|null */ - public function getModuleName(): string|null + public function getModuleName(): ?string { } @@ -305,7 +305,7 @@ public function getNamespaceName(): string * * @todo remove this in future versions */ - public function getParam($param, $filters = null, $defaultValue = null): mixed + public function getParam($param, $filters = null, $defaultValue = null) { } @@ -317,7 +317,7 @@ public function getParam($param, $filters = null, $defaultValue = null): mixed * @param mixed $defaultValue * @return mixed */ - public function getParameter($param, $filters = null, $defaultValue = null): mixed + public function getParameter($param, $filters = null, $defaultValue = null) { } @@ -546,7 +546,7 @@ public function setNamespaceName(string $namespaceName): void * * @return mixed */ - public function getReturnedValue(): mixed + public function getReturnedValue() { } diff --git a/src/Dispatcher/DispatcherInterface.php b/src/Dispatcher/DispatcherInterface.php index ec96fabc..564198c4 100644 --- a/src/Dispatcher/DispatcherInterface.php +++ b/src/Dispatcher/DispatcherInterface.php @@ -19,7 +19,7 @@ interface DispatcherInterface * * @return mixed */ - public function dispatch(): mixed; + public function dispatch(); /** * Forwards the execution flow to another controller/action @@ -57,7 +57,7 @@ public function getHandlerSuffix(): string; * @param mixed $param * @return mixed */ - public function getParam($param, $filters = null): mixed; + public function getParam($param, $filters = null); /** * Gets a param by its name or numeric index @@ -66,7 +66,7 @@ public function getParam($param, $filters = null): mixed; * @param mixed $param * @return mixed */ - public function getParameter($param, $filters = null): mixed; + public function getParameter($param, $filters = null); /** * Gets action params @@ -87,7 +87,7 @@ public function getParameters(): array; * * @return mixed */ - public function getReturnedValue(): mixed; + public function getReturnedValue(); /** * Check if a param exists diff --git a/src/Domain/Payload/Payload.php b/src/Domain/Payload/Payload.php index 82b43b93..589c7c6f 100644 --- a/src/Domain/Payload/Payload.php +++ b/src/Domain/Payload/Payload.php @@ -63,7 +63,7 @@ class Payload implements \Phalcon\Domain\Payload\PayloadInterface * * @return Throwable|null */ - public function getException(): Throwable|null + public function getException(): ?Throwable { } @@ -72,7 +72,7 @@ public function getException(): Throwable|null * * @return mixed */ - public function getExtras(): mixed + public function getExtras() { } @@ -81,7 +81,7 @@ public function getExtras(): mixed * * @return mixed */ - public function getInput(): mixed + public function getInput() { } @@ -90,7 +90,7 @@ public function getInput(): mixed * * @return mixed */ - public function getMessages(): mixed + public function getMessages() { } @@ -99,7 +99,7 @@ public function getMessages(): mixed * * @return mixed */ - public function getStatus(): mixed + public function getStatus() { } @@ -108,7 +108,7 @@ public function getStatus(): mixed * * @return mixed */ - public function getOutput(): mixed + public function getOutput() { } diff --git a/src/Domain/Payload/ReadableInterface.php b/src/Domain/Payload/ReadableInterface.php index d59d23bf..7521e149 100644 --- a/src/Domain/Payload/ReadableInterface.php +++ b/src/Domain/Payload/ReadableInterface.php @@ -21,40 +21,40 @@ interface ReadableInterface * * @return Throwable|null */ - public function getException(): Throwable|null; + public function getException(): ?Throwable; /** * Gets arbitrary extra values produced by the domain layer. * * @return mixed */ - public function getExtras(): mixed; + public function getExtras(); /** * Gets the input received by the domain layer. * * @return mixed */ - public function getInput(): mixed; + public function getInput(); /** * Gets the messages produced by the domain layer. * * @return mixed */ - public function getMessages(): mixed; + public function getMessages(); /** * Gets the output produced from the domain layer. * * @return mixed */ - public function getOutput(): mixed; + public function getOutput(); /** * Gets the status of this payload. * * @return mixed */ - public function getStatus(): mixed; + public function getStatus(); } diff --git a/src/Encryption/Crypt.php b/src/Encryption/Crypt.php index ffdbe90e..810fa4f2 100644 --- a/src/Encryption/Crypt.php +++ b/src/Encryption/Crypt.php @@ -549,7 +549,7 @@ protected function phpFunctionExists(string $name): bool * @param string $cipher * @return int|bool */ - protected function phpOpensslCipherIvLength(string $cipher): int|bool + protected function phpOpensslCipherIvLength(string $cipher) { } diff --git a/src/Encryption/Security.php b/src/Encryption/Security.php index a58e7621..70076691 100644 --- a/src/Encryption/Security.php +++ b/src/Encryption/Security.php @@ -222,7 +222,7 @@ public function getRandomBytes(): int * * @return string|null */ - public function getRequestToken(): string|null + public function getRequestToken(): ?string { } @@ -231,7 +231,7 @@ public function getRequestToken(): string|null * * @return string|null */ - public function getSessionToken(): string|null + public function getSessionToken(): ?string { } @@ -255,7 +255,7 @@ public function getSaltBytes(int $numberBytes = 0): string * @return string * @throws Exception */ - public function getToken(): string|null + public function getToken(): ?string { } @@ -266,7 +266,7 @@ public function getToken(): string|null * @return string|null * @throws Exception */ - public function getTokenKey(): string|null + public function getTokenKey(): ?string { } @@ -383,7 +383,7 @@ private function processCost(array $options = []): int * * @return string|null */ - private function processTokenKey(string $tokenKey = null): string|null + private function processTokenKey(string $tokenKey = null): ?string { } @@ -393,7 +393,7 @@ private function processTokenKey(string $tokenKey = null): string|null * * @return string|null */ - private function processUserToken(string $tokenKey, string $tokenValue = null): string|null + private function processUserToken(string $tokenKey, string $tokenValue = null): ?string { } } diff --git a/src/Encryption/Security/JWT/Builder.php b/src/Encryption/Security/JWT/Builder.php index 1bc108c9..f51888f4 100644 --- a/src/Encryption/Security/JWT/Builder.php +++ b/src/Encryption/Security/JWT/Builder.php @@ -115,14 +115,14 @@ public function getClaims(): array /** * @return string|null */ - public function getContentType(): string|null + public function getContentType(): ?string { } /** * @return int|null */ - public function getExpirationTime(): int|null + public function getExpirationTime(): ?int { } @@ -136,35 +136,35 @@ public function getHeaders(): array /** * @return string|null */ - public function getId(): string|null + public function getId(): ?string { } /** * @return int|null */ - public function getIssuedAt(): int|null + public function getIssuedAt(): ?int { } /** * @return string|null */ - public function getIssuer(): string|null + public function getIssuer(): ?string { } /** * @return int|null */ - public function getNotBefore(): int|null + public function getNotBefore(): ?int { } /** * @return string|null */ - public function getSubject(): string|null + public function getSubject(): ?string { } diff --git a/src/Encryption/Security/JWT/Token/Item.php b/src/Encryption/Security/JWT/Token/Item.php index abee784c..6538eacd 100644 --- a/src/Encryption/Security/JWT/Token/Item.php +++ b/src/Encryption/Security/JWT/Token/Item.php @@ -30,7 +30,7 @@ public function __construct(array $payload, string $encoded) * * @return mixed|null */ - public function get(string $name, $defaultValue = null): mixed + public function get(string $name, $defaultValue = null) { } diff --git a/src/Encryption/Security/JWT/Validator.php b/src/Encryption/Security/JWT/Validator.php index bc99e75e..f6e7423a 100644 --- a/src/Encryption/Security/JWT/Validator.php +++ b/src/Encryption/Security/JWT/Validator.php @@ -65,7 +65,7 @@ public function getErrors(): array * * @return mixed */ - public function get(string $claim): mixed + public function get(string $claim) { } diff --git a/src/Events/AbstractEventsAware.php b/src/Events/AbstractEventsAware.php index 0122db1e..fbf20594 100644 --- a/src/Events/AbstractEventsAware.php +++ b/src/Events/AbstractEventsAware.php @@ -26,7 +26,7 @@ abstract class AbstractEventsAware * * @return ManagerInterface|null */ - public function getEventsManager(): ManagerInterface|null + public function getEventsManager(): ?ManagerInterface { } @@ -49,7 +49,7 @@ public function setEventsManager(\Phalcon\Events\ManagerInterface $eventsManager * * @return mixed|bool */ - protected function fireManagerEvent(string $eventName, $data = null, bool $cancellable = true): mixed + protected function fireManagerEvent(string $eventName, $data = null, bool $cancellable = true) { } } diff --git a/src/Events/Event.php b/src/Events/Event.php index da6a8e5a..696cad71 100644 --- a/src/Events/Event.php +++ b/src/Events/Event.php @@ -74,14 +74,14 @@ public function __construct(string $type, $source = null, $data = null, bool $ca /** * @return mixed */ - public function getData(): mixed + public function getData() { } /** * @return object|null */ - public function getSource(): object|null + public function getSource() { } diff --git a/src/Events/EventInterface.php b/src/Events/EventInterface.php index 1dfbf6ea..46826ae0 100644 --- a/src/Events/EventInterface.php +++ b/src/Events/EventInterface.php @@ -19,14 +19,14 @@ interface EventInterface * * @return mixed */ - public function getData(): mixed; + public function getData(); /** * Gets event type * * @return mixed */ - public function getType(): mixed; + public function getType(); /** * Check whether the event is cancelable diff --git a/src/Events/EventsAwareInterface.php b/src/Events/EventsAwareInterface.php index ce9e45c0..94fcc701 100644 --- a/src/Events/EventsAwareInterface.php +++ b/src/Events/EventsAwareInterface.php @@ -20,7 +20,7 @@ interface EventsAwareInterface * * @return ManagerInterface|null */ - public function getEventsManager(): ManagerInterface|null; + public function getEventsManager(): ?ManagerInterface; /** * Sets the events manager diff --git a/src/Factory/AbstractFactory.php b/src/Factory/AbstractFactory.php index 49e9553e..c7cb8b99 100644 --- a/src/Factory/AbstractFactory.php +++ b/src/Factory/AbstractFactory.php @@ -44,7 +44,7 @@ abstract protected function getServices(): array; * @param string $name * @return mixed */ - protected function getService(string $name): mixed + protected function getService(string $name) { } diff --git a/src/Filter/Filter.php b/src/Filter/Filter.php index bb09a16a..094cbcdb 100644 --- a/src/Filter/Filter.php +++ b/src/Filter/Filter.php @@ -12,28 +12,28 @@ /** * Lazy loads, stores and exposes sanitizer objects * - * @method int absint(mixed $input) - * @method string alnum(mixed $input) - * @method string alpha(mixed $input) - * @method bool bool(mixed $input) - * @method string email(string $input) - * @method float float(mixed $input) - * @method int int(string $input) - * @method string lower(string $input) - * @method string lowerfirst(string $input) - * @method mixed regex(mixed $input, mixed $pattern, mixed $replace) - * @method mixed remove(mixed $input, mixed $replace) - * @method mixed replace(mixed $input, mixed $source, mixed $target) - * @method string special(string $input) - * @method string specialfull(string $input) - * @method string string(string $input) - * @method string stringlegacy(mixed $input) - * @method string striptags(string $input) - * @method string trim(string $input) - * @method string upper(string $input) - * @method string upperFirst(string $input) - * @method string|null upperWords(string $input) - * @method string|null url(string $input) + * @method absint(mixed $input): int + * @method alnum(mixed $input): string + * @method alpha(mixed $input): string + * @method bool(mixed $input): bool + * @method email(string $input): string + * @method float(mixed $input): float + * @method int(string $input): int + * @method lower(string $input): string + * @method lowerfirst(string $input): string + * @method regex(mixed $input, mixed $pattern, mixed $replace): mixed + * @method remove(mixed $input, mixed $replace): mixed + * @method replace(mixed $input, mixed $source, mixed $target): mixed + * @method special(string $input): string + * @method specialfull(string $input): string + * @method string(string $input): string + * @method stringlegacy(mixed $input): string + * @method striptags(string $input): string + * @method trim(string $input): string + * @method upper(string $input): string + * @method upperFirst(string $input): string + * @method upperWords(string $input): string|null + * @method url(string $input): string|null * * @property array $mapper * @property array $services @@ -125,7 +125,7 @@ public function __call(string $name, array $args) * @return mixed * @throws Exception */ - public function get(string $name): mixed + public function get(string $name) { } @@ -150,7 +150,7 @@ public function has(string $name): bool * @return array|false|mixed|null * @throws Exception */ - public function sanitize($value, $sanitizers, bool $noRecursive = false): mixed + public function sanitize($value, $sanitizers, bool $noRecursive = false) { } diff --git a/src/Filter/FilterInterface.php b/src/Filter/FilterInterface.php index 6ab06f35..53036b34 100644 --- a/src/Filter/FilterInterface.php +++ b/src/Filter/FilterInterface.php @@ -23,5 +23,5 @@ interface FilterInterface * * @return mixed */ - public function sanitize($value, $sanitizers, bool $noRecursive = false): mixed; + public function sanitize($value, $sanitizers, bool $noRecursive = false); } diff --git a/src/Filter/Validation.php b/src/Filter/Validation.php index d867935b..6001c886 100644 --- a/src/Filter/Validation.php +++ b/src/Filter/Validation.php @@ -115,7 +115,7 @@ public function bind($entity, $data): ValidationInterface /** * @return mixed */ - public function getData(): mixed + public function getData() { } @@ -124,7 +124,7 @@ public function getData(): mixed * * @return object */ - public function getEntity(): mixed + public function getEntity() { } @@ -134,7 +134,7 @@ public function getEntity(): mixed * @param string $field * @return mixed|null */ - public function getFilters(string $field = null): mixed + public function getFilters(string $field = null) { } @@ -173,7 +173,7 @@ public function getValidators(): array * @param string $field * @return mixed|null */ - public function getValueByEntity($entity, string $field): mixed + public function getValueByEntity($entity, string $field) { } @@ -184,7 +184,7 @@ public function getValueByEntity($entity, string $field): mixed * @param string $field * @return mixed|null */ - public function getValueByData($data, string $field): mixed + public function getValueByData($data, string $field) { } @@ -194,7 +194,7 @@ public function getValueByData($data, string $field): mixed * @param string $field * @return mixed|null */ - public function getValue(string $field): mixed + public function getValue(string $field) { } @@ -264,10 +264,10 @@ public function setValidators(array $validators): Validation * Validate a set of data according to a set of rules * * @param array|object $data - * @param object $entity + * @param object $entity * * @return Messages|false */ - public function validate($data = null, $entity = null): Messages|bool + public function validate($data = null, $entity = null) { } diff --git a/src/Filter/Validation/AbstractValidator.php b/src/Filter/Validation/AbstractValidator.php index f5d1349c..d25ac478 100644 --- a/src/Filter/Validation/AbstractValidator.php +++ b/src/Filter/Validation/AbstractValidator.php @@ -55,7 +55,7 @@ public function __construct(array $options = []) * * @return mixed */ - public function getOption(string $key, $defaultValue = null): mixed + public function getOption(string $key, $defaultValue = null) { } @@ -166,7 +166,7 @@ protected function allowEmpty($field, $value): bool * * @return mixed */ - protected function checkArray($value, string $field): mixed + protected function checkArray($value, string $field) { } @@ -189,7 +189,7 @@ protected function prepareCode(string $field): int * * @return mixed */ - protected function prepareLabel(\Phalcon\Filter\Validation $validation, string $field): mixed + protected function prepareLabel(\Phalcon\Filter\Validation $validation, string $field) { } } diff --git a/src/Filter/Validation/ValidationInterface.php b/src/Filter/Validation/ValidationInterface.php index 2b16c260..4f762607 100644 --- a/src/Filter/Validation/ValidationInterface.php +++ b/src/Filter/Validation/ValidationInterface.php @@ -50,7 +50,7 @@ public function bind($entity, $data): ValidationInterface; * * @return object */ - public function getEntity(): mixed; + public function getEntity(); /** * Returns all the filters or a specific one @@ -58,7 +58,7 @@ public function getEntity(): mixed; * @param string $field * @return mixed|null */ - public function getFilters(string $field = null): mixed; + public function getFilters(string $field = null); /** * Get label for field @@ -88,7 +88,7 @@ public function getValidators(): array; * @param string $field * @return mixed|null */ - public function getValue(string $field): mixed; + public function getValue(string $field); /** * Alias of `add` method @@ -129,8 +129,8 @@ public function setLabels(array $labels): void; * Validate a set of data according to a set of rules * * @param array|object $data - * @param object $entity + * @param object $entity * * @return Messages|false */ - public function validate($data = null, $entity = null): Messages|bool; + public function validate($data = null, $entity = null); } diff --git a/src/Filter/Validation/ValidatorInterface.php b/src/Filter/Validation/ValidatorInterface.php index da611a6c..0b84f4b3 100644 --- a/src/Filter/Validation/ValidatorInterface.php +++ b/src/Filter/Validation/ValidatorInterface.php @@ -24,7 +24,7 @@ interface ValidatorInterface * @param string $key * @param mixed $defaultValue */ - public function getOption(string $key, $defaultValue = null): mixed; + public function getOption(string $key, $defaultValue = null); /** * Get the template message diff --git a/src/Flash/AbstractFlash.php b/src/Flash/AbstractFlash.php index d2f8d239..9ae7498d 100644 --- a/src/Flash/AbstractFlash.php +++ b/src/Flash/AbstractFlash.php @@ -111,7 +111,7 @@ public function clear(): void * * @return string|null */ - public function error(string $message): string|null + public function error(string $message): ?string { } @@ -171,7 +171,7 @@ public function getEscaperService(): EscaperInterface * * @return string|null */ - public function notice(string $message): string|null + public function notice(string $message): ?string { } @@ -257,7 +257,7 @@ public function setImplicitFlush(bool $implicitFlush): AbstractFlash * * @return string|null */ - public function success(string $message): string|null + public function success(string $message): ?string { } @@ -274,7 +274,7 @@ public function success(string $message): string|null * @return string|null * @throws Exception */ - public function outputMessage(string $type, $message): string|null + public function outputMessage(string $type, $message): ?string { } @@ -289,7 +289,7 @@ public function outputMessage(string $type, $message): string|null * * @return string|null */ - public function warning(string $message): string|null + public function warning(string $message): ?string { } diff --git a/src/Flash/Direct.php b/src/Flash/Direct.php index 341a3d8e..4c70a180 100644 --- a/src/Flash/Direct.php +++ b/src/Flash/Direct.php @@ -25,7 +25,7 @@ class Direct extends \Phalcon\Flash\AbstractFlash * @return string|null * @throws Exception */ - public function message(string $type, $message): string|null + public function message(string $type, $message): ?string { } diff --git a/src/Flash/FlashInterface.php b/src/Flash/FlashInterface.php index f0450924..df8d7519 100644 --- a/src/Flash/FlashInterface.php +++ b/src/Flash/FlashInterface.php @@ -23,7 +23,7 @@ interface FlashInterface * * @return string|null */ - public function error(string $message): string|null; + public function error(string $message): ?string; /** * Outputs a message @@ -33,7 +33,7 @@ public function error(string $message): string|null; * * @return string|null */ - public function message(string $type, string $message): string|null; + public function message(string $type, string $message): ?string; /** * Shows a HTML notice/information message @@ -42,7 +42,7 @@ public function message(string $type, string $message): string|null; * * @return string|null */ - public function notice(string $message): string|null; + public function notice(string $message): ?string; /** * Shows a HTML success message @@ -51,7 +51,7 @@ public function notice(string $message): string|null; * * @return string|null */ - public function success(string $message): string|null; + public function success(string $message): ?string; /** * Shows a HTML warning message @@ -60,5 +60,5 @@ public function success(string $message): string|null; * * @return string|null */ - public function warning(string $message): string|null; + public function warning(string $message): ?string; } diff --git a/src/Flash/Session.php b/src/Flash/Session.php index bea59799..7850ac18 100644 --- a/src/Flash/Session.php +++ b/src/Flash/Session.php @@ -69,7 +69,7 @@ public function has(string $type = null): bool * @return string|null * @throws Exception */ - public function message(string $type, $message): string|null + public function message(string $type, $message): ?string { } diff --git a/src/Forms/Element/AbstractElement.php b/src/Forms/Element/AbstractElement.php index b8dac501..4121461a 100644 --- a/src/Forms/Element/AbstractElement.php +++ b/src/Forms/Element/AbstractElement.php @@ -156,7 +156,7 @@ public function clear(): ElementInterface * @param mixed $defaultValue * @return mixed */ - public function getAttribute(string $attribute, $defaultValue = null): mixed + public function getAttribute(string $attribute, $defaultValue = null) { } @@ -174,7 +174,7 @@ public function getAttributes(): array * * @return mixed */ - public function getDefault(): mixed + public function getDefault() { } @@ -229,7 +229,7 @@ public function getName(): string * * @return TagFactory|null */ - public function getTagFactory(): TagFactory|null + public function getTagFactory(): ?TagFactory { } @@ -240,7 +240,7 @@ public function getTagFactory(): TagFactory|null * @param mixed $defaultValue * @return mixed */ - public function getUserOption(string $option, $defaultValue = null): mixed + public function getUserOption(string $option, $defaultValue = null) { } @@ -267,7 +267,7 @@ public function getValidators(): array * * @return mixed */ - public function getValue(): mixed + public function getValue() { } diff --git a/src/Forms/Element/ElementInterface.php b/src/Forms/Element/ElementInterface.php index d8c94a93..d5f76076 100644 --- a/src/Forms/Element/ElementInterface.php +++ b/src/Forms/Element/ElementInterface.php @@ -66,7 +66,7 @@ public function clear(): ElementInterface; * @param mixed $defaultValue * @return mixed */ - public function getAttribute(string $attribute, $defaultValue = null): mixed; + public function getAttribute(string $attribute, $defaultValue = null); /** * Returns the default attributes for the element @@ -80,7 +80,7 @@ public function getAttributes(): array; * * @return mixed */ - public function getDefault(): mixed; + public function getDefault(); /** * Returns the element's filters @@ -125,7 +125,7 @@ public function getName(): string; * @param mixed $defaultValue * @return mixed */ - public function getUserOption(string $option, $defaultValue = null): mixed; + public function getUserOption(string $option, $defaultValue = null); /** * Returns the options for the element @@ -146,7 +146,7 @@ public function getValidators(): array; * * @return mixed */ - public function getValue(): mixed; + public function getValue(); /** * Checks whether there are messages attached to the element diff --git a/src/Forms/Form.php b/src/Forms/Form.php index 6476bd9f..9042e5ee 100644 --- a/src/Forms/Form.php +++ b/src/Forms/Form.php @@ -146,7 +146,7 @@ public function count(): int * * @return mixed */ - public function current(): mixed + public function current() { } @@ -202,7 +202,7 @@ public function getEntity() * @param string $name * @return mixed|null */ - public function getFilteredValue(string $name): mixed + public function getFilteredValue(string $name) { } @@ -231,7 +231,7 @@ public function getLabel(string $name): string * * @return array|Messages */ - public function getMessages(): Messages|array + public function getMessages() { } @@ -250,7 +250,7 @@ public function getMessagesFor(string $name): Messages * * @return TagFactory|null */ - public function getTagFactory(): TagFactory|null + public function getTagFactory(): ?TagFactory { } @@ -261,7 +261,7 @@ public function getTagFactory(): TagFactory|null * @param mixed $defaultValue * @return mixed */ - public function getUserOption(string $option, $defaultValue = null): mixed + public function getUserOption(string $option, $defaultValue = null) { } @@ -280,7 +280,7 @@ public function getUserOptions(): array * @param string $name * @return mixed|null */ - public function getValue(string $name): mixed + public function getValue(string $name) { } @@ -289,7 +289,7 @@ public function getValue(string $name): mixed * * @return ValidationInterface|null */ - public function getValidation(): ValidationInterface|null + public function getValidation(): ?ValidationInterface { } diff --git a/src/Html/Escaper.php b/src/Html/Escaper.php index ce4b1bcc..8d76a301 100644 --- a/src/Html/Escaper.php +++ b/src/Html/Escaper.php @@ -86,7 +86,7 @@ public function css(string $input): string * * @return string|null */ - final public function detectEncoding(string $input): string|null + final public function detectEncoding(string $input): ?string { } diff --git a/src/Html/Link/Serializer/Header.php b/src/Html/Link/Serializer/Header.php index e3363d1f..1c284ddf 100644 --- a/src/Html/Link/Serializer/Header.php +++ b/src/Html/Link/Serializer/Header.php @@ -20,7 +20,7 @@ class Header implements \Phalcon\Html\Link\Serializer\SerializerInterface * @param array $links * @return string|null */ - public function serialize(array $links): string|null + public function serialize(array $links): ?string { } } diff --git a/src/Html/Link/Serializer/SerializerInterface.php b/src/Html/Link/Serializer/SerializerInterface.php index 7dbc437d..aa1a5032 100644 --- a/src/Html/Link/Serializer/SerializerInterface.php +++ b/src/Html/Link/Serializer/SerializerInterface.php @@ -20,5 +20,5 @@ interface SerializerInterface * @param array $links * @return string|null */ - public function serialize(array $links): string|null; + public function serialize(array $links): ?string; } diff --git a/src/Html/TagFactory.php b/src/Html/TagFactory.php index 6456dec2..60a5e66f 100644 --- a/src/Html/TagFactory.php +++ b/src/Html/TagFactory.php @@ -149,7 +149,7 @@ public function has(string $name): bool * @return mixed * @throws Exception */ - public function newInstance(string $name): mixed + public function newInstance(string $name) { } diff --git a/src/Http/Cookie.php b/src/Http/Cookie.php index 7984f4e9..f3e7b36d 100644 --- a/src/Http/Cookie.php +++ b/src/Http/Cookie.php @@ -194,7 +194,7 @@ public function getSecure(): bool * @param mixed $defaultValue * @return mixed */ - public function getValue($filters = null, $defaultValue = null): mixed + public function getValue($filters = null, $defaultValue = null) { } @@ -346,7 +346,7 @@ protected function assertSignKeyIsLongEnough(string $signKey): void * @param mixed $defaultValue * @return mixed */ - private function getArrVal(array $collection, $index, $defaultValue = null): mixed + private function getArrVal(array $collection, $index, $defaultValue = null) { } } diff --git a/src/Http/Cookie/CookieInterface.php b/src/Http/Cookie/CookieInterface.php index 13cace3a..9d3aecdc 100644 --- a/src/Http/Cookie/CookieInterface.php +++ b/src/Http/Cookie/CookieInterface.php @@ -76,7 +76,7 @@ public function getSecure(): bool; * @param mixed $defaultValue * @return mixed */ - public function getValue($filters = null, $defaultValue = null): mixed; + public function getValue($filters = null, $defaultValue = null); /** * Check if the cookie is using implicit encryption diff --git a/src/Http/Request.php b/src/Http/Request.php index d0ed35bd..1b5e7549 100644 --- a/src/Http/Request.php +++ b/src/Http/Request.php @@ -103,7 +103,7 @@ class Request extends AbstractInjectionAware implements \Phalcon\Http\RequestInt * @param bool $noRecursive * @return mixed */ - public function get(string $name = null, $filters = null, $defaultValue = null, bool $notAllowEmpty = false, bool $noRecursive = false): mixed + public function get(string $name = null, $filters = null, $defaultValue = null, bool $notAllowEmpty = false, bool $noRecursive = false) { } @@ -123,7 +123,7 @@ public function getAcceptableContent(): array * * @return array|null */ - public function getBasicAuth(): array|null + public function getBasicAuth(): ?array { } @@ -190,7 +190,7 @@ public function getPreferredIsoLocaleVariant(): string * @param bool $trustForwardedHeader * @return string|bool */ - public function getClientAddress(bool $trustForwardedHeader = false): bool|string + public function getClientAddress(bool $trustForwardedHeader = false) { } @@ -209,7 +209,7 @@ public function getClientCharsets(): array * * @return string|null */ - public function getContentType(): string|null + public function getContentType(): ?string { } @@ -232,7 +232,7 @@ public function getDigestAuth(): array * @param bool $noRecursive * @return mixed */ - public function getFilteredQuery(string $name = null, $defaultValue = null, bool $notAllowEmpty = false, bool $noRecursive = false): mixed + public function getFilteredQuery(string $name = null, $defaultValue = null, bool $notAllowEmpty = false, bool $noRecursive = false) { } @@ -245,7 +245,7 @@ public function getFilteredQuery(string $name = null, $defaultValue = null, bool * @param bool $noRecursive * @return mixed */ - public function getFilteredPatch(string $name = null, $defaultValue = null, bool $notAllowEmpty = false, bool $noRecursive = false): mixed + public function getFilteredPatch(string $name = null, $defaultValue = null, bool $notAllowEmpty = false, bool $noRecursive = false) { } @@ -258,7 +258,7 @@ public function getFilteredPatch(string $name = null, $defaultValue = null, bool * @param bool $noRecursive * @return mixed */ - public function getFilteredPost(string $name = null, $defaultValue = null, bool $notAllowEmpty = false, bool $noRecursive = false): mixed + public function getFilteredPost(string $name = null, $defaultValue = null, bool $notAllowEmpty = false, bool $noRecursive = false) { } @@ -271,7 +271,7 @@ public function getFilteredPost(string $name = null, $defaultValue = null, bool * @param bool $noRecursive * @return mixed */ - public function getFilteredPut(string $name = null, $defaultValue = null, bool $notAllowEmpty = false, bool $noRecursive = false): mixed + public function getFilteredPut(string $name = null, $defaultValue = null, bool $notAllowEmpty = false, bool $noRecursive = false) { } @@ -360,7 +360,7 @@ public function getHTTPReferer(): string * @param bool $associative * @return array|bool|\stdClass */ - public function getJsonRawBody(bool $associative = false): \stdClass|bool|array + public function getJsonRawBody(bool $associative = false) { } @@ -409,7 +409,7 @@ final public function getMethod(): string * @param bool $noRecursive * @return mixed */ - public function getPatch(string $name = null, $filters = null, $defaultValue = null, bool $notAllowEmpty = false, bool $noRecursive = false): mixed + public function getPatch(string $name = null, $filters = null, $defaultValue = null, bool $notAllowEmpty = false, bool $noRecursive = false) { } @@ -441,7 +441,7 @@ public function getPort(): int * @param bool $noRecursive * @return mixed */ - public function getPost(string $name = null, $filters = null, $defaultValue = null, bool $notAllowEmpty = false, bool $noRecursive = false): mixed + public function getPost(string $name = null, $filters = null, $defaultValue = null, bool $notAllowEmpty = false, bool $noRecursive = false) { } @@ -463,7 +463,7 @@ public function getPost(string $name = null, $filters = null, $defaultValue = nu * @param bool $noRecursive * @return mixed */ - public function getPut(string $name = null, $filters = null, $defaultValue = null, bool $notAllowEmpty = false, bool $noRecursive = false): mixed + public function getPut(string $name = null, $filters = null, $defaultValue = null, bool $notAllowEmpty = false, bool $noRecursive = false) { } @@ -489,7 +489,7 @@ public function getPut(string $name = null, $filters = null, $defaultValue = nul * @param bool $noRecursive * @return mixed */ - public function getQuery(string $name = null, $filters = null, $defaultValue = null, bool $notAllowEmpty = false, bool $noRecursive = false): mixed + public function getQuery(string $name = null, $filters = null, $defaultValue = null, bool $notAllowEmpty = false, bool $noRecursive = false) { } @@ -517,7 +517,7 @@ public function getScheme(): string * @param string $name * @return string|null */ - public function getServer(string $name): string|null + public function getServer(string $name): ?string { } @@ -883,7 +883,7 @@ final protected function getBestQuality(array $qualityParts, string $name): stri * @param bool $noRecursive * @return mixed */ - final protected function getHelper(array $source, string $name = null, $filters = null, $defaultValue = null, bool $notAllowEmpty = false, bool $noRecursive = false): mixed + final protected function getHelper(array $source, string $name = null, $filters = null, $defaultValue = null, bool $notAllowEmpty = false, bool $noRecursive = false) { } @@ -960,7 +960,7 @@ private function getServerArray(): array * @param bool $noRecursive * @return mixed */ - public function getFilteredData(string $methodKey, string $method, string $name = null, $defaultValue = null, bool $notAllowEmpty = false, bool $noRecursive = false): mixed + public function getFilteredData(string $methodKey, string $method, string $name = null, $defaultValue = null, bool $notAllowEmpty = false, bool $noRecursive = false) { } @@ -983,7 +983,7 @@ public function getFilteredData(string $methodKey, string $method, string $name * @param bool $noRecursive * @return mixed */ - private function getPatchPut(string $collection, string $name = null, $filters = null, $defaultValue = null, bool $notAllowEmpty = false, bool $noRecursive = false): mixed + private function getPatchPut(string $collection, string $name = null, $filters = null, $defaultValue = null, bool $notAllowEmpty = false, bool $noRecursive = false) { } diff --git a/src/Http/Request/File.php b/src/Http/Request/File.php index 06d23426..138aa83f 100644 --- a/src/Http/Request/File.php +++ b/src/Http/Request/File.php @@ -87,7 +87,7 @@ public function __construct(array $file, $key = null) /** * @return string|null */ - public function getError(): string|null + public function getError(): ?string { } @@ -101,7 +101,7 @@ public function getExtension(): string /** * @return string|null */ - public function getKey(): string|null + public function getKey(): ?string { } @@ -177,7 +177,7 @@ public function moveTo(string $destination): bool * @param mixed $defaultValue * @return mixed */ - private function getArrVal(array $collection, $index, $defaultValue = null): mixed + private function getArrVal(array $collection, $index, $defaultValue = null) { } } diff --git a/src/Http/Request/FileInterface.php b/src/Http/Request/FileInterface.php index 51df3a2c..c380a1a9 100644 --- a/src/Http/Request/FileInterface.php +++ b/src/Http/Request/FileInterface.php @@ -19,7 +19,7 @@ interface FileInterface * * @return string|null */ - public function getError(): string|null; + public function getError(): ?string; /** * Returns the real name of the uploaded file diff --git a/src/Http/RequestInterface.php b/src/Http/RequestInterface.php index 4b007fe8..f26fe459 100644 --- a/src/Http/RequestInterface.php +++ b/src/Http/RequestInterface.php @@ -36,7 +36,7 @@ interface RequestInterface * @param bool $noRecursive * @return mixed */ - public function get(string $name = null, $filters = null, $defaultValue = null, bool $notAllowEmpty = false, bool $noRecursive = false): mixed; + public function get(string $name = null, $filters = null, $defaultValue = null, bool $notAllowEmpty = false, bool $noRecursive = false); /** * Gets an array with mime/types and their quality accepted by the @@ -52,7 +52,7 @@ public function getAcceptableContent(): array; * * @return array|null */ - public function getBasicAuth(): array|null; + public function getBasicAuth(): ?array; /** * Gets best mime/type accepted by the browser/client from @@ -86,7 +86,7 @@ public function getBestLanguage(): string; * @param bool $trustForwardedHeader * @return string|bool */ - public function getClientAddress(bool $trustForwardedHeader = false): bool|string; + public function getClientAddress(bool $trustForwardedHeader = false); /** * Gets a charsets array and their quality accepted by the browser/client @@ -101,7 +101,7 @@ public function getClientCharsets(): array; * * @return string|null */ - public function getContentType(): string|null; + public function getContentType(): ?string; /** * Gets auth info accepted by the browser/client from @@ -188,7 +188,7 @@ public function getHTTPReferer(): string; * @param bool $associative * @return array|bool|stdClass */ - public function getJsonRawBody(bool $associative = false): stdClass|bool|array; + public function getJsonRawBody(bool $associative = false); /** * Gets languages array and their quality accepted by the browser/client @@ -255,7 +255,7 @@ public function getURI(bool $onlyPath = false): string; * @param bool $noRecursive * @return mixed */ - public function getPost(string $name = null, $filters = null, $defaultValue = null, bool $notAllowEmpty = false, bool $noRecursive = false): mixed; + public function getPost(string $name = null, $filters = null, $defaultValue = null, bool $notAllowEmpty = false, bool $noRecursive = false); /** * Gets a variable from put request @@ -275,7 +275,7 @@ public function getPost(string $name = null, $filters = null, $defaultValue = nu * @param bool $noRecursive * @return mixed */ - public function getPut(string $name = null, $filters = null, $defaultValue = null, bool $notAllowEmpty = false, bool $noRecursive = false): mixed; + public function getPut(string $name = null, $filters = null, $defaultValue = null, bool $notAllowEmpty = false, bool $noRecursive = false); /** * Gets variable from $_GET superglobal applying filters if needed @@ -299,7 +299,7 @@ public function getPut(string $name = null, $filters = null, $defaultValue = nul * @param bool $noRecursive * @return mixed */ - public function getQuery(string $name = null, $filters = null, $defaultValue = null, bool $notAllowEmpty = false, bool $noRecursive = false): mixed; + public function getQuery(string $name = null, $filters = null, $defaultValue = null, bool $notAllowEmpty = false, bool $noRecursive = false); /** * Gets HTTP raw request body @@ -321,7 +321,7 @@ public function getScheme(): string; * @param string $name * @return string|null */ - public function getServer(string $name): string|null; + public function getServer(string $name): ?string; /** * Gets active server address IP diff --git a/src/Http/Response.php b/src/Http/Response.php index 63ad5bbf..8d9113b7 100644 --- a/src/Http/Response.php +++ b/src/Http/Response.php @@ -139,7 +139,7 @@ public function getDI(): DiInterface * * @return ManagerInterface|null */ - public function getEventsManager(): ManagerInterface|null + public function getEventsManager(): ?ManagerInterface { } @@ -161,7 +161,7 @@ public function getHeaders(): HeadersInterface * * @return string|null */ - public function getReasonPhrase(): string|null + public function getReasonPhrase(): ?string { } @@ -174,7 +174,7 @@ public function getReasonPhrase(): string|null * * @return int|null */ - public function getStatusCode(): int|null + public function getStatusCode(): ?int { } @@ -275,7 +275,7 @@ public function sendCookies(): ResponseInterface * * @return bool|ResponseInterface */ - public function sendHeaders(): ResponseInterface|bool + public function sendHeaders() { } diff --git a/src/Http/Response/Headers.php b/src/Http/Response/Headers.php index 46836a16..bfc24a82 100644 --- a/src/Http/Response/Headers.php +++ b/src/Http/Response/Headers.php @@ -32,7 +32,7 @@ class Headers implements \Phalcon\Http\Response\HeadersInterface * @param string $name * @return string|bool */ - public function get(string $name): bool|string + public function get(string $name) { } diff --git a/src/Http/Response/HeadersInterface.php b/src/Http/Response/HeadersInterface.php index cb2c73ee..32948747 100644 --- a/src/Http/Response/HeadersInterface.php +++ b/src/Http/Response/HeadersInterface.php @@ -22,7 +22,7 @@ interface HeadersInterface * @param string $name * @return string|bool */ - public function get(string $name): bool|string; + public function get(string $name); /** * Checks if a header exists diff --git a/src/Http/ResponseInterface.php b/src/Http/ResponseInterface.php index 8aba7056..137e7083 100644 --- a/src/Http/ResponseInterface.php +++ b/src/Http/ResponseInterface.php @@ -39,7 +39,7 @@ public function getContent(): string; * * @return int|null */ - public function getStatusCode(): int|null; + public function getStatusCode(): ?int; /** * Returns headers set by the user @@ -190,5 +190,5 @@ public function sendCookies(): ResponseInterface; * * @return bool|ResponseInterface */ - public function sendHeaders(): ResponseInterface|bool; + public function sendHeaders(); } diff --git a/src/Image/ImageFactory.php b/src/Image/ImageFactory.php index 386e6699..01482b5e 100644 --- a/src/Image/ImageFactory.php +++ b/src/Image/ImageFactory.php @@ -82,7 +82,7 @@ protected function getServices(): array * @param mixed $defaultValue * @return mixed */ - private function getArrVal(array $collection, $index, $defaultValue = null): mixed + private function getArrVal(array $collection, $index, $defaultValue = null) { } } diff --git a/src/Logger/LoggerFactory.php b/src/Logger/LoggerFactory.php index ee90919c..3a6ee3a3 100644 --- a/src/Logger/LoggerFactory.php +++ b/src/Logger/LoggerFactory.php @@ -73,7 +73,7 @@ public function newInstance(string $name, array $adapters = [], \DateTimeZone $t * @param mixed $defaultValue * @return mixed */ - protected function getArrVal(array $collection, $index, $defaultValue = null): mixed + protected function getArrVal(array $collection, $index, $defaultValue = null) { } diff --git a/src/Messages/Messages.php b/src/Messages/Messages.php index 74fe9686..1c11c46e 100644 --- a/src/Messages/Messages.php +++ b/src/Messages/Messages.php @@ -155,7 +155,7 @@ public function offsetExists($index): bool * @param mixed $index * @return mixed */ - public function offsetGet($index): mixed + public function offsetGet($index) { } diff --git a/src/Mvc/Application.php b/src/Mvc/Application.php index 46ab3e8e..8efa9900 100644 --- a/src/Mvc/Application.php +++ b/src/Mvc/Application.php @@ -87,7 +87,7 @@ class Application extends AbstractApplication * @param string $uri * @return bool|ResponseInterface */ - public function handle(string $uri): ResponseInterface|bool + public function handle(string $uri) { } diff --git a/src/Mvc/EntityInterface.php b/src/Mvc/EntityInterface.php index 15439c29..1acac67c 100644 --- a/src/Mvc/EntityInterface.php +++ b/src/Mvc/EntityInterface.php @@ -22,7 +22,7 @@ interface EntityInterface * @param string $attribute * @return mixed|null */ - public function readAttribute(string $attribute): mixed; + public function readAttribute(string $attribute); /** * Writes an attribute value by its name diff --git a/src/Mvc/Micro.php b/src/Mvc/Micro.php index 77b3ff5f..3bd057ea 100644 --- a/src/Mvc/Micro.php +++ b/src/Mvc/Micro.php @@ -230,7 +230,7 @@ public function getBoundModels(): array * * @return ManagerInterface|null */ - public function getEventsManager(): ManagerInterface|null + public function getEventsManager(): ?ManagerInterface { } @@ -258,7 +258,7 @@ public function getHandlers(): array * * @return BinderInterface|null */ - public function getModelBinder(): BinderInterface|null + public function getModelBinder(): ?BinderInterface { } @@ -387,7 +387,7 @@ public function offsetExists($offset): bool * @param mixed $offset * @return mixed */ - public function offsetGet($offset): mixed + public function offsetGet($offset) { } diff --git a/src/Mvc/Micro/Collection.php b/src/Mvc/Micro/Collection.php index 393f5c60..1344e3fc 100644 --- a/src/Mvc/Micro/Collection.php +++ b/src/Mvc/Micro/Collection.php @@ -79,7 +79,7 @@ public function get(string $routePattern, $handler, string $name = null): Collec * * @return mixed */ - public function getHandler(): mixed + public function getHandler() { } diff --git a/src/Mvc/Micro/CollectionInterface.php b/src/Mvc/Micro/CollectionInterface.php index dd5ca9e8..d85c4575 100644 --- a/src/Mvc/Micro/CollectionInterface.php +++ b/src/Mvc/Micro/CollectionInterface.php @@ -41,7 +41,7 @@ public function get(string $routePattern, $handler, string $name = null): Collec * * @return mixed */ - public function getHandler(): mixed; + public function getHandler(); /** * Returns the registered handlers diff --git a/src/Mvc/Micro/LazyLoader.php b/src/Mvc/Micro/LazyLoader.php index f56cef08..f28b691c 100644 --- a/src/Mvc/Micro/LazyLoader.php +++ b/src/Mvc/Micro/LazyLoader.php @@ -59,7 +59,7 @@ public function getDefinition(): string /** * @return object|null */ - public function getHandler(): object|null + public function getHandler() { } } diff --git a/src/Mvc/Model.php b/src/Mvc/Model.php index b634fe05..91958485 100644 --- a/src/Mvc/Model.php +++ b/src/Mvc/Model.php @@ -414,7 +414,7 @@ public function assign(array $data, $whiteList = null, $dataColumnMap = null): M * @param array $parameters * @return float | ResultsetInterface */ - public static function average(array $parameters = []): ResultsetInterface|float + public static function average(array $parameters = []) { } @@ -510,7 +510,7 @@ protected function collectRelatedToSave(): array * @param array|string|null $parameters * @return int|ResultsetInterface */ - public static function count($parameters = null): ResultsetInterface|int + public static function count($parameters = null) { } @@ -854,7 +854,7 @@ public static function find($parameters = null) * * @return T|\Phalcon\Mvc\ModelInterface|\Phalcon\Mvc\Model\Row|null */ - public static function findFirst($parameters = null): mixed + public static function findFirst($parameters = null) { } @@ -915,7 +915,7 @@ public function getDirtyState(): int * * @return EventsManagerInterface|null */ - public function getEventsManager(): EventsManagerInterface|null + public function getEventsManager(): ?EventsManagerInterface { } @@ -1048,7 +1048,7 @@ public function isRelationshipLoaded(string $relationshipAlias): bool * * @return string|null */ - final public function getSchema(): string|null + final public function getSchema(): ?string { } @@ -1201,7 +1201,7 @@ public function jsonSerialize(): array * @param array $parameters * @return mixed */ - public static function maximum($parameters = null): mixed + public static function maximum($parameters = null) { } @@ -1233,7 +1233,7 @@ public static function maximum($parameters = null): mixed * @param array $parameters * @return mixed */ - public static function minimum($parameters = null): mixed + public static function minimum($parameters = null) { } @@ -1257,7 +1257,7 @@ public static function query(\Phalcon\Di\DiInterface $container = null): Criteri * @param string $attribute * @return mixed|null */ - public function readAttribute(string $attribute): mixed + public function readAttribute(string $attribute) { } @@ -1313,18 +1313,19 @@ public function doSave(\Phalcon\Support\Collection\CollectionInterface $visited) * Serializes the object ignoring connections, services, related objects or * static properties * - * @return string + * @return string|null */ - public function serialize(): string + public function serialize(): ?string { } /** * Unserializes the object from a serialized string * - * @param mixed $data + * @param string $data + * @return void */ - public function unserialize($data) + public function unserialize(string $data): void { } @@ -1344,7 +1345,7 @@ final public function setConnectionService(string $connectionService): void * @param int $dirtyState * @return bool|ModelInterface */ - public function setDirtyState(int $dirtyState): ModelInterface|bool + public function setDirtyState(int $dirtyState) { } @@ -1441,7 +1442,7 @@ public function setTransaction(\Phalcon\Mvc\Model\TransactionInterface $transact /** * @return TransactionInterface|null */ - public function getTransaction(): TransactionInterface|null + public function getTransaction(): ?TransactionInterface { } @@ -1503,7 +1504,7 @@ public function skipOperation(bool $skip): void * @param array $parameters * @return double | ResultsetInterface */ - public static function sum($parameters = null): ResultsetInterface|float + public static function sum($parameters = null) { } diff --git a/src/Mvc/Model/Binder.php b/src/Mvc/Model/Binder.php index d2a5cf54..dcbe2880 100644 --- a/src/Mvc/Model/Binder.php +++ b/src/Mvc/Model/Binder.php @@ -80,7 +80,7 @@ public function bindToHandler($handler, array $params, string $cacheKey, string * @param mixed $paramValue * @param string $className */ - protected function findBoundModel($paramValue, string $className): mixed + protected function findBoundModel($paramValue, string $className) { } @@ -117,7 +117,7 @@ public function getCache(): AdapterInterface * @param string $cacheKey * @return array|null */ - protected function getParamsFromCache(string $cacheKey): array|null + protected function getParamsFromCache(string $cacheKey): ?array { } diff --git a/src/Mvc/Model/Binder/BindableInterface.php b/src/Mvc/Model/Binder/BindableInterface.php index 0e93da53..9ce9cbb8 100644 --- a/src/Mvc/Model/Binder/BindableInterface.php +++ b/src/Mvc/Model/Binder/BindableInterface.php @@ -22,5 +22,5 @@ interface BindableInterface * * @return string|array */ - public function getModelName(): string|array; + public function getModelName(); } diff --git a/src/Mvc/Model/Criteria.php b/src/Mvc/Model/Criteria.php index 4f2a81a8..4e317105 100644 --- a/src/Mvc/Model/Criteria.php +++ b/src/Mvc/Model/Criteria.php @@ -247,7 +247,7 @@ public static function fromInput(\Phalcon\Di\DiInterface $container, string $mod * * @return string|array|null */ - public function getColumns(): string|array|null + public function getColumns() { } @@ -256,7 +256,7 @@ public function getColumns(): string|array|null * * @return string|null */ - public function getConditions(): string|null + public function getConditions(): ?string { } @@ -292,7 +292,7 @@ public function getHaving() * * @return int|array|null */ - public function getLimit(): int|array|null + public function getLimit() { } @@ -310,7 +310,7 @@ public function getModelName(): string * * @return string|null */ - public function getOrderBy(): string|null + public function getOrderBy(): ?string { } @@ -328,7 +328,7 @@ public function getParams(): array * * @return string|null */ - public function getWhere(): string|null + public function getWhere(): ?string { } diff --git a/src/Mvc/Model/CriteriaInterface.php b/src/Mvc/Model/CriteriaInterface.php index 0a487b2a..196c32fe 100644 --- a/src/Mvc/Model/CriteriaInterface.php +++ b/src/Mvc/Model/CriteriaInterface.php @@ -105,14 +105,14 @@ public function forUpdate(bool $forUpdate = true): CriteriaInterface; * * @return string|array|null */ - public function getColumns(): string|array|null; + public function getColumns(); /** * Returns the conditions parameter in the criteria * * @return string|null */ - public function getConditions(): string|null; + public function getConditions(): ?string; /** * Returns the group clause in the criteria @@ -133,7 +133,7 @@ public function getHaving(); * * @return int|array|null */ - public function getLimit(): int|array|null; + public function getLimit(); /** * Returns an internal model name on which the criteria will be applied @@ -147,7 +147,7 @@ public function getModelName(): string; * * @return string|null */ - public function getOrderBy(): string|null; + public function getOrderBy(): ?string; /** * Returns all the parameters defined in the criteria @@ -161,7 +161,7 @@ public function getParams(): array; * * @return string|null */ - public function getWhere(): string|null; + public function getWhere(): ?string; /** * Adds the group-by clause to the criteria diff --git a/src/Mvc/Model/Manager.php b/src/Mvc/Model/Manager.php index 996f8422..796de7de 100644 --- a/src/Mvc/Model/Manager.php +++ b/src/Mvc/Model/Manager.php @@ -378,7 +378,7 @@ public function createQuery(string $phql): QueryInterface * * @return ResultsetInterface|StatusInterface */ - public function executeQuery(string $phql, $placeholders = null, $types = null): mixed + public function executeQuery(string $phql, $placeholders = null, $types = null) { } @@ -470,7 +470,7 @@ public function getBelongsTo(\Phalcon\Mvc\ModelInterface $model): array * * @return ResultsetInterface | bool */ - public function getBelongsToRecords(string $modelName, string $modelRelation, \Phalcon\Mvc\ModelInterface $record, $parameters = null, string $method = null): ResultsetInterface|bool + public function getBelongsToRecords(string $modelName, string $modelRelation, \Phalcon\Mvc\ModelInterface $record, $parameters = null, string $method = null) { } @@ -479,7 +479,7 @@ public function getBelongsToRecords(string $modelName, string $modelRelation, \P * * @return BuilderInterface | null */ - public function getBuilder(): BuilderInterface|null + public function getBuilder(): ?BuilderInterface { } @@ -504,7 +504,7 @@ public function getConnectionService(\Phalcon\Mvc\ModelInterface $model, array $ * * @return EventsManagerInterface | null */ - public function getCustomEventsManager(\Phalcon\Mvc\ModelInterface $model): EventsManagerInterface|null + public function getCustomEventsManager(\Phalcon\Mvc\ModelInterface $model): ?EventsManagerInterface { } @@ -522,7 +522,7 @@ public function getDI(): DiInterface * * @return EventsManagerInterface|null */ - public function getEventsManager(): EventsManagerInterface|null + public function getEventsManager(): ?EventsManagerInterface { } @@ -546,7 +546,7 @@ public function getHasMany(\Phalcon\Mvc\ModelInterface $model): array * @param string $method * @return bool|ResultsetInterface */ - public function getHasManyRecords(string $modelName, string $modelRelation, \Phalcon\Mvc\ModelInterface $record, $parameters = null, string $method = null): ResultsetInterface|bool + public function getHasManyRecords(string $modelName, string $modelRelation, \Phalcon\Mvc\ModelInterface $record, $parameters = null, string $method = null) { } @@ -590,7 +590,7 @@ public function getHasOneAndHasMany(\Phalcon\Mvc\ModelInterface $model): array * @param string $method * @return bool|ModelInterface */ - public function getHasOneRecords(string $modelName, string $modelRelation, \Phalcon\Mvc\ModelInterface $record, $parameters = null, string $method = null): ModelInterface|bool + public function getHasOneRecords(string $modelName, string $modelRelation, \Phalcon\Mvc\ModelInterface $record, $parameters = null, string $method = null) { } @@ -637,7 +637,7 @@ public function getModelPrefix(): string * @param \Phalcon\Mvc\ModelInterface $model * @return string|null */ - public function getModelSchema(\Phalcon\Mvc\ModelInterface $model): string|null + public function getModelSchema(\Phalcon\Mvc\ModelInterface $model): ?string { } @@ -678,7 +678,7 @@ public function getReadConnectionService(\Phalcon\Mvc\ModelInterface $model): st * @param string $alias * * @return RelationInterface|bool */ - public function getRelationByAlias(string $modelName, string $alias): RelationInterface|bool + public function getRelationByAlias(string $modelName, string $alias) { } @@ -715,7 +715,7 @@ public function getRelations(string $modelName): array * * @return RelationInterface[] | bool */ - public function getRelationsBetween(string $first, string $second): bool|array + public function getRelationsBetween(string $first, string $second) { } diff --git a/src/Mvc/Model/ManagerInterface.php b/src/Mvc/Model/ManagerInterface.php index 35422717..a77aa767 100644 --- a/src/Mvc/Model/ManagerInterface.php +++ b/src/Mvc/Model/ManagerInterface.php @@ -120,7 +120,7 @@ public function createQuery(string $phql): QueryInterface; * @return ResultsetInterface|StatusInterface * @param string $phql */ - public function executeQuery(string $phql, $placeholders = null, $types = null): mixed; + public function executeQuery(string $phql, $placeholders = null, $types = null); /** * Gets belongsTo relations defined on a model @@ -140,14 +140,14 @@ public function getBelongsTo(\Phalcon\Mvc\ModelInterface $model): array; * @param string|null $method * @return bool|ResultsetInterface */ - public function getBelongsToRecords(string $modelName, string $modelRelation, \Phalcon\Mvc\ModelInterface $record, $parameters = null, string $method = null): ResultsetInterface|bool; + public function getBelongsToRecords(string $modelName, string $modelRelation, \Phalcon\Mvc\ModelInterface $record, $parameters = null, string $method = null); /** * Returns the newly created Phalcon\Mvc\Model\Query\Builder or null * * @return BuilderInterface|null */ - public function getBuilder(): BuilderInterface|null; + public function getBuilder(): ?BuilderInterface; /** * Gets hasMany relations defined on a model @@ -167,7 +167,7 @@ public function getHasMany(\Phalcon\Mvc\ModelInterface $model): array; * @param string|null $method * @return bool|ResultsetInterface */ - public function getHasManyRecords(string $modelName, string $modelRelation, \Phalcon\Mvc\ModelInterface $record, $parameters = null, string $method = null): ResultsetInterface|bool; + public function getHasManyRecords(string $modelName, string $modelRelation, \Phalcon\Mvc\ModelInterface $record, $parameters = null, string $method = null); /** * Gets hasManyToMany relations defined on a model @@ -211,7 +211,7 @@ public function getHasOneAndHasMany(\Phalcon\Mvc\ModelInterface $model): array; * @param string|null $method * @return bool|ModelInterface */ - public function getHasOneRecords(string $modelName, string $modelRelation, \Phalcon\Mvc\ModelInterface $record, $parameters = null, string $method = null): ModelInterface|bool; + public function getHasOneRecords(string $modelName, string $modelRelation, \Phalcon\Mvc\ModelInterface $record, $parameters = null, string $method = null); /** * Get last initialized model @@ -233,7 +233,7 @@ public function getLastQuery(): QueryInterface; * @param \Phalcon\Mvc\ModelInterface $model * @return string|null */ - public function getModelSchema(\Phalcon\Mvc\ModelInterface $model): string|null; + public function getModelSchema(\Phalcon\Mvc\ModelInterface $model): ?string; /** * Returns the mapped source for a model @@ -266,7 +266,7 @@ public function getReadConnectionService(\Phalcon\Mvc\ModelInterface $model): st * @param string $alias * * @return RelationInterface|bool */ - public function getRelationByAlias(string $modelName, string $alias): RelationInterface|bool; + public function getRelationByAlias(string $modelName, string $alias); /** * Helper method to query records based on a relation definition @@ -294,7 +294,7 @@ public function getRelations(string $modelName): array; * @param string $second * @return array|bool|RelationInterface[] */ - public function getRelationsBetween(string $first, string $second): bool|array; + public function getRelationsBetween(string $first, string $second); /** * Returns the connection to write data related to a model diff --git a/src/Mvc/Model/MetaData.php b/src/Mvc/Model/MetaData.php index b7f1b78f..adb32a24 100644 --- a/src/Mvc/Model/MetaData.php +++ b/src/Mvc/Model/MetaData.php @@ -100,7 +100,7 @@ abstract class MetaData implements \Phalcon\Di\InjectionAwareInterface, \Phalcon * * @return CacheAdapterInterface|null */ - public function getAdapter(): CacheAdapterInterface|null + public function getAdapter(): ?CacheAdapterInterface { } @@ -190,7 +190,7 @@ public function getBindTypes(\Phalcon\Mvc\ModelInterface $model): array * @param \Phalcon\Mvc\ModelInterface $model * @return array|null */ - public function getColumnMap(\Phalcon\Mvc\ModelInterface $model): array|null + public function getColumnMap(\Phalcon\Mvc\ModelInterface $model): ?array { } @@ -289,7 +289,7 @@ public function getEmptyStringAttributes(\Phalcon\Mvc\ModelInterface $model): ar * @param \Phalcon\Mvc\ModelInterface $model * @return string|null */ - public function getIdentityField(\Phalcon\Mvc\ModelInterface $model): string|null + public function getIdentityField(\Phalcon\Mvc\ModelInterface $model): ?string { } @@ -361,7 +361,7 @@ public function getPrimaryKeyAttributes(\Phalcon\Mvc\ModelInterface $model): arr * @param \Phalcon\Mvc\ModelInterface $model * @return array|null */ - public function getReverseColumnMap(\Phalcon\Mvc\ModelInterface $model): array|null + public function getReverseColumnMap(\Phalcon\Mvc\ModelInterface $model): ?array { } @@ -415,7 +415,7 @@ public function isEmpty(): bool * @param string $key * @return array|null */ - public function read(string $key): array|null + public function read(string $key): ?array { } @@ -433,7 +433,7 @@ public function read(string $key): array|null * @param \Phalcon\Mvc\ModelInterface $model * @return array|null */ - final public function readColumnMap(\Phalcon\Mvc\ModelInterface $model): array|null + final public function readColumnMap(\Phalcon\Mvc\ModelInterface $model): ?array { } @@ -453,7 +453,7 @@ final public function readColumnMap(\Phalcon\Mvc\ModelInterface $model): array|n * @param int $index * @return array|null */ - final public function readColumnMapIndex(\Phalcon\Mvc\ModelInterface $model, int $index): array|null + final public function readColumnMapIndex(\Phalcon\Mvc\ModelInterface $model, int $index): ?array { } @@ -471,7 +471,7 @@ final public function readColumnMapIndex(\Phalcon\Mvc\ModelInterface $model, int * @param \Phalcon\Mvc\ModelInterface $model * @return array|null */ - final public function readMetaData(\Phalcon\Mvc\ModelInterface $model): array|null + final public function readMetaData(\Phalcon\Mvc\ModelInterface $model): ?array { } @@ -491,7 +491,7 @@ final public function readMetaData(\Phalcon\Mvc\ModelInterface $model): array|nu * @param int $index * @return array|null */ - final public function readMetaDataIndex(\Phalcon\Mvc\ModelInterface $model, int $index): array|null + final public function readMetaDataIndex(\Phalcon\Mvc\ModelInterface $model, int $index): ?array { } @@ -674,7 +674,7 @@ private function throwWriteException($option): void * @param mixed $defaultValue * @return mixed */ - protected function getArrVal(array $collection, $index, $defaultValue = null): mixed + protected function getArrVal(array $collection, $index, $defaultValue = null) { } @@ -684,7 +684,7 @@ protected function getArrVal(array $collection, $index, $defaultValue = null): m * @return string * @param \Phalcon\Mvc\ModelInterface $model */ - final public function getMetaDataUniqueKey(\Phalcon\Mvc\ModelInterface $model): string|null + final public function getMetaDataUniqueKey(\Phalcon\Mvc\ModelInterface $model): ?string { } @@ -694,7 +694,7 @@ final public function getMetaDataUniqueKey(\Phalcon\Mvc\ModelInterface $model): * @return string * @param \Phalcon\Mvc\ModelInterface $model */ - final public function getColumnMapUniqueKey(\Phalcon\Mvc\ModelInterface $model): string|null + final public function getColumnMapUniqueKey(\Phalcon\Mvc\ModelInterface $model): ?string { } } diff --git a/src/Mvc/Model/MetaData/Memory.php b/src/Mvc/Model/MetaData/Memory.php index a67c3b74..d96e6081 100644 --- a/src/Mvc/Model/MetaData/Memory.php +++ b/src/Mvc/Model/MetaData/Memory.php @@ -34,7 +34,7 @@ public function __construct($options = null) * @param string $key * @return array|null */ - public function read(string $key): array|null + public function read(string $key): ?array { } diff --git a/src/Mvc/Model/MetaData/Stream.php b/src/Mvc/Model/MetaData/Stream.php index d87ed956..724f130c 100644 --- a/src/Mvc/Model/MetaData/Stream.php +++ b/src/Mvc/Model/MetaData/Stream.php @@ -47,7 +47,7 @@ public function __construct(array $options = []) * @param string $key * @return array|null */ - public function read(string $key): array|null + public function read(string $key): ?array { } diff --git a/src/Mvc/Model/MetaDataInterface.php b/src/Mvc/Model/MetaDataInterface.php index 2a15ee59..6fed1245 100644 --- a/src/Mvc/Model/MetaDataInterface.php +++ b/src/Mvc/Model/MetaDataInterface.php @@ -57,7 +57,7 @@ public function getBindTypes(\Phalcon\Mvc\ModelInterface $model): array; * @param \Phalcon\Mvc\ModelInterface $model * @return array|null */ - public function getColumnMap(\Phalcon\Mvc\ModelInterface $model): array|null; + public function getColumnMap(\Phalcon\Mvc\ModelInterface $model): ?array; /** * Returns attributes (which have default values) and their default values @@ -97,7 +97,7 @@ public function getEmptyStringAttributes(\Phalcon\Mvc\ModelInterface $model): ar * @param \Phalcon\Mvc\ModelInterface $model * @return string|null */ - public function getIdentityField(\Phalcon\Mvc\ModelInterface $model): string|null; + public function getIdentityField(\Phalcon\Mvc\ModelInterface $model): ?string; /** * Returns an array of fields which are not part of the primary key @@ -129,7 +129,7 @@ public function getPrimaryKeyAttributes(\Phalcon\Mvc\ModelInterface $model): arr * @param \Phalcon\Mvc\ModelInterface $model * @return array|null */ - public function getReverseColumnMap(\Phalcon\Mvc\ModelInterface $model): array|null; + public function getReverseColumnMap(\Phalcon\Mvc\ModelInterface $model): ?array; /** * Return the strategy to obtain the meta-data @@ -160,7 +160,7 @@ public function isEmpty(): bool; * @param string $key * @return array|null */ - public function read(string $key): array|null; + public function read(string $key): ?array; /** * Reads the ordered/reversed column map for certain model @@ -168,7 +168,7 @@ public function read(string $key): array|null; * @param \Phalcon\Mvc\ModelInterface $model * @return array|null */ - public function readColumnMap(\Phalcon\Mvc\ModelInterface $model): array|null; + public function readColumnMap(\Phalcon\Mvc\ModelInterface $model): ?array; /** * Reads column-map information for certain model using a MODEL_ constant @@ -177,7 +177,7 @@ public function readColumnMap(\Phalcon\Mvc\ModelInterface $model): array|null; * @param int $index * @return array|null */ - public function readColumnMapIndex(\Phalcon\Mvc\ModelInterface $model, int $index): array|null; + public function readColumnMapIndex(\Phalcon\Mvc\ModelInterface $model, int $index): ?array; /** * Reads meta-data for certain model @@ -185,7 +185,7 @@ public function readColumnMapIndex(\Phalcon\Mvc\ModelInterface $model, int $inde * @param \Phalcon\Mvc\ModelInterface $model * @return array|null */ - public function readMetaData(\Phalcon\Mvc\ModelInterface $model): array|null; + public function readMetaData(\Phalcon\Mvc\ModelInterface $model): ?array; /** * Reads meta-data for certain model using a MODEL_ constant @@ -194,7 +194,7 @@ public function readMetaData(\Phalcon\Mvc\ModelInterface $model): array|null; * @param int $index * @return array|null */ - public function readMetaDataIndex(\Phalcon\Mvc\ModelInterface $model, int $index): array|null; + public function readMetaDataIndex(\Phalcon\Mvc\ModelInterface $model, int $index): ?array; /** * Resets internal meta-data in order to regenerate it diff --git a/src/Mvc/Model/Query.php b/src/Mvc/Model/Query.php index 4ade28e8..7556b344 100644 --- a/src/Mvc/Model/Query.php +++ b/src/Mvc/Model/Query.php @@ -348,7 +348,7 @@ public function getUniqueRow(): bool /** * @return TransactionInterface|null */ - public function getTransaction(): TransactionInterface|null + public function getTransaction(): ?TransactionInterface { } @@ -482,7 +482,7 @@ final protected function executeInsert(array $intermediate, array $bindParams, a * @param bool $simulate * @return array|ResultsetInterface */ - final protected function executeSelect(array $intermediate, array $bindParams, array $bindTypes, bool $simulate = false): ResultsetInterface|array + final protected function executeSelect(array $intermediate, array $bindParams, array $bindTypes, bool $simulate = false) { } diff --git a/src/Mvc/Model/Query/Builder.php b/src/Mvc/Model/Query/Builder.php index ba9d2749..2ffb8e32 100644 --- a/src/Mvc/Model/Query/Builder.php +++ b/src/Mvc/Model/Query/Builder.php @@ -465,7 +465,7 @@ public function getLimit() * * @return string|array|null */ - public function getModels(): string|array|null + public function getModels() { } diff --git a/src/Mvc/Model/Query/BuilderInterface.php b/src/Mvc/Model/Query/BuilderInterface.php index 084a436d..4265dbbc 100644 --- a/src/Mvc/Model/Query/BuilderInterface.php +++ b/src/Mvc/Model/Query/BuilderInterface.php @@ -305,7 +305,7 @@ public function limit(int $limit, $offset = null): BuilderInterface; * * @return string|array|null */ - public function getModels(): string|array|null; + public function getModels(); /** * Appends a NOT BETWEEN condition to the current conditions diff --git a/src/Mvc/Model/ResultInterface.php b/src/Mvc/Model/ResultInterface.php index fc38462d..2cbe045e 100644 --- a/src/Mvc/Model/ResultInterface.php +++ b/src/Mvc/Model/ResultInterface.php @@ -24,5 +24,5 @@ interface ResultInterface * @param int $dirtyState * @return bool|ModelInterface */ - public function setDirtyState(int $dirtyState): ModelInterface|bool; + public function setDirtyState(int $dirtyState); } diff --git a/src/Mvc/Model/Resultset.php b/src/Mvc/Model/Resultset.php index c7395f9b..3dc05e16 100644 --- a/src/Mvc/Model/Resultset.php +++ b/src/Mvc/Model/Resultset.php @@ -186,7 +186,7 @@ public function filter($filter): array * * @return CacheInterface|null */ - public function getCache(): CacheInterface|null + public function getCache(): ?CacheInterface { } @@ -215,7 +215,7 @@ public function getCache(): CacheInterface|null * * @return ModelInterface|Row|null */ - public function getFirst(): mixed + public function getFirst() { } @@ -233,7 +233,7 @@ public function getHydrateMode(): int * * @return ModelInterface|null */ - public function getLast(): ModelInterface|null + public function getLast(): ?ModelInterface { } @@ -285,7 +285,7 @@ public function jsonSerialize(): array * * @return TKey|null */ - public function key(): int|null + public function key(): ?int { } @@ -304,7 +304,7 @@ public function next(): void * @param mixed $index * @return mixed */ - public function offsetGet($index): mixed + public function offsetGet($index) { } diff --git a/src/Mvc/Model/Resultset/Complex.php b/src/Mvc/Model/Resultset/Complex.php index dd214e36..adaf9304 100644 --- a/src/Mvc/Model/Resultset/Complex.php +++ b/src/Mvc/Model/Resultset/Complex.php @@ -61,7 +61,7 @@ public function __construct($columnTypes, \Phalcon\Db\ResultInterface $result = * * @return mixed */ - final public function current(): mixed + final public function current() { } diff --git a/src/Mvc/Model/Resultset/Simple.php b/src/Mvc/Model/Resultset/Simple.php index 07896a1f..a6a6bc0e 100644 --- a/src/Mvc/Model/Resultset/Simple.php +++ b/src/Mvc/Model/Resultset/Simple.php @@ -62,7 +62,7 @@ public function __construct($columnMap, $model, $result, $cache = null, bool $ke * * @return TValue */ - final public function current(): ModelInterface|null + final public function current(): ?ModelInterface { } diff --git a/src/Mvc/Model/ResultsetInterface.php b/src/Mvc/Model/ResultsetInterface.php index 1c12957e..8477d9a4 100644 --- a/src/Mvc/Model/ResultsetInterface.php +++ b/src/Mvc/Model/ResultsetInterface.php @@ -51,14 +51,14 @@ public function filter($filter): array; * * @return mixed|null */ - public function getCache(): mixed; + public function getCache(); /** * Get first row in the resultset * * @return ModelInterface|Row|null */ - public function getFirst(): mixed; + public function getFirst(); /** * Returns the current hydration mode @@ -72,7 +72,7 @@ public function getHydrateMode(): int; * * @return ModelInterface|null */ - public function getLast(): ModelInterface|null; + public function getLast(): ?ModelInterface; /** * Returns the error messages produced by a batch operation diff --git a/src/Mvc/Model/Row.php b/src/Mvc/Model/Row.php index 0bb3dd44..c07f245c 100644 --- a/src/Mvc/Model/Row.php +++ b/src/Mvc/Model/Row.php @@ -35,7 +35,7 @@ public function jsonSerialize(): array * @param string|int $index * * @return string|ModelInterface */ - public function offsetGet($index): mixed + public function offsetGet($index) { } @@ -91,7 +91,7 @@ public function readAttribute(string $attribute) * @param int $dirtyState * @return bool|ModelInterface */ - public function setDirtyState(int $dirtyState): ModelInterface|bool + public function setDirtyState(int $dirtyState) { } diff --git a/src/Mvc/ModelInterface.php b/src/Mvc/ModelInterface.php index d434196d..5ba5907f 100644 --- a/src/Mvc/ModelInterface.php +++ b/src/Mvc/ModelInterface.php @@ -53,7 +53,7 @@ public function assign(array $data, $whiteList = null, $dataColumnMap = null): M * @param array $parameters * @return ResultsetInterface|float */ - public static function average(array $parameters = []): ResultsetInterface|float; + public static function average(array $parameters = []); /** * Assigns values to a model from an array returning a new model @@ -96,7 +96,7 @@ public static function cloneResultMapHydrate(array $data, $columnMap, int $hydra * @param array|string|null $parameters * @return int|ResultsetInterface */ - public static function count($parameters = null): ResultsetInterface|int; + public static function count($parameters = null); /** * Inserts a model instance. If the instance already exists in the @@ -132,7 +132,7 @@ public static function find($parameters = null); * @see https://github.com/phalcon/cphalcon/issues/15212 * @see https://github.com/phalcon/cphalcon/issues/15883 */ - public static function findFirst($parameters = null): mixed; + public static function findFirst($parameters = null); /** * Fires an event, implicitly calls behaviors and listeners in the events @@ -211,7 +211,7 @@ public function getRelated(string $alias, $arguments = null); * * @return string|null */ - public function getSchema(): string|null; + public function getSchema(): ?string; /** * Returns table name mapped in the model @@ -241,7 +241,7 @@ public function getWriteConnectionService(): string; * @param array $parameters * @return mixed */ - public static function maximum($parameters = null): mixed; + public static function maximum($parameters = null); /** * Allows to get the minimum value of a column that match the specified @@ -250,7 +250,7 @@ public static function maximum($parameters = null): mixed; * @param array $parameters * @return mixed */ - public static function minimum($parameters = null): mixed; + public static function minimum($parameters = null); /** * Create a criteria for a specific model @@ -290,7 +290,7 @@ public function setConnectionService(string $connectionService): void; * @param int $dirtyState * @return bool|ModelInterface */ - public function setDirtyState(int $dirtyState): ModelInterface|bool; + public function setDirtyState(int $dirtyState); /** * Sets the DependencyInjection connection service used to read data @@ -340,7 +340,7 @@ public function skipOperation(bool $skip): void; * @param array $parameters * @return float|ResultsetInterface */ - public static function sum($parameters = null): ResultsetInterface|float; + public static function sum($parameters = null); /** * Check whether validation process has generated any messages diff --git a/src/Mvc/Router.php b/src/Mvc/Router.php index 11acc4d7..dc88de03 100644 --- a/src/Mvc/Router.php +++ b/src/Mvc/Router.php @@ -408,7 +408,7 @@ public function clear(): void * * @return ManagerInterface|null */ - public function getEventsManager(): ManagerInterface|null + public function getEventsManager(): ?ManagerInterface { } @@ -458,7 +458,7 @@ public function getKeyRouteIds(): array * * @return RouteInterface|null */ - public function getMatchedRoute(): RouteInterface|null + public function getMatchedRoute(): ?RouteInterface { } @@ -501,11 +501,10 @@ public function getParams(): array /** * Returns a route object by its id * - * @param mixed $id - * + * @param mixed $id * * @return RouteInterface|bool */ - public function getRouteById($id): RouteInterface|bool + public function getRouteById($id) { } @@ -515,7 +514,7 @@ public function getRouteById($id): RouteInterface|bool * @param string $name * * @return RouteInterface|bool */ - public function getRouteByName(string $name): RouteInterface|bool + public function getRouteByName(string $name) { } diff --git a/src/Mvc/Router/Group.php b/src/Mvc/Router/Group.php index 44b9b505..030ab2a4 100644 --- a/src/Mvc/Router/Group.php +++ b/src/Mvc/Router/Group.php @@ -322,9 +322,9 @@ public function getBeforeMatch() /** * Returns the hostname restriction * - * @return string + * @return string|null */ - public function getHostname(): string + public function getHostname(): ?string { } @@ -333,7 +333,7 @@ public function getHostname(): string * * @return array|string */ - public function getPaths(): string|array + public function getPaths() { } diff --git a/src/Mvc/Router/GroupInterface.php b/src/Mvc/Router/GroupInterface.php index a7648c12..884080e8 100644 --- a/src/Mvc/Router/GroupInterface.php +++ b/src/Mvc/Router/GroupInterface.php @@ -188,16 +188,16 @@ public function getBeforeMatch(); /** * Returns the hostname restriction * - * @return string + * @return string|null */ - public function getHostname(): string; + public function getHostname(): ?string; /** * Returns the common paths defined for this group * * @return array|string */ - public function getPaths(): string|array; + public function getPaths(); /** * Returns the common prefix for all the routes diff --git a/src/Mvc/Router/Route.php b/src/Mvc/Router/Route.php index 09052eba..a69e64e6 100644 --- a/src/Mvc/Router/Route.php +++ b/src/Mvc/Router/Route.php @@ -145,7 +145,7 @@ public function convert(string $name, $converter): RouteInterface * @param string $pattern * @return array|bool */ - public function extractNamedParams(string $pattern): bool|array + public function extractNamedParams(string $pattern) { } @@ -181,7 +181,7 @@ public function getConverters(): array * * @return GroupInterface|null */ - public function getGroup(): GroupInterface|null + public function getGroup(): ?GroupInterface { } @@ -190,7 +190,7 @@ public function getGroup(): GroupInterface|null * * @return array|string */ - public function getHttpMethods(): string|array + public function getHttpMethods() { } @@ -199,7 +199,7 @@ public function getHttpMethods(): string|array * * @return string|null */ - public function getHostname(): string|null + public function getHostname(): ?string { } @@ -224,7 +224,7 @@ public function getMatch() * * @return string|null */ - public function getName(): string|null + public function getName(): ?string { } diff --git a/src/Mvc/Router/RouteInterface.php b/src/Mvc/Router/RouteInterface.php index c86190f7..e759ac83 100644 --- a/src/Mvc/Router/RouteInterface.php +++ b/src/Mvc/Router/RouteInterface.php @@ -45,21 +45,21 @@ public function getCompiledPattern(): string; * * @return string|null */ - public function getHostname(): string|null; + public function getHostname(): ?string; /** * Returns the HTTP methods that constraint matching the route * * @return string|array */ - public function getHttpMethods(): string|array; + public function getHttpMethods(); /** * Returns the route's name * * @return string|null */ - public function getName(): string|null; + public function getName(): ?string; /** * Returns the paths diff --git a/src/Mvc/RouterInterface.php b/src/Mvc/RouterInterface.php index d6a55925..bb1b0088 100644 --- a/src/Mvc/RouterInterface.php +++ b/src/Mvc/RouterInterface.php @@ -164,7 +164,7 @@ public function getControllerName(): string; * * @return RouteInterface|null */ - public function getMatchedRoute(): RouteInterface|null; + public function getMatchedRoute(): ?RouteInterface; /** * Return the sub expressions in the regular expression matched @@ -207,7 +207,7 @@ public function getRoutes(): array; * @return RouteInterface|bool * @param mixed $id */ - public function getRouteById($id): RouteInterface|bool; + public function getRouteById($id); /** * Returns a route object by its name @@ -215,7 +215,7 @@ public function getRouteById($id): RouteInterface|bool; * @return RouteInterface|bool * @param string $name */ - public function getRouteByName(string $name): RouteInterface|bool; + public function getRouteByName(string $name); /** * Handles routing information received from the rewrite engine diff --git a/src/Mvc/View.php b/src/Mvc/View.php index b28624df..99f0bd3c 100644 --- a/src/Mvc/View.php +++ b/src/Mvc/View.php @@ -209,7 +209,7 @@ public function __construct(array $options = []) * @param string $key * @return mixed|null */ - public function __get(string $key): mixed + public function __get(string $key) { } @@ -328,7 +328,7 @@ public function getActionName(): string * * @return string|array */ - public function getActiveRenderPath(): string|array + public function getActiveRenderPath() { } @@ -385,7 +385,7 @@ public function getRenderLevel(): int * * @return ManagerInterface|null */ - public function getEventsManager(): ManagerInterface|null + public function getEventsManager(): ?ManagerInterface { } @@ -489,7 +489,7 @@ public function getRender(string $controllerName, string $actionName, array $par * @return mixed|null * @param string $key */ - public function getVar(string $key): mixed + public function getVar(string $key) { } @@ -498,7 +498,7 @@ public function getVar(string $key): mixed * * @return string|array */ - public function getViewsDir(): string|array + public function getViewsDir() { } @@ -613,7 +613,7 @@ public function registerEngines(array $engines): View * @param array $params * @return bool|View */ - public function render(string $controllerName, string $actionName, array $params = []): View|bool + public function render(string $controllerName, string $actionName, array $params = []) { } diff --git a/src/Mvc/View/Engine/Volt.php b/src/Mvc/View/Engine/Volt.php index dd16dd12..8e75c451 100644 --- a/src/Mvc/View/Engine/Volt.php +++ b/src/Mvc/View/Engine/Volt.php @@ -52,7 +52,7 @@ class Volt extends \Phalcon\Mvc\View\Engine\AbstractEngine implements \Phalcon\E * @param string $name * @param array $arguments */ - public function callMacro(string $name, array $arguments = []): mixed + public function callMacro(string $name, array $arguments = []) { } @@ -82,7 +82,7 @@ public function getCompiler(): Compiler * * @return ManagerInterface|null */ - public function getEventsManager(): ManagerInterface|null + public function getEventsManager(): ?ManagerInterface { } diff --git a/src/Mvc/View/Engine/Volt/Compiler.php b/src/Mvc/View/Engine/Volt/Compiler.php index 9acb1835..0076ede9 100644 --- a/src/Mvc/View/Engine/Volt/Compiler.php +++ b/src/Mvc/View/Engine/Volt/Compiler.php @@ -531,7 +531,7 @@ public function getFunctions(): array * @param string $option * * @return string|null */ - public function getOption(string $option): string|null + public function getOption(string $option): ?string { } @@ -634,9 +634,9 @@ public function setUniquePrefix(string $prefix): Compiler * * @param string $viewCode * @param bool $extendsMode - * @return string + * @return array|string */ - protected function compileSource(string $viewCode, bool $extendsMode = false): string + protected function compileSource(string $viewCode, bool $extendsMode = false) { } diff --git a/src/Mvc/View/Simple.php b/src/Mvc/View/Simple.php index 87c3ce26..b1d8c9c9 100644 --- a/src/Mvc/View/Simple.php +++ b/src/Mvc/View/Simple.php @@ -106,7 +106,7 @@ public function __construct(array $options = []) * @return mixed|null * @param string $key */ - public function __get(string $key): mixed + public function __get(string $key) { } @@ -148,7 +148,7 @@ public function getContent(): string * * @return ManagerInterface|null */ - public function getEventsManager(): ManagerInterface|null + public function getEventsManager(): ?ManagerInterface { } @@ -174,7 +174,7 @@ public function getRegisteredEngines(): array * @return mixed|null * @param string $key */ - public function getVar(string $key): mixed + public function getVar(string $key) { } diff --git a/src/Mvc/ViewBaseInterface.php b/src/Mvc/ViewBaseInterface.php index ddb5a697..becc5b16 100644 --- a/src/Mvc/ViewBaseInterface.php +++ b/src/Mvc/ViewBaseInterface.php @@ -37,7 +37,7 @@ public function getParamsToView(): array; * * @return string|array */ - public function getViewsDir(): string|array; + public function getViewsDir(); /** * Renders a partial view diff --git a/src/Mvc/ViewInterface.php b/src/Mvc/ViewInterface.php index 735b6a30..6e6caea1 100644 --- a/src/Mvc/ViewInterface.php +++ b/src/Mvc/ViewInterface.php @@ -53,7 +53,7 @@ public function getActionName(): string; * * @return string|array */ - public function getActiveRenderPath(): string|array; + public function getActiveRenderPath(); /** * Gets base path @@ -126,7 +126,7 @@ public function registerEngines(array $engines); * @param array $params * @return bool|ViewInterface */ - public function render(string $controllerName, string $actionName, array $params = []): ViewInterface|bool; + public function render(string $controllerName, string $actionName, array $params = []); /** * Resets the view component to its factory default values diff --git a/src/Paginator/Repository.php b/src/Paginator/Repository.php index a24211cb..ffa6ab77 100644 --- a/src/Paginator/Repository.php +++ b/src/Paginator/Repository.php @@ -34,7 +34,7 @@ class Repository implements \Phalcon\Paginator\RepositoryInterface, \JsonSeriali * @param string $property * @return mixed|null */ - public function __get(string $property): mixed + public function __get(string $property) { } @@ -70,7 +70,7 @@ public function getFirst(): int * * @return mixed */ - public function getItems(): mixed + public function getItems() { } @@ -155,7 +155,7 @@ public function setProperties(array $properties): RepositoryInterface * @param mixed $defaultValue * @return mixed */ - protected function getProperty(string $property, $defaultValue = null): mixed + protected function getProperty(string $property, $defaultValue = null) { } diff --git a/src/Paginator/RepositoryInterface.php b/src/Paginator/RepositoryInterface.php index c7ddb582..05c23ed4 100644 --- a/src/Paginator/RepositoryInterface.php +++ b/src/Paginator/RepositoryInterface.php @@ -60,7 +60,7 @@ public function getFirst(): int; * * @return mixed */ - public function getItems(): mixed; + public function getItems(); /** * Gets number of the last page diff --git a/src/Session/Adapter/AbstractAdapter.php b/src/Session/Adapter/AbstractAdapter.php index cb660ac5..9b362972 100644 --- a/src/Session/Adapter/AbstractAdapter.php +++ b/src/Session/Adapter/AbstractAdapter.php @@ -39,30 +39,30 @@ public function close(): bool /** * Destroy * - * @param mixed $sessionId + * @param mixed $id * @return bool */ - public function destroy($sessionId): bool + public function destroy($id): bool { } /** * Garbage Collector * - * @param int $maxlifetime + * @param int $max_lifetime * @return false|int */ - public function gc(int $maxlifetime): int|false + public function gc(int $max_lifetime): int { } /** * Read * - * @param mixed $sessionId + * @param mixed $id * @return string */ - public function read($sessionId): string + public function read($id): string { } @@ -95,7 +95,7 @@ public function write($id, $data): bool * @param mixed $defaultValue * @return mixed */ - protected function getArrVal(array $collection, $index, $defaultValue = null): mixed + protected function getArrVal(array $collection, $index, $defaultValue = null) { } } diff --git a/src/Session/Adapter/Noop.php b/src/Session/Adapter/Noop.php index df2b3833..c1785aee 100644 --- a/src/Session/Adapter/Noop.php +++ b/src/Session/Adapter/Noop.php @@ -80,30 +80,30 @@ public function close(): bool /** * Destroy * - * @param mixed $sessionId + * @param mixed $id * @return bool */ - public function destroy($sessionId): bool + public function destroy($id): bool { } /** * Garbage Collector * - * @param int $maxlifetime + * @param int $max_lifetime * @return false|int */ - public function gc(int $maxlifetime): int|false + public function gc(int $max_lifetime): int { } /** * Read * - * @param mixed $sessionId + * @param mixed $id * @return string */ - public function read($sessionId): string + public function read($id): string { } diff --git a/src/Session/Adapter/Stream.php b/src/Session/Adapter/Stream.php index 1ba037b7..c5ca6608 100644 --- a/src/Session/Adapter/Stream.php +++ b/src/Session/Adapter/Stream.php @@ -55,20 +55,20 @@ public function __construct(array $options = []) } /** - * @param mixed $sessionId + * @param mixed $id * @return bool */ - public function destroy($sessionId): bool + public function destroy($id): bool { } /** * Garbage Collector * - * @param int $maxlifetime + * @param int $max_lifetime * @return false|int */ - public function gc(int $maxlifetime): int|false + public function gc(int $max_lifetime): int { } @@ -86,10 +86,10 @@ public function open($path, $name): bool /** * Reads data from the adapter * - * @param mixed $sessionId + * @param mixed $id * @return string */ - public function read($sessionId): string + public function read($id): string { } @@ -110,7 +110,7 @@ public function write($id, $data): bool * @param string $cast * @return mixed */ - protected function getArrVal(array $collection, $index, $defaultValue = null, string $cast = null): mixed + protected function getArrVal(array $collection, $index, $defaultValue = null, string $cast = null) { } diff --git a/src/Session/BagInterface.php b/src/Session/BagInterface.php index ac0047da..52e9d16e 100644 --- a/src/Session/BagInterface.php +++ b/src/Session/BagInterface.php @@ -20,7 +20,7 @@ interface BagInterface * @param string $element * @return mixed */ - public function __get(string $element): mixed; + public function __get(string $element); /** * @param string $element @@ -53,7 +53,7 @@ public function init(array $data = []): void; * @param string $cast * @return mixed */ - public function get(string $element, $defaultValue = null, string $cast = null): mixed; + public function get(string $element, $defaultValue = null, string $cast = null); /** * @param string $element diff --git a/src/Session/Manager.php b/src/Session/Manager.php index d080f84c..475935ba 100644 --- a/src/Session/Manager.php +++ b/src/Session/Manager.php @@ -62,7 +62,7 @@ public function __construct(array $options = []) * * @return mixed */ - public function __get(string $key): mixed + public function __get(string $key) { } @@ -125,7 +125,7 @@ public function exists(): bool * * @return mixed|null */ - public function get(string $key, $defaultValue = null, bool $remove = false): mixed + public function get(string $key, $defaultValue = null, bool $remove = false) { } @@ -298,7 +298,7 @@ private function getUniqueKey(string $key): string * @param mixed $defaultValue * @return mixed */ - private function getArrVal(array $collection, $index, $defaultValue = null): mixed + private function getArrVal(array $collection, $index, $defaultValue = null) { } } diff --git a/src/Session/ManagerInterface.php b/src/Session/ManagerInterface.php index 247d9086..9af730e7 100644 --- a/src/Session/ManagerInterface.php +++ b/src/Session/ManagerInterface.php @@ -33,7 +33,7 @@ interface ManagerInterface * @param string $key * @return mixed */ - public function __get(string $key): mixed; + public function __get(string $key); /** * Alias: Check whether a session variable is set in an application context @@ -82,7 +82,7 @@ public function destroy(): void; * @param bool $remove * @return mixed */ - public function get(string $key, $defaultValue = null, bool $remove = false): mixed; + public function get(string $key, $defaultValue = null, bool $remove = false); /** * Returns the session id diff --git a/src/Storage/Adapter/AbstractAdapter.php b/src/Storage/Adapter/AbstractAdapter.php index d10da955..dcacd3c4 100644 --- a/src/Storage/Adapter/AbstractAdapter.php +++ b/src/Storage/Adapter/AbstractAdapter.php @@ -12,6 +12,8 @@ use DateInterval; use DateTime; use Exception; +use Phalcon\Events\EventsAwareInterface; +use Phalcon\Events\ManagerInterface; use Phalcon\Storage\Serializer\SerializerInterface; use Phalcon\Storage\SerializerFactory; use Phalcon\Support\Exception as SupportException; @@ -29,7 +31,7 @@ * @property SerializerInterface $serializer * @property SerializerFactory $serializerFactory */ -abstract class AbstractAdapter implements \Phalcon\Storage\Adapter\AdapterInterface +abstract class AbstractAdapter implements \Phalcon\Storage\Adapter\AdapterInterface, \Phalcon\Events\EventsAwareInterface { /** * @var mixed @@ -74,6 +76,20 @@ abstract class AbstractAdapter implements \Phalcon\Storage\Adapter\AdapterInterf */ protected $serializerFactory; + /** + * Event Manager + * + * @var ManagerInterface|null + */ + protected $eventsManager = null; + + /** + * EventType prefix. + * + * @var string + */ + protected $eventType = 'storage'; + /** * AbstractAdapter constructor. * @@ -99,7 +115,7 @@ abstract public function clear(): bool; * * @return int | bool */ - abstract public function decrement(string $key, int $value = 1): int|bool; + abstract public function decrement(string $key, int $value = 1); /** * Deletes data from the adapter @@ -118,7 +134,7 @@ abstract public function delete(string $key): bool; * * @return mixed */ - public function get(string $key, $defaultValue = null): mixed + public function get(string $key, $defaultValue = null) { } @@ -127,7 +143,7 @@ public function get(string $key, $defaultValue = null): mixed * * @return mixed */ - public function getAdapter(): mixed + public function getAdapter() { } @@ -175,7 +191,7 @@ abstract public function has(string $key): bool; * * @return int | bool */ - abstract public function increment(string $key, int $value = 1): int|bool; + abstract public function increment(string $key, int $value = 1); /** * Stores data in the adapter @@ -235,7 +251,7 @@ protected function getPrefixedKey($key): string * * @return mixed */ - protected function getSerializedData($content): mixed + protected function getSerializedData($content) { } @@ -259,7 +275,7 @@ protected function getTtl($ttl): int * * @return mixed */ - protected function getUnserializedData($content, $defaultValue = null): mixed + protected function getUnserializedData($content, $defaultValue = null) { } @@ -281,7 +297,37 @@ protected function initSerializer(): void * @param string $cast * @return mixed */ - protected function getArrVal(array $collection, $index, $defaultValue = null, string $cast = null): mixed + protected function getArrVal(array $collection, $index, $defaultValue = null, string $cast = null) + { + } + + /** + * Sets the event manager + * + * @param \Phalcon\Events\ManagerInterface $eventsManager + * @return void + */ + public function setEventsManager(\Phalcon\Events\ManagerInterface $eventsManager): void + { + } + + /** + * Get the event manager + * + * @return ManagerInterface|null + */ + public function getEventsManager(): ?ManagerInterface + { + } + + /** + * Trigger an event for the eventsManager. + * + * @param string $eventName + * @param mixed $keys + * @return void + */ + protected function fire(string $eventName, $keys): void { } } diff --git a/src/Storage/Adapter/AdapterInterface.php b/src/Storage/Adapter/AdapterInterface.php index ec4ec5d7..46e1c225 100644 --- a/src/Storage/Adapter/AdapterInterface.php +++ b/src/Storage/Adapter/AdapterInterface.php @@ -30,7 +30,7 @@ public function clear(): bool; * @param int $value * @return int|bool */ - public function decrement(string $key, int $value = 1): int|bool; + public function decrement(string $key, int $value = 1); /** * Deletes data from the adapter @@ -47,7 +47,7 @@ public function delete(string $key): bool; * @param mixed|null $defaultValue * * @return mixed */ - public function get(string $key, $defaultValue = null): mixed; + public function get(string $key, $defaultValue = null); /** * Returns the already connected adapter or connects to the backend @@ -55,7 +55,7 @@ public function get(string $key, $defaultValue = null): mixed; * * @return mixed */ - public function getAdapter(): mixed; + public function getAdapter(); /** * Returns all the keys stored @@ -87,7 +87,7 @@ public function has(string $key): bool; * @param int $value * @return int|bool */ - public function increment(string $key, int $value = 1): int|bool; + public function increment(string $key, int $value = 1); /** * Stores data in the adapter. If the TTL is `null` (default) or not defined diff --git a/src/Storage/Adapter/Apcu.php b/src/Storage/Adapter/Apcu.php index 9121b30d..91d3731e 100644 --- a/src/Storage/Adapter/Apcu.php +++ b/src/Storage/Adapter/Apcu.php @@ -56,7 +56,7 @@ public function clear(): bool * * @return bool|int */ - public function decrement(string $key, int $value = 1): int|bool + public function decrement(string $key, int $value = 1) { } @@ -101,7 +101,7 @@ public function has(string $key): bool * * @return bool|int */ - public function increment(string $key, int $value = 1): int|bool + public function increment(string $key, int $value = 1) { } @@ -151,7 +151,7 @@ protected function doGet(string $key) * @param int $step * @return bool|int */ - protected function phpApcuDec($key, int $step = 1): int|bool + protected function phpApcuDec($key, int $step = 1) { } @@ -159,7 +159,7 @@ protected function phpApcuDec($key, int $step = 1): int|bool * @param mixed $key * @return bool|array */ - protected function phpApcuDelete($key): bool|array + protected function phpApcuDelete($key) { } @@ -167,7 +167,7 @@ protected function phpApcuDelete($key): bool|array * @param mixed $key * @return bool|array */ - protected function phpApcuExists($key): bool|array + protected function phpApcuExists($key) { } @@ -176,7 +176,7 @@ protected function phpApcuExists($key): bool|array * @param int $step * @return bool|int */ - protected function phpApcuInc($key, int $step = 1): int|bool + protected function phpApcuInc($key, int $step = 1) { } @@ -184,7 +184,7 @@ protected function phpApcuInc($key, int $step = 1): int|bool * @param mixed $key * @return mixed */ - protected function phpApcuFetch($key): mixed + protected function phpApcuFetch($key) { } @@ -192,7 +192,7 @@ protected function phpApcuFetch($key): mixed * @param string $pattern * @return bool|APCUIterator */ - protected function phpApcuIterator(string $pattern): APCUIterator|bool + protected function phpApcuIterator(string $pattern) { } @@ -202,7 +202,7 @@ protected function phpApcuIterator(string $pattern): APCUIterator|bool * @param int $ttl * @return bool|array */ - protected function phpApcuStore($key, $payload, int $ttl = 0): bool|array + protected function phpApcuStore($key, $payload, int $ttl = 0) { } } diff --git a/src/Storage/Adapter/Libmemcached.php b/src/Storage/Adapter/Libmemcached.php index c88a711d..e8ae138f 100644 --- a/src/Storage/Adapter/Libmemcached.php +++ b/src/Storage/Adapter/Libmemcached.php @@ -56,7 +56,7 @@ public function clear(): bool * @return bool|int * @throws StorageException */ - public function decrement(string $key, int $value = 1): int|bool + public function decrement(string $key, int $value = 1) { } @@ -79,7 +79,7 @@ public function delete(string $key): bool * @return \Memcached|null * @throws StorageException */ - public function getAdapter(): mixed + public function getAdapter() { } @@ -116,7 +116,7 @@ public function has(string $key): bool * @return bool|int * @throws StorageException */ - public function increment(string $key, int $value = 1): int|bool + public function increment(string $key, int $value = 1) { } diff --git a/src/Storage/Adapter/Memory.php b/src/Storage/Adapter/Memory.php index 9537d7c8..d9669d89 100644 --- a/src/Storage/Adapter/Memory.php +++ b/src/Storage/Adapter/Memory.php @@ -56,7 +56,7 @@ public function clear(): bool * * @return bool|int */ - public function decrement(string $key, int $value = 1): int|bool + public function decrement(string $key, int $value = 1) { } @@ -101,7 +101,7 @@ public function has(string $key): bool * * @return bool|int */ - public function increment(string $key, int $value = 1): int|bool + public function increment(string $key, int $value = 1) { } diff --git a/src/Storage/Adapter/Redis.php b/src/Storage/Adapter/Redis.php index 51eeb39c..8548d8d5 100644 --- a/src/Storage/Adapter/Redis.php +++ b/src/Storage/Adapter/Redis.php @@ -70,7 +70,7 @@ public function clear(): bool * @return bool|int * @throws StorageException */ - public function decrement(string $key, int $value = 1): int|bool + public function decrement(string $key, int $value = 1) { } @@ -93,7 +93,7 @@ public function delete(string $key): bool * @return mixed|\Redis * @throws StorageException */ - public function getAdapter(): mixed + public function getAdapter() { } @@ -130,7 +130,7 @@ public function has(string $key): bool * @return bool|false|int * @throws StorageException */ - public function increment(string $key, int $value = 1): int|bool + public function increment(string $key, int $value = 1) { } diff --git a/src/Storage/Adapter/Stream.php b/src/Storage/Adapter/Stream.php index 1fe43d9a..edb4c38f 100644 --- a/src/Storage/Adapter/Stream.php +++ b/src/Storage/Adapter/Stream.php @@ -71,7 +71,7 @@ public function clear(): bool * * @return bool|int */ - public function decrement(string $key, int $value = 1): int|bool + public function decrement(string $key, int $value = 1) { } @@ -94,7 +94,7 @@ public function delete(string $key): bool * * @return mixed|null */ - public function get(string $key, $defaultValue = null): mixed + public function get(string $key, $defaultValue = null) { } @@ -128,7 +128,7 @@ public function has(string $key): bool * * @return bool|int */ - public function increment(string $key, int $value = 1): int|bool + public function increment(string $key, int $value = 1) { } @@ -255,7 +255,7 @@ protected function phpFileExists(string $filename): bool * @param string $filename * @return string|bool */ - protected function phpFileGetContents(string $filename): bool|string + protected function phpFileGetContents(string $filename) { } @@ -266,7 +266,7 @@ protected function phpFileGetContents(string $filename): bool|string * @param mixed $context * @return int|bool */ - protected function phpFilePutContents(string $filename, $data, int $flags = 0, $context = null): int|bool + protected function phpFilePutContents(string $filename, $data, int $flags = 0, $context = null) { } @@ -275,7 +275,7 @@ protected function phpFilePutContents(string $filename, $data, int $flags = 0, $ * @param string $mode * @return mixed */ - protected function phpFopen(string $filename, string $mode): mixed + protected function phpFopen(string $filename, string $mode) { } diff --git a/src/Storage/Adapter/Weak.php b/src/Storage/Adapter/Weak.php index 845f334b..53df27db 100644 --- a/src/Storage/Adapter/Weak.php +++ b/src/Storage/Adapter/Weak.php @@ -63,7 +63,7 @@ public function clear(): bool * * @return bool|int */ - public function decrement(string $key, int $value = 1): int|bool + public function decrement(string $key, int $value = 1) { } @@ -97,7 +97,7 @@ public function getKeys(string $prefix = ''): array * * @return bool|int */ - public function increment(string $key, int $value = 1): int|bool + public function increment(string $key, int $value = 1) { } @@ -108,7 +108,7 @@ public function increment(string $key, int $value = 1): int|bool * @param mixed|null $defaultValue * * @return mixed */ - public function get(string $key, $defaultValue = null): mixed + public function get(string $key, $defaultValue = null) { } diff --git a/src/Storage/Serializer/Igbinary.php b/src/Storage/Serializer/Igbinary.php index 99fc41de..46d67f4d 100644 --- a/src/Storage/Serializer/Igbinary.php +++ b/src/Storage/Serializer/Igbinary.php @@ -46,7 +46,7 @@ public function unserialize($data): void * * @return string|null */ - protected function phpIgbinarySerialize($value): string|null + protected function phpIgbinarySerialize($value): ?string { } @@ -57,7 +57,7 @@ protected function phpIgbinarySerialize($value): string|null * * @return string|null */ - protected function doSerialize($value): string|null + protected function doSerialize($value): ?string { } diff --git a/src/Storage/Serializer/None.php b/src/Storage/Serializer/None.php index 53af81fb..59c7da77 100644 --- a/src/Storage/Serializer/None.php +++ b/src/Storage/Serializer/None.php @@ -24,7 +24,7 @@ class None extends \Phalcon\Storage\Serializer\AbstractSerializer * * @return mixed */ - public function serialize(): mixed + public function serialize() { } diff --git a/src/Storage/Serializer/Php.php b/src/Storage/Serializer/Php.php index a9ac87dc..4b117985 100644 --- a/src/Storage/Serializer/Php.php +++ b/src/Storage/Serializer/Php.php @@ -46,7 +46,7 @@ public function unserialize($data): void * * @return mixed */ - private function phpUnserialize(string $data, array $options = []): mixed + private function phpUnserialize(string $data, array $options = []) { } } diff --git a/src/Storage/Serializer/SerializerInterface.php b/src/Storage/Serializer/SerializerInterface.php index b1246f95..021ad6e5 100644 --- a/src/Storage/Serializer/SerializerInterface.php +++ b/src/Storage/Serializer/SerializerInterface.php @@ -24,7 +24,7 @@ interface SerializerInterface extends \Serializable /** * @return mixed */ - public function getData(): mixed; + public function getData(); /** * @param mixed $data diff --git a/src/Support/Collection.php b/src/Support/Collection.php index 81f5f7a1..23948682 100644 --- a/src/Support/Collection.php +++ b/src/Support/Collection.php @@ -68,7 +68,7 @@ public function __construct(array $data = [], bool $insensitive = true) * @param string $element * @return mixed */ - public function __get(string $element): mixed + public function __get(string $element) { } @@ -130,7 +130,7 @@ public function count(): int * @param string $cast * @return mixed */ - public function get(string $element, $defaultValue = null, string $cast = null): mixed + public function get(string $element, $defaultValue = null, string $cast = null) { } @@ -210,7 +210,7 @@ public function offsetExists($element): bool * @param mixed $element * @return mixed */ - public function offsetGet($element): mixed + public function offsetGet($element) { } @@ -262,9 +262,9 @@ public function set(string $element, $value): void * String representation of object * See [serialize](https://php.net/manual/en/serializable.serialize.php) * - * @return string + * @return string|null */ - public function serialize(): string + public function serialize(): ?string { } @@ -298,10 +298,10 @@ public function toJson(int $options = 4194383): string * Constructs the object * See [unserialize](https://php.net/manual/en/serializable.unserialize.php) * - * @param string $serialized + * @param string $data * @return void */ - public function unserialize(string $serialized): void + public function unserialize(string $data): void { } diff --git a/src/Support/Collection/CollectionInterface.php b/src/Support/Collection/CollectionInterface.php index ea00124a..31de7e9f 100644 --- a/src/Support/Collection/CollectionInterface.php +++ b/src/Support/Collection/CollectionInterface.php @@ -20,7 +20,7 @@ interface CollectionInterface * @param string $element * @return mixed */ - public function __get(string $element): mixed; + public function __get(string $element); /** * @param string $element @@ -52,7 +52,7 @@ public function clear(): void; * @param string $cast * @return mixed */ - public function get(string $element, $defaultValue = null, string $cast = null): mixed; + public function get(string $element, $defaultValue = null, string $cast = null); /** * @param bool $insensitive diff --git a/src/Support/Debug.php b/src/Support/Debug.php index bb80025a..f3aa47a7 100644 --- a/src/Support/Debug.php +++ b/src/Support/Debug.php @@ -266,7 +266,7 @@ protected function escapeString(string $value): string * @param array $argument * @param mixed $n */ - protected function getArrayDump(array $argument, $n = 0): string|null + protected function getArrayDump(array $argument, $n = 0): ?string { } @@ -300,7 +300,7 @@ final protected function showTraceItem(int $n, array $trace): string * @param mixed $defaultValue * @return mixed */ - private function getArrVal(array $collection, $index, $defaultValue = null): mixed + private function getArrVal(array $collection, $index, $defaultValue = null) { } } diff --git a/src/Support/Helper/Arr/Filter.php b/src/Support/Helper/Arr/Filter.php index 47aaf6b2..519595d5 100644 --- a/src/Support/Helper/Arr/Filter.php +++ b/src/Support/Helper/Arr/Filter.php @@ -20,7 +20,7 @@ class Filter extends \Phalcon\Support\Helper\Arr\AbstractArr * * @return mixed */ - public function __invoke(array $collection, $method = null): mixed + public function __invoke(array $collection, $method = null) { } } diff --git a/src/Support/Helper/Arr/First.php b/src/Support/Helper/Arr/First.php index 500b7674..5b2a4955 100644 --- a/src/Support/Helper/Arr/First.php +++ b/src/Support/Helper/Arr/First.php @@ -21,7 +21,7 @@ class First extends \Phalcon\Support\Helper\Arr\AbstractArr * * @return mixed */ - public function __invoke(array $collection, $method = null): mixed + public function __invoke(array $collection, $method = null) { } } diff --git a/src/Support/Helper/Arr/FirstKey.php b/src/Support/Helper/Arr/FirstKey.php index e0760417..b86b0a9a 100644 --- a/src/Support/Helper/Arr/FirstKey.php +++ b/src/Support/Helper/Arr/FirstKey.php @@ -21,7 +21,7 @@ class FirstKey extends \Phalcon\Support\Helper\Arr\AbstractArr * * @return mixed */ - public function __invoke(array $collection, $method = null): mixed + public function __invoke(array $collection, $method = null) { } } diff --git a/src/Support/Helper/Arr/Get.php b/src/Support/Helper/Arr/Get.php index 0099f4cd..edc26e45 100644 --- a/src/Support/Helper/Arr/Get.php +++ b/src/Support/Helper/Arr/Get.php @@ -24,7 +24,7 @@ class Get * * @return mixed|null */ - public function __invoke(array $collection, $index, $defaultValue = null, string $cast = null): mixed + public function __invoke(array $collection, $index, $defaultValue = null, string $cast = null) { } } diff --git a/src/Support/Helper/Arr/Last.php b/src/Support/Helper/Arr/Last.php index 59323d7e..469d599d 100644 --- a/src/Support/Helper/Arr/Last.php +++ b/src/Support/Helper/Arr/Last.php @@ -21,7 +21,7 @@ class Last extends \Phalcon\Support\Helper\Arr\AbstractArr * * @return mixed */ - public function __invoke(array $collection, $method = null): mixed + public function __invoke(array $collection, $method = null) { } } diff --git a/src/Support/Helper/Arr/LastKey.php b/src/Support/Helper/Arr/LastKey.php index a53793a8..a4ba6482 100644 --- a/src/Support/Helper/Arr/LastKey.php +++ b/src/Support/Helper/Arr/LastKey.php @@ -21,7 +21,7 @@ class LastKey extends \Phalcon\Support\Helper\Arr\AbstractArr * * @return mixed */ - public function __invoke(array $collection, $method = null): mixed + public function __invoke(array $collection, $method = null) { } } diff --git a/src/Support/Helper/Arr/ToObject.php b/src/Support/Helper/Arr/ToObject.php index 5155fe80..4a24639c 100644 --- a/src/Support/Helper/Arr/ToObject.php +++ b/src/Support/Helper/Arr/ToObject.php @@ -19,7 +19,7 @@ class ToObject * * @return object */ - public function __invoke(array $collection): object + public function __invoke(array $collection) { } } diff --git a/src/Support/Helper/Str/Uncamelize.php b/src/Support/Helper/Str/Uncamelize.php index 52634372..73167702 100644 --- a/src/Support/Helper/Str/Uncamelize.php +++ b/src/Support/Helper/Str/Uncamelize.php @@ -16,9 +16,10 @@ class Uncamelize { /** * @param string $text - * @param string $delimiter + * @param string $delimiters * * @return string + * @param string $delimiter */ public function __invoke(string $text, string $delimiter = '_'): string { diff --git a/src/Support/Registry.php b/src/Support/Registry.php index 420cb074..ac958475 100644 --- a/src/Support/Registry.php +++ b/src/Support/Registry.php @@ -79,7 +79,7 @@ final public function __construct(array $data = []) * @param string $element * @return mixed */ - final public function __get(string $element): mixed + final public function __get(string $element) { } @@ -141,7 +141,7 @@ final public function count(): int * @param string $cast * @return mixed */ - final public function get(string $element, $defaultValue = null, string $cast = null): mixed + final public function get(string $element, $defaultValue = null, string $cast = null) { } @@ -202,7 +202,7 @@ final public function offsetExists($element): bool * @param mixed $element * @return mixed */ - final public function offsetGet($element): mixed + final public function offsetGet($element) { } @@ -243,9 +243,9 @@ final public function remove(string $element): void * String representation of object * * @link https://php.net/manual/en/serializable.serialize.php - * @return string + * @return string|null */ - final public function serialize(): string + final public function serialize(): ?string { } @@ -288,10 +288,10 @@ final public function toJson(int $options = 79): string * Constructs the object * * @link https://php.net/manual/en/serializable.unserialize.php - * @param mixed $serialized + * @param string $data * @return void */ - final public function unserialize($serialized): void + final public function unserialize(string $data): void { } } diff --git a/src/Tag.php b/src/Tag.php index 0f73d89b..a46538f4 100644 --- a/src/Tag.php +++ b/src/Tag.php @@ -284,7 +284,7 @@ public static function getDocType(): string * @param array $params * @return EscaperInterface|null */ - public static function getEscaper(array $params): EscaperInterface|null + public static function getEscaper(array $params): ?EscaperInterface { } @@ -423,7 +423,7 @@ public static function javascriptInclude($parameters = null, bool $local = true) /** * Builds a HTML A tag using framework conventions * - * @param array|string $parameters = [ + * @param parameters $array |string = [ * 'action' => '', * 'text' => '', * 'local' => false, @@ -433,8 +433,9 @@ public static function javascriptInclude($parameters = null, bool $local = true) * 'href' => '', * 'id' => '' * ] - * @param string $text - * @param bool $local + * @param mixed $parameters + * @param mixed $text + * @param mixed $local * @return string */ public static function linkTo($parameters, $text = null, $local = true): string diff --git a/src/Translate/Adapter/AbstractAdapter.php b/src/Translate/Adapter/AbstractAdapter.php index 0f298b4d..9571e206 100644 --- a/src/Translate/Adapter/AbstractAdapter.php +++ b/src/Translate/Adapter/AbstractAdapter.php @@ -73,7 +73,7 @@ public function offsetExists($translateKey): bool * * @return mixed */ - public function offsetGet($translateKey): mixed + public function offsetGet($translateKey) { } diff --git a/src/Translate/Adapter/Csv.php b/src/Translate/Adapter/Csv.php index 96e7eed6..00dbfed6 100644 --- a/src/Translate/Adapter/Csv.php +++ b/src/Translate/Adapter/Csv.php @@ -79,10 +79,11 @@ public function query(string $translateKey, array $placeholders = []): string * * @param string $file * @param int $length - * @param string $delimiter + * @param string $separator * @param string $enclosure * * @throws Exception + * @param string $delimiter * @return void */ private function load(string $file, int $length, string $delimiter, string $enclosure): void diff --git a/src/Translate/Adapter/Gettext.php b/src/Translate/Adapter/Gettext.php index ec5715bf..79a0ac4c 100644 --- a/src/Translate/Adapter/Gettext.php +++ b/src/Translate/Adapter/Gettext.php @@ -104,7 +104,7 @@ public function getDefaultDomain(): string /** * @return string|array */ - public function getDirectory(): string|array + public function getDirectory() { } @@ -228,7 +228,7 @@ public function setDomain(string $domain = null): string * * @return false|string */ - public function setLocale(int $category, array $localeArray = []): bool|string + public function setLocale(int $category, array $localeArray = []) { } diff --git a/src/Translate/Adapter/NativeArray.php b/src/Translate/Adapter/NativeArray.php index fd871b22..3e70aeb0 100644 --- a/src/Translate/Adapter/NativeArray.php +++ b/src/Translate/Adapter/NativeArray.php @@ -10,7 +10,6 @@ namespace Phalcon\Translate\Adapter; use ArrayAccess; -use Phalcon\Translate\Adapter\AbstractAdapter; use Phalcon\Translate\Exception; use Phalcon\Translate\InterpolatorFactory; @@ -24,7 +23,7 @@ * @property array $translate * @property bool $triggerError */ -class NativeArray extends AbstractAdapter implements \ArrayAccess +class NativeArray extends \Phalcon\Translate\Adapter\AbstractAdapter implements \ArrayAccess { /** * @var array @@ -89,11 +88,12 @@ public function notFound(string $index): string /** * Returns the translation related to the given key * - * @param string $translateKey + * @param string $index * @param array $placeholders * * @return string * @throws Exception + * @param string $translateKey */ public function query(string $translateKey, array $placeholders = []): string {