Skip to content

Commit

Permalink
revert previous bc
Browse files Browse the repository at this point in the history
Signed-off-by: gennadigennadigennadi <gennadijanzen@icloud.com>
  • Loading branch information
gennadigennadigennadi committed Oct 10, 2020
1 parent 4606ab1 commit 1797c2a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/Container/AutowireFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,9 @@ public function canCreate(ContainerInterface $container, $requestedName)
/**
* Create an instance
*
* @param string $requestedName
* @return object
*/
public function create(ContainerInterface $container, $requestedName, ?array $options = null)
public function create(ContainerInterface $container, string $requestedName, ?array $options = null)
{
return $this->getInjector($container)->create($requestedName, $options ?: []);
}
Expand Down
7 changes: 5 additions & 2 deletions src/LegacyConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function __construct($config)

/**
* @param mixed $parameters
* @return mixed
* @return mixed[]
*/
private function prepareParametersArray($parameters, string $class)
{
Expand All @@ -68,7 +68,10 @@ private function prepareParametersArray($parameters, string $class)
return $prepared;
}

private function configureInstance(iterable $config)
/**
* @param iterable $config
*/
private function configureInstance($config)
{
foreach ($config as $target => $data) {
switch ($target) {
Expand Down
2 changes: 2 additions & 0 deletions test/Resolver/DependencyResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ private function mockParameter(string $name, int $position, array $options): Par
}

private function mockClassDefinition(
string $name,
array $parameters = [],
array $interfaces = [],
array $supertypes = []
Expand Down Expand Up @@ -135,6 +136,7 @@ private function mockDefinition(array $definition)
$mock->method('getClassDefinition')
->with($class)
->willReturn($this->mockClassDefinition(
$class,
$options['parameters'],
$options['interfaces'],
$options['supertypes']
Expand Down

0 comments on commit 1797c2a

Please sign in to comment.