Skip to content

Commit

Permalink
Merge pull request #32 from Dhii/fix/30-map-factory-wrong-return
Browse files Browse the repository at this point in the history
  • Loading branch information
XedinUnknown authored Sep 21, 2024
2 parents 942f511 + 7692c37 commit 5285c00
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [[*next-version*]] - YYYY-MM-DD
### Fixed
- Wrong return typehint for `MapFactoryInterface`
and `WritableMapFactoryInterface` (#32).

## [0.4.0-alpha1] - 2024-09-21
### Added
Expand Down
3 changes: 1 addition & 2 deletions src/MapFactoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
namespace Dhii\Collection;

use Exception;
use Psr\Container\ContainerInterface as BaseContainerInterface;

/**
* A factory that can create maps.
Expand All @@ -23,5 +22,5 @@ interface MapFactoryInterface extends ContainerFactoryInterface
*
* @throws Exception If problem creating.
*/
public function createContainerFromArray(array $data): BaseContainerInterface;
public function createContainerFromArray(array $data): MapInterface;
}
4 changes: 1 addition & 3 deletions src/WritableMapFactoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

namespace Dhii\Collection;

use Psr\Container\ContainerInterface as BaseContainerInterface;

/**
* Creates writable maps.
*
Expand All @@ -18,5 +16,5 @@ interface WritableMapFactoryInterface extends WritableContainerFactoryInterface,
*
* @return WritableMapInterface The new map.
*/
public function createContainerFromArray(array $data): BaseContainerInterface;
public function createContainerFromArray(array $data): WritableMapInterface;
}

0 comments on commit 5285c00

Please sign in to comment.