Skip to content

Commit

Permalink
Using correct interface checks & docs update (Fixes #27) (#28)
Browse files Browse the repository at this point in the history
* Reverted back to Follower.

* Fixed documentation on blocking() and liking()
  • Loading branch information
rennokki authored Aug 25, 2018
1 parent 736aeb6 commit 5136d53
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
8 changes: 4 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ $user->block($user);
$user->block($page);
$user->unblock($user);

$user->blockings(); // Users that this user blocks.
$user->blockings(Page::class); // Pages that this user blocks.
$user->blocking(); // Users that this user blocks.
$user->blocking(Page::class); // Pages that this user blocks.
$user->blockers(); // Users that block this user.
$user->blockers(Page::class); // Pages that block this user.

Expand Down Expand Up @@ -223,8 +223,8 @@ $user->like($user);
$user->like($page);
$user->unlike($page);

$user->likings(); // Users that this user likes.
$user->likings(Page::class); // Pages that this user likes.
$user->liking(); // Users that this user likes.
$user->liking(Page::class); // Pages that this user likes.
$user->likers(); // Users that like this user.
$user->likers(Page::class); // Pages that like this user.

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

use Rennokki\Befriended\Contracts\Follower;
use Rennokki\Befriended\Contracts\Following;
use Rennokki\Befriended\Contracts\Followable;

trait CanFollow
{
Expand All @@ -31,7 +30,7 @@ public function following($model = null)
*/
public function isFollowing($model): bool
{
if (! $model instanceof Followable && ! $model instanceof Following) {
if (! $model instanceof Follower && ! $model instanceof Following) {
return false;
}

Expand All @@ -57,7 +56,7 @@ public function follows($model): bool
*/
public function follow($model): bool
{
if (! $model instanceof Followable && ! $model instanceof Following) {
if (! $model instanceof Follower && ! $model instanceof Following) {
return false;
}

Expand All @@ -82,7 +81,7 @@ public function follow($model): bool
*/
public function unfollow($model): bool
{
if (! $model instanceof Followable && ! $model instanceof Following) {
if (! $model instanceof Follower && ! $model instanceof Following) {
return false;
}

Expand Down

0 comments on commit 5136d53

Please sign in to comment.