Skip to content

Commit

Permalink
fix: signature of Map attributes transformer property
Browse files Browse the repository at this point in the history
  • Loading branch information
JorickPepin committed Oct 16, 2024
1 parent 253325d commit 1ad4779
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
16 changes: 8 additions & 8 deletions src/Attribute/MapFrom.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
final readonly class MapFrom
{
/**
* @param class-string<object>|'array'|array<class-string<object>|'array'>|null $source The specific source class name or array. If null this attribute will be used for all source classes.
* @param string|null $property The source property name. If null, the target property name will be used.
* @param int|null $maxDepth The maximum depth of the mapping. If null, the default max depth will be used.
* @param string|callable(mixed $value, object $object): mixed|null $transformer A transformer id or a callable that transform the value during mapping
* @param bool|null $ignore If true, the property will be ignored during mapping
* @param string|null $if The condition to map the property, using the expression language
* @param string[]|null $groups The groups to map the property
* @param string|null $dateTimeFormat The date-time format to use when transforming this property
* @param class-string<object>|'array'|array<class-string<object>|'array'>|null $source The specific source class name or array. If null this attribute will be used for all source classes.
* @param string|null $property The source property name. If null, the target property name will be used.
* @param int|null $maxDepth The maximum depth of the mapping. If null, the default max depth will be used.
* @param string|callable(mixed $value, object|array $source, array $context): mixed $transformer A transformer id or a callable that transform the value during mapping
* @param bool|null $ignore If true, the property will be ignored during mapping
* @param string|null $if The condition to map the property, using the expression language
* @param string[]|null $groups The groups to map the property
* @param string|null $dateTimeFormat The date-time format to use when transforming this property
*/
public function __construct(

Check failure on line 23 in src/Attribute/MapFrom.php

View workflow job for this annotation

GitHub Actions / phpstan

Method AutoMapper\Attribute\MapFrom::__construct() has parameter $transformer with no value type specified in iterable type array.

Check failure on line 23 in src/Attribute/MapFrom.php

View workflow job for this annotation

GitHub Actions / phpstan

Method AutoMapper\Attribute\MapFrom::__construct() has parameter $transformer with no value type specified in iterable type array.

Check failure on line 23 in src/Attribute/MapFrom.php

View workflow job for this annotation

GitHub Actions / phpstan

Method AutoMapper\Attribute\MapFrom::__construct() has parameter $transformer with no value type specified in iterable type array.

Check failure on line 23 in src/Attribute/MapFrom.php

View workflow job for this annotation

GitHub Actions / phpstan

Method AutoMapper\Attribute\MapFrom::__construct() has parameter $transformer with no value type specified in iterable type array.
public string|array|null $source = null,
Expand Down
16 changes: 8 additions & 8 deletions src/Attribute/MapTo.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
final readonly class MapTo
{
/**
* @param class-string<object>|'array'|array<class-string<object>|'array'>|null $target The specific target class name or array. If null this attribute will be used for all target classes.
* @param string|null $property The target property name. If null, the source property name will be used.
* @param int|null $maxDepth The maximum depth of the mapping. If null, the default max depth will be used.
* @param string|callable(mixed $value, object $object): mixed|null $transformer A transformer id or a callable that transform the value during mapping
* @param bool|null $ignore If true, the property will be ignored during mapping
* @param string|null $if The condition to map the property, using the expression language
* @param string[]|null $groups The groups to map the property
* @param string|null $dateTimeFormat The date-time format to use when transforming this property
* @param class-string<object>|'array'|array<class-string<object>|'array'>|null $target The specific target class name or array. If null this attribute will be used for all target classes.
* @param string|null $property The target property name. If null, the source property name will be used.
* @param int|null $maxDepth The maximum depth of the mapping. If null, the default max depth will be used.
* @param string|callable(mixed $value, object|array $source, array $context): mixed $transformer A transformer id or a callable that transform the value during mapping
* @param bool|null $ignore If true, the property will be ignored during mapping
* @param string|null $if The condition to map the property, using the expression language
* @param string[]|null $groups The groups to map the property
* @param string|null $dateTimeFormat The date-time format to use when transforming this property
*/
public function __construct(

Check failure on line 23 in src/Attribute/MapTo.php

View workflow job for this annotation

GitHub Actions / phpstan

Method AutoMapper\Attribute\MapTo::__construct() has parameter $transformer with no value type specified in iterable type array.

Check failure on line 23 in src/Attribute/MapTo.php

View workflow job for this annotation

GitHub Actions / phpstan

Method AutoMapper\Attribute\MapTo::__construct() has parameter $transformer with no value type specified in iterable type array.

Check failure on line 23 in src/Attribute/MapTo.php

View workflow job for this annotation

GitHub Actions / phpstan

Method AutoMapper\Attribute\MapTo::__construct() has parameter $transformer with no value type specified in iterable type array.

Check failure on line 23 in src/Attribute/MapTo.php

View workflow job for this annotation

GitHub Actions / phpstan

Method AutoMapper\Attribute\MapTo::__construct() has parameter $transformer with no value type specified in iterable type array.
public string|array|null $target = null,
Expand Down

0 comments on commit 1ad4779

Please sign in to comment.