diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fcb46b..4ce043b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## v0.3.9 (2023-09-26) +* Converted phpstan doc comments to generic + ## v0.3.8 (2022-11-28) * Updated Dictum dependency diff --git a/README.md b/README.md index 709f885..756d8e9 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![PHP from Packagist](https://img.shields.io/packagist/php-v/decodelabs/lucid?style=flat)](https://packagist.org/packages/decodelabs/lucid) [![Latest Version](https://img.shields.io/packagist/v/decodelabs/lucid.svg?style=flat)](https://packagist.org/packages/decodelabs/lucid) [![Total Downloads](https://img.shields.io/packagist/dt/decodelabs/lucid.svg?style=flat)](https://packagist.org/packages/decodelabs/lucid) -[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/decodelabs/lucid/Integrate)](https://github.com/decodelabs/lucid/actions/workflows/integrate.yml) +[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/decodelabs/lucid/integrate.yml?branch=develop)](https://github.com/decodelabs/lucid/actions/workflows/integrate.yml) [![PHPStan](https://img.shields.io/badge/PHPStan-enabled-44CC11.svg?longCache=true&style=flat)](https://github.com/phpstan/phpstan) [![License](https://img.shields.io/packagist/l/decodelabs/lucid?style=flat)](https://packagist.org/packages/decodelabs/lucid) diff --git a/src/Lucid/Constraint/Color/MaxLightness.php b/src/Lucid/Constraint/Color/MaxLightness.php index cc2f7ec..78ce165 100644 --- a/src/Lucid/Constraint/Color/MaxLightness.php +++ b/src/Lucid/Constraint/Color/MaxLightness.php @@ -21,7 +21,7 @@ class MaxLightness implements Constraint { /** - * @phpstan-use ConstraintTrait + * @use ConstraintTrait */ use ConstraintTrait; diff --git a/src/Lucid/Constraint/Color/MaxSaturation.php b/src/Lucid/Constraint/Color/MaxSaturation.php index a3fff86..e8eda6f 100644 --- a/src/Lucid/Constraint/Color/MaxSaturation.php +++ b/src/Lucid/Constraint/Color/MaxSaturation.php @@ -21,7 +21,7 @@ class MaxSaturation implements Constraint { /** - * @phpstan-use ConstraintTrait + * @use ConstraintTrait */ use ConstraintTrait; diff --git a/src/Lucid/Constraint/Color/MinLightness.php b/src/Lucid/Constraint/Color/MinLightness.php index 23535b8..f1bb0b3 100644 --- a/src/Lucid/Constraint/Color/MinLightness.php +++ b/src/Lucid/Constraint/Color/MinLightness.php @@ -21,7 +21,7 @@ class MinLightness implements Constraint { /** - * @phpstan-use ConstraintTrait + * @use ConstraintTrait */ use ConstraintTrait; diff --git a/src/Lucid/Constraint/Color/MinSaturation.php b/src/Lucid/Constraint/Color/MinSaturation.php index 16be8ce..f33a07f 100644 --- a/src/Lucid/Constraint/Color/MinSaturation.php +++ b/src/Lucid/Constraint/Color/MinSaturation.php @@ -21,7 +21,7 @@ class MinSaturation implements Constraint { /** - * @phpstan-use ConstraintTrait + * @use ConstraintTrait */ use ConstraintTrait; diff --git a/src/Lucid/Constraint/Compass/Max.php b/src/Lucid/Constraint/Compass/Max.php index a3d72d2..c8f5a78 100644 --- a/src/Lucid/Constraint/Compass/Max.php +++ b/src/Lucid/Constraint/Compass/Max.php @@ -23,7 +23,7 @@ class Max implements Constraint { /** - * @phpstan-use ConstraintTrait + * @use ConstraintTrait */ use ConstraintTrait; diff --git a/src/Lucid/Constraint/Compass/Min.php b/src/Lucid/Constraint/Compass/Min.php index df0a5cd..156f2f7 100644 --- a/src/Lucid/Constraint/Compass/Min.php +++ b/src/Lucid/Constraint/Compass/Min.php @@ -23,7 +23,7 @@ class Min implements Constraint { /** - * @phpstan-use ConstraintTrait + * @use ConstraintTrait */ use ConstraintTrait; diff --git a/src/Lucid/Constraint/Compass/Range.php b/src/Lucid/Constraint/Compass/Range.php index e903303..0e5fc39 100644 --- a/src/Lucid/Constraint/Compass/Range.php +++ b/src/Lucid/Constraint/Compass/Range.php @@ -24,7 +24,7 @@ class Range implements Constraint { /** - * @phpstan-use ConstraintTrait + * @use ConstraintTrait */ use ConstraintTrait; diff --git a/src/Lucid/Constraint/Compass/V4.php b/src/Lucid/Constraint/Compass/V4.php index bf6b384..1062718 100644 --- a/src/Lucid/Constraint/Compass/V4.php +++ b/src/Lucid/Constraint/Compass/V4.php @@ -22,7 +22,7 @@ class V4 implements Constraint { /** - * @phpstan-use ConstraintTrait + * @use ConstraintTrait */ use ConstraintTrait; diff --git a/src/Lucid/Constraint/Compass/V6.php b/src/Lucid/Constraint/Compass/V6.php index f3bfbf7..5cdc7aa 100644 --- a/src/Lucid/Constraint/Compass/V6.php +++ b/src/Lucid/Constraint/Compass/V6.php @@ -22,7 +22,7 @@ class V6 implements Constraint { /** - * @phpstan-use ConstraintTrait + * @use ConstraintTrait */ use ConstraintTrait; diff --git a/src/Lucid/Constraint/DateTime/Max.php b/src/Lucid/Constraint/DateTime/Max.php index a7a73a3..f8e39c6 100644 --- a/src/Lucid/Constraint/DateTime/Max.php +++ b/src/Lucid/Constraint/DateTime/Max.php @@ -23,7 +23,7 @@ class Max implements Constraint { /** - * @phpstan-use ConstraintTrait + * @use ConstraintTrait */ use ConstraintTrait; diff --git a/src/Lucid/Constraint/DateTime/Min.php b/src/Lucid/Constraint/DateTime/Min.php index 981f86a..88a498a 100644 --- a/src/Lucid/Constraint/DateTime/Min.php +++ b/src/Lucid/Constraint/DateTime/Min.php @@ -23,7 +23,7 @@ class Min implements Constraint { /** - * @phpstan-use ConstraintTrait + * @use ConstraintTrait */ use ConstraintTrait; diff --git a/src/Lucid/Constraint/DateTime/Range.php b/src/Lucid/Constraint/DateTime/Range.php index b7e3f12..9b32891 100644 --- a/src/Lucid/Constraint/DateTime/Range.php +++ b/src/Lucid/Constraint/DateTime/Range.php @@ -21,7 +21,7 @@ class Range implements Constraint { /** - * @phpstan-use ConstraintTrait, Carbon> + * @use ConstraintTrait, Carbon> */ use ConstraintTrait; diff --git a/src/Lucid/Constraint/DefaultValue.php b/src/Lucid/Constraint/DefaultValue.php index 699f9bc..f5b503f 100644 --- a/src/Lucid/Constraint/DefaultValue.php +++ b/src/Lucid/Constraint/DefaultValue.php @@ -19,7 +19,7 @@ class DefaultValue implements Constraint { /** - * @phpstan-use ConstraintTrait + * @use ConstraintTrait */ use ConstraintTrait; diff --git a/src/Lucid/Constraint/Interval/Max.php b/src/Lucid/Constraint/Interval/Max.php index c2340c1..b271a69 100644 --- a/src/Lucid/Constraint/Interval/Max.php +++ b/src/Lucid/Constraint/Interval/Max.php @@ -23,7 +23,7 @@ class Max implements Constraint { /** - * @phpstan-use ConstraintTrait + * @use ConstraintTrait */ use ConstraintTrait; diff --git a/src/Lucid/Constraint/Interval/Min.php b/src/Lucid/Constraint/Interval/Min.php index 6bd4a25..49f6e1a 100644 --- a/src/Lucid/Constraint/Interval/Min.php +++ b/src/Lucid/Constraint/Interval/Min.php @@ -23,7 +23,7 @@ class Min implements Constraint { /** - * @phpstan-use ConstraintTrait + * @use ConstraintTrait */ use ConstraintTrait; diff --git a/src/Lucid/Constraint/Interval/Range.php b/src/Lucid/Constraint/Interval/Range.php index 2865580..a3ad189 100644 --- a/src/Lucid/Constraint/Interval/Range.php +++ b/src/Lucid/Constraint/Interval/Range.php @@ -21,7 +21,7 @@ class Range implements Constraint { /** - * @phpstan-use ConstraintTrait, CarbonInterval> + * @use ConstraintTrait, CarbonInterval> */ use ConstraintTrait; diff --git a/src/Lucid/Constraint/Number/Max.php b/src/Lucid/Constraint/Number/Max.php index 077e041..3a94336 100644 --- a/src/Lucid/Constraint/Number/Max.php +++ b/src/Lucid/Constraint/Number/Max.php @@ -20,7 +20,7 @@ class Max implements Constraint { /** - * @phpstan-use ConstraintTrait + * @use ConstraintTrait */ use ConstraintTrait; diff --git a/src/Lucid/Constraint/Number/Min.php b/src/Lucid/Constraint/Number/Min.php index 5d7fe91..4f0e052 100644 --- a/src/Lucid/Constraint/Number/Min.php +++ b/src/Lucid/Constraint/Number/Min.php @@ -20,7 +20,7 @@ class Min implements Constraint { /** - * @phpstan-use ConstraintTrait + * @use ConstraintTrait */ use ConstraintTrait; diff --git a/src/Lucid/Constraint/Number/Range.php b/src/Lucid/Constraint/Number/Range.php index 878c49f..9e1cf25 100644 --- a/src/Lucid/Constraint/Number/Range.php +++ b/src/Lucid/Constraint/Number/Range.php @@ -18,7 +18,7 @@ class Range implements Constraint { /** - * @phpstan-use ConstraintTrait, int|float> + * @use ConstraintTrait, int|float> */ use ConstraintTrait; diff --git a/src/Lucid/Constraint/Required.php b/src/Lucid/Constraint/Required.php index cda8554..74690c9 100644 --- a/src/Lucid/Constraint/Required.php +++ b/src/Lucid/Constraint/Required.php @@ -21,7 +21,7 @@ class Required implements Constraint { /** - * @phpstan-use ConstraintTrait + * @use ConstraintTrait */ use ConstraintTrait; diff --git a/src/Lucid/Constraint/Sanitize.php b/src/Lucid/Constraint/Sanitize.php index db4154d..3cedf6a 100644 --- a/src/Lucid/Constraint/Sanitize.php +++ b/src/Lucid/Constraint/Sanitize.php @@ -19,7 +19,7 @@ class Sanitize implements Constraint { /** - * @phpstan-use ConstraintTrait + * @use ConstraintTrait */ use ConstraintTrait; diff --git a/src/Lucid/Constraint/String/Emojis.php b/src/Lucid/Constraint/String/Emojis.php index f7284ab..390b963 100644 --- a/src/Lucid/Constraint/String/Emojis.php +++ b/src/Lucid/Constraint/String/Emojis.php @@ -20,7 +20,7 @@ class Emojis implements Constraint { /** - * @phpstan-use ConstraintTrait + * @use ConstraintTrait */ use ConstraintTrait; diff --git a/src/Lucid/Constraint/String/MaxLength.php b/src/Lucid/Constraint/String/MaxLength.php index db597e6..00607f0 100644 --- a/src/Lucid/Constraint/String/MaxLength.php +++ b/src/Lucid/Constraint/String/MaxLength.php @@ -21,7 +21,7 @@ class MaxLength implements Constraint { /** - * @phpstan-use ConstraintTrait + * @use ConstraintTrait */ use ConstraintTrait; diff --git a/src/Lucid/Constraint/String/MaxWords.php b/src/Lucid/Constraint/String/MaxWords.php index d98a497..1fd20ad 100644 --- a/src/Lucid/Constraint/String/MaxWords.php +++ b/src/Lucid/Constraint/String/MaxWords.php @@ -22,7 +22,7 @@ class MaxWords implements Constraint { /** - * @phpstan-use ConstraintTrait + * @use ConstraintTrait */ use ConstraintTrait; diff --git a/src/Lucid/Constraint/String/MinLength.php b/src/Lucid/Constraint/String/MinLength.php index 9450713..79218f1 100644 --- a/src/Lucid/Constraint/String/MinLength.php +++ b/src/Lucid/Constraint/String/MinLength.php @@ -21,7 +21,7 @@ class MinLength implements Constraint { /** - * @phpstan-use ConstraintTrait + * @use ConstraintTrait */ use ConstraintTrait; diff --git a/src/Lucid/Constraint/String/MinWords.php b/src/Lucid/Constraint/String/MinWords.php index e0078bd..e874a3b 100644 --- a/src/Lucid/Constraint/String/MinWords.php +++ b/src/Lucid/Constraint/String/MinWords.php @@ -22,7 +22,7 @@ class MinWords implements Constraint { /** - * @phpstan-use ConstraintTrait + * @use ConstraintTrait */ use ConstraintTrait; diff --git a/src/Lucid/Constraint/String/Pattern.php b/src/Lucid/Constraint/String/Pattern.php index 1a34fd4..67c3e19 100644 --- a/src/Lucid/Constraint/String/Pattern.php +++ b/src/Lucid/Constraint/String/Pattern.php @@ -20,7 +20,7 @@ class Pattern implements Constraint { /** - * @phpstan-use ConstraintTrait + * @use ConstraintTrait */ use ConstraintTrait; diff --git a/src/Lucid/Constraint/String/Trim.php b/src/Lucid/Constraint/String/Trim.php index 2d65a5a..2d75273 100644 --- a/src/Lucid/Constraint/String/Trim.php +++ b/src/Lucid/Constraint/String/Trim.php @@ -18,7 +18,7 @@ class Trim implements Constraint { /** - * @phpstan-use ConstraintTrait + * @use ConstraintTrait */ use ConstraintTrait; diff --git a/src/Lucid/Constraint/Validate.php b/src/Lucid/Constraint/Validate.php index 0a34962..33927e9 100644 --- a/src/Lucid/Constraint/Validate.php +++ b/src/Lucid/Constraint/Validate.php @@ -21,7 +21,7 @@ class Validate implements Constraint { /** - * @phpstan-use ConstraintTrait, string> + * @use ConstraintTrait, string> */ use ConstraintTrait; diff --git a/src/Lucid/Processor/BoolNative.php b/src/Lucid/Processor/BoolNative.php index 4358b0e..8bdc77a 100644 --- a/src/Lucid/Processor/BoolNative.php +++ b/src/Lucid/Processor/BoolNative.php @@ -20,7 +20,7 @@ class BoolNative implements Processor { /** - * @phpstan-use ProcessorTrait + * @use ProcessorTrait */ use ProcessorTrait; diff --git a/src/Lucid/Processor/Camel.php b/src/Lucid/Processor/Camel.php index 39c5c0c..6049c5a 100644 --- a/src/Lucid/Processor/Camel.php +++ b/src/Lucid/Processor/Camel.php @@ -20,7 +20,7 @@ class Camel implements Processor { /** - * @phpstan-use ProcessorTrait + * @use ProcessorTrait */ use ProcessorTrait; diff --git a/src/Lucid/Processor/Color.php b/src/Lucid/Processor/Color.php index e7f34c2..d998e35 100644 --- a/src/Lucid/Processor/Color.php +++ b/src/Lucid/Processor/Color.php @@ -20,7 +20,7 @@ class Color implements Processor { /** - * @phpstan-use ProcessorTrait + * @use ProcessorTrait */ use ProcessorTrait; diff --git a/src/Lucid/Processor/Date.php b/src/Lucid/Processor/Date.php index 983d85b..4df6455 100644 --- a/src/Lucid/Processor/Date.php +++ b/src/Lucid/Processor/Date.php @@ -23,7 +23,7 @@ class Date implements Processor { /** - * @phpstan-use ProcessorTrait + * @use ProcessorTrait */ use ProcessorTrait; diff --git a/src/Lucid/Processor/Email.php b/src/Lucid/Processor/Email.php index 17d2e98..43adc84 100644 --- a/src/Lucid/Processor/Email.php +++ b/src/Lucid/Processor/Email.php @@ -21,7 +21,7 @@ class Email implements Processor { /** - * @phpstan-use ProcessorTrait + * @use ProcessorTrait */ use ProcessorTrait; diff --git a/src/Lucid/Processor/FloatNative.php b/src/Lucid/Processor/FloatNative.php index 602c68b..c8b285f 100644 --- a/src/Lucid/Processor/FloatNative.php +++ b/src/Lucid/Processor/FloatNative.php @@ -19,7 +19,7 @@ class FloatNative implements Processor { /** - * @phpstan-use ProcessorTrait + * @use ProcessorTrait */ use ProcessorTrait; diff --git a/src/Lucid/Processor/IntNative.php b/src/Lucid/Processor/IntNative.php index f780fb5..41b868b 100644 --- a/src/Lucid/Processor/IntNative.php +++ b/src/Lucid/Processor/IntNative.php @@ -19,7 +19,7 @@ class IntNative implements Processor { /** - * @phpstan-use ProcessorTrait + * @use ProcessorTrait */ use ProcessorTrait; diff --git a/src/Lucid/Processor/Interval.php b/src/Lucid/Processor/Interval.php index b08ed31..aaa24eb 100644 --- a/src/Lucid/Processor/Interval.php +++ b/src/Lucid/Processor/Interval.php @@ -22,7 +22,7 @@ class Interval implements Processor { /** - * @phpstan-use ProcessorTrait + * @use ProcessorTrait */ use ProcessorTrait; diff --git a/src/Lucid/Processor/Ip.php b/src/Lucid/Processor/Ip.php index e0c1186..be1d60f 100644 --- a/src/Lucid/Processor/Ip.php +++ b/src/Lucid/Processor/Ip.php @@ -21,7 +21,7 @@ class Ip implements Processor { /** - * @phpstan-use ProcessorTrait + * @use ProcessorTrait */ use ProcessorTrait; diff --git a/src/Lucid/Processor/IpRange.php b/src/Lucid/Processor/IpRange.php index 900bcc4..4dda0ab 100644 --- a/src/Lucid/Processor/IpRange.php +++ b/src/Lucid/Processor/IpRange.php @@ -23,7 +23,7 @@ class IpRange implements Processor { /** - * @phpstan-use ProcessorTrait + * @use ProcessorTrait */ use ProcessorTrait; diff --git a/src/Lucid/Processor/ListNative.php b/src/Lucid/Processor/ListNative.php index 723a194..7ed53f9 100644 --- a/src/Lucid/Processor/ListNative.php +++ b/src/Lucid/Processor/ListNative.php @@ -19,12 +19,12 @@ class ListNative implements Processor { /** - * @phpstan-use ProcessorTrait> + * @use ProcessorTrait> */ use ProcessorTrait; /** - * @phpstan-var Processor + * @var Processor */ protected ?Processor $childType = null; @@ -40,7 +40,7 @@ public function isMultiValue(): bool /** - * @phpstan-param Processor $processor + * @param Processor $processor */ public function setChildType(Processor $processor): void { @@ -50,7 +50,7 @@ public function setChildType(Processor $processor): void /** * Get child type * - * @phpstan-return Processor + * @return Processor */ public function getChildType(): ?Processor { @@ -62,7 +62,7 @@ public function getChildType(): ?Processor /** * Convert prepared value to bool or null * - * @phpstan-return array|null + * @return array|null */ public function coerce(mixed $value): ?array { diff --git a/src/Lucid/Processor/Name.php b/src/Lucid/Processor/Name.php index 455e591..7779da3 100644 --- a/src/Lucid/Processor/Name.php +++ b/src/Lucid/Processor/Name.php @@ -20,7 +20,7 @@ class Name implements Processor { /** - * @phpstan-use ProcessorTrait + * @use ProcessorTrait */ use ProcessorTrait; diff --git a/src/Lucid/Processor/PathSlug.php b/src/Lucid/Processor/PathSlug.php index ed69089..aa84f55 100644 --- a/src/Lucid/Processor/PathSlug.php +++ b/src/Lucid/Processor/PathSlug.php @@ -20,7 +20,7 @@ class PathSlug implements Processor { /** - * @phpstan-use ProcessorTrait + * @use ProcessorTrait */ use ProcessorTrait; diff --git a/src/Lucid/Processor/Slug.php b/src/Lucid/Processor/Slug.php index 00a800b..ea52a2a 100644 --- a/src/Lucid/Processor/Slug.php +++ b/src/Lucid/Processor/Slug.php @@ -20,7 +20,7 @@ class Slug implements Processor { /** - * @phpstan-use ProcessorTrait + * @use ProcessorTrait */ use ProcessorTrait; diff --git a/src/Lucid/Processor/StringNative.php b/src/Lucid/Processor/StringNative.php index fa36876..8984e80 100644 --- a/src/Lucid/Processor/StringNative.php +++ b/src/Lucid/Processor/StringNative.php @@ -20,7 +20,7 @@ class StringNative implements Processor { /** - * @phpstan-use ProcessorTrait + * @use ProcessorTrait */ use ProcessorTrait; diff --git a/src/Lucid/Processor/Url.php b/src/Lucid/Processor/Url.php index d977edb..72e8620 100644 --- a/src/Lucid/Processor/Url.php +++ b/src/Lucid/Processor/Url.php @@ -21,7 +21,7 @@ class Url implements Processor { /** - * @phpstan-use ProcessorTrait + * @use ProcessorTrait */ use ProcessorTrait; diff --git a/src/Lucid/ProcessorTrait.php b/src/Lucid/ProcessorTrait.php index 839a31d..3aebb8b 100644 --- a/src/Lucid/ProcessorTrait.php +++ b/src/Lucid/ProcessorTrait.php @@ -21,7 +21,7 @@ trait ProcessorTrait { /** - * @phpstan-var array> + * @var array> */ protected array $constraints = []; diff --git a/src/Lucid/Sanitizer/ValueContainer.php b/src/Lucid/Sanitizer/ValueContainer.php index 52a2ec2..185e8d6 100644 --- a/src/Lucid/Sanitizer/ValueContainer.php +++ b/src/Lucid/Sanitizer/ValueContainer.php @@ -131,7 +131,7 @@ public function validate( * Load processor for value * * @param array|Closure|null $setup - * @phpstan-return Processor + * @return Processor */ public function loadProcessor( string $type, diff --git a/stubs/DecodeLabs/Lucid.php b/stubs/DecodeLabs/Lucid.php index b92b5c3..f8889f5 100644 --- a/stubs/DecodeLabs/Lucid.php +++ b/stubs/DecodeLabs/Lucid.php @@ -16,7 +16,7 @@ class Lucid implements Proxy { use ProxyTrait; - const VENEER = 'DecodeLabs\Lucid'; + const VENEER = 'DecodeLabs\\Lucid'; const VENEER_TARGET = Inst::class; public static Inst $instance;