Skip to content

Commit 6465552

Browse files
committed
style: fix code style
1 parent e213589 commit 6465552

12 files changed

+16
-36
lines changed

src/Exceptions/HydrationException.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
namespace Swis\JsonApi\Client\Exceptions;
66

7-
use InvalidArgumentException;
8-
9-
class HydrationException extends InvalidArgumentException implements Exception
7+
class HydrationException extends \InvalidArgumentException implements Exception
108
{
119
}

src/Exceptions/MassAssignmentException.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
namespace Swis\JsonApi\Client\Exceptions;
66

7-
use RuntimeException;
8-
9-
class MassAssignmentException extends RuntimeException
7+
class MassAssignmentException extends \RuntimeException
108
{
119
}

src/Exceptions/TypeMappingException.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
namespace Swis\JsonApi\Client\Exceptions;
66

7-
use InvalidArgumentException;
8-
9-
class TypeMappingException extends InvalidArgumentException implements Exception
7+
class TypeMappingException extends \InvalidArgumentException implements Exception
108
{
119
}

src/Exceptions/UnsupportedDataException.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
namespace Swis\JsonApi\Client\Exceptions;
66

7-
use InvalidArgumentException;
8-
9-
class UnsupportedDataException extends InvalidArgumentException implements Exception
7+
class UnsupportedDataException extends \InvalidArgumentException implements Exception
108
{
119
}

src/Exceptions/ValidationException.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
namespace Swis\JsonApi\Client\Exceptions;
66

7-
use InvalidArgumentException;
8-
9-
class ValidationException extends InvalidArgumentException implements Exception
7+
class ValidationException extends \InvalidArgumentException implements Exception
108
{
119
}

src/Item.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@
44

55
namespace Swis\JsonApi\Client;
66

7-
use ArrayAccess;
87
use Illuminate\Contracts\Support\Arrayable;
98
use Illuminate\Contracts\Support\Jsonable;
10-
use JsonSerializable;
119
use Swis\JsonApi\Client\Exceptions\MassAssignmentException;
1210
use Swis\JsonApi\Client\Interfaces\ItemInterface;
1311
use Swis\JsonApi\Client\Interfaces\ManyRelationInterface;
@@ -16,7 +14,7 @@
1614
/**
1715
* @property string|null id
1816
*/
19-
class Item implements ArrayAccess, Arrayable, Jsonable, JsonSerializable, ItemInterface
17+
class Item implements \ArrayAccess, Arrayable, Jsonable, \JsonSerializable, ItemInterface
2018
{
2119
use Concerns\GuardsAttributes;
2220
use Concerns\HasAttributes;

src/Jsonapi.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@
66

77
use Illuminate\Contracts\Support\Arrayable;
88
use Illuminate\Contracts\Support\Jsonable;
9-
use JsonSerializable;
109
use Swis\JsonApi\Client\Concerns\HasMeta;
1110

12-
class Jsonapi implements Arrayable, Jsonable, JsonSerializable
11+
class Jsonapi implements Arrayable, Jsonable, \JsonSerializable
1312
{
1413
use HasMeta;
1514

src/Links.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@
44

55
namespace Swis\JsonApi\Client;
66

7-
use ArrayAccess;
87
use Illuminate\Contracts\Support\Arrayable;
98
use Illuminate\Contracts\Support\Jsonable;
10-
use JsonSerializable;
119

12-
class Links implements ArrayAccess, Arrayable, Jsonable, JsonSerializable
10+
class Links implements \ArrayAccess, Arrayable, Jsonable, \JsonSerializable
1311
{
1412
/**
1513
* @var \Swis\JsonApi\Client\Link[]

src/Meta.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@
44

55
namespace Swis\JsonApi\Client;
66

7-
use ArrayAccess;
87
use Illuminate\Contracts\Support\Arrayable;
98
use Illuminate\Contracts\Support\Jsonable;
10-
use JsonSerializable;
119

12-
class Meta implements ArrayAccess, Arrayable, Jsonable, JsonSerializable
10+
class Meta implements \ArrayAccess, Arrayable, Jsonable, \JsonSerializable
1311
{
1412
/**
1513
* @var array

src/Parsers/DocumentParser.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
namespace Swis\JsonApi\Client\Parsers;
66

7-
use JsonException;
87
use Swis\JsonApi\Client\Collection;
98
use Swis\JsonApi\Client\CollectionDocument;
109
use Swis\JsonApi\Client\Document;
@@ -129,7 +128,7 @@ private function decodeJson(string $json)
129128
{
130129
try {
131130
return json_decode($json, false, 512, JSON_THROW_ON_ERROR);
132-
} catch (JsonException $exception) {
131+
} catch (\JsonException $exception) {
133132
throw new ValidationException(sprintf('Unable to parse JSON data: %s', $exception->getMessage()), 0, $exception);
134133
}
135134
}

0 commit comments

Comments
 (0)