Skip to content

Commit

Permalink
fix phpstan errors
Browse files Browse the repository at this point in the history
  • Loading branch information
l0gicgate committed Aug 20, 2019
1 parent 2375206 commit 8e0f835
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Slim/App.php
Expand Up @@ -37,14 +37,14 @@ class App extends RouteCollectorProxy implements RequestHandlerInterface
public const VERSION = '4.1.0';

/**
* @var MiddlewareDispatcher
* @var RouteResolverInterface
*/
protected $middlewareDispatcher;
protected $routeResolver;

/**
* @var RouteResolverInterface
* @var MiddlewareDispatcherInterface
*/
protected $routeResolver;
protected $middlewareDispatcher;

/**
* @param ResponseFactoryInterface $responseFactory
Expand Down
18 changes: 16 additions & 2 deletions tests/AppTest.php
Expand Up @@ -124,7 +124,14 @@ public function testGetMiddlewareDispatcherReturnsInjectedInstance()
$responseFactoryProphecy = $this->prophesize(ResponseFactoryInterface::class);
$middlewareDispatcherProphecy = $this->prophesize(MiddlewareDispatcherInterface::class);

$app = new App($responseFactoryProphecy->reveal(), null, null, null, null, $middlewareDispatcherProphecy->reveal());
$app = new App(
$responseFactoryProphecy->reveal(),
null,
null,
null,
null,
$middlewareDispatcherProphecy->reveal()
);

$this->assertSame($middlewareDispatcherProphecy->reveal(), $app->getMiddlewareDispatcher());
}
Expand All @@ -138,7 +145,14 @@ public function testMiddlewareDispatcherGetsSeededWithInjectedInstance()
->seedMiddlewareStack(Argument::any())
->shouldBeCalledOnce();

$app = new App($responseFactoryProphecy->reveal(), null, null, null, null, $middlewareDispatcherProphecy->reveal());
$app = new App(
$responseFactoryProphecy->reveal(),
null,
null,
null,
null,
$middlewareDispatcherProphecy->reveal()
);

$this->assertSame($middlewareDispatcherProphecy->reveal(), $app->getMiddlewareDispatcher());
}
Expand Down

0 comments on commit 8e0f835

Please sign in to comment.