Skip to content

Commit

Permalink
Fix return type of AutoMapper::create() (#135)
Browse files Browse the repository at this point in the history
fixed #133
  • Loading branch information
Korbeil committed May 14, 2024
2 parents cc8ba91 + 6240513 commit 60d1536
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/AutoMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ public function map(array|object $source, string|array|object $target, array $co
* @param TransformerFactoryInterface[] $transformerFactories
* @param ProviderInterface[] $providers
* @param iterable<string, PropertyTransformerInterface> $propertyTransformers
*
* @return self
*/
public static function create(
Configuration $configuration = new Configuration(),
Expand All @@ -129,7 +131,7 @@ public static function create(
ExpressionLanguageProvider $expressionLanguageProvider = null,
EventDispatcherInterface $eventDispatcher = new EventDispatcher(),
iterable $providers = [],
): self {
): AutoMapperInterface {
if (class_exists(AttributeLoader::class)) {
$loaderClass = new AttributeLoader();
} elseif (class_exists(AnnotationReader::class) && class_exists(AnnotationLoader::class)) {
Expand Down

0 comments on commit 60d1536

Please sign in to comment.