diff --git a/src/Acl/Adapter/AdapterInterface.php b/src/Acl/Adapter/AdapterInterface.php index 3333fd92..3ebef211 100644 --- a/src/Acl/Adapter/AdapterInterface.php +++ b/src/Acl/Adapter/AdapterInterface.php @@ -40,7 +40,7 @@ public function addRole($role, $accessInherits = null): bool; * Adds a component to the ACL list * * Access names can be a particular action, by example - * search, update, delete, etc or a list of them + * search, update, delete, etc. or a list of them * * @param mixed $componentValue * @param mixed $accessList @@ -80,7 +80,7 @@ public function allow(string $roleName, string $componentName, $access, $func = public function deny(string $roleName, string $componentName, $access, $func = null): void; /** - * Removes an access from a component + * Removes access from a component * * @param string $componentName * @param mixed $accessList diff --git a/src/Acl/Adapter/Memory.php b/src/Acl/Adapter/Memory.php index 4408f330..97a2ae28 100644 --- a/src/Acl/Adapter/Memory.php +++ b/src/Acl/Adapter/Memory.php @@ -99,7 +99,7 @@ class Memory extends \Phalcon\Acl\Adapter\AbstractAdapter protected $accessList; /** - * Returns latest function used to acquire access + * Returns the latest function used to acquire access * * @var mixed */ @@ -113,7 +113,7 @@ class Memory extends \Phalcon\Acl\Adapter\AbstractAdapter protected $activeFunctionCustomArgumentsCount = 0; /** - * Returns latest key used to acquire access + * Returns the latest key used to acquire access * * @var string|null */ @@ -141,7 +141,7 @@ class Memory extends \Phalcon\Acl\Adapter\AbstractAdapter protected $func; /** - * Default action for no arguments is allow + * Default action for no arguments is `allow` * * @var mixed */ @@ -172,11 +172,11 @@ public function __construct() * Adds a component to the ACL list * * Access names can be a particular action, by example - * search, update, delete, etc or a list of them + * search, update, delete, etc. or a list of them * * Example: * ```php - * // Add a component to the the list allowing access to an action + * // Add a component to the list allowing access to an action * $acl->addComponent( * new Phalcon\Acl\Component("customers"), * "search" @@ -312,7 +312,7 @@ public function deny(string $roleName, string $componentName, $access, $func = n } /** - * Removes an access from a component + * Removes access from a component * * @param string $componentName * @param mixed $accessList @@ -323,7 +323,7 @@ public function dropComponentAccess(string $componentName, $accessList): void } /** - * Returns latest function used to acquire access + * Returns the latest function used to acquire access * * @return mixed */ @@ -341,7 +341,7 @@ public function getActiveFunctionCustomArgumentsCount(): int } /** - * Returns latest key used to acquire access + * Returns the latest key used to acquire access * * @return string|null */ diff --git a/src/Assets/Asset.php b/src/Assets/Asset.php index a20868c5..01030196 100644 --- a/src/Assets/Asset.php +++ b/src/Assets/Asset.php @@ -15,18 +15,6 @@ * ```php * $asset = new \Phalcon\Assets\Asset("js", "js/jquery.js"); * ``` - * - * @property array $attributes - * @property bool $isAutoVersion - * @property bool $filter - * @property bool $isLocal - * @property string $path - * @property string $sourcePath - * @property string $targetPath - * @property string $targetUri - * @property string $type - * @property string|null $version - * */ class Asset implements \Phalcon\Assets\AssetInterface { diff --git a/src/Assets/Collection.php b/src/Assets/Collection.php index ce61fee9..03eadc31 100644 --- a/src/Assets/Collection.php +++ b/src/Assets/Collection.php @@ -15,20 +15,6 @@ /** * Collection of asset objects - * - * @property array $assets - * @property array $attributes - * @property bool $autoVersion - * @property array $codes - * @property array $filters - * @property bool $join - * @property bool $isLocal - * @property string $prefix - * @property string $sourcePath - * @property bool $targetIsLocal - * @property string $targetPath - * @property string $targetUri - * @property string $version */ class Collection implements \Countable, \IteratorAggregate { diff --git a/src/Assets/Filters/Cssmin.php b/src/Assets/Filters/Cssmin.php index 58fc0fec..05ddbf42 100644 --- a/src/Assets/Filters/Cssmin.php +++ b/src/Assets/Filters/Cssmin.php @@ -19,7 +19,9 @@ class Cssmin implements \Phalcon\Assets\FilterInterface { /** * Filters the content using CSSMIN - * NOTE: This functionality is not currently available + * + * > NOTE: This functionality is not currently available + * {: .alert .alert-info } * * @param string $content * @return string diff --git a/src/Assets/Filters/Jsmin.php b/src/Assets/Filters/Jsmin.php index afc0cd04..c7c497c7 100644 --- a/src/Assets/Filters/Jsmin.php +++ b/src/Assets/Filters/Jsmin.php @@ -20,7 +20,9 @@ class Jsmin implements \Phalcon\Assets\FilterInterface { /** * Filters the content using JSMIN - * NOTE: This functionality is not currently available + * + * > NOTE: This functionality is not currently available + * {: .alert .alert-info } * * @param string $content * @return string diff --git a/src/Assets/Manager.php b/src/Assets/Manager.php index 40e39036..8dd8923b 100644 --- a/src/Assets/Manager.php +++ b/src/Assets/Manager.php @@ -21,11 +21,6 @@ /** * Manages collections of CSS/JavaScript assets - * - * @property array $collections - * @property bool $implicitOutput - * @property array $options - * @property TagFactory $tagFactory */ class Manager extends AbstractInjectionAware { diff --git a/src/Autoload/Loader.php b/src/Autoload/Loader.php index 78b81731..40367b7b 100644 --- a/src/Autoload/Loader.php +++ b/src/Autoload/Loader.php @@ -15,18 +15,6 @@ * The Phalcon Autoloader provides an easy way to automatically load classes * (namespaced or not) as well as files. It also features extension loading, * allowing the user to autoload files with different extensions than .php. - * - * @property string|null $checkedPath - * @property array $classes - * @property array $debug - * @property array $directories - * @property array $extensions - * @property string|callable|null $fileCheckingCallback - * @property array $files - * @property string|null $foundPath - * @property bool $isDebug - * @property bool $isRegistered - * @property array $namespaces */ class Loader extends AbstractEventsAware { diff --git a/src/Cache/AbstractCache.php b/src/Cache/AbstractCache.php index 2ed1a50e..50457091 100644 --- a/src/Cache/AbstractCache.php +++ b/src/Cache/AbstractCache.php @@ -16,9 +16,6 @@ /** * This component offers caching capabilities for your application. - * Phalcon\Cache implements PSR-16. - * - * @property AdapterInterface $adapter */ abstract class AbstractCache implements \Phalcon\Cache\CacheInterface { diff --git a/src/Cache/AdapterFactory.php b/src/Cache/AdapterFactory.php index ae451a05..e8112260 100644 --- a/src/Cache/AdapterFactory.php +++ b/src/Cache/AdapterFactory.php @@ -16,8 +16,6 @@ /** * Factory to create Cache adapters - * - * @property SerializerFactory $serializerFactory */ class AdapterFactory extends AbstractFactory { diff --git a/src/Cache/Cache.php b/src/Cache/Cache.php index c81e6c26..7c7a372b 100644 --- a/src/Cache/Cache.php +++ b/src/Cache/Cache.php @@ -15,9 +15,6 @@ /** * This component offers caching capabilities for your application. - * Phalcon\Cache implements PSR-16. - * - * @property AdapterInterface $adapter */ class Cache extends \Phalcon\Cache\AbstractCache { diff --git a/src/Cache/CacheFactory.php b/src/Cache/CacheFactory.php index 213b18a4..0000a752 100644 --- a/src/Cache/CacheFactory.php +++ b/src/Cache/CacheFactory.php @@ -17,8 +17,6 @@ /** * Creates a new Cache class - * - * @property AdapterFactory $adapterFactory; */ class CacheFactory extends AbstractConfigFactory { diff --git a/src/Cli/Router.php b/src/Cli/Router.php index cf60aaf7..9c9247ee 100644 --- a/src/Cli/Router.php +++ b/src/Cli/Router.php @@ -38,14 +38,14 @@ class Router extends AbstractInjectionAware { /** - * @var string|null + * @var string */ - protected $action = null; + protected $action = ''; /** - * @var string|null + * @var string */ - protected $defaultAction = null; + protected $defaultAction = ''; /** * @var string @@ -58,9 +58,9 @@ class Router extends AbstractInjectionAware protected $defaultParams = []; /** - * @var string|null + * @var string */ - protected $defaultTask = null; + protected $defaultTask = ''; /** * @var RouteInterface|null @@ -68,10 +68,9 @@ class Router extends AbstractInjectionAware protected $matchedRoute = null; /** - * @var array|null - * TODO: make always array + * @var array */ - protected $matches = null; + protected $matches = []; /** * @var string @@ -89,9 +88,9 @@ class Router extends AbstractInjectionAware protected $routes = []; /** - * @var string|null + * @var string */ - protected $task = null; + protected $task = ''; /** * @var bool @@ -161,12 +160,22 @@ public function getModuleName(): string /** * Returns processed extra params * + * @todo deprecate this in future versions * @return array */ public function getParams(): array { } + /** + * Returns processed extra params + * + * @return array + */ + public function getParameters(): array + { + } + /** * Returns a route object by its id * diff --git a/src/Cli/Router/Route.php b/src/Cli/Router/Route.php index 78b77d8a..20c2ff6f 100644 --- a/src/Cli/Router/Route.php +++ b/src/Cli/Router/Route.php @@ -22,9 +22,9 @@ class Route implements \Phalcon\Cli\Router\RouteInterface protected $beforeMatch = null; /** - * @var string|null + * @var string */ - protected $compiledPattern = null; + protected $compiledPattern = ''; /** * @var array @@ -42,19 +42,19 @@ class Route implements \Phalcon\Cli\Router\RouteInterface protected static $delimiterPath = self::DEFAULT_DELIMITER; /** - * @var string|null + * @var string */ - protected $description = null; + protected $description = ''; /** * @var string */ - protected $id; + protected $routeId; /** - * @var string|null + * @var string */ - protected $name = null; + protected $name = ''; /** * @var array @@ -64,10 +64,10 @@ class Route implements \Phalcon\Cli\Router\RouteInterface /** * @var string */ - protected $pattern; + protected $pattern = ''; /** - * @var int|string + * @var int */ protected static $uniqueId = 0; diff --git a/src/Cli/RouterInterface.php b/src/Cli/RouterInterface.php index 1187996b..2393d25b 100644 --- a/src/Cli/RouterInterface.php +++ b/src/Cli/RouterInterface.php @@ -56,10 +56,18 @@ public function getModuleName(): string; /** * Returns processed extra params * + * @todo deprecate this in the future * @return array */ public function getParams(): array; + /** + * Returns processed extra params + * + * @return array + */ + public function getParameters(): array; + /** * Returns a route object by its id * diff --git a/src/Config/Config.php b/src/Config/Config.php index 02639e12..e31b4262 100644 --- a/src/Config/Config.php +++ b/src/Config/Config.php @@ -35,8 +35,6 @@ * ] * ); * ``` - * - * @property string $pathDelimiter */ class Config extends Collection implements \Phalcon\Config\ConfigInterface { diff --git a/src/DataMapper/Pdo/Connection.php b/src/DataMapper/Pdo/Connection.php index 646881ef..95aac404 100644 --- a/src/DataMapper/Pdo/Connection.php +++ b/src/DataMapper/Pdo/Connection.php @@ -17,10 +17,6 @@ /** * Provides array quoting, profiling, a new `perform()` method, new `fetch()` * methods - * - * @property array $arguments - * @property PDO $pdo - * @property ProfilerInterface $profiler */ class Connection extends AbstractConnection { diff --git a/src/DataMapper/Pdo/Connection/AbstractConnection.php b/src/DataMapper/Pdo/Connection/AbstractConnection.php index 7f39ab9e..2de1d6ce 100644 --- a/src/DataMapper/Pdo/Connection/AbstractConnection.php +++ b/src/DataMapper/Pdo/Connection/AbstractConnection.php @@ -16,9 +16,6 @@ /** * Provides array quoting, profiling, a new `perform()` method, new `fetch()` * methods - * - * @property PDO $pdo - * @property ProfilerInterface $profiler */ abstract class AbstractConnection implements \Phalcon\DataMapper\Pdo\Connection\ConnectionInterface { diff --git a/src/DataMapper/Pdo/Connection/ConnectionInterface.php b/src/DataMapper/Pdo/Connection/ConnectionInterface.php index cb346682..20bba058 100644 --- a/src/DataMapper/Pdo/Connection/ConnectionInterface.php +++ b/src/DataMapper/Pdo/Connection/ConnectionInterface.php @@ -16,11 +16,6 @@ /** * Provides array quoting, profiling, a new `perform()` method, new `fetch()` * methods - * - * @property array $args - * @property PDO $pdo - * @property ProfilerInterface $profiler - * @property array $quote */ interface ConnectionInterface extends \Phalcon\DataMapper\Pdo\Connection\PdoInterface { diff --git a/src/DataMapper/Pdo/ConnectionLocator.php b/src/DataMapper/Pdo/ConnectionLocator.php index 690b14ea..84948e25 100644 --- a/src/DataMapper/Pdo/ConnectionLocator.php +++ b/src/DataMapper/Pdo/ConnectionLocator.php @@ -14,10 +14,6 @@ /** * Manages Connection instances for default, read, and write connections. - * - * @property callable $master - * @property array $read - * @property array $write */ class ConnectionLocator implements \Phalcon\DataMapper\Pdo\ConnectionLocatorInterface { diff --git a/src/DataMapper/Pdo/Profiler/MemoryLogger.php b/src/DataMapper/Pdo/Profiler/MemoryLogger.php index b8cb36a2..9d4dcb66 100644 --- a/src/DataMapper/Pdo/Profiler/MemoryLogger.php +++ b/src/DataMapper/Pdo/Profiler/MemoryLogger.php @@ -16,8 +16,6 @@ /** * A memory-based logger. - * - * @property array $messages */ class MemoryLogger implements \Phalcon\Logger\LoggerInterface { diff --git a/src/DataMapper/Pdo/Profiler/Profiler.php b/src/DataMapper/Pdo/Profiler/Profiler.php index 43c89715..4eecdf30 100644 --- a/src/DataMapper/Pdo/Profiler/Profiler.php +++ b/src/DataMapper/Pdo/Profiler/Profiler.php @@ -16,12 +16,6 @@ /** * Sends query profiles to a logger. - * - * @property bool $active - * @property array $context - * @property string $logFormat - * @property string $logLevel - * @property LoggerInterface $logger */ class Profiler implements \Phalcon\DataMapper\Pdo\Profiler\ProfilerInterface { diff --git a/src/DataMapper/Query/AbstractQuery.php b/src/DataMapper/Query/AbstractQuery.php index 712ba4ec..2777e31e 100644 --- a/src/DataMapper/Query/AbstractQuery.php +++ b/src/DataMapper/Query/AbstractQuery.php @@ -13,10 +13,6 @@ /** * Class AbstractQuery - * - * @property Bind $bind - * @property Connection $connection - * @property array $store */ abstract class AbstractQuery { diff --git a/src/DataMapper/Query/Bind.php b/src/DataMapper/Query/Bind.php index 6b681ea0..2d2601e2 100644 --- a/src/DataMapper/Query/Bind.php +++ b/src/DataMapper/Query/Bind.php @@ -11,9 +11,6 @@ /** * Class Bind - * - * @property int $inlineCount - * @property array $store */ class Bind { diff --git a/src/DataMapper/Query/Delete.php b/src/DataMapper/Query/Delete.php index 4f74348d..a4c0a7df 100644 --- a/src/DataMapper/Query/Delete.php +++ b/src/DataMapper/Query/Delete.php @@ -12,17 +12,7 @@ use Phalcon\DataMapper\Pdo\Connection; /** - * This file is part of the Phalcon Framework. - * - * (c) Phalcon Team - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - * - * Implementation of this file has been influenced by AtlasPHP - * - * @link https://github.com/atlasphp/Atlas.Query - * @license https://github.com/atlasphp/Atlas.Qyert/blob/1.x/LICENSE.md + * Delete Query */ class Delete extends \Phalcon\DataMapper\Query\AbstractConditions { diff --git a/src/DataMapper/Query/Insert.php b/src/DataMapper/Query/Insert.php index 56f1e831..f111d5b1 100644 --- a/src/DataMapper/Query/Insert.php +++ b/src/DataMapper/Query/Insert.php @@ -12,7 +12,7 @@ use Phalcon\DataMapper\Pdo\Connection; /** - * Class Insert + * Insert Query */ class Insert extends \Phalcon\DataMapper\Query\AbstractQuery { diff --git a/src/DataMapper/Query/QueryFactory.php b/src/DataMapper/Query/QueryFactory.php index 39f15086..2d0a3d3e 100644 --- a/src/DataMapper/Query/QueryFactory.php +++ b/src/DataMapper/Query/QueryFactory.php @@ -12,9 +12,7 @@ use Phalcon\DataMapper\Pdo\Connection; /** - * Class QueryFactory - * - * @property string $class + * QueryFactory */ class QueryFactory { diff --git a/src/DataMapper/Query/Select.php b/src/DataMapper/Query/Select.php index 9c346ae2..2367e54b 100644 --- a/src/DataMapper/Query/Select.php +++ b/src/DataMapper/Query/Select.php @@ -12,21 +12,7 @@ use BadMethodCallException; /** - * Class Select - * - * @property string $asAlias - * @property bool $forUpdate - * - * @method int fetchAffected() - * @method array fetchAll() - * @method array fetchAssoc() - * @method array fetchColumn(int $column = 0) - * @method array fetchGroup(int $flags = PDO::FETCH_ASSOC) - * @method object fetchObject(string $class = 'stdClass', array $arguments = []) - * @method array fetchObjects(string $class = 'stdClass', array $arguments = []) - * @method array fetchOne() - * @method array fetchPairs() - * @method mixed fetchValue() + * Select Query */ class Select extends \Phalcon\DataMapper\Query\AbstractConditions { diff --git a/src/DataMapper/Query/Update.php b/src/DataMapper/Query/Update.php index c2b50a74..49a4c545 100644 --- a/src/DataMapper/Query/Update.php +++ b/src/DataMapper/Query/Update.php @@ -12,7 +12,7 @@ use Phalcon\DataMapper\Pdo\Connection; /** - * Class Update + * Update Query */ class Update extends \Phalcon\DataMapper\Query\AbstractConditions { diff --git a/src/Di/InitializationAwareInterface.php b/src/Di/InitializationAwareInterface.php index 32af76ee..6fba8ad9 100644 --- a/src/Di/InitializationAwareInterface.php +++ b/src/Di/InitializationAwareInterface.php @@ -10,12 +10,7 @@ namespace Phalcon\Di; /** - * This file is part of the Phalcon Framework. - * - * (c) Phalcon Team - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. + * Interface for components that have `initialize()` */ interface InitializationAwareInterface { diff --git a/src/Dispatcher/AbstractDispatcher.php b/src/Dispatcher/AbstractDispatcher.php index c142d6aa..29adc1d9 100644 --- a/src/Dispatcher/AbstractDispatcher.php +++ b/src/Dispatcher/AbstractDispatcher.php @@ -37,9 +37,9 @@ abstract class AbstractDispatcher extends AbstractInjectionAware implements \Pha protected $activeMethodMap = []; /** - * @var string|null + * @var string */ - protected $actionName = null; + protected $actionName = ''; /** * @var string @@ -57,14 +57,14 @@ abstract class AbstractDispatcher extends AbstractInjectionAware implements \Pha protected $defaultAction = ''; /** - * @var string|null + * @var string */ - protected $defaultNamespace = null; + protected $defaultNamespace = ''; /** - * @var string|null + * @var string */ - protected $defaultHandler = null; + protected $defaultHandler = ''; /** * @var array @@ -72,9 +72,9 @@ abstract class AbstractDispatcher extends AbstractInjectionAware implements \Pha protected $handlerHashes = []; /** - * @var string|null + * @var string */ - protected $handlerName = null; + protected $handlerName = ''; /** * @var string @@ -117,14 +117,14 @@ abstract class AbstractDispatcher extends AbstractInjectionAware implements \Pha protected $modelBinding = false; /** - * @var string|null + * @var string */ - protected $moduleName = null; + protected $moduleName = ''; /** - * @var string|null + * @var string */ - protected $namespaceName = null; + protected $namespaceName = ''; /** * @var array @@ -134,17 +134,17 @@ abstract class AbstractDispatcher extends AbstractInjectionAware implements \Pha /** * @var string|null */ - protected $previousActionName = null; + protected $previousActionName = ''; /** * @var string|null */ - protected $previousHandlerName = null; + protected $previousHandlerName = ''; /** * @var string|null */ - protected $previousNamespaceName = null; + protected $previousNamespaceName = ''; /** * @var string|null @@ -302,23 +302,48 @@ public function getNamespaceName(): string * @param string|array $filters * @param mixed $defaultValue * @return mixed + * + * @todo remove this in future versions */ public function getParam($param, $filters = null, $defaultValue = null) { } + /** + * Gets a param by its name or numeric index + * + * @param mixed $param + * @param string|array $filters + * @param mixed $defaultValue + * @return mixed + */ + public function getParameter($param, $filters = null, $defaultValue = null) + { + } + /** * Gets action params * + * @todo remove this in future versions * @return array */ public function getParams(): array { } + /** + * Gets action params + * + * @return array + */ + public function getParameters(): array + { + } + /** * Check if a param exists * + * @todo deprecate this in the future * @param mixed $param * @return bool */ @@ -326,6 +351,16 @@ public function hasParam($param): bool { } + /** + * Check if a param exists + * + * @param mixed $param + * @return bool + */ + public function hasParameter($param): bool + { + } + /** * Checks if the dispatch loop is finished or has more pendent * controllers/tasks to dispatch @@ -378,6 +413,7 @@ public function getHandlerClass(): string /** * Set a param by its name or numeric index * + * @todo deprecate this in the future * @param mixed $param * @param mixed $value * @return void @@ -386,9 +422,21 @@ public function setParam($param, $value): void { } + /** + * Set a param by its name or numeric index + * + * @param mixed $param + * @param mixed $value + * @return void + */ + public function setParameter($param, $value): void + { + } + /** * Sets action params to be dispatched * + * @todo deprecate this in the future * @param array $params * @return void */ @@ -396,6 +444,16 @@ public function setParams(array $params): void { } + /** + * Sets action params to be dispatched + * + * @param array $params + * @return void + */ + public function setParameters(array $params): void + { + } + /** * Sets the latest returned value by an action manually * diff --git a/src/Dispatcher/DispatcherInterface.php b/src/Dispatcher/DispatcherInterface.php index bdfbb0eb..564198c4 100644 --- a/src/Dispatcher/DispatcherInterface.php +++ b/src/Dispatcher/DispatcherInterface.php @@ -59,6 +59,15 @@ public function getHandlerSuffix(): string; */ public function getParam($param, $filters = null); + /** + * Gets a param by its name or numeric index + * + * @param string|array $filters + * @param mixed $param + * @return mixed + */ + public function getParameter($param, $filters = null); + /** * Gets action params * @@ -66,6 +75,13 @@ public function getParam($param, $filters = null); */ public function getParams(): array; + /** + * Gets action params + * + * @return array + */ + public function getParameters(): array; + /** * Returns value returned by the latest dispatched action * diff --git a/src/Encryption/Security/JWT/Builder.php b/src/Encryption/Security/JWT/Builder.php index a805e01b..560995de 100644 --- a/src/Encryption/Security/JWT/Builder.php +++ b/src/Encryption/Security/JWT/Builder.php @@ -20,14 +20,7 @@ use Phalcon\Encryption\Security\JWT\Token\Token; /** - * Builder - * - * The builder offers - * - * @property CollectionInterface $claims - * @property CollectionInterface $jose - * @property string $passphrase - * @property SignerInterface $signer + * JWT Builder * * @link https://tools.ietf.org/html/rfc7519 */ diff --git a/src/Encryption/Security/JWT/Token/AbstractItem.php b/src/Encryption/Security/JWT/Token/AbstractItem.php index 45df2261..3cf529ec 100644 --- a/src/Encryption/Security/JWT/Token/AbstractItem.php +++ b/src/Encryption/Security/JWT/Token/AbstractItem.php @@ -11,8 +11,6 @@ /** * Abstract helper class for Tokens - * - * @property array $data */ abstract class AbstractItem { diff --git a/src/Encryption/Security/JWT/Token/Token.php b/src/Encryption/Security/JWT/Token/Token.php index fe148ca2..023b04ad 100644 --- a/src/Encryption/Security/JWT/Token/Token.php +++ b/src/Encryption/Security/JWT/Token/Token.php @@ -18,10 +18,6 @@ * A container for Token related data. It stores the claims, headers, signature * and payload. It also calculates and returns the token string. * - * @property Item $claims - * @property Item $headers - * @property Signature $signature - * * @link https://tools.ietf.org/html/rfc7519 */ class Token diff --git a/src/Encryption/Security/JWT/Validator.php b/src/Encryption/Security/JWT/Validator.php index 07c194f1..665cb799 100644 --- a/src/Encryption/Security/JWT/Validator.php +++ b/src/Encryption/Security/JWT/Validator.php @@ -16,9 +16,6 @@ /** * Class Validator - * - * @property int $timeShift - * @property Token $token */ class Validator { diff --git a/src/Events/AbstractEventsAware.php b/src/Events/AbstractEventsAware.php index 72d15a8e..fbf20594 100644 --- a/src/Events/AbstractEventsAware.php +++ b/src/Events/AbstractEventsAware.php @@ -13,8 +13,6 @@ /** * This abstract class offers access to the events manager - * - * @property ?ManagerInterface $eventsManager */ abstract class AbstractEventsAware { diff --git a/src/Http/Request.php b/src/Http/Request.php index 903a8a5b..a30d203c 100644 --- a/src/Http/Request.php +++ b/src/Http/Request.php @@ -63,6 +63,11 @@ class Request extends AbstractInjectionAware implements \Phalcon\Http\RequestInt */ private $queryFilters = []; + /** + * @var array|null + */ + private $patchCache = null; + /** * @var array|null */ @@ -230,6 +235,19 @@ public function getFilteredQuery(string $name = null, $defaultValue = null, bool { } + /** + * Retrieves a patch value always sanitized with the preset filters + * + * @param string $name + * @param mixed $defaultValue + * @param bool $notAllowEmpty + * @param bool $noRecursive + * @return mixed + */ + public function getFilteredPatch(string $name = null, $defaultValue = null, bool $notAllowEmpty = false, bool $noRecursive = false) + { + } + /** * Retrieves a post value always sanitized with the preset filters * @@ -372,6 +390,28 @@ final public function getMethod(): string { } + /** + * Gets a variable from put request + * + * ```php + * // Returns value from $_PATCH["user_email"] without sanitizing + * $userEmail = $request->getPatch("user_email"); + * + * // Returns value from $_PATCH["user_email"] with sanitizing + * $userEmail = $request->getPatch("user_email", "email"); + * ``` + * + * @param string $name + * @param mixed $filters + * @param mixed $defaultValue + * @param bool $notAllowEmpty + * @param bool $noRecursive + * @return mixed + */ + public function getPatch(string $name = null, $filters = null, $defaultValue = null, bool $notAllowEmpty = false, bool $noRecursive = false) + { + } + /** * Gets information about the port on which the request is made. * @@ -565,6 +605,16 @@ final public function hasHeader(string $header): bool { } + /** + * Checks whether the PATCH data has certain index + * + * @param string $name + * @return bool + */ + public function hasPatch(string $name): bool + { + } + /** * Checks whether $_POST superglobal has certain index * @@ -897,4 +947,42 @@ private function getFilterService(): FilterInterface private function getServerArray(): array { } + + /** + * Gets filtered data + * + * @param string $methodKey + * @param string $method + * @param string $name + * @param mixed $defaultValue + * @param bool $notAllowEmpty + * @param bool $noRecursive + * @return mixed + */ + public function getFilteredData(string $methodKey, string $method, string $name = null, $defaultValue = null, bool $notAllowEmpty = false, bool $noRecursive = false) + { + } + + /** + * Gets a variable from put request + * + * ```php + * // Returns value from $_PATCH["user_email"] without sanitizing + * $userEmail = $request->getPatch("user_email"); + * + * // Returns value from $_PATCH["user_email"] with sanitizing + * $userEmail = $request->getPatch("user_email", "email"); + * ``` + * + * @param string $collection + * @param string $name + * @param mixed $filters + * @param mixed $defaultValue + * @param bool $notAllowEmpty + * @param bool $noRecursive + * @return mixed + */ + private function getPatchPut(string $collection, string $name = null, $filters = null, $defaultValue = null, bool $notAllowEmpty = false, bool $noRecursive = false) + { + } }