Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove phpstan resolved error and move test assets into approperiate directory #54

Merged
merged 2 commits into from
May 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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