Skip to content

Commit

Permalink
Fix psalm config move from psalm.xml to docBlock
Browse files Browse the repository at this point in the history
  • Loading branch information
devanych committed Sep 6, 2020
1 parent d93cb87 commit f57e4e0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
7 changes: 0 additions & 7 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,4 @@
<directory name="vendor" />
</ignoreFiles>
</projectFiles>

<issueHandlers>
<ArgumentTypeCoercion errorLevel="info" />
<MixedArgument errorLevel="info" />
<MixedArgumentTypeCoercion errorLevel="info" />
<MixedAssignment errorLevel="info" />
</issueHandlers>
</psalm>
8 changes: 6 additions & 2 deletions src/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ final class Container implements ContainerInterface
private array $instances = [];

/**
* @param array $definitions
* @param array<string, mixed> $definitions
*/
public function __construct(array $definitions = [])
{
Expand All @@ -57,7 +57,8 @@ public function set(string $id, $definition): void
/**
* Sets multiple definitions at once.
*
* @param array $definitions
* @param array<string, mixed> $definitions
* @psalm-suppress MixedAssignment
*/
public function setMultiple(array $definitions): void
{
Expand Down Expand Up @@ -134,6 +135,7 @@ public function has($id): bool
* @return mixed
* @throws NotFoundException If not found definition in the container.
* @throws ContainerException If unable to create instance.
* @psalm-suppress MixedArgument
*/
private function createInstance(string $id)
{
Expand Down Expand Up @@ -162,6 +164,7 @@ private function createInstance(string $id)
* @param string $className
* @return object
* @throws ContainerException If unable to create object.
* @psalm-suppress ArgumentTypeCoercion
*/
private function createObject(string $className): object
{
Expand Down Expand Up @@ -194,6 +197,7 @@ private function createObject(string $className): object
* @param ReflectionClass $reflection
* @return object
* @throws ContainerException If unable to create object.
* @psalm-suppress MixedAssignment
*/
private function getObjectFromReflection(ReflectionClass $reflection): object
{
Expand Down

0 comments on commit f57e4e0

Please sign in to comment.