Skip to content

Commit

Permalink
Merge pull request shlinkio#13 from acelaya-forks/feature/fix-return-…
Browse files Browse the repository at this point in the history
…type

Fixed regression in DottedAccessConfigAbstractFactory
  • Loading branch information
acelaya authored Nov 1, 2021
2 parents 2cf30a0 + 8db9a72 commit 8d017be
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,23 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com), and this project adheres to [Semantic Versioning](https://semver.org).

## [1.3.1] - 2021-11-01
### Added
* *Nothing*

### Changed
* *Nothing*

### Deprecated
* *Nothing*

### Removed
* *Nothing*

### Fixed
* Fixed regression introduced on return types of `DottedAccessConfigAbstractFactory`.


## [1.3.0] - 2021-11-01
### Added
* *Nothing*
Expand Down
6 changes: 3 additions & 3 deletions src/Factory/DottedAccessConfigAbstractFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function canCreate(ContainerInterface $container, $requestedName): bool /
* @param string $requestedName
*/
// phpcs:ignore
public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null): object
public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null): mixed
{
$parts = explode('.', $requestedName);
$serviceName = array_shift($parts);
Expand All @@ -49,13 +49,13 @@ public function __invoke(ContainerInterface $container, $requestedName, ?array $
));
}

return $this->readKeysFromArray($parts, $array);
return $this->readKeysFromArray($parts, $array); // @phpstan-ignore-line
}

/**
* @throws InvalidArgumentException
*/
private function readKeysFromArray(array $keys, array|ArrayAccess $array): object
private function readKeysFromArray(array $keys, array|ArrayAccess $array): mixed
{
$key = array_shift($keys);

Expand Down

0 comments on commit 8d017be

Please sign in to comment.