Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upadate the key of table name of password #549

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
general updates
  • Loading branch information
impleri committed Jun 27, 2015
commit a8627758958851313ccdc4cc45a29133cd966182
4 changes: 2 additions & 2 deletions src/Confide/CacheLoginThrottleService.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ class CacheLoginThrottleService implements LoginThrottleServiceInterface
/**
* Laravel application.
*
* @var \Illuminate\Foundation\Application
* @var \Illuminate\Contracts\Foundation\Application
*/
public $app;

/**
* Create a new PasswordService.
*
* @param \Illuminate\Foundation\Application $app Laravel application object.
* @param \Illuminate\Contracts\Foundation\Application $app Laravel application object.
*/
public function __construct(Application $app)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Confide/Confide.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Confide
/**
* Laravel application.
*
* @var \Illuminate\Foundation\Application
* @var \Illuminate\Contracts\Foundation\Application
*/
public $app;

Expand Down Expand Up @@ -46,7 +46,7 @@ class Confide
* @param \Zizaco\Confide\RepositoryInterface $repo
* @param \Zizaco\Confide\PasswordServiceInterface $passService
* @param \Zizaco\Confide\LoginThrottleServiceInterface $loginThrottler
* @param \Illuminate\Foundation\Application $app Laravel application object
* @param \Illuminate\Contracts\Foundation\Application $app Laravel application object
*
* @return void
*/
Expand Down
10 changes: 5 additions & 5 deletions src/Confide/EloquentPasswordService.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php namespace Zizaco\Confide;

use Illuminate\Contracts\Auth\Authenticable;
use Illuminate\Contracts\Auth\Authenticatable;
use Illuminate\Contracts\Foundation\Application;

/**
Expand All @@ -14,14 +14,14 @@ class EloquentPasswordService implements PasswordServiceInterface
/**
* Laravel application.
*
* @var \Illuminate\Foundation\Application
* @var \Illuminate\Contracts\Foundation\Application
*/
public $app;

/**
* Create a new PasswordService.
*
* @param \Illuminate\Foundation\Application $app Laravel application object
* @param \Illuminate\Contracts\Foundation\Application $app Laravel application object
*/
public function __construct(Application $app)
{
Expand All @@ -33,11 +33,11 @@ public function __construct(Application $app)
* the 'password_reminders' table with the email of the
* user.
*
* @param Authenticable $user An existent user.
* @param Authenticatable $user An existent user.
*
* @return string Password reset token.
*/
public function requestChangePassword(Authenticable $user)
public function requestChangePassword(Authenticatable $user)
{
$email = $user->getReminderEmail();
$token = $this->generateToken();
Expand Down
6 changes: 3 additions & 3 deletions src/Confide/EloquentRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class EloquentRepository implements RepositoryInterface
/**
* Laravel application.
*
* @var \Illuminate\Foundation\Application
* @var \Illuminate\Contracts\Foundation\Application
*/
public $app;

Expand All @@ -30,7 +30,7 @@ class EloquentRepository implements RepositoryInterface
/**
* Create a new ConfideRepository
*
* @param \Illuminate\Foundation\Application $app Laravel application object
* @param \Illuminate\Contracts\Foundation\Application $app Laravel application object
*/
public function __construct(Application $app)
{
Expand Down Expand Up @@ -68,7 +68,7 @@ public function getUserByIdentity($identity)
{
$user = $this->model();

$user = $user->where(function($user) use ($identity) {
$user = $user->where(function ($user) use ($identity) {
foreach ($identity as $attribute => $value) {
$user = $user->orWhere($attribute, '=', $value);
}
Expand Down
6 changes: 3 additions & 3 deletions src/Confide/PasswordServiceInterface.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php namespace Zizaco\Confide;

use Illuminate\Contracts\Auth\Authenticable;
use Illuminate\Contracts\Auth\Authenticatable;

/**
* A service that abstracts all user password management related methods.
Expand All @@ -14,11 +14,11 @@ interface PasswordServiceInterface
* Generate a token for password change and saves it in the
* 'password_reminders' table with the email of the user.
*
* @param RemindableInterface $user An existent user.
* @param Authenticatable $user An existent user.
*
* @return string Password reset token.
*/
public function requestChangePassword(Authenticable $user);
public function requestChangePassword(Authenticatable $user);

/**
* Returns the email associated with the given reset password token.
Expand Down
2 changes: 1 addition & 1 deletion tests/Confide/ConfideTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ public function testShouldForgotPassword()
$loginThrottler = m::mock('Zizaco\Confide\LoginThrottleServiceInterface');
$confide = new Confide($repo, $passService, $loginThrottler, $app);

$user = m::mock('Illuminate\Contracts\Auth\Authenticable');
$user = m::mock('Illuminate\Contracts\Auth\Authenticatable');
$user->email = '[email protected]';
$generatedToken = '12345';

Expand Down
2 changes: 1 addition & 1 deletion tests/Confide/EloquentPasswordServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function testSouldRequestChangePassword()
$generatedToken = '123456789';

$app = m::mock('Illuminate\Contracts\Foundation\Application');
$user = m::mock('Illuminate\Contracts\Auth\Authenticable');
$user = m::mock('Illuminate\Contracts\Auth\Authenticatable');
$passService = m::mock('Zizaco\Confide\EloquentPasswordService[generateToken,sendEmail,getTable]', [$app]);
$db = m::mock('connection');

Expand Down