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

spelling and grammar fixes #189

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/laravel-impersonate.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
'session_key' => 'impersonated_by',

/**
* The session key used to stored the original user guard.
* The session key used to store the original user guard.
*/
'session_guard' => 'impersonator_guard',

Expand Down
6 changes: 3 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ route('impersonate.leave')

### Defining impersonation authorization

By default all users can **impersonate** an user.
By default, all users can **impersonate** a user.
You need to add the method `canImpersonate()` to your user model:

```php
Expand All @@ -117,7 +117,7 @@ You need to add the method `canImpersonate()` to your user model:
}
```

By default all users can **be impersonated**.
By default, all users can **be impersonated**.
You need to add the method `canBeImpersonated()` to your user model to extend this behavior:

```php
Expand Down Expand Up @@ -180,7 +180,7 @@ There are two events available that can be used to improve your workflow:
- `TakeImpersonation` is fired when an impersonation is taken.
- `LeaveImpersonation` is fired when an impersonation is leaved.

Each events returns two properties `$event->impersonator` and `$event->impersonated` containing User model instance.
Each event returns two properties `$event->impersonator` and `$event->impersonated` containing User model instance.

## Configuration

Expand Down
4 changes: 2 additions & 2 deletions src/Models/Impersonate.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
trait Impersonate
{
/**
* Return true or false if the user can impersonate an other user.
* Return true or false if the user can impersonate another user.
*
* @param void
* @return bool
Expand All @@ -19,7 +19,7 @@ public function canImpersonate()
}

/**
* Return true or false if the user can be impersonate.
* Return true or false if the user can be impersonated.
*
* @param void
* @return bool
Expand Down
4 changes: 2 additions & 2 deletions tests/MiddlewareProtectFromImpersonationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ protected function logout()
}

/** @test */
public function it_can_acces_when_no_impersonating()
public function it_can_access_when_no_impersonating()
{
$this->actingAs($this->user);
$return = $this->middleware->handle($this->request, function () {
Expand All @@ -50,7 +50,7 @@ public function it_can_acces_when_no_impersonating()
}

/** @test */
public function it_cant_acces_when_impersonating()
public function it_cant_access_when_impersonating()
{
$this->actingAs($this->admin);
$this->admin->impersonate($this->user);
Expand Down