Skip to content
This repository has been archived by the owner on Jul 3, 2020. It is now read-only.

Commit

Permalink
Fix missing new statement in cookbook examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Maks3w committed Dec 11, 2014
1 parent 1c6a7f1 commit eef686f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/07. Cookbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ class PostService
{
// First check permission
if (!$this->authorizationService->isGranted('deletePost')) {
throw UnauthorizedException('You are not allowed !');
throw new UnauthorizedException('You are not allowed !');
}

$post = $this->objectManager->find('Post', $id);
Expand Down Expand Up @@ -425,7 +425,7 @@ class PostService

// Check the permission now with a given context
if (!$this->authorizationService->isGranted('deletePost', $post)) {
throw UnauthorizedException('You are not allowed !');
throw new UnauthorizedException('You are not allowed !');
}

$this->objectManager->remove($post);
Expand Down

0 comments on commit eef686f

Please sign in to comment.