Skip to content

Commit

Permalink
Merge pull request #9 from ncou/analysis-zGA5ME
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
ncou committed May 26, 2019
2 parents cd7cbf7 + d2e46fd commit e1046f3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 18 deletions.
8 changes: 1 addition & 7 deletions src/Dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,8 @@

namespace Chiron\Pipe;

use Chiron\Pipe\Decorator\CallableMiddleware;
use Chiron\Pipe\Decorator\FixedResponseMiddleware;
use Chiron\Pipe\Decorator\LazyLoadingMiddleware;
use Chiron\Pipe\Decorator\RequestHandlerMiddleware;
use InvalidArgumentException;
use OutOfBoundsException;
use LogicException;
use Psr\Container\ContainerInterface;
use OutOfBoundsException;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\MiddlewareInterface;
Expand Down
1 change: 0 additions & 1 deletion src/Pipeline.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
use Chiron\Pipe\Decorator\LazyLoadingMiddleware;
use Chiron\Pipe\Decorator\RequestHandlerMiddleware;
use InvalidArgumentException;
use OutOfBoundsException;
use Psr\Container\ContainerInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
Expand Down
13 changes: 4 additions & 9 deletions tests/DispatcherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,11 @@

namespace Chiron\Tests\Pipe;

use Chiron\Http\Psr\Response;
use Chiron\Http\Psr\ServerRequest;
use Chiron\Http\Psr\Uri;
use Chiron\Pipe\Decorator\CallableMiddleware;
use Chiron\Pipe\Decorator\FixedResponseMiddleware;
use Chiron\Pipe\Dispatcher;
use PHPUnit\Framework\TestCase;
use Psr\Container\ContainerInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Server\RequestHandlerInterface;
use Psr\Http\Server\MiddlewareInterface;

class DispatcherTest extends TestCase
Expand Down Expand Up @@ -69,8 +64,8 @@ public function testDispatcherAcceptsASingleArgument()
public function testDispatcherThrowExceptionForInvalidMultipleArguments()
{
$middleware = new CallableMiddleware(function ($request, $handler) {
$response = $handler->handle($request);
});
$response = $handler->handle($request);
});

$dispatcher = new Dispatcher($middleware, 'invalid type');

Expand All @@ -84,8 +79,8 @@ public function testDispatcherThrowExceptionForInvalidMultipleArguments()
public function testDispatcherThrowExceptionForInvalidSingleArrayArgument()
{
$middleware = new CallableMiddleware(function ($request, $handler) {
$response = $handler->handle($request);
});
$response = $handler->handle($request);
});

$dispatcher = new Dispatcher([$middleware, 'invalid type']);

Expand Down
1 change: 0 additions & 1 deletion tests/PipelineTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -285,5 +285,4 @@ public function testExceptionWhenIncompatibleTypeIsUsed()
$pipeline = new Pipeline();
$pipeline->pipe(123456);
}

}

0 comments on commit e1046f3

Please sign in to comment.