diff --git a/CHANGELOG.md b/CHANGELOG.md index ed5c87ba..e91d27af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Changed +- Used PHPStan's int-mask-of type where applicable ([#779](https://github.com/jsonrainbow/json-schema/pull/779)) ## [6.1.0] - 2025-02-04 ### Added @@ -91,4 +93,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix: Clean up `.gitattributes` ([#687](https://github.com/jsonrainbow/json-schema/pull/687)) - Fix: Order `friendsofphp/php-cs-fixer` rules ([#688](https://github.com/jsonrainbow/json-schema/pull/688)) - HTTP to HTTPS redirection breaks remote reference resolution ([#709](https://github.com/jsonrainbow/json-schema/pull/709)) -- Corrected several typos and code style issues \ No newline at end of file +- Corrected several typos and code style issues diff --git a/src/JsonSchema/Constraints/BaseConstraint.php b/src/JsonSchema/Constraints/BaseConstraint.php index a4b4c9a2..0b661e0f 100644 --- a/src/JsonSchema/Constraints/BaseConstraint.php +++ b/src/JsonSchema/Constraints/BaseConstraint.php @@ -30,6 +30,7 @@ class BaseConstraint /** * @var int All error types which have occurred + * @phpstan-var int-mask-of */ protected $errorMask = Validator::ERROR_NONE; @@ -129,6 +130,7 @@ public function reset() * Get the error mask * * @return int + * @phpstan-return int-mask-of */ public function getErrorMask() { diff --git a/src/JsonSchema/Validator.php b/src/JsonSchema/Validator.php index 86440949..a02c2e5d 100644 --- a/src/JsonSchema/Validator.php +++ b/src/JsonSchema/Validator.php @@ -44,7 +44,8 @@ class Validator extends BaseConstraint * * @return int * - * @phpstan-param Constraint::CHECK_MODE_* $checkMode + * @phpstan-param int-mask-of $checkMode + * @phpstan-return int-mask-of */ public function validate(&$value, $schema = null, $checkMode = null) {