Skip to content

Commit f289007

Browse files
author
Konstantin Tieber
committed
Fix typos and improve readability in documentation
1 parent f5b18ff commit f289007

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

NotModified/Annotation/ReplaceWithNotModifiedResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use Webfactory\HttpCacheBundle\NotModified\VoterInterface;
1515

1616
/**
17-
* This Annotation determines the last modified date over all of it's parameterising voters. This date is used by the
17+
* This Annotation determines the last modified date over all of its parameterised voters. This date is used by the
1818
* \Webfactory\HttpCacheBundle\NotModified\EventListener to possibly replace the execution of a controller with
1919
* sending a Not Modified HTTP response.
2020
*

NotModified/EventListener.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ public function __construct(Reader $reader, ContainerInterface $container)
5050

5151
/**
5252
* When the controller action for a request is determined, check it for a ReplaceWithNotModifiedResponse annotation.
53-
* If it determines that the underlying ressources for the response were not modified after the "If-Modified-Since"
54-
* header in the request, replace the determines controller action with an minimal action that just returns an
53+
* If it determines that the underlying resources for the response were not modified after the "If-Modified-Since"
54+
* header in the request, replace the determined controller action with a minimal action that just returns an
5555
* "empty" response with a 304 Not Modified HTTP status code.
5656
*
5757
* @param FilterControllerEvent $event

NotModified/VoterInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313

1414
/**
1515
* The ReplaceWithNotModifiedResponse method annotation is parameterised with Voters. Each Voter should determine the
16-
* last modified date of one of the various underlying ressources for a response. E.g. if your controller's indexAction
17-
* build a response containing News and Users, you can write a NewsVoter determining the date of the last published
16+
* last modified date of one of the various underlying resources for a response. E.g. if your controller's indexAction
17+
* builds a response containing News and Users, you can write a NewsVoter determining the date of the last published
1818
* News and a UserVoter determining the creation date of the last registered User.
1919
*/
2020
interface VoterInterface

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ WebfactoryHttpCacheBundle is a Symfony bundle that eases
44
[HTTP cache validation via the last modified header](https://symfony.com/doc/current/http_cache/validation.html#validation-with-the-last-modified-header).
55

66
It provides the ```ReplaceWithNotModifiedResponse``` annotation for your controller actions. This annotation can be
7-
parameterised with Voters, one for each of the underlying ressources that overall determine the last modified date for
7+
parameterised with Voters, one for each of the underlying resources, and determines the overall latest "last modified" date for
88
the response. If the client request contains an appropriate if-not-modified-since header, the execution of the
99
controller action will be skipped and an empty response with a 304 Not Modified status code will be sent. If your Voters
1010
are fast, this can improve your performance greatly.
@@ -116,8 +116,8 @@ services:
116116
```
117117

118118
Although this seems to be more code, we find it to be a good deal, as we separate the concerns better and encapsulate
119-
the tasks in a smaller units that are easier to understand and test. Another advantage becomes obvious when we have
120-
another controller action that depends on an article for it's last modified date - we can reuse the ArticleVoter and
119+
the tasks into smaller units that are easier to understand and test. Another advantage becomes obvious when we have
120+
another controller action that depends on an article for its last modified date - we can reuse the ArticleVoter and
121121
combine it with other Voters.
122122

123123

@@ -208,7 +208,7 @@ final class MyController
208208
}
209209
```
210210

211-
The most simple form of adding a Voter is passing it's fully qualfified class name:
211+
The most simple form of adding a Voter is passing its fully qualfified class name:
212212

213213
@ReplaceWithNotModifiedResponse(voters = {"\My\Namespace\MySimpleVoter"})
214214

0 commit comments

Comments
 (0)