Skip to content

Commit e3fcd97

Browse files
committed
change params
1 parent 80db8a0 commit e3fcd97

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Illuminate/Auth/SessionGuard.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -379,11 +379,11 @@ public function attempt(array $credentials = [], $remember = false)
379379
* Attempt to authenticate a user with credentials and additional callbacks.
380380
*
381381
* @param array $credentials
382-
* @param false $remember
383382
* @param array|callable $callbacks
383+
* @param false $remember
384384
* @return bool
385385
*/
386-
public function attemptWith(array $credentials = [], $remember = false, $callbacks = null)
386+
public function attemptWhen(array $credentials = [], $callbacks = null, $remember = false)
387387
{
388388
$this->fireAttemptEvent($credentials, $remember);
389389

tests/Auth/AuthGuardTest.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,14 @@ public function testAttemptAndWithCallbacks()
145145
$mock->getProvider()->shouldReceive('validateCredentials')->twice()->andReturnTrue();
146146
$mock->getProvider()->shouldReceive('validateCredentials')->once()->andReturnFalse();
147147

148-
$this->assertTrue($mock->attemptWith(['foo'], false, function ($user, $guard) {
148+
$this->assertTrue($mock->attemptWhen(['foo'], function ($user, $guard) {
149149
static::assertInstanceOf(Authenticatable::class, $user);
150150
static::assertInstanceOf(SessionGuard::class, $guard);
151151

152152
return true;
153153
}));
154154

155-
$this->assertFalse($mock->attemptWith(['foo'], false, function ($user, $guard) {
155+
$this->assertFalse($mock->attemptWhen(['foo'], function ($user, $guard) {
156156
static::assertInstanceOf(Authenticatable::class, $user);
157157
static::assertInstanceOf(SessionGuard::class, $guard);
158158

@@ -161,7 +161,7 @@ public function testAttemptAndWithCallbacks()
161161

162162
$executed = false;
163163

164-
$this->assertFalse($mock->attemptWith(['foo'], false, function () use (&$executed) {
164+
$this->assertFalse($mock->attemptWhen(['foo'], false, function () use (&$executed) {
165165
return $executed = true;
166166
}));
167167

0 commit comments

Comments
 (0)