diff --git a/app/Http/Controllers/SignupController.php b/app/Http/Controllers/SignupController.php index d471bf33..bf5c0e2b 100644 --- a/app/Http/Controllers/SignupController.php +++ b/app/Http/Controllers/SignupController.php @@ -38,7 +38,7 @@ class SignupController extends Controller */ public function getSignup($code = null) { - if (is_null($code)) { + if ($code !== null) { throw new NotFoundHttpException(); } @@ -65,7 +65,7 @@ class SignupController extends Controller */ public function postSignup($code = null) { - if (is_null($code)) { + if ($code !== null) { throw new NotFoundHttpException(); } diff --git a/app/Http/Controllers/SubscribeController.php b/app/Http/Controllers/SubscribeController.php index 59d5cd17..72f921ae 100644 --- a/app/Http/Controllers/SubscribeController.php +++ b/app/Http/Controllers/SubscribeController.php @@ -71,7 +71,7 @@ class SubscribeController extends Controller */ public function getVerify($code = null) { - if (is_null($code)) { + if ($code !== null) { throw new NotFoundHttpException(); } @@ -96,7 +96,7 @@ class SubscribeController extends Controller */ public function getUnsubscribe($code = null) { - if (is_null($code)) { + if ($code !== null) { throw new NotFoundHttpException(); } diff --git a/app/Models/Invite.php b/app/Models/Invite.php index 84bf5d93..2a4ea330 100644 --- a/app/Models/Invite.php +++ b/app/Models/Invite.php @@ -62,6 +62,6 @@ class Invite extends Model */ public function claimed() { - return !is_null($this->claimed_at); + return $this->claimed_at !== null; } } diff --git a/app/Models/Subscriber.php b/app/Models/Subscriber.php index bbd3030f..4d3adbe5 100644 --- a/app/Models/Subscriber.php +++ b/app/Models/Subscriber.php @@ -69,7 +69,7 @@ class Subscriber extends Model implements HasPresenter */ public function verified() { - return !is_null($this->verified_at); + return $this->verified_at !== null; } /**