Skip to content

Commit

Permalink
Consistency fixes (#20)
Browse files Browse the repository at this point in the history
* Added type hints.

* Typos.
  • Loading branch information
rennokki authored Jul 30, 2018
1 parent fed4d2b commit b2ac363
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 24 deletions.
8 changes: 4 additions & 4 deletions src/Contracts/Blocker.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ interface Blocker
{
public function blocking($model = null);

public function isBlocking($model);
public function isBlocking($model): bool;

public function blocks($model);
public function blocks($model): bool;

public function block($model);
public function block($model): bool;

public function unblock($model);
public function unblock($model): bool;
}
8 changes: 4 additions & 4 deletions src/Contracts/Follower.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ interface Follower
{
public function following($model = null);

public function isFollowing($model);
public function isFollowing($model): bool;

public function follows($model);
public function follows($model): bool;

public function follow($model);
public function follow($model): bool;

public function unfollow($model);
public function unfollow($model): bool;
}
8 changes: 4 additions & 4 deletions src/Contracts/Liker.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ interface Liker
{
public function liking($model = null);

public function isLiking($model);
public function isLiking($model): bool;

public function likes($model);
public function likes($model): bool;

public function like($model);
public function like($model): bool;

public function unlike($model);
public function unlike($model): bool;
}
8 changes: 4 additions & 4 deletions src/Traits/CanBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function blocking($model = null)
* @param Model $model The model which will be checked against.
* @return bool
*/
public function isBlocking($model)
public function isBlocking($model): bool
{
if (! $model instanceof Blocker && ! $model instanceof Blocking) {
return false;
Expand All @@ -42,7 +42,7 @@ public function isBlocking($model)
* @param Model $model The model which will be checked against.
* @return bool
*/
public function blocks($model)
public function blocks($model): bool
{
return $this->isBlocking($model);
}
Expand All @@ -53,7 +53,7 @@ public function blocks($model)
* @param Model $model The model which will be blocked.
* @return bool
*/
public function block($model)
public function block($model): bool
{
if (! $model instanceof Blocker && ! $model instanceof Blocking) {
return false;
Expand All @@ -78,7 +78,7 @@ public function block($model)
* @param Model $model The model which will be unblocked.
* @return bool
*/
public function unblock($model)
public function unblock($model): bool
{
if (! $model instanceof Blocker && ! $model instanceof Blocking) {
return false;
Expand Down
8 changes: 4 additions & 4 deletions src/Traits/CanFollow.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function following($model = null)
* @param Model $model The model which will be checked against.
* @return bool
*/
public function isFollowing($model)
public function isFollowing($model): bool
{
if (! $model instanceof Follower && ! $model instanceof Following) {
return false;
Expand All @@ -42,7 +42,7 @@ public function isFollowing($model)
* @param Model $model The model which will be checked against.
* @return bool
*/
public function follows($model)
public function follows($model): bool
{
return $this->isFollowing($model);
}
Expand All @@ -53,7 +53,7 @@ public function follows($model)
* @param Model $model The model which will be followed.
* @return bool
*/
public function follow($model)
public function follow($model): bool
{
if (! $model instanceof Follower && ! $model instanceof Following) {
return false;
Expand All @@ -78,7 +78,7 @@ public function follow($model)
* @param Model $model The model which will be unfollowed.
* @return bool
*/
public function unfollow($model)
public function unfollow($model): bool
{
if (! $model instanceof Follower && ! $model instanceof Following) {
return false;
Expand Down
8 changes: 4 additions & 4 deletions src/Traits/CanLike.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function liking($model = null)
* @param Model $model The model which will be checked against.
* @return bool
*/
public function isLiking($model)
public function isLiking($model): bool
{
if (! $model instanceof Liker && ! $model instanceof Liking) {
return false;
Expand All @@ -42,7 +42,7 @@ public function isLiking($model)
* @param Model $model The model which will be checked against.
* @return bool
*/
public function likes($model)
public function likes($model): bool
{
return $this->isLiking($model);
}
Expand All @@ -53,7 +53,7 @@ public function likes($model)
* @param Model $model The model which will be liked.
* @return bool
*/
public function like($model)
public function like($model): bool
{
if (! $model instanceof Liker && ! $model instanceof Liking) {
return false;
Expand All @@ -78,7 +78,7 @@ public function like($model)
* @param Model $model The model which will be unliked.
* @return bool
*/
public function unlike($model)
public function unlike($model): bool
{
if (! $model instanceof Liker && ! $model instanceof Liking) {
return false;
Expand Down

0 comments on commit b2ac363

Please sign in to comment.