Skip to content

Commit

Permalink
Merge pull request #54 from sjokkateer/minor
Browse files Browse the repository at this point in the history
Remove phpstan resolved error and move test assets into approperiate directory
  • Loading branch information
Ocramius authored May 16, 2022
2 parents 80c90d6 + e852cfa commit 23bca94
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 12 deletions.
2 changes: 1 addition & 1 deletion phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@

<exclude-pattern><![CDATA[*/test/_files/*]]></exclude-pattern>
<!-- Excluded since phpcs does not yet provide intersection types -->
<exclude-pattern>./test/Classes/IntersectionTypeConstructorDependency.php</exclude-pattern>
<exclude-pattern>./test/TestAsset/Constructor/IntersectionTypeConstructorDependency.php</exclude-pattern>
<rule ref="LaminasCodingStandard"/>
</ruleset>
5 changes: 0 additions & 5 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -280,11 +280,6 @@ parameters:
count: 1
path: src/Resolver/AbstractInjection.php

-
message: "#^Property Laminas\\\\Di\\\\Resolver\\\\DependencyResolver\\:\\:\\$gettypeMap has no typehint specified\\.$#"
count: 1
path: src/Resolver/DependencyResolver.php

-
message: "#^Method Laminas\\\\Di\\\\Resolver\\\\DependencyResolver\\:\\:getConfiguredParameters\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
Expand Down
6 changes: 2 additions & 4 deletions test/Definition/Reflection/ParameterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

use Laminas\Di\Definition\Reflection\Parameter;
use Laminas\Di\Exception\UnsupportedReflectionTypeException;
use LaminasTest\Di\Classes\IntersectionTypeConstructorDependency;
use LaminasTest\Di\Classes\UnionTypeConstructorDependency;
use LaminasTest\Di\TestAsset;
use PHPUnit\Framework\TestCase;
use ReflectionClass;
Expand Down Expand Up @@ -117,7 +115,7 @@ public function testGivenUnionTypeToParameterExpectedUnexpectedValueExceptionThr
{
$this->expectException(UnsupportedReflectionTypeException::class);

$class = UnionTypeConstructorDependency::class;
$class = TestAsset\Constructor\UnionTypeConstructorDependency::class;
$parameters = (new ReflectionClass($class))->getConstructor()->getParameters();
$param = new Parameter($parameters[0]);

Expand All @@ -131,7 +129,7 @@ public function testGivenIntersectionTypeToParameterExpectedUnexpectedValueExcep
{
$this->expectException(UnsupportedReflectionTypeException::class);

$class = IntersectionTypeConstructorDependency::class;
$class = TestAsset\Constructor\IntersectionTypeConstructorDependency::class;
$parameters = (new ReflectionClass($class))->getConstructor()->getParameters();
$param = new Parameter($parameters[0]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace LaminasTest\Di\Classes;
namespace LaminasTest\Di\TestAsset\Constructor;

use Countable;
use Iterator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace LaminasTest\Di\Classes;
namespace LaminasTest\Di\TestAsset\Constructor;

use Countable;
use stdClass;
Expand Down

0 comments on commit 23bca94

Please sign in to comment.