From fb460bd7395e6e88968a41ca7628d5e059f43b34 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 1 Oct 2026 17:26:31 +0000 Subject: [PATCH] stubs: update to v5.22.1 --- src/ADR/Events/Event.php | 12 +- src/ADR/Payload/Status.php | 42 ++--- src/Acl/Adapter/Storage.php | 2 +- src/Acl/Enum.php | 4 +- src/Annotations/Annotation.php | 2 +- src/Annotations/AttributesReader.php | 2 +- src/Annotations/Router/Connect.php | 2 +- src/Annotations/Router/Delete.php | 2 +- src/Annotations/Router/Get.php | 2 +- src/Annotations/Router/Head.php | 2 +- src/Annotations/Router/Options.php | 2 +- src/Annotations/Router/Patch.php | 2 +- src/Annotations/Router/Post.php | 2 +- src/Annotations/Router/Purge.php | 2 +- src/Annotations/Router/Put.php | 2 +- src/Annotations/Router/Route.php | 2 +- src/Annotations/Router/Trace.php | 2 +- src/Auth/Adapter/AbstractAdapter.php | 2 +- src/Auth/Guard/Config/SessionGuardConfig.php | 2 +- src/Cli/Router/Route.php | 2 +- src/Config/Config.php | 2 +- src/Container/Definition/DefinitionType.php | 8 +- src/Container/Definition/ServiceLifetime.php | 6 +- src/Contracts/Db/Dialect.php | 6 +- .../Encryption/Security/Uuid/Uuid.php | 8 +- src/Contracts/Events/Manager.php | 2 +- src/Contracts/Filter/FilterTypes.php | 4 +- src/Contracts/Paginator/Repository.php | 16 +- src/Contracts/Queue/Processor.php | 6 +- src/DataMapper/Pdo/Events.php | 34 ++-- src/DataMapper/Query/Select.php | 8 +- src/Db/Adapter/Pdo/AbstractPdo.php | 2 +- src/Db/Column.php | 110 +++++------ src/Db/Enum.php | 38 ++-- src/Di/FactoryDefault.php | 2 +- src/Di/FactoryDefault/Cli.php | 2 +- src/Dispatcher/Exception.php | 12 +- src/Domain/Payload/Status.php | 40 ++-- src/Encryption/Crypt.php | 18 +- src/Encryption/Security.php | 26 +-- src/Encryption/Security/JWT/Token/Enum.php | 20 +- src/Encryption/Security/Uuid/AbstractUuid.php | 6 +- src/Filter/Filter.php | 54 +++--- src/Filter/Validation/Validator/Ip.php | 4 +- src/Flash/Session.php | 2 +- src/Html/Helper/Doctype.php | 22 +-- src/Http/Message/RequestMethodInterface.php | 20 +- .../Message/ResponseStatusCodeInterface.php | 176 +++++++++--------- src/Image/Adapter/AbstractAdapter.php | 2 +- src/Image/Enum.php | 18 +- src/Logger/AbstractLogger.php | 20 +- src/Logger/Enum.php | 20 +- src/Mvc/Model.php | 16 +- src/Mvc/Model/Eager/Loader.php | 2 +- src/Mvc/Model/Eager/PathTree.php | 2 +- src/Mvc/Model/MetaData.php | 32 ++-- src/Mvc/Model/MetaData/Stream.php | 11 ++ src/Mvc/Model/Query.php | 8 +- src/Mvc/Model/Query/BuilderInterface.php | 4 +- src/Mvc/Model/Relation.php | 16 +- src/Mvc/Model/Resultset.php | 10 +- src/Mvc/Router.php | 10 +- src/Mvc/View.php | 12 +- .../Adapter/Beanstalk/BeanstalkConsumer.php | 2 +- .../Adapter/Beanstalk/BeanstalkProducer.php | 2 +- src/Queue/Consumer/Events.php | 14 +- src/Session/ManagerInterface.php | 6 +- src/Support/Helper/Arr/Order.php | 4 +- src/Support/Helper/Str/Random.php | 12 +- src/Support/Settings.php | 16 -- src/Support/Version.php | 10 +- src/Tag.php | 22 +-- 72 files changed, 506 insertions(+), 511 deletions(-) diff --git a/src/ADR/Events/Event.php b/src/ADR/Events/Event.php index b7791168..b1e6e88e 100644 --- a/src/ADR/Events/Event.php +++ b/src/ADR/Events/Event.php @@ -17,32 +17,32 @@ class Event /** * @var string */ - const ADR_AFTER_EXECUTE_ACTION = 'adr:afterExecuteAction'; + const string ADR_AFTER_EXECUTE_ACTION = 'adr:afterExecuteAction'; /** * @var string */ - const ADR_BEFORE_EXECUTE_ACTION = 'adr:beforeExecuteAction'; + const string ADR_BEFORE_EXECUTE_ACTION = 'adr:beforeExecuteAction'; /** * @var string */ - const APPLICATION_AFTER_HANDLE = 'application:afterHandle'; + const string APPLICATION_AFTER_HANDLE = 'application:afterHandle'; /** * @var string */ - const APPLICATION_BEFORE_HANDLE = 'application:beforeHandle'; + const string APPLICATION_BEFORE_HANDLE = 'application:beforeHandle'; /** * @var string */ - const PIPELINE_AFTER_DISPATCH = 'pipeline:afterDispatch'; + const string PIPELINE_AFTER_DISPATCH = 'pipeline:afterDispatch'; /** * @var string */ - const PIPELINE_BEFORE_DISPATCH = 'pipeline:beforeDispatch'; + const string PIPELINE_BEFORE_DISPATCH = 'pipeline:beforeDispatch'; /** diff --git a/src/ADR/Payload/Status.php b/src/ADR/Payload/Status.php index 4d4853f1..f5d576f6 100644 --- a/src/ADR/Payload/Status.php +++ b/src/ADR/Payload/Status.php @@ -28,107 +28,107 @@ class Status /** * @var string */ - const ACCEPTED = 'ACCEPTED'; + const string ACCEPTED = 'ACCEPTED'; /** * @var string */ - const AUTHENTICATED = 'AUTHENTICATED'; + const string AUTHENTICATED = 'AUTHENTICATED'; /** * @var string */ - const AUTHORIZED = 'AUTHORIZED'; + const string AUTHORIZED = 'AUTHORIZED'; /** * @var string */ - const CREATED = 'CREATED'; + const string CREATED = 'CREATED'; /** * @var string */ - const DELETED = 'DELETED'; + const string DELETED = 'DELETED'; /** * @var string */ - const ERROR = 'ERROR'; + const string ERROR = 'ERROR'; /** * @var string */ - const FAILURE = 'FAILURE'; + const string FAILURE = 'FAILURE'; /** * @var string */ - const FOUND = 'FOUND'; + const string FOUND = 'FOUND'; /** * @var string */ - const METHOD_NOT_ALLOWED = 'METHOD_NOT_ALLOWED'; + const string METHOD_NOT_ALLOWED = 'METHOD_NOT_ALLOWED'; /** * @var string */ - const NOT_ACCEPTED = 'NOT_ACCEPTED'; + const string NOT_ACCEPTED = 'NOT_ACCEPTED'; /** * @var string */ - const NOT_AUTHENTICATED = 'NOT_AUTHENTICATED'; + const string NOT_AUTHENTICATED = 'NOT_AUTHENTICATED'; /** * @var string */ - const NOT_AUTHORIZED = 'NOT_AUTHORIZED'; + const string NOT_AUTHORIZED = 'NOT_AUTHORIZED'; /** * @var string */ - const NOT_CREATED = 'NOT_CREATED'; + const string NOT_CREATED = 'NOT_CREATED'; /** * @var string */ - const NOT_DELETED = 'NOT_DELETED'; + const string NOT_DELETED = 'NOT_DELETED'; /** * @var string */ - const NOT_FOUND = 'NOT_FOUND'; + const string NOT_FOUND = 'NOT_FOUND'; /** * @var string */ - const NOT_UPDATED = 'NOT_UPDATED'; + const string NOT_UPDATED = 'NOT_UPDATED'; /** * @var string */ - const NOT_VALID = 'NOT_VALID'; + const string NOT_VALID = 'NOT_VALID'; /** * @var string */ - const PROCESSING = 'PROCESSING'; + const string PROCESSING = 'PROCESSING'; /** * @var string */ - const SUCCESS = 'SUCCESS'; + const string SUCCESS = 'SUCCESS'; /** * @var string */ - const UPDATED = 'UPDATED'; + const string UPDATED = 'UPDATED'; /** * @var string */ - const VALID = 'VALID'; + const string VALID = 'VALID'; /** diff --git a/src/Acl/Adapter/Storage.php b/src/Acl/Adapter/Storage.php index 5582fd20..0448be51 100644 --- a/src/Acl/Adapter/Storage.php +++ b/src/Acl/Adapter/Storage.php @@ -43,7 +43,7 @@ class Storage extends \Phalcon\Acl\Adapter\Memory implements \Phalcon\Contracts\ /** * @var int */ - const SNAPSHOT_VERSION = 1; + const int SNAPSHOT_VERSION = 1; protected string $key; diff --git a/src/Acl/Enum.php b/src/Acl/Enum.php index 42957cca..5d8f930f 100644 --- a/src/Acl/Enum.php +++ b/src/Acl/Enum.php @@ -17,10 +17,10 @@ class Enum /** * @var int */ - const ALLOW = 1; + const int ALLOW = 1; /** * @var int */ - const DENY = 0; + const int DENY = 0; } diff --git a/src/Annotations/Annotation.php b/src/Annotations/Annotation.php index d9ab3d24..3eafa11b 100644 --- a/src/Annotations/Annotation.php +++ b/src/Annotations/Annotation.php @@ -34,7 +34,7 @@ class Annotation * * @var int */ - const T_RESOLVED = 1000; + const int T_RESOLVED = 1000; /** * Annotation Arguments diff --git a/src/Annotations/AttributesReader.php b/src/Annotations/AttributesReader.php index 0cdc367c..2ae28a4a 100644 --- a/src/Annotations/AttributesReader.php +++ b/src/Annotations/AttributesReader.php @@ -37,7 +37,7 @@ class AttributesReader implements \Phalcon\Annotations\ReaderInterface * * @var string */ - const PHALCON_NAMESPACE = 'Phalcon\\\\Annotations\\\\'; + const string PHALCON_NAMESPACE = 'Phalcon\\\\Annotations\\\\'; /** diff --git a/src/Annotations/Router/Connect.php b/src/Annotations/Router/Connect.php index 4386dbba..376eaf63 100644 --- a/src/Annotations/Router/Connect.php +++ b/src/Annotations/Router/Connect.php @@ -19,7 +19,7 @@ * @phpstan-import-type annotations_route_converters from AnnotationsTypes * @phpstan-import-type annotations_route_paths from AnnotationsTypes */ -#[\Attribute(68)] +#[\Attribute(132)] class Connect extends \Phalcon\Annotations\Router\Route { /** diff --git a/src/Annotations/Router/Delete.php b/src/Annotations/Router/Delete.php index 245eb1af..8a7db2e4 100644 --- a/src/Annotations/Router/Delete.php +++ b/src/Annotations/Router/Delete.php @@ -19,7 +19,7 @@ * @phpstan-import-type annotations_route_converters from AnnotationsTypes * @phpstan-import-type annotations_route_paths from AnnotationsTypes */ -#[\Attribute(68)] +#[\Attribute(132)] class Delete extends \Phalcon\Annotations\Router\Route { /** diff --git a/src/Annotations/Router/Get.php b/src/Annotations/Router/Get.php index 466ced2a..910b1bc5 100644 --- a/src/Annotations/Router/Get.php +++ b/src/Annotations/Router/Get.php @@ -19,7 +19,7 @@ * @phpstan-import-type annotations_route_converters from AnnotationsTypes * @phpstan-import-type annotations_route_paths from AnnotationsTypes */ -#[\Attribute(68)] +#[\Attribute(132)] class Get extends \Phalcon\Annotations\Router\Route { /** diff --git a/src/Annotations/Router/Head.php b/src/Annotations/Router/Head.php index 52232276..7a3ac1b4 100644 --- a/src/Annotations/Router/Head.php +++ b/src/Annotations/Router/Head.php @@ -19,7 +19,7 @@ * @phpstan-import-type annotations_route_converters from AnnotationsTypes * @phpstan-import-type annotations_route_paths from AnnotationsTypes */ -#[\Attribute(68)] +#[\Attribute(132)] class Head extends \Phalcon\Annotations\Router\Route { /** diff --git a/src/Annotations/Router/Options.php b/src/Annotations/Router/Options.php index eaeab92d..e758c65b 100644 --- a/src/Annotations/Router/Options.php +++ b/src/Annotations/Router/Options.php @@ -19,7 +19,7 @@ * @phpstan-import-type annotations_route_converters from AnnotationsTypes * @phpstan-import-type annotations_route_paths from AnnotationsTypes */ -#[\Attribute(68)] +#[\Attribute(132)] class Options extends \Phalcon\Annotations\Router\Route { /** diff --git a/src/Annotations/Router/Patch.php b/src/Annotations/Router/Patch.php index 92ac6f98..8ba18b84 100644 --- a/src/Annotations/Router/Patch.php +++ b/src/Annotations/Router/Patch.php @@ -19,7 +19,7 @@ * @phpstan-import-type annotations_route_converters from AnnotationsTypes * @phpstan-import-type annotations_route_paths from AnnotationsTypes */ -#[\Attribute(68)] +#[\Attribute(132)] class Patch extends \Phalcon\Annotations\Router\Route { /** diff --git a/src/Annotations/Router/Post.php b/src/Annotations/Router/Post.php index 3647a97c..577efa11 100644 --- a/src/Annotations/Router/Post.php +++ b/src/Annotations/Router/Post.php @@ -19,7 +19,7 @@ * @phpstan-import-type annotations_route_converters from AnnotationsTypes * @phpstan-import-type annotations_route_paths from AnnotationsTypes */ -#[\Attribute(68)] +#[\Attribute(132)] class Post extends \Phalcon\Annotations\Router\Route { /** diff --git a/src/Annotations/Router/Purge.php b/src/Annotations/Router/Purge.php index 5ed716cc..439f0d1f 100644 --- a/src/Annotations/Router/Purge.php +++ b/src/Annotations/Router/Purge.php @@ -19,7 +19,7 @@ * @phpstan-import-type annotations_route_converters from AnnotationsTypes * @phpstan-import-type annotations_route_paths from AnnotationsTypes */ -#[\Attribute(68)] +#[\Attribute(132)] class Purge extends \Phalcon\Annotations\Router\Route { /** diff --git a/src/Annotations/Router/Put.php b/src/Annotations/Router/Put.php index 0fd29cb2..02bd07c9 100644 --- a/src/Annotations/Router/Put.php +++ b/src/Annotations/Router/Put.php @@ -19,7 +19,7 @@ * @phpstan-import-type annotations_route_converters from AnnotationsTypes * @phpstan-import-type annotations_route_paths from AnnotationsTypes */ -#[\Attribute(68)] +#[\Attribute(132)] class Put extends \Phalcon\Annotations\Router\Route { /** diff --git a/src/Annotations/Router/Route.php b/src/Annotations/Router/Route.php index f414790a..bb4c8023 100644 --- a/src/Annotations/Router/Route.php +++ b/src/Annotations/Router/Route.php @@ -23,7 +23,7 @@ * @phpstan-import-type annotations_route_methods from AnnotationsTypes * @phpstan-import-type annotations_route_paths from AnnotationsTypes */ -#[\Attribute(68)] +#[\Attribute(132)] class Route { /** diff --git a/src/Annotations/Router/Trace.php b/src/Annotations/Router/Trace.php index aaccba0f..d92caa55 100644 --- a/src/Annotations/Router/Trace.php +++ b/src/Annotations/Router/Trace.php @@ -19,7 +19,7 @@ * @phpstan-import-type annotations_route_converters from AnnotationsTypes * @phpstan-import-type annotations_route_paths from AnnotationsTypes */ -#[\Attribute(68)] +#[\Attribute(132)] class Trace extends \Phalcon\Annotations\Router\Route { /** diff --git a/src/Auth/Adapter/AbstractAdapter.php b/src/Auth/Adapter/AbstractAdapter.php index 2b75da43..a3202385 100644 --- a/src/Auth/Adapter/AbstractAdapter.php +++ b/src/Auth/Adapter/AbstractAdapter.php @@ -29,7 +29,7 @@ abstract class AbstractAdapter implements \Phalcon\Contracts\Auth\Adapter\Adapte * * @var string */ - const DUMMY_HASH = '$2y$10$YMmGMSXz.5U3bjjJ2qx45uElzUrlaBiS8L70VaVnmsKYFJVcam8gW'; + const string DUMMY_HASH = '$2y$10$YMmGMSXz.5U3bjjJ2qx45uElzUrlaBiS8L70VaVnmsKYFJVcam8gW'; protected \Phalcon\Contracts\Auth\Adapter\AdapterConfig $config; diff --git a/src/Auth/Guard/Config/SessionGuardConfig.php b/src/Auth/Guard/Config/SessionGuardConfig.php index c6133a0f..f485ba4d 100644 --- a/src/Auth/Guard/Config/SessionGuardConfig.php +++ b/src/Auth/Guard/Config/SessionGuardConfig.php @@ -27,7 +27,7 @@ class SessionGuardConfig extends \Phalcon\Auth\Guard\Config\AbstractGuardConfig * * @var int */ - const DEFAULT_REMEMBER_TTL = 31536000; + const int DEFAULT_REMEMBER_TTL = 31536000; private string $name; diff --git a/src/Cli/Router/Route.php b/src/Cli/Router/Route.php index 1c0a93df..8744368c 100644 --- a/src/Cli/Router/Route.php +++ b/src/Cli/Router/Route.php @@ -26,7 +26,7 @@ class Route implements \Phalcon\Cli\Router\RouteInterface /** * @var string */ - const DEFAULT_DELIMITER = ' '; + const string DEFAULT_DELIMITER = ' '; /** * @var string diff --git a/src/Config/Config.php b/src/Config/Config.php index c0777dea..4cbd6c68 100644 --- a/src/Config/Config.php +++ b/src/Config/Config.php @@ -47,7 +47,7 @@ class Config extends Collection implements \Phalcon\Config\ConfigInterface /** * @var string */ - const DEFAULT_PATH_DELIMITER = '.'; + const string DEFAULT_PATH_DELIMITER = '.'; /** * @var string diff --git a/src/Container/Definition/DefinitionType.php b/src/Container/Definition/DefinitionType.php index 136df6b3..d207e5fe 100644 --- a/src/Container/Definition/DefinitionType.php +++ b/src/Container/Definition/DefinitionType.php @@ -42,20 +42,20 @@ class DefinitionType /** * @var string */ - const CLOSURE_TYPE = 'closure'; + const string CLOSURE_TYPE = 'closure'; /** * @var string */ - const OBJECT_TYPE = 'object'; + const string OBJECT_TYPE = 'object'; /** * @var string */ - const PARAMETER_TYPE = 'parameter'; + const string PARAMETER_TYPE = 'parameter'; /** * @var string */ - const STRING_TYPE = 'string'; + const string STRING_TYPE = 'string'; } diff --git a/src/Container/Definition/ServiceLifetime.php b/src/Container/Definition/ServiceLifetime.php index 7167a27b..60646a6c 100644 --- a/src/Container/Definition/ServiceLifetime.php +++ b/src/Container/Definition/ServiceLifetime.php @@ -42,15 +42,15 @@ class ServiceLifetime /** * @var string */ - const SCOPED = 'SCOPED'; + const string SCOPED = 'SCOPED'; /** * @var string */ - const SINGLETON = 'SINGLETON'; + const string SINGLETON = 'SINGLETON'; /** * @var string */ - const TRANSIENT = 'TRANSIENT'; + const string TRANSIENT = 'TRANSIENT'; } diff --git a/src/Contracts/Db/Dialect.php b/src/Contracts/Db/Dialect.php index 354a32fa..05ebcc59 100644 --- a/src/Contracts/Db/Dialect.php +++ b/src/Contracts/Db/Dialect.php @@ -62,7 +62,7 @@ interface Dialect * * @var string */ - const LOCK_NONE = ''; + const string LOCK_NONE = ''; /** * Append `NOWAIT` to the `FOR UPDATE` clause - the query fails immediately @@ -72,7 +72,7 @@ interface Dialect * * @var string */ - const LOCK_NOWAIT = 'NOWAIT'; + const string LOCK_NOWAIT = 'NOWAIT'; /** * Append `SKIP LOCKED` to the `FOR UPDATE` clause - the query returns @@ -81,7 +81,7 @@ interface Dialect * * @var string */ - const LOCK_SKIP_LOCKED = 'SKIP LOCKED'; + const string LOCK_SKIP_LOCKED = 'SKIP LOCKED'; /** diff --git a/src/Contracts/Encryption/Security/Uuid/Uuid.php b/src/Contracts/Encryption/Security/Uuid/Uuid.php index 277fcd47..9ea2c9a2 100644 --- a/src/Contracts/Encryption/Security/Uuid/Uuid.php +++ b/src/Contracts/Encryption/Security/Uuid/Uuid.php @@ -19,20 +19,20 @@ interface Uuid /** * @var string */ - const NAMESPACE_DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; + const string NAMESPACE_DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; /** * @var string */ - const NAMESPACE_OID = '6ba7b812-9dad-11d1-80b4-00c04fd430c8'; + const string NAMESPACE_OID = '6ba7b812-9dad-11d1-80b4-00c04fd430c8'; /** * @var string */ - const NAMESPACE_URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; + const string NAMESPACE_URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; /** * @var string */ - const NAMESPACE_X500 = '6ba7b814-9dad-11d1-80b4-00c04fd430c8'; + const string NAMESPACE_X500 = '6ba7b814-9dad-11d1-80b4-00c04fd430c8'; } diff --git a/src/Contracts/Events/Manager.php b/src/Contracts/Events/Manager.php index cc02aa98..4d6bf788 100644 --- a/src/Contracts/Events/Manager.php +++ b/src/Contracts/Events/Manager.php @@ -17,7 +17,7 @@ interface Manager /** * @var int */ - const DEFAULT_PRIORITY = 100; + const int DEFAULT_PRIORITY = 100; /** diff --git a/src/Contracts/Filter/FilterTypes.php b/src/Contracts/Filter/FilterTypes.php index f88aaa72..3186dffb 100644 --- a/src/Contracts/Filter/FilterTypes.php +++ b/src/Contracts/Filter/FilterTypes.php @@ -14,11 +14,11 @@ /** * Central registry of the array shapes used across the Filter namespace. * - * @phpstan-type filter_mapper array|Sanitizer> + * @phpstan-type filter_mapper array|Sanitizer> * @phpstan-type filter_sanitizer_params array * @phpstan-type filter_sanitizers array|string> * @phpstan-type filter_sanitizer_split array{0: string, 1: filter_sanitizer_params} - * @phpstan-type filter_services array + * @phpstan-type filter_services array * @phpstan-type filter_values array * @phpstan-type filter_uploaded_file array{ * name: string, diff --git a/src/Contracts/Paginator/Repository.php b/src/Contracts/Paginator/Repository.php index de14bb3d..7a87c8c0 100644 --- a/src/Contracts/Paginator/Repository.php +++ b/src/Contracts/Paginator/Repository.php @@ -30,42 +30,42 @@ interface Repository /** * @var string */ - const PROPERTY_CURRENT_PAGE = 'current'; + const string PROPERTY_CURRENT_PAGE = 'current'; /** * @var string */ - const PROPERTY_FIRST_PAGE = 'first'; + const string PROPERTY_FIRST_PAGE = 'first'; /** * @var string */ - const PROPERTY_ITEMS = 'items'; + const string PROPERTY_ITEMS = 'items'; /** * @var string */ - const PROPERTY_LAST_PAGE = 'last'; + const string PROPERTY_LAST_PAGE = 'last'; /** * @var string */ - const PROPERTY_LIMIT = 'limit'; + const string PROPERTY_LIMIT = 'limit'; /** * @var string */ - const PROPERTY_NEXT_PAGE = 'next'; + const string PROPERTY_NEXT_PAGE = 'next'; /** * @var string */ - const PROPERTY_PREVIOUS_PAGE = 'previous'; + const string PROPERTY_PREVIOUS_PAGE = 'previous'; /** * @var string */ - const PROPERTY_TOTAL_ITEMS = 'total_items'; + const string PROPERTY_TOTAL_ITEMS = 'total_items'; /** diff --git a/src/Contracts/Queue/Processor.php b/src/Contracts/Queue/Processor.php index 0cfb476c..812f5134 100644 --- a/src/Contracts/Queue/Processor.php +++ b/src/Contracts/Queue/Processor.php @@ -21,17 +21,17 @@ interface Processor /** * @var string */ - const ACK = 'enqueue.ack'; + const string ACK = 'enqueue.ack'; /** * @var string */ - const REJECT = 'enqueue.reject'; + const string REJECT = 'enqueue.reject'; /** * @var string */ - const REQUEUE = 'enqueue.requeue'; + const string REQUEUE = 'enqueue.requeue'; /** diff --git a/src/DataMapper/Pdo/Events.php b/src/DataMapper/Pdo/Events.php index 04523c80..c2f1f2ca 100644 --- a/src/DataMapper/Pdo/Events.php +++ b/src/DataMapper/Pdo/Events.php @@ -49,85 +49,85 @@ class Events /** * @var string */ - const AFTER_BEGIN_TRANSACTION = 'dm:afterBeginTransaction'; + const string AFTER_BEGIN_TRANSACTION = 'dm:afterBeginTransaction'; /** * @var string */ - const AFTER_COMMIT = 'dm:afterCommit'; + const string AFTER_COMMIT = 'dm:afterCommit'; /** * @var string */ - const AFTER_CONNECT = 'dm:afterConnect'; + const string AFTER_CONNECT = 'dm:afterConnect'; /** * @var string */ - const AFTER_DISCONNECT = 'dm:afterDisconnect'; + const string AFTER_DISCONNECT = 'dm:afterDisconnect'; /** * @var string */ - const AFTER_EXEC = 'dm:afterExec'; + const string AFTER_EXEC = 'dm:afterExec'; /** * @var string */ - const AFTER_PERFORM = 'dm:afterPerform'; + const string AFTER_PERFORM = 'dm:afterPerform'; /** * @var string */ - const AFTER_QUERY = 'dm:afterQuery'; + const string AFTER_QUERY = 'dm:afterQuery'; /** * @var string */ - const AFTER_ROLLBACK = 'dm:afterRollBack'; + const string AFTER_ROLLBACK = 'dm:afterRollBack'; /** * @var string */ - const BEFORE_BEGIN_TRANSACTION = 'dm:beforeBeginTransaction'; + const string BEFORE_BEGIN_TRANSACTION = 'dm:beforeBeginTransaction'; /** * @var string */ - const BEFORE_COMMIT = 'dm:beforeCommit'; + const string BEFORE_COMMIT = 'dm:beforeCommit'; /** * @var string */ - const BEFORE_CONNECT = 'dm:beforeConnect'; + const string BEFORE_CONNECT = 'dm:beforeConnect'; /** * @var string */ - const BEFORE_DISCONNECT = 'dm:beforeDisconnect'; + const string BEFORE_DISCONNECT = 'dm:beforeDisconnect'; /** * @var string */ - const BEFORE_EXEC = 'dm:beforeExec'; + const string BEFORE_EXEC = 'dm:beforeExec'; /** * @var string */ - const BEFORE_PERFORM = 'dm:beforePerform'; + const string BEFORE_PERFORM = 'dm:beforePerform'; /** * @var string */ - const BEFORE_QUERY = 'dm:beforeQuery'; + const string BEFORE_QUERY = 'dm:beforeQuery'; /** * @var string */ - const BEFORE_ROLLBACK = 'dm:beforeRollBack'; + const string BEFORE_ROLLBACK = 'dm:beforeRollBack'; /** * @var string */ - const CONNECTION_LOST = 'dm:connectionLost'; + const string CONNECTION_LOST = 'dm:connectionLost'; } diff --git a/src/DataMapper/Query/Select.php b/src/DataMapper/Query/Select.php index e4df5441..2e932cce 100644 --- a/src/DataMapper/Query/Select.php +++ b/src/DataMapper/Query/Select.php @@ -28,22 +28,22 @@ class Select extends \Phalcon\DataMapper\Query\AbstractConditions /** * @var string */ - const JOIN_INNER = 'INNER'; + const string JOIN_INNER = 'INNER'; /** * @var string */ - const JOIN_LEFT = 'LEFT'; + const string JOIN_LEFT = 'LEFT'; /** * @var string */ - const JOIN_NATURAL = 'NATURAL'; + const string JOIN_NATURAL = 'NATURAL'; /** * @var string */ - const JOIN_RIGHT = 'RIGHT'; + const string JOIN_RIGHT = 'RIGHT'; protected string $asAlias = ''; diff --git a/src/Db/Adapter/Pdo/AbstractPdo.php b/src/Db/Adapter/Pdo/AbstractPdo.php index 51fc0706..7f6abfeb 100644 --- a/src/Db/Adapter/Pdo/AbstractPdo.php +++ b/src/Db/Adapter/Pdo/AbstractPdo.php @@ -52,7 +52,7 @@ abstract class AbstractPdo extends AbstractAdapter /** * @var string */ - const BIND_PATTERN = '/\\\\?([0-9]+)|:([a-zA-Z0-9_]+):/'; + const string BIND_PATTERN = '/\\\\?([0-9]+)|:([a-zA-Z0-9_]+):/'; /** * Last affected rows diff --git a/src/Db/Column.php b/src/Db/Column.php index 8ce18f82..02b9baa7 100644 --- a/src/Db/Column.php +++ b/src/Db/Column.php @@ -50,385 +50,385 @@ class Column implements \Phalcon\Db\ColumnInterface * * @var int */ - const BIND_PARAM_BLOB = 3; + const int BIND_PARAM_BLOB = 3; /** * Bind Type Bool * * @var int */ - const BIND_PARAM_BOOL = 5; + const int BIND_PARAM_BOOL = 5; /** * Bind Type Decimal * * @var int */ - const BIND_PARAM_DECIMAL = 32; + const int BIND_PARAM_DECIMAL = 32; /** * Bind Type Integer * * @var int */ - const BIND_PARAM_INT = 1; + const int BIND_PARAM_INT = 1; /** * Bind Type Null * * @var int */ - const BIND_PARAM_NULL = 0; + const int BIND_PARAM_NULL = 0; /** * Bind Type String * * @var int */ - const BIND_PARAM_STR = 2; + const int BIND_PARAM_STR = 2; /** * Skip binding by type * * @var int */ - const BIND_SKIP = 1024; + const int BIND_SKIP = 1024; /** * Big integer abstract data type * * @var int */ - const TYPE_BIGINTEGER = 14; + const int TYPE_BIGINTEGER = 14; /** * Bit abstract data type * * @var int */ - const TYPE_BIT = 19; + const int TYPE_BIT = 19; /** * Binary abstract data type * * @var int */ - const TYPE_BINARY = 27; + const int TYPE_BINARY = 27; /** * Blob abstract data type * * @var int */ - const TYPE_BLOB = 11; + const int TYPE_BLOB = 11; /** * Bool abstract data type * * @var int */ - const TYPE_BOOLEAN = 8; + const int TYPE_BOOLEAN = 8; /** * Char abstract data type * * @var int */ - const TYPE_CHAR = 5; + const int TYPE_CHAR = 5; /** * Date abstract data type * * @var int */ - const TYPE_DATE = 1; + const int TYPE_DATE = 1; /** * Datetime abstract data type * * @var int */ - const TYPE_DATETIME = 4; + const int TYPE_DATETIME = 4; /** * Decimal abstract data type * * @var int */ - const TYPE_DECIMAL = 3; + const int TYPE_DECIMAL = 3; /** * Double abstract data type * * @var int */ - const TYPE_DOUBLE = 9; + const int TYPE_DOUBLE = 9; /** * Enum abstract data type * * @var int */ - const TYPE_ENUM = 18; + const int TYPE_ENUM = 18; /** * Float abstract data type * * @var int */ - const TYPE_FLOAT = 7; + const int TYPE_FLOAT = 7; /** * Int abstract data type * * @var int */ - const TYPE_INTEGER = 0; + const int TYPE_INTEGER = 0; /** * Json abstract data type * * @var int */ - const TYPE_JSON = 15; + const int TYPE_JSON = 15; /** * Jsonb abstract data type * * @var int */ - const TYPE_JSONB = 16; + const int TYPE_JSONB = 16; /** * Longblob abstract data type * * @var int */ - const TYPE_LONGBLOB = 13; + const int TYPE_LONGBLOB = 13; /** * Longtext abstract data type * * @var int */ - const TYPE_LONGTEXT = 24; + const int TYPE_LONGTEXT = 24; /** * Mediumblob abstract data type * * @var int */ - const TYPE_MEDIUMBLOB = 12; + const int TYPE_MEDIUMBLOB = 12; /** * Mediumintegerr abstract data type * * @var int */ - const TYPE_MEDIUMINTEGER = 21; + const int TYPE_MEDIUMINTEGER = 21; /** * Mediumtext abstract data type * * @var int */ - const TYPE_MEDIUMTEXT = 23; + const int TYPE_MEDIUMTEXT = 23; /** * Smallint abstract data type * * @var int */ - const TYPE_SMALLINTEGER = 22; + const int TYPE_SMALLINTEGER = 22; /** * Text abstract data type * * @var int */ - const TYPE_TEXT = 6; + const int TYPE_TEXT = 6; /** * Time abstract data type * * @var int */ - const TYPE_TIME = 20; + const int TYPE_TIME = 20; /** * Timestamp abstract data type * * @var int */ - const TYPE_TIMESTAMP = 17; + const int TYPE_TIMESTAMP = 17; /** * Tinyblob abstract data type * * @var int */ - const TYPE_TINYBLOB = 10; + const int TYPE_TINYBLOB = 10; /** * Tinyint abstract data type * * @var int */ - const TYPE_TINYINTEGER = 26; + const int TYPE_TINYINTEGER = 26; /** * Tinytext abstract data type * * @var int */ - const TYPE_TINYTEXT = 25; + const int TYPE_TINYTEXT = 25; /** * UUID abstract data type * * @var int */ - const TYPE_UUID = 29; + const int TYPE_UUID = 29; /** * Varbinary abstract data type * * @var int */ - const TYPE_VARBINARY = 28; + const int TYPE_VARBINARY = 28; /** * Varchar abstract data type * * @var int */ - const TYPE_VARCHAR = 2; + const int TYPE_VARCHAR = 2; /** * PostgreSQL `BYTEA` binary type * * @var int */ - const TYPE_BYTEA = 30; + const int TYPE_BYTEA = 30; /** * PostgreSQL `INET` IPv4/IPv6 address type * * @var int */ - const TYPE_INET = 31; + const int TYPE_INET = 31; /** * PostgreSQL `CIDR` network-address type * * @var int */ - const TYPE_CIDR = 32; + const int TYPE_CIDR = 32; /** * PostgreSQL `MACADDR` MAC-address type * * @var int */ - const TYPE_MACADDR = 33; + const int TYPE_MACADDR = 33; /** * PostgreSQL `INT4RANGE` range-of-integer type * * @var int */ - const TYPE_INT4RANGE = 34; + const int TYPE_INT4RANGE = 34; /** * PostgreSQL `INT8RANGE` range-of-bigint type * * @var int */ - const TYPE_INT8RANGE = 35; + const int TYPE_INT8RANGE = 35; /** * PostgreSQL `NUMRANGE` range-of-numeric type * * @var int */ - const TYPE_NUMRANGE = 36; + const int TYPE_NUMRANGE = 36; /** * PostgreSQL `TSRANGE` range-of-timestamp (without time zone) type * * @var int */ - const TYPE_TSRANGE = 37; + const int TYPE_TSRANGE = 37; /** * PostgreSQL `TSTZRANGE` range-of-timestamp (with time zone) type * * @var int */ - const TYPE_TSTZRANGE = 38; + const int TYPE_TSTZRANGE = 38; /** * PostgreSQL `DATERANGE` range-of-date type * * @var int */ - const TYPE_DATERANGE = 39; + const int TYPE_DATERANGE = 39; /** * Spatial `GEOMETRY` base type (MySQL 5.7+; PostgreSQL + PostGIS) * * @var int */ - const TYPE_GEOMETRY = 40; + const int TYPE_GEOMETRY = 40; /** * Spatial `POINT` type (MySQL; PostgreSQL + PostGIS) * * @var int */ - const TYPE_POINT = 41; + const int TYPE_POINT = 41; /** * Spatial `LINESTRING` type (MySQL; PostgreSQL + PostGIS) * * @var int */ - const TYPE_LINESTRING = 42; + const int TYPE_LINESTRING = 42; /** * Spatial `POLYGON` type (MySQL; PostgreSQL + PostGIS) * * @var int */ - const TYPE_POLYGON = 43; + const int TYPE_POLYGON = 43; /** * Spatial `MULTIPOINT` type (MySQL; PostgreSQL + PostGIS) * * @var int */ - const TYPE_MULTIPOINT = 44; + const int TYPE_MULTIPOINT = 44; /** * Spatial `MULTILINESTRING` type (MySQL; PostgreSQL + PostGIS) * * @var int */ - const TYPE_MULTILINESTRING = 45; + const int TYPE_MULTILINESTRING = 45; /** * Spatial `MULTIPOLYGON` type (MySQL; PostgreSQL + PostGIS) * * @var int */ - const TYPE_MULTIPOLYGON = 46; + const int TYPE_MULTIPOLYGON = 46; /** * Spatial `GEOMETRYCOLLECTION` type (MySQL; PostgreSQL + PostGIS) * * @var int */ - const TYPE_GEOMETRYCOLLECTION = 47; + const int TYPE_GEOMETRYCOLLECTION = 47; /** * Column Position diff --git a/src/Db/Enum.php b/src/Db/Enum.php index 4847f8f4..e75af88c 100644 --- a/src/Db/Enum.php +++ b/src/Db/Enum.php @@ -17,95 +17,95 @@ class Enum /** * @var int */ - const FETCH_ASSOC = 2; + const int FETCH_ASSOC = 2; /** * @var int */ - const FETCH_BOTH = 4; + const int FETCH_BOTH = 4; /** * @var int */ - const FETCH_BOUND = 6; + const int FETCH_BOUND = 6; /** * @var int */ - const FETCH_CLASS = 8; + const int FETCH_CLASS = 8; /** * @var int */ - const FETCH_CLASSTYPE = 262144; + const int FETCH_CLASSTYPE = 128; /** * @var int */ - const FETCH_COLUMN = 7; + const int FETCH_COLUMN = 7; /** * @var int */ - const FETCH_FUNC = 10; + const int FETCH_FUNC = 10; /** * @var int */ - const FETCH_GROUP = 65536; + const int FETCH_GROUP = 32; /** * @var int */ - const FETCH_INTO = 9; + const int FETCH_INTO = 9; /** * @var int */ - const FETCH_KEY_PAIR = 12; + const int FETCH_KEY_PAIR = 12; /** * @var int */ - const FETCH_LAZY = 1; + const int FETCH_LAZY = 1; /** * @var int */ - const FETCH_NAMED = 11; + const int FETCH_NAMED = 11; /** * @var int */ - const FETCH_NUM = 3; + const int FETCH_NUM = 3; /** * @var int */ - const FETCH_OBJ = 5; + const int FETCH_OBJ = 5; /** * @var int */ - const FETCH_ORI_NEXT = 0; + const int FETCH_ORI_NEXT = 0; /** * @var int */ - const FETCH_PROPS_LATE = 1048576; + const int FETCH_PROPS_LATE = 256; /** * @var int */ - const FETCH_SERIALIZE = 524288; + const int FETCH_SERIALIZE = 512; /** * @var int */ - const FETCH_UNIQUE = 196608; + const int FETCH_UNIQUE = 64; /** * @var int */ - const FETCH_DEFAULT = 0; + const int FETCH_DEFAULT = 0; } diff --git a/src/Di/FactoryDefault.php b/src/Di/FactoryDefault.php index 37f01526..263109f5 100644 --- a/src/Di/FactoryDefault.php +++ b/src/Di/FactoryDefault.php @@ -14,7 +14,7 @@ use Phalcon\Encryption\Crypt; use Phalcon\Encryption\Security; use Phalcon\Events\Manager as EventsManager; -use Phalcon\Filter\FilterFactory; +use Phalcon\Filter\Filter; use Phalcon\Flash\Direct; use Phalcon\Flash\Session; use Phalcon\Html\Escaper; diff --git a/src/Di/FactoryDefault/Cli.php b/src/Di/FactoryDefault/Cli.php index f43b512b..804090fc 100644 --- a/src/Di/FactoryDefault/Cli.php +++ b/src/Di/FactoryDefault/Cli.php @@ -16,7 +16,7 @@ use Phalcon\Di\Service; use Phalcon\Encryption\Security; use Phalcon\Events\Manager as EventsManager; -use Phalcon\Filter\FilterFactory; +use Phalcon\Filter\Filter; use Phalcon\Html\Escaper; use Phalcon\Html\TagFactory; use Phalcon\Mvc\Model\Manager as ModelManager; diff --git a/src/Dispatcher/Exception.php b/src/Dispatcher/Exception.php index a37513e6..1b734059 100644 --- a/src/Dispatcher/Exception.php +++ b/src/Dispatcher/Exception.php @@ -17,30 +17,30 @@ class Exception extends \Exception /** * @var int */ - const EXCEPTION_ACTION_NOT_FOUND = 5; + const int EXCEPTION_ACTION_NOT_FOUND = 5; /** * @var int */ - const EXCEPTION_CYCLIC_ROUTING = 1; + const int EXCEPTION_CYCLIC_ROUTING = 1; /** * @var int */ - const EXCEPTION_HANDLER_NOT_FOUND = 2; + const int EXCEPTION_HANDLER_NOT_FOUND = 2; /** * @var int */ - const EXCEPTION_INVALID_HANDLER = 3; + const int EXCEPTION_INVALID_HANDLER = 3; /** * @var int */ - const EXCEPTION_INVALID_PARAMS = 4; + const int EXCEPTION_INVALID_PARAMS = 4; /** * @var int */ - const EXCEPTION_NO_DI = 0; + const int EXCEPTION_NO_DI = 0; } diff --git a/src/Domain/Payload/Status.php b/src/Domain/Payload/Status.php index a0681b0d..54dfb8c4 100644 --- a/src/Domain/Payload/Status.php +++ b/src/Domain/Payload/Status.php @@ -28,102 +28,102 @@ class Status /** * @var string */ - const ACCEPTED = 'ACCEPTED'; + const string ACCEPTED = 'ACCEPTED'; /** * @var string */ - const AUTHENTICATED = 'AUTHENTICATED'; + const string AUTHENTICATED = 'AUTHENTICATED'; /** * @var string */ - const AUTHORIZED = 'AUTHORIZED'; + const string AUTHORIZED = 'AUTHORIZED'; /** * @var string */ - const CREATED = 'CREATED'; + const string CREATED = 'CREATED'; /** * @var string */ - const DELETED = 'DELETED'; + const string DELETED = 'DELETED'; /** * @var string */ - const ERROR = 'ERROR'; + const string ERROR = 'ERROR'; /** * @var string */ - const FAILURE = 'FAILURE'; + const string FAILURE = 'FAILURE'; /** * @var string */ - const FOUND = 'FOUND'; + const string FOUND = 'FOUND'; /** * @var string */ - const NOT_ACCEPTED = 'NOT_ACCEPTED'; + const string NOT_ACCEPTED = 'NOT_ACCEPTED'; /** * @var string */ - const NOT_AUTHENTICATED = 'NOT_AUTHENTICATED'; + const string NOT_AUTHENTICATED = 'NOT_AUTHENTICATED'; /** * @var string */ - const NOT_AUTHORIZED = 'NOT_AUTHORIZED'; + const string NOT_AUTHORIZED = 'NOT_AUTHORIZED'; /** * @var string */ - const NOT_CREATED = 'NOT_CREATED'; + const string NOT_CREATED = 'NOT_CREATED'; /** * @var string */ - const NOT_DELETED = 'NOT_DELETED'; + const string NOT_DELETED = 'NOT_DELETED'; /** * @var string */ - const NOT_FOUND = 'NOT_FOUND'; + const string NOT_FOUND = 'NOT_FOUND'; /** * @var string */ - const NOT_UPDATED = 'NOT_UPDATED'; + const string NOT_UPDATED = 'NOT_UPDATED'; /** * @var string */ - const NOT_VALID = 'NOT_VALID'; + const string NOT_VALID = 'NOT_VALID'; /** * @var string */ - const PROCESSING = 'PROCESSING'; + const string PROCESSING = 'PROCESSING'; /** * @var string */ - const SUCCESS = 'SUCCESS'; + const string SUCCESS = 'SUCCESS'; /** * @var string */ - const UPDATED = 'UPDATED'; + const string UPDATED = 'UPDATED'; /** * @var string */ - const VALID = 'VALID'; + const string VALID = 'VALID'; /** diff --git a/src/Encryption/Crypt.php b/src/Encryption/Crypt.php index 3d5899fd..ce64e090 100644 --- a/src/Encryption/Crypt.php +++ b/src/Encryption/Crypt.php @@ -65,49 +65,49 @@ class Crypt implements \Phalcon\Encryption\Crypt\CryptInterface /** * @var string */ - const DEFAULT_ALGORITHM = 'sha256'; + const string DEFAULT_ALGORITHM = 'sha256'; /** * @var string */ - const DEFAULT_CIPHER = 'aes-256-cfb'; + const string DEFAULT_CIPHER = 'aes-256-cfb'; /** * Padding * * @var int */ - const PADDING_ANSI_X_923 = 1; + const int PADDING_ANSI_X_923 = 1; /** * @var int */ - const PADDING_DEFAULT = 0; + const int PADDING_DEFAULT = 0; /** * @var int */ - const PADDING_ISO_10126 = 3; + const int PADDING_ISO_10126 = 3; /** * @var int */ - const PADDING_ISO_IEC_7816_4 = 4; + const int PADDING_ISO_IEC_7816_4 = 4; /** * @var int */ - const PADDING_PKCS7 = 2; + const int PADDING_PKCS7 = 2; /** * @var int */ - const PADDING_SPACE = 6; + const int PADDING_SPACE = 6; /** * @var int */ - const PADDING_ZERO = 5; + const int PADDING_ZERO = 5; protected string $authData = ''; diff --git a/src/Encryption/Security.php b/src/Encryption/Security.php index d73b7174..6b8223ce 100644 --- a/src/Encryption/Security.php +++ b/src/Encryption/Security.php @@ -48,53 +48,53 @@ class Security extends AbstractInjectionAware implements SecurityContract /** * @var int */ - const CRYPT_ARGON2I = 10; + const int CRYPT_ARGON2I = 10; /** * @var int */ - const CRYPT_ARGON2ID = 11; + const int CRYPT_ARGON2ID = 11; /** * @var int */ - const CRYPT_BCRYPT = 0; + const int CRYPT_BCRYPT = 0; /** * @var int */ - const CRYPT_DEFAULT = 0; + const int CRYPT_DEFAULT = 0; /** * @deprecated Not implemented; resolves to bcrypt. To be removed. * * @var int */ - const CRYPT_BLOWFISH = 4; + const int CRYPT_BLOWFISH = 4; /** * @var int */ - const CRYPT_BLOWFISH_A = 5; + const int CRYPT_BLOWFISH_A = 5; /** * @var int */ - const CRYPT_BLOWFISH_X = 6; + const int CRYPT_BLOWFISH_X = 6; /** * @deprecated Not implemented; resolves to bcrypt. To be removed. * * @var int */ - const CRYPT_BLOWFISH_Y = 7; + const int CRYPT_BLOWFISH_Y = 7; /** * @deprecated Not implemented; resolves to bcrypt. To be removed. * * @var int */ - const CRYPT_EXT_DES = 2; + const int CRYPT_EXT_DES = 2; /** * Weak legacy algorithm, easier to brute-force than bcrypt or Argon2. Use @@ -103,7 +103,7 @@ class Security extends AbstractInjectionAware implements SecurityContract * * @var int */ - const CRYPT_MD5 = 3; + const int CRYPT_MD5 = 3; /** * Weak legacy algorithm, easier to brute-force than bcrypt or Argon2. Use @@ -112,7 +112,7 @@ class Security extends AbstractInjectionAware implements SecurityContract * * @var int */ - const CRYPT_SHA256 = 8; + const int CRYPT_SHA256 = 8; /** * Weak legacy algorithm, easier to brute-force than bcrypt or Argon2. Use @@ -121,14 +121,14 @@ class Security extends AbstractInjectionAware implements SecurityContract * * @var int */ - const CRYPT_SHA512 = 9; + const int CRYPT_SHA512 = 9; /** * @deprecated Not implemented; resolves to bcrypt. To be removed. * * @var int */ - const CRYPT_STD_DES = 1; + const int CRYPT_STD_DES = 1; protected bool $autoRefresh = true; diff --git a/src/Encryption/Security/JWT/Token/Enum.php b/src/Encryption/Security/JWT/Token/Enum.php index 5a98c384..203aee62 100644 --- a/src/Encryption/Security/JWT/Token/Enum.php +++ b/src/Encryption/Security/JWT/Token/Enum.php @@ -19,54 +19,54 @@ class Enum /** * @var string */ - const ALGO = 'alg'; + const string ALGO = 'alg'; /** * Claims * * @var string */ - const AUDIENCE = 'aud'; + const string AUDIENCE = 'aud'; /** * @var string */ - const CONTENT_TYPE = 'cty'; + const string CONTENT_TYPE = 'cty'; /** * @var string */ - const EXPIRATION_TIME = 'exp'; + const string EXPIRATION_TIME = 'exp'; /** * @var string */ - const ID = 'jti'; + const string ID = 'jti'; /** * @var string */ - const ISSUED_AT = 'iat'; + const string ISSUED_AT = 'iat'; /** * @var string */ - const ISSUER = 'iss'; + const string ISSUER = 'iss'; /** * @var string */ - const NOT_BEFORE = 'nbf'; + const string NOT_BEFORE = 'nbf'; /** * @var string */ - const SUBJECT = 'sub'; + const string SUBJECT = 'sub'; /** * Headers * * @var string */ - const TYPE = 'typ'; + const string TYPE = 'typ'; } diff --git a/src/Encryption/Security/Uuid/AbstractUuid.php b/src/Encryption/Security/Uuid/AbstractUuid.php index 637d37a3..1b2230a4 100644 --- a/src/Encryption/Security/Uuid/AbstractUuid.php +++ b/src/Encryption/Security/Uuid/AbstractUuid.php @@ -17,12 +17,12 @@ abstract class AbstractUuid implements \Phalcon\Encryption\Security\Uuid\UuidInt /** * @var string */ - const MAX = 'ffffffff-ffff-ffff-ffff-ffffffffffff'; + const string MAX = 'ffffffff-ffff-ffff-ffff-ffffffffffff'; /** * @var string */ - const NIL = '00000000-0000-0000-0000-000000000000'; + const string NIL = '00000000-0000-0000-0000-000000000000'; /** * 100-nanosecond intervals between UUID epoch (1582-10-15) @@ -30,7 +30,7 @@ abstract class AbstractUuid implements \Phalcon\Encryption\Security\Uuid\UuidInt * * @var int */ - const TIME_OFFSET_INT = 0x01B21DD213814000; + const int TIME_OFFSET_INT = 0x01B21DD213814000; /** * Cached SysNodeProvider instance - shared within the request via static. diff --git a/src/Filter/Filter.php b/src/Filter/Filter.php index 9a37f5fe..f0308923 100644 --- a/src/Filter/Filter.php +++ b/src/Filter/Filter.php @@ -78,117 +78,117 @@ class Filter implements \Phalcon\Filter\FilterInterface /** * @var string */ - const FILTER_ABSINT = 'absint'; + const string FILTER_ABSINT = 'absint'; /** * @var string */ - const FILTER_ALNUM = 'alnum'; + const string FILTER_ALNUM = 'alnum'; /** * @var string */ - const FILTER_ALPHA = 'alpha'; + const string FILTER_ALPHA = 'alpha'; /** * @var string */ - const FILTER_BOOL = 'bool'; + const string FILTER_BOOL = 'bool'; /** * @var string */ - const FILTER_EMAIL = 'email'; + const string FILTER_EMAIL = 'email'; /** * @var string */ - const FILTER_FLOAT = 'float'; + const string FILTER_FLOAT = 'float'; /** * @var string */ - const FILTER_INT = 'int'; + const string FILTER_INT = 'int'; /** * @var string */ - const FILTER_IP = 'ip'; + const string FILTER_IP = 'ip'; /** * @var string */ - const FILTER_LOWER = 'lower'; + const string FILTER_LOWER = 'lower'; /** * @var string */ - const FILTER_LOWERFIRST = 'lowerfirst'; + const string FILTER_LOWERFIRST = 'lowerfirst'; /** * @var string */ - const FILTER_REGEX = 'regex'; + const string FILTER_REGEX = 'regex'; /** * @var string */ - const FILTER_REMOVE = 'remove'; + const string FILTER_REMOVE = 'remove'; /** * @var string */ - const FILTER_REPLACE = 'replace'; + const string FILTER_REPLACE = 'replace'; /** * @var string */ - const FILTER_SPECIAL = 'special'; + const string FILTER_SPECIAL = 'special'; /** * @var string */ - const FILTER_SPECIALFULL = 'specialfull'; + const string FILTER_SPECIALFULL = 'specialfull'; /** * @var string */ - const FILTER_STRING = 'string'; + const string FILTER_STRING = 'string'; /** * @var string */ - const FILTER_STRING_LEGACY = 'stringlegacy'; + const string FILTER_STRING_LEGACY = 'stringlegacy'; /** * @var string */ - const FILTER_STRIPTAGS = 'striptags'; + const string FILTER_STRIPTAGS = 'striptags'; /** * @var string */ - const FILTER_TRIM = 'trim'; + const string FILTER_TRIM = 'trim'; /** * @var string */ - const FILTER_UPPER = 'upper'; + const string FILTER_UPPER = 'upper'; /** * @var string */ - const FILTER_UPPERFIRST = 'upperfirst'; + const string FILTER_UPPERFIRST = 'upperfirst'; /** * @var string */ - const FILTER_UPPERWORDS = 'upperwords'; + const string FILTER_UPPERWORDS = 'upperwords'; /** * @var string */ - const FILTER_URL = 'url'; + const string FILTER_URL = 'url'; /** * @phpstan-var filter_mapper @@ -244,7 +244,7 @@ public static function getDefaultMapper(): array * * @return mixed * - * @phpstan-return Sanitizer + * @phpstan-return callable-array|callable-object|Sanitizer * * @throws Exception */ @@ -289,7 +289,7 @@ public function sanitize($value, $sanitizers, bool $noRecursive = false): mixed /** * Set a new service to the mapper array * - * @phpstan-param class-string|Sanitizer $service + * @phpstan-param callable-array|callable-object|class-string|Sanitizer $service * @param string $name * @param mixed $service * @return void @@ -310,9 +310,9 @@ protected function init(array $mapper): void } /** - * @phpstan-param class-string|Sanitizer $definition + * @phpstan-param callable-array|callable-object|class-string|Sanitizer $definition * - * @phpstan-return Sanitizer + * @phpstan-return callable-array|callable-object|Sanitizer * @param mixed $definition */ private function createInstance($definition) diff --git a/src/Filter/Validation/Validator/Ip.php b/src/Filter/Validation/Validator/Ip.php index ae5dcdb8..8361dd9b 100644 --- a/src/Filter/Validation/Validator/Ip.php +++ b/src/Filter/Validation/Validator/Ip.php @@ -72,12 +72,12 @@ class Ip extends AbstractValidator /** * @var int */ - const VERSION_4 = 1048576; + const int VERSION_4 = 1048576; /** * @var int */ - const VERSION_6 = 2097152; + const int VERSION_6 = 2097152; /** * @var string|null diff --git a/src/Flash/Session.php b/src/Flash/Session.php index b316739e..f9b604c5 100644 --- a/src/Flash/Session.php +++ b/src/Flash/Session.php @@ -30,7 +30,7 @@ class Session extends \Phalcon\Flash\AbstractFlash /** * @var string */ - const SESSION_KEY = '_flashMessages'; + const string SESSION_KEY = '_flashMessages'; protected string $sessionKey = ''; diff --git a/src/Html/Helper/Doctype.php b/src/Html/Helper/Doctype.php index d06647f2..37dd1dc4 100644 --- a/src/Html/Helper/Doctype.php +++ b/src/Html/Helper/Doctype.php @@ -17,57 +17,57 @@ class Doctype /** * @var int */ - const HTML32 = 1; + const int HTML32 = 1; /** * @var int */ - const HTML401_STRICT = 2; + const int HTML401_STRICT = 2; /** * @var int */ - const HTML401_TRANSITIONAL = 3; + const int HTML401_TRANSITIONAL = 3; /** * @var int */ - const HTML401_FRAMESET = 4; + const int HTML401_FRAMESET = 4; /** * @var int */ - const HTML5 = 5; + const int HTML5 = 5; /** * @var int */ - const XHTML10_STRICT = 6; + const int XHTML10_STRICT = 6; /** * @var int */ - const XHTML10_TRANSITIONAL = 7; + const int XHTML10_TRANSITIONAL = 7; /** * @var int */ - const XHTML10_FRAMESET = 8; + const int XHTML10_FRAMESET = 8; /** * @var int */ - const XHTML11 = 9; + const int XHTML11 = 9; /** * @var int */ - const XHTML20 = 10; + const int XHTML20 = 10; /** * @var int */ - const XHTML5 = 11; + const int XHTML5 = 11; /** * @var string diff --git a/src/Http/Message/RequestMethodInterface.php b/src/Http/Message/RequestMethodInterface.php index 73e1409a..8377075d 100644 --- a/src/Http/Message/RequestMethodInterface.php +++ b/src/Http/Message/RequestMethodInterface.php @@ -22,50 +22,50 @@ interface RequestMethodInterface /** * @var string */ - const METHOD_CONNECT = 'CONNECT'; + const string METHOD_CONNECT = 'CONNECT'; /** * @var string */ - const METHOD_DELETE = 'DELETE'; + const string METHOD_DELETE = 'DELETE'; /** * @var string */ - const METHOD_GET = 'GET'; + const string METHOD_GET = 'GET'; /** * @var string */ - const METHOD_HEAD = 'HEAD'; + const string METHOD_HEAD = 'HEAD'; /** * @var string */ - const METHOD_OPTIONS = 'OPTIONS'; + const string METHOD_OPTIONS = 'OPTIONS'; /** * @var string */ - const METHOD_PATCH = 'PATCH'; + const string METHOD_PATCH = 'PATCH'; /** * @var string */ - const METHOD_POST = 'POST'; + const string METHOD_POST = 'POST'; /** * @var string */ - const METHOD_PURGE = 'PURGE'; + const string METHOD_PURGE = 'PURGE'; /** * @var string */ - const METHOD_PUT = 'PUT'; + const string METHOD_PUT = 'PUT'; /** * @var string */ - const METHOD_TRACE = 'TRACE'; + const string METHOD_TRACE = 'TRACE'; } diff --git a/src/Http/Message/ResponseStatusCodeInterface.php b/src/Http/Message/ResponseStatusCodeInterface.php index bf85e147..dbe910f4 100644 --- a/src/Http/Message/ResponseStatusCodeInterface.php +++ b/src/Http/Message/ResponseStatusCodeInterface.php @@ -43,440 +43,440 @@ interface ResponseStatusCodeInterface /** * @var int */ - const STATUS_CONTINUE = 100; + const int STATUS_CONTINUE = 100; /** * @var int */ - const STATUS_SWITCHING_PROTOCOLS = 101; + const int STATUS_SWITCHING_PROTOCOLS = 101; /** * @var int */ - const STATUS_PROCESSING = 102; + const int STATUS_PROCESSING = 102; /** * @var int */ - const STATUS_EARLY_HINTS = 103; + const int STATUS_EARLY_HINTS = 103; /** * @var int */ - const STATUS_OK = 200; + const int STATUS_OK = 200; /** * @var int */ - const STATUS_CREATED = 201; + const int STATUS_CREATED = 201; /** * @var int */ - const STATUS_ACCEPTED = 202; + const int STATUS_ACCEPTED = 202; /** * @var int */ - const STATUS_NON_AUTHORITATIVE_INFORMATION = 203; + const int STATUS_NON_AUTHORITATIVE_INFORMATION = 203; /** * @var int */ - const STATUS_NO_CONTENT = 204; + const int STATUS_NO_CONTENT = 204; /** * @var int */ - const STATUS_RESET_CONTENT = 205; + const int STATUS_RESET_CONTENT = 205; /** * @var int */ - const STATUS_PARTIAL_CONTENT = 206; + const int STATUS_PARTIAL_CONTENT = 206; /** * @var int */ - const STATUS_MULTI_STATUS = 207; + const int STATUS_MULTI_STATUS = 207; /** * @var int */ - const STATUS_ALREADY_REPORTED = 208; + const int STATUS_ALREADY_REPORTED = 208; /** * @var int */ - const STATUS_IM_USED = 226; + const int STATUS_IM_USED = 226; /** * @var int */ - const STATUS_MULTIPLE_CHOICES = 300; + const int STATUS_MULTIPLE_CHOICES = 300; /** * @var int */ - const STATUS_MOVED_PERMANENTLY = 301; + const int STATUS_MOVED_PERMANENTLY = 301; /** * @var int */ - const STATUS_FOUND = 302; + const int STATUS_FOUND = 302; /** * @var int */ - const STATUS_SEE_OTHER = 303; + const int STATUS_SEE_OTHER = 303; /** * @var int */ - const STATUS_NOT_MODIFIED = 304; + const int STATUS_NOT_MODIFIED = 304; /** * @var int */ - const STATUS_USE_PROXY = 305; + const int STATUS_USE_PROXY = 305; /** * @var int */ - const STATUS_RESERVED = 306; + const int STATUS_RESERVED = 306; /** * @var int */ - const STATUS_TEMPORARY_REDIRECT = 307; + const int STATUS_TEMPORARY_REDIRECT = 307; /** * @var int */ - const STATUS_PERMANENT_REDIRECT = 308; + const int STATUS_PERMANENT_REDIRECT = 308; /** * @var int */ - const STATUS_BAD_REQUEST = 400; + const int STATUS_BAD_REQUEST = 400; /** * @var int */ - const STATUS_UNAUTHORIZED = 401; + const int STATUS_UNAUTHORIZED = 401; /** * @var int */ - const STATUS_PAYMENT_REQUIRED = 402; + const int STATUS_PAYMENT_REQUIRED = 402; /** * @var int */ - const STATUS_FORBIDDEN = 403; + const int STATUS_FORBIDDEN = 403; /** * @var int */ - const STATUS_NOT_FOUND = 404; + const int STATUS_NOT_FOUND = 404; /** * @var int */ - const STATUS_METHOD_NOT_ALLOWED = 405; + const int STATUS_METHOD_NOT_ALLOWED = 405; /** * @var int */ - const STATUS_NOT_ACCEPTABLE = 406; + const int STATUS_NOT_ACCEPTABLE = 406; /** * @var int */ - const STATUS_PROXY_AUTHENTICATION_REQUIRED = 407; + const int STATUS_PROXY_AUTHENTICATION_REQUIRED = 407; /** * @var int */ - const STATUS_REQUEST_TIMEOUT = 408; + const int STATUS_REQUEST_TIMEOUT = 408; /** * @var int */ - const STATUS_CONFLICT = 409; + const int STATUS_CONFLICT = 409; /** * @var int */ - const STATUS_GONE = 410; + const int STATUS_GONE = 410; /** * @var int */ - const STATUS_LENGTH_REQUIRED = 411; + const int STATUS_LENGTH_REQUIRED = 411; /** * @var int */ - const STATUS_PRECONDITION_FAILED = 412; + const int STATUS_PRECONDITION_FAILED = 412; /** * @var int */ - const STATUS_PAYLOAD_TOO_LARGE = 413; + const int STATUS_PAYLOAD_TOO_LARGE = 413; /** * @var int */ - const STATUS_URI_TOO_LONG = 414; + const int STATUS_URI_TOO_LONG = 414; /** * @var int */ - const STATUS_UNSUPPORTED_MEDIA_TYPE = 415; + const int STATUS_UNSUPPORTED_MEDIA_TYPE = 415; /** * @var int */ - const STATUS_RANGE_NOT_SATISFIABLE = 416; + const int STATUS_RANGE_NOT_SATISFIABLE = 416; /** * @var int */ - const STATUS_EXPECTATION_FAILED = 417; + const int STATUS_EXPECTATION_FAILED = 417; /** * @var int */ - const STATUS_IM_A_TEAPOT = 418; + const int STATUS_IM_A_TEAPOT = 418; /** * @var int */ - const STATUS_MISDIRECTED_REQUEST = 421; + const int STATUS_MISDIRECTED_REQUEST = 421; /** * @var int */ - const STATUS_UNPROCESSABLE_ENTITY = 422; + const int STATUS_UNPROCESSABLE_ENTITY = 422; /** * @var int */ - const STATUS_LOCKED = 423; + const int STATUS_LOCKED = 423; /** * @var int */ - const STATUS_FAILED_DEPENDENCY = 424; + const int STATUS_FAILED_DEPENDENCY = 424; /** * @var int */ - const STATUS_TOO_EARLY = 425; + const int STATUS_TOO_EARLY = 425; /** * @var int */ - const STATUS_UPGRADE_REQUIRED = 426; + const int STATUS_UPGRADE_REQUIRED = 426; /** * @var int */ - const STATUS_PRECONDITION_REQUIRED = 428; + const int STATUS_PRECONDITION_REQUIRED = 428; /** * @var int */ - const STATUS_TOO_MANY_REQUESTS = 429; + const int STATUS_TOO_MANY_REQUESTS = 429; /** * @var int */ - const STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE = 431; + const int STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE = 431; /** * @var int */ - const STATUS_UNAVAILABLE_FOR_LEGAL_REASONS = 451; + const int STATUS_UNAVAILABLE_FOR_LEGAL_REASONS = 451; /** * @var int */ - const STATUS_INTERNAL_SERVER_ERROR = 500; + const int STATUS_INTERNAL_SERVER_ERROR = 500; /** * @var int */ - const STATUS_NOT_IMPLEMENTED = 501; + const int STATUS_NOT_IMPLEMENTED = 501; /** * @var int */ - const STATUS_BAD_GATEWAY = 502; + const int STATUS_BAD_GATEWAY = 502; /** * @var int */ - const STATUS_SERVICE_UNAVAILABLE = 503; + const int STATUS_SERVICE_UNAVAILABLE = 503; /** * @var int */ - const STATUS_GATEWAY_TIMEOUT = 504; + const int STATUS_GATEWAY_TIMEOUT = 504; /** * @var int */ - const STATUS_VERSION_NOT_SUPPORTED = 505; + const int STATUS_VERSION_NOT_SUPPORTED = 505; /** * @var int */ - const STATUS_VARIANT_ALSO_NEGOTIATES = 506; + const int STATUS_VARIANT_ALSO_NEGOTIATES = 506; /** * @var int */ - const STATUS_INSUFFICIENT_STORAGE = 507; + const int STATUS_INSUFFICIENT_STORAGE = 507; /** * @var int */ - const STATUS_LOOP_DETECTED = 508; + const int STATUS_LOOP_DETECTED = 508; /** * @var int */ - const STATUS_NOT_EXTENDED = 510; + const int STATUS_NOT_EXTENDED = 510; /** * @var int */ - const STATUS_NETWORK_AUTHENTICATION_REQUIRED = 511; + const int STATUS_NETWORK_AUTHENTICATION_REQUIRED = 511; /** * @var int */ - const STATUS_THIS_IS_FINE = 218; + const int STATUS_THIS_IS_FINE = 218; /** * @var int */ - const STATUS_PAGE_EXPIRED = 419; + const int STATUS_PAGE_EXPIRED = 419; /** * @var int */ - const STATUS_METHOD_FAILURE = 420; + const int STATUS_METHOD_FAILURE = 420; /** * @var int */ - const STATUS_LOGIN_TIMEOUT = 440; + const int STATUS_LOGIN_TIMEOUT = 440; /** * @var int */ - const STATUS_NO_RESPONSE = 444; + const int STATUS_NO_RESPONSE = 444; /** * @var int */ - const STATUS_RETRY_WITH = 449; + const int STATUS_RETRY_WITH = 449; /** * @var int */ - const STATUS_BLOCKED_BY_WINDOWS_PARENTAL_CONTROLS = 450; + const int STATUS_BLOCKED_BY_WINDOWS_PARENTAL_CONTROLS = 450; /** * @var int */ - const STATUS_REQUEST_HEADER_TOO_LARGE = 494; + const int STATUS_REQUEST_HEADER_TOO_LARGE = 494; /** * @var int */ - const STATUS_SSL_CERTIFICATE_ERROR = 495; + const int STATUS_SSL_CERTIFICATE_ERROR = 495; /** * @var int */ - const STATUS_SSL_CERTIFICATE_REQUIRED = 496; + const int STATUS_SSL_CERTIFICATE_REQUIRED = 496; /** * @var int */ - const STATUS_HTTP_REQUEST_SENT_TO_HTTPS_PORT = 497; + const int STATUS_HTTP_REQUEST_SENT_TO_HTTPS_PORT = 497; /** * @var int */ - const STATUS_INVALID_TOKEN_ESRI = 498; + const int STATUS_INVALID_TOKEN_ESRI = 498; /** * @var int */ - const STATUS_CLIENT_CLOSED_REQUEST = 499; + const int STATUS_CLIENT_CLOSED_REQUEST = 499; /** * @var int */ - const STATUS_BANDWIDTH_LIMIT_EXCEEDED = 509; + const int STATUS_BANDWIDTH_LIMIT_EXCEEDED = 509; /** * @var int */ - const STATUS_UNKNOWN_ERROR = 520; + const int STATUS_UNKNOWN_ERROR = 520; /** * @var int */ - const STATUS_WEB_SERVER_IS_DOWN = 521; + const int STATUS_WEB_SERVER_IS_DOWN = 521; /** * @var int */ - const STATUS_CONNECTION_TIMEOUT = 522; + const int STATUS_CONNECTION_TIMEOUT = 522; /** * @var int */ - const STATUS_ORIGIN_IS_UNREACHABLE = 523; + const int STATUS_ORIGIN_IS_UNREACHABLE = 523; /** * @var int */ - const STATUS_TIMEOUT_OCCURRED = 524; + const int STATUS_TIMEOUT_OCCURRED = 524; /** * @var int */ - const STATUS_SSL_HANDSHAKE_FAILED = 525; + const int STATUS_SSL_HANDSHAKE_FAILED = 525; /** * @var int */ - const STATUS_INVALID_SSL_CERTIFICATE = 526; + const int STATUS_INVALID_SSL_CERTIFICATE = 526; /** * @var int */ - const STATUS_RAILGUN_ERROR = 527; + const int STATUS_RAILGUN_ERROR = 527; /** * @var int */ - const STATUS_ORIGIN_DNS_ERROR = 530; + const int STATUS_ORIGIN_DNS_ERROR = 530; /** * @var int */ - const STATUS_NETWORK_READ_TIMEOUT_ERROR = 598; + const int STATUS_NETWORK_READ_TIMEOUT_ERROR = 598; /** * @var int */ - const STATUS_NETWORK_CONNECT_TIMEOUT_ERROR = 599; + const int STATUS_NETWORK_CONNECT_TIMEOUT_ERROR = 599; } diff --git a/src/Image/Adapter/AbstractAdapter.php b/src/Image/Adapter/AbstractAdapter.php index 6ec61dd4..98d3b0c4 100644 --- a/src/Image/Adapter/AbstractAdapter.php +++ b/src/Image/Adapter/AbstractAdapter.php @@ -36,7 +36,7 @@ abstract class AbstractAdapter implements \Phalcon\Image\Adapter\AdapterInterfac * * @var int */ - const DEFAULT_MAX_PIXELS = 50000000; + const int DEFAULT_MAX_PIXELS = 50000000; protected string $file; diff --git a/src/Image/Enum.php b/src/Image/Enum.php index 586214d3..1527a55e 100644 --- a/src/Image/Enum.php +++ b/src/Image/Enum.php @@ -22,45 +22,45 @@ class Enum /** * @var int */ - const AUTO = 4; + const int AUTO = 4; /** * @var int */ - const HEIGHT = 3; + const int HEIGHT = 3; /** * @var int */ - const INVERSE = 5; + const int INVERSE = 5; /** * @var int */ - const NONE = 1; + const int NONE = 1; /** * @var int */ - const PRECISE = 6; + const int PRECISE = 6; /** * @var int */ - const TENSILE = 7; + const int TENSILE = 7; /** * @var int */ - const WIDTH = 2; + const int WIDTH = 2; /** * @var int */ - const HORIZONTAL = 11; + const int HORIZONTAL = 11; /** * @var int */ - const VERTICAL = 12; + const int VERTICAL = 12; } diff --git a/src/Logger/AbstractLogger.php b/src/Logger/AbstractLogger.php index c615c054..65ae89e1 100644 --- a/src/Logger/AbstractLogger.php +++ b/src/Logger/AbstractLogger.php @@ -43,12 +43,12 @@ abstract class AbstractLogger /** * @var int */ - const ALERT = 2; + const int ALERT = 2; /** * @var int */ - const CRITICAL = 1; + const int CRITICAL = 1; /** * Default threshold and fallback sink. It sits between DEBUG (7) and @@ -58,42 +58,42 @@ abstract class AbstractLogger * * @var int */ - const CUSTOM = 8; + const int CUSTOM = 8; /** * @var int */ - const DEBUG = 7; + const int DEBUG = 7; /** * @var int */ - const EMERGENCY = 0; + const int EMERGENCY = 0; /** * @var int */ - const ERROR = 3; + const int ERROR = 3; /** * @var int */ - const INFO = 6; + const int INFO = 6; /** * @var int */ - const NOTICE = 5; + const int NOTICE = 5; /** * @var int */ - const TRACE = 9; + const int TRACE = 9; /** * @var int */ - const WARNING = 4; + const int WARNING = 4; /** * The adapter stack diff --git a/src/Logger/Enum.php b/src/Logger/Enum.php index 0a29e2ed..4e82e606 100644 --- a/src/Logger/Enum.php +++ b/src/Logger/Enum.php @@ -17,12 +17,12 @@ class Enum /** * @var int */ - const ALERT = 2; + const int ALERT = 2; /** * @var int */ - const CRITICAL = 1; + const int CRITICAL = 1; /** * Default threshold and fallback sink. It sits between DEBUG (7) and @@ -32,40 +32,40 @@ class Enum * * @var int */ - const CUSTOM = 8; + const int CUSTOM = 8; /** * @var int */ - const DEBUG = 7; + const int DEBUG = 7; /** * @var int */ - const EMERGENCY = 0; + const int EMERGENCY = 0; /** * @var int */ - const ERROR = 3; + const int ERROR = 3; /** * @var int */ - const INFO = 6; + const int INFO = 6; /** * @var int */ - const NOTICE = 5; + const int NOTICE = 5; /** * @var int */ - const TRACE = 9; + const int TRACE = 9; /** * @var int */ - const WARNING = 4; + const int WARNING = 4; } diff --git a/src/Mvc/Model.php b/src/Mvc/Model.php index dce85b10..0ccd1c82 100644 --- a/src/Mvc/Model.php +++ b/src/Mvc/Model.php @@ -156,42 +156,42 @@ abstract class Model extends AbstractInjectionAware implements \Phalcon\Mvc\Enti /** * @var int */ - const DIRTY_STATE_DETACHED = 2; + const int DIRTY_STATE_DETACHED = 2; /** * @var int */ - const DIRTY_STATE_PERSISTENT = 0; + const int DIRTY_STATE_PERSISTENT = 0; /** * @var int */ - const DIRTY_STATE_TRANSIENT = 1; + const int DIRTY_STATE_TRANSIENT = 1; /** * @var int */ - const OP_CREATE = 1; + const int OP_CREATE = 1; /** * @var int */ - const OP_DELETE = 3; + const int OP_DELETE = 3; /** * @var int */ - const OP_NONE = 0; + const int OP_NONE = 0; /** * @var int */ - const OP_UPDATE = 2; + const int OP_UPDATE = 2; /** * @var string */ - const TRANSACTION_INDEX = 'transaction'; + const string TRANSACTION_INDEX = 'transaction'; /** * @phpstan-var mvc_model_related diff --git a/src/Mvc/Model/Eager/Loader.php b/src/Mvc/Model/Eager/Loader.php index f109723b..e7cafa67 100644 --- a/src/Mvc/Model/Eager/Loader.php +++ b/src/Mvc/Model/Eager/Loader.php @@ -42,7 +42,7 @@ class Loader * * @var int */ - const MAX_ROWS_PER_LEVEL = 100000; + const int MAX_ROWS_PER_LEVEL = 100000; protected \Phalcon\Mvc\Model\ManagerInterface $manager; diff --git a/src/Mvc/Model/Eager/PathTree.php b/src/Mvc/Model/Eager/PathTree.php index c96b3308..03001bcd 100644 --- a/src/Mvc/Model/Eager/PathTree.php +++ b/src/Mvc/Model/Eager/PathTree.php @@ -34,7 +34,7 @@ class PathTree * * @var int */ - const MAX_DEPTH = 5; + const int MAX_DEPTH = 5; /** diff --git a/src/Mvc/Model/MetaData.php b/src/Mvc/Model/MetaData.php index b232f311..5f2cae5d 100644 --- a/src/Mvc/Model/MetaData.php +++ b/src/Mvc/Model/MetaData.php @@ -93,82 +93,82 @@ abstract class MetaData implements \Phalcon\Di\InjectionAwareInterface, \Phalcon /** * @var int */ - const MODELS_ATTRIBUTES = 0; + const int MODELS_ATTRIBUTES = 0; /** * @var int */ - const MODELS_AUTOMATIC_DEFAULT_INSERT = 10; + const int MODELS_AUTOMATIC_DEFAULT_INSERT = 10; /** * @var int */ - const MODELS_AUTOMATIC_DEFAULT_UPDATE = 11; + const int MODELS_AUTOMATIC_DEFAULT_UPDATE = 11; /** * @var int */ - const MODELS_COLUMN_MAP = 0; + const int MODELS_COLUMN_MAP = 0; /** * @var int */ - const MODELS_DATA_TYPES = 4; + const int MODELS_DATA_TYPES = 4; /** * @var int */ - const MODELS_DATA_TYPES_BIND = 9; + const int MODELS_DATA_TYPES_BIND = 9; /** * @var int */ - const MODELS_DATA_TYPES_NUMERIC = 5; + const int MODELS_DATA_TYPES_NUMERIC = 5; /** * @var int */ - const MODELS_DATE_AT = 6; + const int MODELS_DATE_AT = 6; /** * @var int */ - const MODELS_DATE_IN = 7; + const int MODELS_DATE_IN = 7; /** * @var int */ - const MODELS_DEFAULT_VALUES = 12; + const int MODELS_DEFAULT_VALUES = 12; /** * @var int */ - const MODELS_EMPTY_STRING_VALUES = 13; + const int MODELS_EMPTY_STRING_VALUES = 13; /** * @var int */ - const MODELS_IDENTITY_COLUMN = 8; + const int MODELS_IDENTITY_COLUMN = 8; /** * @var int */ - const MODELS_NON_PRIMARY_KEY = 2; + const int MODELS_NON_PRIMARY_KEY = 2; /** * @var int */ - const MODELS_NOT_NULL = 3; + const int MODELS_NOT_NULL = 3; /** * @var int */ - const MODELS_PRIMARY_KEY = 1; + const int MODELS_PRIMARY_KEY = 1; /** * @var int */ - const MODELS_REVERSE_COLUMN_MAP = 1; + const int MODELS_REVERSE_COLUMN_MAP = 1; protected ?\Phalcon\Cache\Adapter\AdapterInterface $adapter = null; diff --git a/src/Mvc/Model/MetaData/Stream.php b/src/Mvc/Model/MetaData/Stream.php index 95d68316..52217a19 100644 --- a/src/Mvc/Model/MetaData/Stream.php +++ b/src/Mvc/Model/MetaData/Stream.php @@ -81,6 +81,17 @@ private function getFilePath(string $key): string { } + /** + * Returns the value of a PHP file. The require is in a separate method, + * because the caller must be able to catch a ParseError. + * + * @param string $path + * @return mixed + */ + private function requireFile(string $path): mixed + { + } + /** * Throws an exception when the metadata cannot be written * diff --git a/src/Mvc/Model/Query.php b/src/Mvc/Model/Query.php index 4ef53ba6..ef04df9a 100644 --- a/src/Mvc/Model/Query.php +++ b/src/Mvc/Model/Query.php @@ -137,22 +137,22 @@ class Query implements \Phalcon\Mvc\Model\QueryInterface, \Phalcon\Di\InjectionA /** * @var int */ - const TYPE_DELETE = 303; + const int TYPE_DELETE = 303; /** * @var int */ - const TYPE_INSERT = 306; + const int TYPE_INSERT = 306; /** * @var int */ - const TYPE_SELECT = 309; + const int TYPE_SELECT = 309; /** * @var int */ - const TYPE_UPDATE = 300; + const int TYPE_UPDATE = 300; /** * @var array diff --git a/src/Mvc/Model/Query/BuilderInterface.php b/src/Mvc/Model/Query/BuilderInterface.php index ed3e86b4..c033316a 100644 --- a/src/Mvc/Model/Query/BuilderInterface.php +++ b/src/Mvc/Model/Query/BuilderInterface.php @@ -25,12 +25,12 @@ interface BuilderInterface /** * @var string */ - const OPERATOR_AND = 'and'; + const string OPERATOR_AND = 'and'; /** * @var string */ - const OPERATOR_OR = 'or'; + const string OPERATOR_OR = 'or'; /** diff --git a/src/Mvc/Model/Relation.php b/src/Mvc/Model/Relation.php index 04213815..30f5eb70 100644 --- a/src/Mvc/Model/Relation.php +++ b/src/Mvc/Model/Relation.php @@ -23,42 +23,42 @@ class Relation implements \Phalcon\Mvc\Model\RelationInterface /** * @var int */ - const ACTION_CASCADE = 2; + const int ACTION_CASCADE = 2; /** * @var int */ - const ACTION_RESTRICT = 1; + const int ACTION_RESTRICT = 1; /** * @var int */ - const BELONGS_TO = 0; + const int BELONGS_TO = 0; /** * @var int */ - const HAS_MANY = 2; + const int HAS_MANY = 2; /** * @var int */ - const HAS_MANY_THROUGH = 4; + const int HAS_MANY_THROUGH = 4; /** * @var int */ - const HAS_ONE = 1; + const int HAS_ONE = 1; /** * @var int */ - const HAS_ONE_THROUGH = 3; + const int HAS_ONE_THROUGH = 3; /** * @var int */ - const NO_ACTION = 0; + const int NO_ACTION = 0; /** * @var array|string diff --git a/src/Mvc/Model/Resultset.php b/src/Mvc/Model/Resultset.php index 14619c62..d463f2df 100644 --- a/src/Mvc/Model/Resultset.php +++ b/src/Mvc/Model/Resultset.php @@ -77,27 +77,27 @@ abstract class Resultset implements \Phalcon\Mvc\Model\ResultsetInterface, \Iter /** * @var int */ - const HYDRATE_ARRAYS = 1; + const int HYDRATE_ARRAYS = 1; /** * @var int */ - const HYDRATE_OBJECTS = 2; + const int HYDRATE_OBJECTS = 2; /** * @var int */ - const HYDRATE_RECORDS = 0; + const int HYDRATE_RECORDS = 0; /** * @var int */ - const TYPE_RESULT_FULL = 0; + const int TYPE_RESULT_FULL = 0; /** * @var int */ - const TYPE_RESULT_PARTIAL = 1; + const int TYPE_RESULT_PARTIAL = 1; /** * @var mixed|null diff --git a/src/Mvc/Router.php b/src/Mvc/Router.php index bc71920a..63e10627 100644 --- a/src/Mvc/Router.php +++ b/src/Mvc/Router.php @@ -88,12 +88,12 @@ class Router extends AbstractInjectionAware implements \Phalcon\Mvc\RouterInterf /** * @var int */ - const POSITION_FIRST = 0; + const int POSITION_FIRST = 0; /** * @var int */ - const POSITION_LAST = 1; + const int POSITION_LAST = 1; /** * Number of alternatives per combined-regex chunk. Empirically derived @@ -101,17 +101,17 @@ class Router extends AbstractInjectionAware implements \Phalcon\Mvc\RouterInterf * * @var int */ - const REGEX_CHUNK_SIZE = 10; + const int REGEX_CHUNK_SIZE = 10; /** * @var int */ - const URI_SOURCE_GET_URL = 0; + const int URI_SOURCE_GET_URL = 0; /** * @var int */ - const URI_SOURCE_SERVER_REQUEST_URI = 1; + const int URI_SOURCE_SERVER_REQUEST_URI = 1; protected string $action = ''; diff --git a/src/Mvc/View.php b/src/Mvc/View.php index 7dfff09d..20f04e66 100644 --- a/src/Mvc/View.php +++ b/src/Mvc/View.php @@ -61,42 +61,42 @@ class View extends Injectable implements \Phalcon\Mvc\ViewInterface, \Phalcon\Ev * * @var int */ - const LEVEL_ACTION_VIEW = 1; + const int LEVEL_ACTION_VIEW = 1; /** * Render Level: Render to the templates "after" * * @var int */ - const LEVEL_AFTER_TEMPLATE = 4; + const int LEVEL_AFTER_TEMPLATE = 4; /** * Render Level: To the templates "before" * * @var int */ - const LEVEL_BEFORE_TEMPLATE = 2; + const int LEVEL_BEFORE_TEMPLATE = 2; /** * Render Level: To the controller layout * * @var int */ - const LEVEL_LAYOUT = 3; + const int LEVEL_LAYOUT = 3; /** * Render Level: To the main layout * * @var int */ - const LEVEL_MAIN_LAYOUT = 5; + const int LEVEL_MAIN_LAYOUT = 5; /** * Render Level: No render any view * * @var int */ - const LEVEL_NO_RENDER = 0; + const int LEVEL_NO_RENDER = 0; /** * @var string diff --git a/src/Queue/Adapter/Beanstalk/BeanstalkConsumer.php b/src/Queue/Adapter/Beanstalk/BeanstalkConsumer.php index a075897e..5ce742ea 100644 --- a/src/Queue/Adapter/Beanstalk/BeanstalkConsumer.php +++ b/src/Queue/Adapter/Beanstalk/BeanstalkConsumer.php @@ -29,7 +29,7 @@ class BeanstalkConsumer extends AbstractConsumer implements \Phalcon\Contracts\Q * * @var int */ - const DEFAULT_PRIORITY = 100; + const int DEFAULT_PRIORITY = 100; protected BeanstalkConnection $connection; diff --git a/src/Queue/Adapter/Beanstalk/BeanstalkProducer.php b/src/Queue/Adapter/Beanstalk/BeanstalkProducer.php index 365ed849..c4a94a68 100644 --- a/src/Queue/Adapter/Beanstalk/BeanstalkProducer.php +++ b/src/Queue/Adapter/Beanstalk/BeanstalkProducer.php @@ -29,7 +29,7 @@ class BeanstalkProducer extends AbstractProducer * * @var int */ - const DEFAULT_PRIORITY = 100; + const int DEFAULT_PRIORITY = 100; protected BeanstalkContext $context; diff --git a/src/Queue/Consumer/Events.php b/src/Queue/Consumer/Events.php index cf32ebd0..97bea2a8 100644 --- a/src/Queue/Consumer/Events.php +++ b/src/Queue/Consumer/Events.php @@ -18,35 +18,35 @@ class Events /** * @var string */ - const AFTER_END = 'queue:afterEnd'; + const string AFTER_END = 'queue:afterEnd'; /** * @var string */ - const AFTER_PROCESS = 'queue:afterProcess'; + const string AFTER_PROCESS = 'queue:afterProcess'; /** * @var string */ - const AFTER_RECEIVE = 'queue:afterReceive'; + const string AFTER_RECEIVE = 'queue:afterReceive'; /** * @var string */ - const BEFORE_PROCESS = 'queue:beforeProcess'; + const string BEFORE_PROCESS = 'queue:beforeProcess'; /** * @var string */ - const BEFORE_RECEIVE = 'queue:beforeReceive'; + const string BEFORE_RECEIVE = 'queue:beforeReceive'; /** * @var string */ - const BEFORE_START = 'queue:beforeStart'; + const string BEFORE_START = 'queue:beforeStart'; /** * @var string */ - const PROCESSOR_EXCEPTION = 'queue:processorException'; + const string PROCESSOR_EXCEPTION = 'queue:processorException'; } diff --git a/src/Session/ManagerInterface.php b/src/Session/ManagerInterface.php index 694bdfb2..eeab728f 100644 --- a/src/Session/ManagerInterface.php +++ b/src/Session/ManagerInterface.php @@ -23,17 +23,17 @@ interface ManagerInterface /** * @var int */ - const SESSION_ACTIVE = 2; + const int SESSION_ACTIVE = 2; /** * @var int */ - const SESSION_DISABLED = 0; + const int SESSION_DISABLED = 0; /** * @var int */ - const SESSION_NONE = 1; + const int SESSION_NONE = 1; /** diff --git a/src/Support/Helper/Arr/Order.php b/src/Support/Helper/Arr/Order.php index a1c17eeb..4c937041 100644 --- a/src/Support/Helper/Arr/Order.php +++ b/src/Support/Helper/Arr/Order.php @@ -19,12 +19,12 @@ class Order /** * @var int */ - const ORDER_ASC = 1; + const int ORDER_ASC = 1; /** * @var int */ - const ORDER_DESC = 2; + const int ORDER_DESC = 2; /** diff --git a/src/Support/Helper/Str/Random.php b/src/Support/Helper/Str/Random.php index bc7606c0..0fe7b586 100644 --- a/src/Support/Helper/Str/Random.php +++ b/src/Support/Helper/Str/Random.php @@ -20,14 +20,14 @@ class Random * * @var int */ - const RANDOM_ALNUM = 0; + const int RANDOM_ALNUM = 0; /** * Only alphabetical characters [azAZ] * * @var int */ - const RANDOM_ALPHA = 1; + const int RANDOM_ALPHA = 1; /** * Only alphanumeric uppercase characters exclude similar @@ -35,28 +35,28 @@ class Random * * @var int */ - const RANDOM_DISTINCT = 5; + const int RANDOM_DISTINCT = 5; /** * Only hexadecimal characters [0-9a-f] * * @var int */ - const RANDOM_HEXDEC = 2; + const int RANDOM_HEXDEC = 2; /** * Only numbers without 0 [1-9] * * @var int */ - const RANDOM_NOZERO = 4; + const int RANDOM_NOZERO = 4; /** * Only numbers [0-9] * * @var int */ - const RANDOM_NUMERIC = 3; + const int RANDOM_NUMERIC = 3; /** diff --git a/src/Support/Settings.php b/src/Support/Settings.php index 64aec5de..9910302b 100644 --- a/src/Support/Settings.php +++ b/src/Support/Settings.php @@ -81,20 +81,4 @@ public static function set(string $key, $value): void public static function reset(): void { } - - /** - * The single authoritative whitelist. Reads a known setting from its - * C-level global, applying the per-key cast, and returns null for any - * unknown key. Both get() and set() consult this method so the list of - * valid settings lives in one place. - * - * globals_get() requires a string literal, so each key is read - * explicitly rather than by a variable lookup. - * - * @param string $key - * @return mixed - */ - private static function readGlobal(string $key): mixed - { - } } diff --git a/src/Support/Version.php b/src/Support/Version.php index 33ad2cd4..9ca73652 100644 --- a/src/Support/Version.php +++ b/src/Support/Version.php @@ -24,7 +24,7 @@ class Version * * @var int */ - const VERSION_MAJOR = 0; + const int VERSION_MAJOR = 0; /** * The constant referencing the major version. Returns 1 @@ -36,7 +36,7 @@ class Version * * @var int */ - const VERSION_MEDIUM = 1; + const int VERSION_MEDIUM = 1; /** * The constant referencing the major version. Returns 2 @@ -48,7 +48,7 @@ class Version * * @var int */ - const VERSION_MINOR = 2; + const int VERSION_MINOR = 2; /** * The constant referencing the major version. Returns 3 @@ -60,7 +60,7 @@ class Version * * @var int */ - const VERSION_SPECIAL = 3; + const int VERSION_SPECIAL = 3; /** * The constant referencing the major version. Returns 4 @@ -72,7 +72,7 @@ class Version * * @var int */ - const VERSION_SPECIAL_NUMBER = 4; + const int VERSION_SPECIAL_NUMBER = 4; /** diff --git a/src/Tag.php b/src/Tag.php index 9745e7af..6e856e17 100644 --- a/src/Tag.php +++ b/src/Tag.php @@ -37,57 +37,57 @@ class Tag /** * @var int */ - const HTML32 = 1; + const int HTML32 = 1; /** * @var int */ - const HTML401_STRICT = 2; + const int HTML401_STRICT = 2; /** * @var int */ - const HTML401_TRANSITIONAL = 3; + const int HTML401_TRANSITIONAL = 3; /** * @var int */ - const HTML401_FRAMESET = 4; + const int HTML401_FRAMESET = 4; /** * @var int */ - const HTML5 = 5; + const int HTML5 = 5; /** * @var int */ - const XHTML10_STRICT = 6; + const int XHTML10_STRICT = 6; /** * @var int */ - const XHTML10_TRANSITIONAL = 7; + const int XHTML10_TRANSITIONAL = 7; /** * @var int */ - const XHTML10_FRAMESET = 8; + const int XHTML10_FRAMESET = 8; /** * @var int */ - const XHTML11 = 9; + const int XHTML11 = 9; /** * @var int */ - const XHTML20 = 10; + const int XHTML20 = 10; /** * @var int */ - const XHTML5 = 11; + const int XHTML5 = 11; protected static bool $autoEscape = true;