Skip to content

Commit

Permalink
Update PasswordBroker.php (#13975)
Browse files Browse the repository at this point in the history
For posibility extending class without touching all methods
  • Loading branch information
pilot911 authored and taylorotwell committed Jun 14, 2016
1 parent 19b98fa commit 6dba0ef
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Illuminate/Auth/Passwords/PasswordBroker.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function sendResetLink(array $credentials, Closure $callback = null)
$user = $this->getUser($credentials);

if (is_null($user)) {
return PasswordBrokerContract::INVALID_USER;
return static::INVALID_USER;
}

// Once we have the reset token, we are ready to send the message out to this
Expand All @@ -92,7 +92,7 @@ public function sendResetLink(array $credentials, Closure $callback = null)

$this->emailResetLink($user, $token, $callback);

return PasswordBrokerContract::RESET_LINK_SENT;
return static::RESET_LINK_SENT;
}

/**
Expand Down Expand Up @@ -146,7 +146,7 @@ public function reset(array $credentials, Closure $callback)

$this->tokens->delete($credentials['token']);

return PasswordBrokerContract::PASSWORD_RESET;
return static::PASSWORD_RESET;
}

/**
Expand All @@ -158,15 +158,15 @@ public function reset(array $credentials, Closure $callback)
protected function validateReset(array $credentials)
{
if (is_null($user = $this->getUser($credentials))) {
return PasswordBrokerContract::INVALID_USER;
return static::INVALID_USER;
}

if (! $this->validateNewPassword($credentials)) {
return PasswordBrokerContract::INVALID_PASSWORD;
return static::INVALID_PASSWORD;
}

if (! $this->tokens->exists($user, $credentials['token'])) {
return PasswordBrokerContract::INVALID_TOKEN;
return static::INVALID_TOKEN;
}

return $user;
Expand Down

0 comments on commit 6dba0ef

Please sign in to comment.