@@ -22,7 +22,7 @@ Getting Started
2222===============
2323
2424The Authorization plugin integrates into your application as a middleware layer
25- and optionally a component to make checking authorization easier. First, lets
25+ and optionally a component to make checking authorization easier. First, let's
2626apply the middleware. In **src/Application.php ** add the following to the class
2727imports::
2828
@@ -31,7 +31,6 @@ imports::
3131 use Authorization\AuthorizationServiceProviderInterface;
3232 use Authorization\Middleware\AuthorizationMiddleware;
3333 use Authorization\Policy\OrmResolver;
34- use Psr\Http\Message\ResponseInterface;
3534 use Psr\Http\Message\ServerRequestInterface;
3635
3736Add the ``AuthorizationServiceProviderInterface `` to the implemented interfaces
@@ -56,7 +55,7 @@ Then make your application's ``middleware()`` method look like::
5655 // and authentication middleware.
5756 ->add(new AuthorizationMiddleware($this));
5857
59- return $middlewareQueue() ;
58+ return $middlewareQueue;
6059 }
6160
6261The placement of the ``AuthorizationMiddleware `` is important and must be added
@@ -78,7 +77,7 @@ define the ``AuthorizationService`` it wants to use. Add the following method yo
7877This configures basic :doc: `/policy-resolvers ` that will match
7978ORM entities with their policy classes.
8079
81- Next, lets add the ``AuthorizationComponent `` to ``AppController ``. In
80+ Next, let's add the ``AuthorizationComponent `` to ``AppController ``. In
8281**src/Controller/AppController.php ** add the following to the ``initialize() ``
8382method::
8483
@@ -89,7 +88,7 @@ authorization on a per-action basis more easily. For example, we can do::
8988
9089 public function edit($id = null)
9190 {
92- $article = $this->Article ->get($id);
91+ $article = $this->Articles ->get($id);
9392 $this->Authorization->authorize($article, 'update');
9493
9594 // Rest of action
0 commit comments