From 40e6a216133ce4618f47684db44244568455dca5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Sun, 20 Oct 2019 08:35:33 +0200 Subject: [PATCH] Fix PSR-12 conformance --- CHANGELOG.md | 2 +- composer.json | 2 +- phpcs.xml | 17 +++++++++++++++++ src/JsonApi/Client/JsonApiAsyncClient.php | 1 + src/JsonApi/Client/JsonApiClient.php | 1 + src/JsonApi/Exception/DocumentException.php | 1 + .../Exception/JsonApiExceptionInterface.php | 1 + src/JsonApi/Exception/ResponseException.php | 1 + .../Exception/SerializationException.php | 1 + .../Hydrator/AbstractClassDocumentHydrator.php | 1 + src/JsonApi/Hydrator/ClassDocumentHydrator.php | 1 + src/JsonApi/Hydrator/ClassHydrator.php | 1 + .../Hydrator/DocumentHydratorInterface.php | 1 + src/JsonApi/Hydrator/HydratorInterface.php | 1 + src/JsonApi/Request/JsonApiRequestBuilder.php | 2 ++ src/JsonApi/Request/RelationshipInterface.php | 1 + src/JsonApi/Request/ResourceObject.php | 1 + src/JsonApi/Request/ToManyRelationship.php | 1 + src/JsonApi/Request/ToOneRelationship.php | 1 + src/JsonApi/Response/AbstractResponse.php | 1 + src/JsonApi/Response/JsonApiResponse.php | 2 ++ src/JsonApi/Schema/Document.php | 2 ++ src/JsonApi/Schema/Error/Error.php | 2 ++ src/JsonApi/Schema/Error/ErrorSource.php | 1 + src/JsonApi/Schema/JsonApiObject.php | 1 + src/JsonApi/Schema/Link/AbstractLink.php | 4 +--- src/JsonApi/Schema/Link/AbstractLinks.php | 3 +-- src/JsonApi/Schema/Link/DocumentLinks.php | 2 ++ src/JsonApi/Schema/Link/ErrorLinks.php | 2 ++ src/JsonApi/Schema/Link/Link.php | 1 + src/JsonApi/Schema/Link/ProfileLink.php | 1 + src/JsonApi/Schema/Link/RelationshipLinks.php | 4 ++++ src/JsonApi/Schema/Link/ResourceLinks.php | 4 ++++ src/JsonApi/Schema/Relationship.php | 2 ++ src/JsonApi/Schema/Resource/ResourceObject.php | 2 ++ src/JsonApi/Schema/Resource/ResourceObjects.php | 2 ++ .../Serializer/DeserializerInterface.php | 1 + src/JsonApi/Serializer/JsonDeserializer.php | 2 ++ src/JsonApi/Serializer/JsonSerializer.php | 2 ++ src/JsonApi/Serializer/SerializerInterface.php | 1 + .../Hydrator/ClassDocumentHydratorTest.php | 2 ++ tests/JsonApi/Hydrator/ClassHydratorTest.php | 1 + tests/JsonApi/Hydrator/CustomHydratorTest.php | 1 + .../Request/JsonApiRequestBuilderTest.php | 2 ++ tests/JsonApi/Request/ResourceObjectTest.php | 1 + .../JsonApi/Request/ToManyRelationshipTest.php | 1 + tests/JsonApi/Request/ToOneRelationshipTest.php | 1 + tests/JsonApi/Response/AbstractResponseTest.php | 2 ++ tests/JsonApi/Response/JsonApiResponseTest.php | 2 ++ tests/JsonApi/Schema/DocumentTest.php | 1 + tests/JsonApi/Schema/Error/ErrorSourceTest.php | 1 + tests/JsonApi/Schema/Error/ErrorTest.php | 1 + tests/JsonApi/Schema/JsonApiObjectTest.php | 1 + tests/JsonApi/Schema/Link/AbstractLinksTest.php | 1 + tests/JsonApi/Schema/Link/DocumentLinksTest.php | 1 + tests/JsonApi/Schema/Link/ErrorLinksTest.php | 1 + tests/JsonApi/Schema/Link/LinkTest.php | 1 + tests/JsonApi/Schema/Link/ProfileLinkTest.php | 1 + .../Schema/Link/RelationshipLinksTest.php | 1 + tests/JsonApi/Schema/Link/ResourceLinksTest.php | 1 + tests/JsonApi/Schema/RelationshipTest.php | 1 + .../Schema/Resource/ResourceObjectTest.php | 1 + .../Schema/Resource/ResourceObjectsTest.php | 1 + .../JsonApi/Serializer/JsonDeserializerTest.php | 2 ++ tests/JsonApi/Serializer/JsonSerializerTest.php | 2 ++ 65 files changed, 104 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 15b1d01..346a6ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ REMOVED: FIXED: -## 2.2.1 - 2019-10-19 +## 2.2.1 - 2019-10-20 FIXED: diff --git a/composer.json b/composer.json index 01a9b53..5725ae3 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ "phpstan/phpstan-phpunit": "^0.11.2", "phpstan/phpstan-strict-rules": "^0.11.0", "phpunit/phpunit": "^7.0.0||^8.2.0", - "squizlabs/php_codesniffer": "^3.4.0", + "squizlabs/php_codesniffer": "^3.5.1", "woohoolabs/coding-standard": "^1.0.0", "woohoolabs/releaser": "^1.1.0" }, diff --git a/phpcs.xml b/phpcs.xml index b90f52b..8bbedb4 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -18,4 +18,21 @@ tests/ + + + + + + + + + + + + + + + + + diff --git a/src/JsonApi/Client/JsonApiAsyncClient.php b/src/JsonApi/Client/JsonApiAsyncClient.php index 0a66ce3..463966f 100644 --- a/src/JsonApi/Client/JsonApiAsyncClient.php +++ b/src/JsonApi/Client/JsonApiAsyncClient.php @@ -1,4 +1,5 @@