Skip to content

Commit

Permalink
Rename namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
zingimmick committed Feb 9, 2021
1 parent 99a8db8 commit 1df6572
Show file tree
Hide file tree
Showing 17 changed files with 71 additions and 71 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ composer require laravel-interaction/bookmark

```php
use Illuminate\Database\Eloquent\Model;
use Zing\LaravelBookmark\Concerns\Bookmarker;
use LaravelInteraction\Bookmark\Concerns\Bookmarker;

class User extends Model
{
Expand All @@ -38,7 +38,7 @@ class User extends Model

```php
use Illuminate\Database\Eloquent\Model;
use Zing\LaravelBookmark\Concerns\Bookmarkable;
use LaravelInteraction\Bookmark\Concerns\Bookmarkable;

class Channel extends Model
{
Expand All @@ -49,9 +49,9 @@ class Channel extends Model
### Bookmarker

```php
use Zing\LaravelBookmark\Tests\Models\Channel;
/** @var \Zing\LaravelBookmark\Tests\Models\User $user */
/** @var \Zing\LaravelBookmark\Tests\Models\Channel $channel */
use LaravelInteraction\Bookmark\Tests\Models\Channel;
/** @var \LaravelInteraction\Bookmark\Tests\Models\User $user */
/** @var \LaravelInteraction\Bookmark\Tests\Models\Channel $channel */
// Bookmark to Bookmarkable
$user->bookmark($channel);
$user->unbookmark($channel);
Expand All @@ -77,10 +77,10 @@ Channel::query()->whereNotBookmarkedBy($user)->get();
### Bookmarkable

```php
use Zing\LaravelBookmark\Tests\Models\User;
use Zing\LaravelBookmark\Tests\Models\Channel;
/** @var \Zing\LaravelBookmark\Tests\Models\User $user */
/** @var \Zing\LaravelBookmark\Tests\Models\Channel $channel */
use LaravelInteraction\Bookmark\Tests\Models\User;
use LaravelInteraction\Bookmark\Tests\Models\Channel;
/** @var \LaravelInteraction\Bookmark\Tests\Models\User $user */
/** @var \LaravelInteraction\Bookmark\Tests\Models\Channel $channel */
// Compare Bookmarker
$channel->isBookmarkedBy($user);
$channel->isNotBookmarkedBy($user);
Expand All @@ -102,8 +102,8 @@ $channels->each(function (Channel $channel){

| Event | Fired |
| --- | --- |
| `Zing\LaravelBookmark\Events\Bookmarked` | When an object get bookmarked. |
| `Zing\LaravelBookmark\Events\Unbookmarked` | When an object get unbookmarked. |
| `LaravelInteraction\Bookmark\Events\Bookmarked` | When an object get bookmarked. |
| `LaravelInteraction\Bookmark\Events\Unbookmarked` | When an object get unbookmarked. |

## License

Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@
},
"autoload": {
"psr-4": {
"Zing\\LaravelBookmark\\": "src"
"LaravelInteraction\\Bookmark\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"Zing\\LaravelBookmark\\Tests\\": "tests"
"LaravelInteraction\\Bookmark\\Tests\\": "tests"
}
},
"extra": {
"laravel": {
"providers": [
"Zing\\LaravelBookmark\\BookmarkServiceProvider"
"LaravelInteraction\\Bookmark\\BookmarkServiceProvider"
]
}
},
Expand Down
2 changes: 1 addition & 1 deletion config/bookmark.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

use Zing\LaravelBookmark\Bookmark;
use LaravelInteraction\Bookmark\Bookmark;

return [
'load_migrations' => true,
Expand Down
10 changes: 5 additions & 5 deletions src/Bookmark.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@

declare(strict_types=1);

namespace Zing\LaravelBookmark;
namespace LaravelInteraction\Bookmark;

use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\MorphPivot;
use Illuminate\Database\Eloquent\Relations\MorphTo;
use Illuminate\Support\Str;
use Zing\LaravelBookmark\Events\Bookmarked;
use Zing\LaravelBookmark\Events\Unbookmarked;
use LaravelInteraction\Bookmark\Events\Bookmarked;
use LaravelInteraction\Bookmark\Events\Unbookmarked;

/**
* @property \Illuminate\Database\Eloquent\Model $user
* @property \Illuminate\Database\Eloquent\Model $bookmarker
* @property \Illuminate\Database\Eloquent\Model $bookmarkable
*
* @method static \Zing\LaravelBookmark\Bookmark|\Illuminate\Database\Eloquent\Builder withType(string $type)
* @method static \Zing\LaravelBookmark\Bookmark|\Illuminate\Database\Eloquent\Builder query()
* @method static \LaravelInteraction\Bookmark\Bookmark|\Illuminate\Database\Eloquent\Builder withType(string $type)
* @method static \LaravelInteraction\Bookmark\Bookmark|\Illuminate\Database\Eloquent\Builder query()
*/
class Bookmark extends MorphPivot
{
Expand Down
2 changes: 1 addition & 1 deletion src/BookmarkServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Zing\LaravelBookmark;
namespace LaravelInteraction\Bookmark;

use Illuminate\Support\ServiceProvider;

Expand Down
6 changes: 3 additions & 3 deletions src/Concerns/Bookmarkable.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Zing\LaravelBookmark\Concerns;
namespace LaravelInteraction\Bookmark\Concerns;

use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
Expand All @@ -11,8 +11,8 @@
use function is_a;

/**
* @property-read \Illuminate\Database\Eloquent\Collection|\Zing\LaravelBookmark\Bookmark[] $bookmarkableBookmarks
* @property-read \Illuminate\Database\Eloquent\Collection|\Zing\LaravelBookmark\Concerns\Bookmarker[] $bookmarkers
* @property-read \Illuminate\Database\Eloquent\Collection|\LaravelInteraction\Bookmark\Bookmark[] $bookmarkableBookmarks
* @property-read \Illuminate\Database\Eloquent\Collection|\LaravelInteraction\Bookmark\Concerns\Bookmarker[] $bookmarkers
* @property-read int|null $bookmarkers_count
*
* @method static static|\Illuminate\Database\Eloquent\Builder whereBookmarkedBy(\Illuminate\Database\Eloquent\Model $user)
Expand Down
4 changes: 2 additions & 2 deletions src/Concerns/Bookmarker.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

declare(strict_types=1);

namespace Zing\LaravelBookmark\Concerns;
namespace LaravelInteraction\Bookmark\Concerns;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\MorphToMany;

/**
* @property-read \Illuminate\Database\Eloquent\Collection|\Zing\LaravelBookmark\Bookmark[] $bookmarkerBookmarks
* @property-read \Illuminate\Database\Eloquent\Collection|\LaravelInteraction\Bookmark\Bookmark[] $bookmarkerBookmarks
* @property-read int|null $bookmarkerBookmarks_count
*/
trait Bookmarker
Expand Down
2 changes: 1 addition & 1 deletion src/Events/Bookmarked.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Zing\LaravelBookmark\Events;
namespace LaravelInteraction\Bookmark\Events;

use Illuminate\Database\Eloquent\Model;

Expand Down
2 changes: 1 addition & 1 deletion src/Events/Unbookmarked.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Zing\LaravelBookmark\Events;
namespace LaravelInteraction\Bookmark\Events;

use Illuminate\Database\Eloquent\Model;

Expand Down
14 changes: 7 additions & 7 deletions tests/BookmarkTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,27 @@

declare(strict_types=1);

namespace Zing\LaravelBookmark\Tests;
namespace LaravelInteraction\Bookmark\Tests;

use Illuminate\Support\Carbon;
use Zing\LaravelBookmark\Bookmark;
use Zing\LaravelBookmark\Tests\Models\Channel;
use Zing\LaravelBookmark\Tests\Models\User;
use LaravelInteraction\Bookmark\Bookmark;
use LaravelInteraction\Bookmark\Tests\Models\Channel;
use LaravelInteraction\Bookmark\Tests\Models\User;

class BookmarkTest extends TestCase
{
/**
* @var \Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Eloquent\Model|\Zing\LaravelBookmark\Tests\Models\User
* @var \Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Eloquent\Model|\LaravelInteraction\Bookmark\Tests\Models\User
*/
protected $user;

/**
* @var \Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Eloquent\Model|\Zing\LaravelBookmark\Tests\Models\Channel
* @var \Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Eloquent\Model|\LaravelInteraction\Bookmark\Tests\Models\Channel
*/
protected $channel;

/**
* @var \Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Eloquent\Model|object|\Zing\LaravelBookmark\Bookmark|null
* @var \Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Eloquent\Model|object|\LaravelInteraction\Bookmark\Bookmark|null
*/
protected $bookmark;

Expand Down
22 changes: 11 additions & 11 deletions tests/Concerns/BookmarkableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

declare(strict_types=1);

namespace Zing\LaravelBookmark\Tests\Concerns;
namespace LaravelInteraction\Bookmark\Tests\Concerns;

use LaravelInteraction\Bookmark\Tests\Models\Channel;
use LaravelInteraction\Bookmark\Tests\Models\User;
use LaravelInteraction\Bookmark\Tests\TestCase;
use Mockery;
use Zing\LaravelBookmark\Tests\Models\Channel;
use Zing\LaravelBookmark\Tests\Models\User;
use Zing\LaravelBookmark\Tests\TestCase;

class BookmarkableTest extends TestCase
{
Expand All @@ -22,7 +22,7 @@ public function modelClasses(): array
/**
* @dataProvider modelClasses
*
* @param \Zing\LaravelBookmark\Tests\Models\User|\Zing\LaravelBookmark\Tests\Models\Channel|string $modelClass
* @param \LaravelInteraction\Bookmark\Tests\Models\User|\LaravelInteraction\Bookmark\Tests\Models\Channel|string $modelClass
*/
public function testBookmarkableBookmarks(string $modelClass): void
{
Expand All @@ -36,7 +36,7 @@ public function testBookmarkableBookmarks(string $modelClass): void
/**
* @dataProvider modelClasses
*
* @param \Zing\LaravelBookmark\Tests\Models\User|\Zing\LaravelBookmark\Tests\Models\Channel|string $modelClass
* @param \LaravelInteraction\Bookmark\Tests\Models\User|\LaravelInteraction\Bookmark\Tests\Models\Channel|string $modelClass
*/
public function testBookmarkersCount(string $modelClass): void
{
Expand Down Expand Up @@ -88,7 +88,7 @@ public function testBookmarkersCountForHumans($actual, $onePrecision, $twoPrecis
/**
* @dataProvider modelClasses
*
* @param \Zing\LaravelBookmark\Tests\Models\User|\Zing\LaravelBookmark\Tests\Models\Channel|string $modelClass
* @param \LaravelInteraction\Bookmark\Tests\Models\User|\LaravelInteraction\Bookmark\Tests\Models\Channel|string $modelClass
*/
public function testIsBookmarkedBy(string $modelClass): void
{
Expand All @@ -107,7 +107,7 @@ public function testIsBookmarkedBy(string $modelClass): void
/**
* @dataProvider modelClasses
*
* @param \Zing\LaravelBookmark\Tests\Models\User|\Zing\LaravelBookmark\Tests\Models\Channel|string $modelClass
* @param \LaravelInteraction\Bookmark\Tests\Models\User|\LaravelInteraction\Bookmark\Tests\Models\Channel|string $modelClass
*/
public function testIsNotBookmarkedBy(string $modelClass): void
{
Expand All @@ -126,7 +126,7 @@ public function testIsNotBookmarkedBy(string $modelClass): void
/**
* @dataProvider modelClasses
*
* @param \Zing\LaravelBookmark\Tests\Models\User|\Zing\LaravelBookmark\Tests\Models\Channel|string $modelClass
* @param \LaravelInteraction\Bookmark\Tests\Models\User|\LaravelInteraction\Bookmark\Tests\Models\Channel|string $modelClass
*/
public function testBookmarkers(string $modelClass): void
{
Expand All @@ -141,7 +141,7 @@ public function testBookmarkers(string $modelClass): void
/**
* @dataProvider modelClasses
*
* @param \Zing\LaravelBookmark\Tests\Models\User|\Zing\LaravelBookmark\Tests\Models\Channel|string $modelClass
* @param \LaravelInteraction\Bookmark\Tests\Models\User|\LaravelInteraction\Bookmark\Tests\Models\Channel|string $modelClass
*/
public function testScopeWhereBookmarkedBy(string $modelClass): void
{
Expand All @@ -156,7 +156,7 @@ public function testScopeWhereBookmarkedBy(string $modelClass): void
/**
* @dataProvider modelClasses
*
* @param \Zing\LaravelBookmark\Tests\Models\User|\Zing\LaravelBookmark\Tests\Models\Channel|string $modelClass
* @param \LaravelInteraction\Bookmark\Tests\Models\User|\LaravelInteraction\Bookmark\Tests\Models\Channel|string $modelClass
*/
public function testScopeWhereNotBookmarkedBy(string $modelClass): void
{
Expand Down
10 changes: 5 additions & 5 deletions tests/Concerns/BookmarkerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

declare(strict_types=1);

namespace Zing\LaravelBookmark\Tests\Concerns;
namespace LaravelInteraction\Bookmark\Tests\Concerns;

use Zing\LaravelBookmark\Bookmark;
use Zing\LaravelBookmark\Tests\Models\Channel;
use Zing\LaravelBookmark\Tests\Models\User;
use Zing\LaravelBookmark\Tests\TestCase;
use LaravelInteraction\Bookmark\Bookmark;
use LaravelInteraction\Bookmark\Tests\Models\Channel;
use LaravelInteraction\Bookmark\Tests\Models\User;
use LaravelInteraction\Bookmark\Tests\TestCase;

class BookmarkerTest extends TestCase
{
Expand Down
10 changes: 5 additions & 5 deletions tests/Events/BookmarkedTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

declare(strict_types=1);

namespace Zing\LaravelBookmark\Tests\Events;
namespace LaravelInteraction\Bookmark\Tests\Events;

use Illuminate\Support\Facades\Event;
use Zing\LaravelBookmark\Events\Bookmarked;
use Zing\LaravelBookmark\Tests\Models\Channel;
use Zing\LaravelBookmark\Tests\Models\User;
use Zing\LaravelBookmark\Tests\TestCase;
use LaravelInteraction\Bookmark\Events\Bookmarked;
use LaravelInteraction\Bookmark\Tests\Models\Channel;
use LaravelInteraction\Bookmark\Tests\Models\User;
use LaravelInteraction\Bookmark\Tests\TestCase;

class BookmarkedTest extends TestCase
{
Expand Down
10 changes: 5 additions & 5 deletions tests/Events/UnbookmarkedTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

declare(strict_types=1);

namespace Zing\LaravelBookmark\Tests\Events;
namespace LaravelInteraction\Bookmark\Tests\Events;

use Illuminate\Support\Facades\Event;
use Zing\LaravelBookmark\Events\Unbookmarked;
use Zing\LaravelBookmark\Tests\Models\Channel;
use Zing\LaravelBookmark\Tests\Models\User;
use Zing\LaravelBookmark\Tests\TestCase;
use LaravelInteraction\Bookmark\Events\Unbookmarked;
use LaravelInteraction\Bookmark\Tests\Models\Channel;
use LaravelInteraction\Bookmark\Tests\Models\User;
use LaravelInteraction\Bookmark\Tests\TestCase;

class UnbookmarkedTest extends TestCase
{
Expand Down
6 changes: 3 additions & 3 deletions tests/Models/Channel.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

declare(strict_types=1);

namespace Zing\LaravelBookmark\Tests\Models;
namespace LaravelInteraction\Bookmark\Tests\Models;

use Illuminate\Database\Eloquent\Model;
use Zing\LaravelBookmark\Concerns\Bookmarkable;
use LaravelInteraction\Bookmark\Concerns\Bookmarkable;

/**
* @method static \Zing\LaravelBookmark\Tests\Models\Channel|\Illuminate\Database\Eloquent\Builder query()
* @method static \LaravelInteraction\Bookmark\Tests\Models\Channel|\Illuminate\Database\Eloquent\Builder query()
*/
class Channel extends Model
{
Expand Down
8 changes: 4 additions & 4 deletions tests/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

declare(strict_types=1);

namespace Zing\LaravelBookmark\Tests\Models;
namespace LaravelInteraction\Bookmark\Tests\Models;

use Illuminate\Database\Eloquent\Model;
use Zing\LaravelBookmark\Concerns\Bookmarkable;
use Zing\LaravelBookmark\Concerns\Bookmarker;
use LaravelInteraction\Bookmark\Concerns\Bookmarkable;
use LaravelInteraction\Bookmark\Concerns\Bookmarker;

/**
* @method static \Zing\LaravelBookmark\Tests\Models\User|\Illuminate\Database\Eloquent\Builder query()
* @method static \LaravelInteraction\Bookmark\Tests\Models\User|\Illuminate\Database\Eloquent\Builder query()
*/
class User extends Model
{
Expand Down
Loading

0 comments on commit 1df6572

Please sign in to comment.