Skip to content

Commit

Permalink
Remove unused use statements
Browse files Browse the repository at this point in the history
  • Loading branch information
Art4 committed Sep 23, 2019
1 parent caa44d8 commit 71b9f52
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/Helper/RootAccessable.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*
* @internal
*/
class RootAccessable implements Accessable
final class RootAccessable implements Accessable
{
use AccessableTrait;
}
6 changes: 1 addition & 5 deletions src/Serializer/ArraySerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
namespace Art4\JsonApiClient\Serializer;

use Art4\JsonApiClient\Accessable;
use Art4\JsonApiClient\ResourceNullInterface;
use Art4\JsonApiClient\V1\ResourceNull;

final class ArraySerializer implements Serializer
Expand Down Expand Up @@ -54,10 +53,7 @@ public function serialize(Accessable $data)
{
$fullArray = (bool) $this->config['recursive'];

if (
$data instanceof ResourceNull
or $data instanceof ResourceNullInterface // #TODO Don't use ResourceNullInterface anymore
) {
if ($data instanceof ResourceNull) {
return null;
}

Expand Down
8 changes: 3 additions & 5 deletions src/V1/RelationshipLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
use Art4\JsonApiClient\Exception\AccessException;
use Art4\JsonApiClient\Exception\ValidationException;
use Art4\JsonApiClient\Helper\AbstractElement;
use Art4\JsonApiClient\ResourceIdentifierCollectionInterface;

/**
* Relationship Link Object
Expand Down Expand Up @@ -80,10 +79,9 @@ protected function parse($object)
}

// Pagination links
if ($this->getParent()->has('data') and (
$this->getParent()->get('data') instanceof ResourceIdentifierCollection or
$this->getParent()->get('data') instanceof ResourceIdentifierCollectionInterface
)) {
if ($this->getParent()->has('data') and
$this->getParent()->get('data') instanceof ResourceIdentifierCollection
) {
if (array_key_exists('first', $links)) {
$this->setPaginationLink('first', $links['first']);

Expand Down
2 changes: 1 addition & 1 deletion src/V1/ResourceCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function get($key)
*
* @param object $data The resource data
*
* @return ElementInterface The resource
* @return \Art4\JsonApiClient\Accessable The resource
*/
private function parseResource($data)
{
Expand Down
1 change: 0 additions & 1 deletion src/V1/ResourceItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

namespace Art4\JsonApiClient\V1;

use Art4\JsonApiClient\DocumentInterface;
use Art4\JsonApiClient\Helper\AbstractElement;
use Art4\JsonApiClient\Exception\AccessException;
use Art4\JsonApiClient\Exception\ValidationException;
Expand Down

0 comments on commit 71b9f52

Please sign in to comment.