Skip to content

Commit

Permalink
Conform to PSR-12
Browse files Browse the repository at this point in the history
  • Loading branch information
kocsismate committed Oct 4, 2019
1 parent 4d79014 commit 4c260b6
Show file tree
Hide file tree
Showing 15 changed files with 114 additions and 99 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ REMOVED:

FIXED:

## 4.1.1 - 2019-10-04

CHANGED:

- Improved conformance to PSR-12
- Added more property type declarations

## 4.1.0 - 2019-08-21

CHANGED:
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
"phpstan/phpstan-strict-rules": "^0.11.0",
"phpunit/phpunit": "^8.3.4",
"seld/jsonlint": "^1.7.1",
"squizlabs/php_codesniffer": "^3.4.0",
"woohoolabs/coding-standard": "^2.0.1",
"woohoolabs/releaser": "^1.1.0",
"squizlabs/php_codesniffer": "^3.5.0",
"woohoolabs/coding-standard": "^2.1.1",
"woohoolabs/releaser": "^1.2.0",
"zendframework/zend-diactoros": "^2.0.0"
},
"autoload": {
Expand Down
177 changes: 87 additions & 90 deletions composer.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/Exception/JsonApiRequestException.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

namespace WoohooLabs\YinMiddleware\Exception;
Expand Down
6 changes: 3 additions & 3 deletions src/Middleware/JsonApiDispatcherMiddleware.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

namespace WoohooLabs\YinMiddleware\Middleware;
Expand All @@ -15,16 +16,15 @@
use WoohooLabs\Yin\JsonApi\Serializer\JsonSerializer;
use WoohooLabs\Yin\JsonApi\Serializer\SerializerInterface;
use WoohooLabs\YinMiddleware\Exception\JsonApiRequestException;

use function is_array;
use function is_callable;
use function is_string;

class JsonApiDispatcherMiddleware implements MiddlewareInterface
{
private ExceptionFactoryInterface $exceptionFactory;

/** @var ContainerInterface|null */
protected $container;
protected ?ContainerInterface $container;
protected SerializerInterface $serializer;
protected string $handlerAttributeName;

Expand Down
1 change: 1 addition & 0 deletions src/Middleware/JsonApiExceptionHandlerMiddleware.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

namespace WoohooLabs\YinMiddleware\Middleware;
Expand Down
1 change: 1 addition & 0 deletions src/Middleware/JsonApiRequestValidatorMiddleware.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

namespace WoohooLabs\YinMiddleware\Middleware;
Expand Down
1 change: 1 addition & 0 deletions src/Middleware/JsonApiResponseValidatorMiddleware.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

namespace WoohooLabs\YinMiddleware\Middleware;
Expand Down
1 change: 1 addition & 0 deletions src/Utils/JsonApiMessageValidator.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

namespace WoohooLabs\YinMiddleware\Utils;
Expand Down
1 change: 1 addition & 0 deletions tests/Middleware/JsonApiDispatcherMiddlewareTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

namespace WoohooLabs\YinMiddleware\Tests\Middleware;
Expand Down
2 changes: 2 additions & 0 deletions tests/Middleware/JsonApiErrorHandlerMiddlewareTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

namespace WoohooLabs\YinMiddleware\Tests\Middleware;
Expand All @@ -14,6 +15,7 @@
use WoohooLabs\YinMiddleware\Tests\Utils\DummyException;
use Zend\Diactoros\Response;
use Zend\Diactoros\ServerRequest;

use function json_decode;

class JsonApiErrorHandlerMiddlewareTest extends TestCase
Expand Down
1 change: 1 addition & 0 deletions tests/Middleware/JsonApiRequestValidatorMiddlewareTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

namespace WoohooLabs\YinMiddleware\Tests\Middleware;
Expand Down
6 changes: 3 additions & 3 deletions tests/Middleware/JsonApiResponseValidatorMiddlewareTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

namespace WoohooLabs\YinMiddleware\Tests\Middleware;
Expand Down Expand Up @@ -198,9 +199,8 @@ private function getRequest(): JsonApiRequestInterface

private function createHandler(ResponseInterface $response): RequestHandlerInterface
{
return new class($response) implements RequestHandlerInterface {
/** @var ResponseInterface */
private $response;
return new class ($response) implements RequestHandlerInterface {
private ResponseInterface $response;

public function __construct(ResponseInterface $response)
{
Expand Down
1 change: 1 addition & 0 deletions tests/Utils/DummyException.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

namespace WoohooLabs\YinMiddleware\Tests\Utils;
Expand Down
1 change: 1 addition & 0 deletions tests/Utils/FakeController.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

namespace WoohooLabs\YinMiddleware\Tests\Utils;
Expand Down

0 comments on commit 4c260b6

Please sign in to comment.