Skip to content

Commit

Permalink
fix: rename namespace <Resource> to <Resources>
Browse files Browse the repository at this point in the history
  • Loading branch information
Ark4ne committed Apr 23, 2022
1 parent 4677829 commit 8450b9b
Show file tree
Hide file tree
Showing 27 changed files with 37 additions and 39 deletions.
4 changes: 1 addition & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,7 @@ protected function toMeta(Request $request): ?iterable;
Example:

```php
use Ark4ne\JsonApi\Resource\JsonApiResource;
use Illuminate\Http\Request;
use DateTimeInterface;
use Ark4ne\JsonApi\Resources\JsonApiResource;use Illuminate\Http\Request;

class UserResource extends JsonApiResource
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Ark4ne\JsonApi\Resource\Concerns;
namespace Ark4ne\JsonApi\Resources\Concerns;

use Ark4ne\JsonApi\Support\Fields;
use Illuminate\Http\Request;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Ark4ne\JsonApi\Resource\Concerns;
namespace Ark4ne\JsonApi\Resources\Concerns;

use Ark4ne\JsonApi\Support\Includes;
use Illuminate\Http\Request;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Ark4ne\JsonApi\Resource\Concerns;
namespace Ark4ne\JsonApi\Resources\Concerns;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Http\Request;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Ark4ne\JsonApi\Resource\Concerns;
namespace Ark4ne\JsonApi\Resources\Concerns;

use Illuminate\Http\Request;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Ark4ne\JsonApi\Resource\Concerns;
namespace Ark4ne\JsonApi\Resources\Concerns;

use Illuminate\Http\Request;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace Ark4ne\JsonApi\Resource\Concerns;
namespace Ark4ne\JsonApi\Resources\Concerns;

use Ark4ne\JsonApi\Resource\Relationship;
use Ark4ne\JsonApi\Resources\Relationship;
use Closure;

trait Relationize
Expand All @@ -12,7 +12,7 @@ trait Relationize
* @param \Closure|null $links
* @param \Closure|null $meta
*
* @return \Ark4ne\JsonApi\Resource\Relationship<static>
* @return \Ark4ne\JsonApi\Resources\Relationship<static>
*/
public static function relationship(
Closure $value,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace Ark4ne\JsonApi\Resource\Concerns;
namespace Ark4ne\JsonApi\Resources\Concerns;

use Ark4ne\JsonApi\Resource\Relationship;
use Ark4ne\JsonApi\Resources\Relationship;
use Ark4ne\JsonApi\Support\Includes;
use Illuminate\Http\Request;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace Ark4ne\JsonApi\Resource\Concerns;
namespace Ark4ne\JsonApi\Resources\Concerns;

use Ark4ne\JsonApi\Resource\JsonApiCollection;
use Ark4ne\JsonApi\Resources\JsonApiCollection;
use Ark4ne\JsonApi\Support\FakeModel;
use Illuminate\Http\Request;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Ark4ne\JsonApi\Resource\Concerns;
namespace Ark4ne\JsonApi\Resources\Concerns;

use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Ark4ne\JsonApi\Resource;
namespace Ark4ne\JsonApi\Resources;

use Ark4ne\JsonApi\Support\With;
use Illuminate\Http\Resources\Json\JsonResource;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace Ark4ne\JsonApi\Resource;
namespace Ark4ne\JsonApi\Resources;

use Ark4ne\JsonApi\Resource\Concerns;
use Ark4ne\JsonApi\Resources\Concerns;
use Ark4ne\JsonApi\Support\With;
use Illuminate\Http\Resources\Json\JsonResource;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Ark4ne\JsonApi\Resource;
namespace Ark4ne\JsonApi\Resources;

use Closure;
use Illuminate\Http\Resources\Json\JsonResource;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Ark4ne\JsonApi\Resource;
namespace Ark4ne\JsonApi\Resources;

interface Resourceable
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/SchemaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Test\Feature;

use Ark4ne\JsonApi\Resource\JsonApiCollection;
use Ark4ne\JsonApi\Resources\JsonApiCollection;
use Test\app\Http\Resources\CommentResource;
use Test\app\Http\Resources\PostResource;
use Test\app\Http\Resources\UserResource;
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Resources/Concerns/AttributesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Test\Unit\Resources\Concerns;

use Ark4ne\JsonApi\Resource\Concerns\Attributes;
use Ark4ne\JsonApi\Resources\Concerns\Attributes;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
use Test\Support\Reflect;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Test\Unit\Resources\Concerns;

use Ark4ne\JsonApi\Resource\Concerns\ConditionallyLoadsAttributes;
use Ark4ne\JsonApi\Resources\Concerns\ConditionallyLoadsAttributes;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
use Illuminate\Http\Resources\MissingValue;
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Resources/Concerns/IdentifierTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Test\Unit\Resources\Concerns;

use Ark4ne\JsonApi\Resource\Concerns\Identifier;
use Ark4ne\JsonApi\Resources\Concerns\Identifier;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
use Illuminate\Support\Str;
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Resources/Concerns/LinksTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Test\Unit\Resources\Concerns;

use Ark4ne\JsonApi\Resource\Concerns\Links;
use Ark4ne\JsonApi\Resources\Concerns\Links;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
use Test\Support\Reflect;
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Resources/Concerns/MetaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Test\Unit\Resources\Concerns;

use Ark4ne\JsonApi\Resource\Concerns\Meta;
use Ark4ne\JsonApi\Resources\Concerns\Meta;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
use Test\Support\Reflect;
Expand Down
6 changes: 3 additions & 3 deletions tests/Unit/Resources/Concerns/RelationshipsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Test\Unit\Resources\Concerns;

use Ark4ne\JsonApi\Resource\Concerns\Relationships;
use Ark4ne\JsonApi\Resource\Relationship;
use Ark4ne\JsonApi\Resource\Resourceable;
use Ark4ne\JsonApi\Resources\Concerns\Relationships;
use Ark4ne\JsonApi\Resources\Relationship;
use Ark4ne\JsonApi\Resources\Resourceable;
use Ark4ne\JsonApi\Support\Includes;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
Expand Down
4 changes: 2 additions & 2 deletions tests/Unit/Resources/JsonApiCollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Test\Unit\Resources;

use Ark4ne\JsonApi\Resource\JsonApiCollection;
use Ark4ne\JsonApi\Resource\Resourceable;
use Ark4ne\JsonApi\Resources\JsonApiCollection;
use Ark4ne\JsonApi\Resources\Resourceable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
Expand Down
4 changes: 2 additions & 2 deletions tests/Unit/Resources/JsonApiResourceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Test\Unit\Resources;

use Ark4ne\JsonApi\Resource\JsonApiCollection;
use Ark4ne\JsonApi\Resource\JsonApiResource;
use Ark4ne\JsonApi\Resources\JsonApiCollection;
use Ark4ne\JsonApi\Resources\JsonApiResource;
use Illuminate\Http\Request;
use Test\Support\Stub;
use Test\TestCase;
Expand Down
4 changes: 2 additions & 2 deletions tests/Unit/Resources/RelationshipTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Test\Unit\Resources;

use Ark4ne\JsonApi\Resource\Relationship;
use Ark4ne\JsonApi\Resource\Resourceable;
use Ark4ne\JsonApi\Resources\Relationship;
use Ark4ne\JsonApi\Resources\Resourceable;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
use Illuminate\Http\Resources\Json\ResourceCollection;
Expand Down
2 changes: 1 addition & 1 deletion tests/app/Http/Resources/CommentResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Test\app\Http\Resources;

use Ark4ne\JsonApi\Resource\JsonApiResource;
use Ark4ne\JsonApi\Resources\JsonApiResource;
use DateTimeInterface;
use Illuminate\Http\Request;

Expand Down
2 changes: 1 addition & 1 deletion tests/app/Http/Resources/PostResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Test\app\Http\Resources;

use Ark4ne\JsonApi\Resource\JsonApiResource;
use Ark4ne\JsonApi\Resources\JsonApiResource;
use DateTimeInterface;
use Illuminate\Http\Request;

Expand Down
2 changes: 1 addition & 1 deletion tests/app/Http/Resources/UserResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Test\app\Http\Resources;

use Ark4ne\JsonApi\Resource\JsonApiResource;
use Ark4ne\JsonApi\Resources\JsonApiResource;
use DateTimeInterface;
use Illuminate\Http\Request;

Expand Down

0 comments on commit 8450b9b

Please sign in to comment.