Skip to content

Commit a307efe

Browse files
authored
Merge pull request #368 from FriendsOfSymfony/analysis-8K2ABe
Apply fixes from StyleCI
2 parents a79f41e + f31c713 commit a307efe

24 files changed

+74
-67
lines changed

src/CacheInvalidator.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public function __construct(ProxyClientInterface $cache)
9696
* refreshPath works and INVALIDATE is about all other invalidation
9797
* methods.
9898
*
99-
* @param string $operation one of the class constants.
99+
* @param string $operation one of the class constants
100100
*
101101
* @return bool
102102
*
@@ -123,7 +123,7 @@ public function supports($operation)
123123
*
124124
* @return $this
125125
*
126-
* @throws \Exception When trying to override the event dispatcher.
126+
* @throws \Exception when trying to override the event dispatcher
127127
*/
128128
public function setEventDispatcher(EventDispatcherInterface $eventDispatcher)
129129
{
@@ -156,7 +156,7 @@ public function getEventDispatcher()
156156
*
157157
* @return $this
158158
*
159-
* @deprecated Use getEventDispatcher()->addSubscriber($subscriber) instead.
159+
* @deprecated use getEventDispatcher()->addSubscriber($subscriber) instead
160160
*/
161161
public function addSubscriber(EventSubscriberInterface $subscriber)
162162
{
@@ -172,7 +172,7 @@ public function addSubscriber(EventSubscriberInterface $subscriber)
172172
*
173173
* @return $this
174174
*
175-
* @deprecated Use constructor argument to TagHandler instead.
175+
* @deprecated use constructor argument to TagHandler instead
176176
*/
177177
public function setTagsHeader($tagsHeader)
178178
{
@@ -188,7 +188,7 @@ public function setTagsHeader($tagsHeader)
188188
*
189189
* @return string
190190
*
191-
* @deprecated Use TagHandler::getTagsHeaderName instead.
191+
* @deprecated use TagHandler::getTagsHeaderName instead
192192
*/
193193
public function getTagsHeader()
194194
{
@@ -247,7 +247,7 @@ public function refreshPath($path, array $headers = array())
247247
*
248248
* @see BanInterface::ban()
249249
*
250-
* @param array $headers HTTP headers that path must match to be banned.
250+
* @param array $headers HTTP headers that path must match to be banned
251251
*
252252
* @throws UnsupportedProxyOperationException If HTTP cache does not support BAN requests
253253
*
@@ -275,12 +275,12 @@ public function invalidate(array $headers)
275275
*
276276
* @see BanInterface::banPath()
277277
*
278-
* @param string $path Regular expression pattern for URI to
279-
* invalidate.
280-
* @param string $contentType Regular expression pattern for the content
281-
* type to limit banning, for instance 'text'.
282-
* @param array|string $hosts Regular expression of a host name or list of
283-
* exact host names to limit banning.
278+
* @param string $path regular expression pattern for URI to
279+
* invalidate
280+
* @param string $contentType regular expression pattern for the content
281+
* type to limit banning, for instance 'text'
282+
* @param array|string $hosts regular expression of a host name or list of
283+
* exact host names to limit banning
284284
*
285285
* @throws UnsupportedProxyOperationException If HTTP cache does not support BAN requests
286286
*
@@ -307,7 +307,7 @@ public function invalidateRegex($path, $contentType = null, $hosts = null)
307307
*
308308
* @return $this
309309
*
310-
* @deprecated Use TagHandler::invalidateTags instead.
310+
* @deprecated use TagHandler::invalidateTags instead
311311
*/
312312
public function invalidateTags(array $tags)
313313
{
@@ -323,9 +323,9 @@ public function invalidateTags(array $tags)
323323
/**
324324
* Send all pending invalidation requests.
325325
*
326-
* @return int The number of cache invalidations performed per caching server.
326+
* @return int the number of cache invalidations performed per caching server
327327
*
328-
* @throws ExceptionCollection If any errors occurred during flush.
328+
* @throws ExceptionCollection if any errors occurred during flush
329329
*/
330330
public function flush()
331331
{

src/Exception/InvalidUrlException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
class InvalidUrlException extends InvalidArgumentException implements HttpCacheExceptionInterface
1818
{
1919
/**
20-
* @param string $url The invalid URL.
20+
* @param string $url the invalid URL
2121
* @param string $reason Further explanation why the URL was invalid (optional)
2222
*
2323
* @return InvalidUrlException

src/Exception/MissingHostException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
class MissingHostException extends \RuntimeException implements HttpCacheExceptionInterface
1919
{
2020
/**
21-
* @param string $path The path that was asked to be invalidated.
21+
* @param string $path the path that was asked to be invalidated
2222
*
2323
* @return MissingHostException
2424
*/

src/Exception/ProxyResponseException.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
class ProxyResponseException extends \RuntimeException implements HttpCacheExceptionInterface
1818
{
1919
/**
20-
* @param string $host The host name that was contacted.
21-
* @param string $statusCode The status code of the reply.
22-
* @param string $statusMessage The error message.
23-
* @param string $details Further details about the request that caused the error.
24-
* @param \Exception $previous The exception from the HTTP client.
20+
* @param string $host the host name that was contacted
21+
* @param string $statusCode the status code of the reply
22+
* @param string $statusMessage the error message
23+
* @param string $details further details about the request that caused the error
24+
* @param \Exception $previous the exception from the HTTP client
2525
*
2626
* @return ProxyUnreachableException
2727
*/

src/Exception/ProxyUnreachableException.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
class ProxyUnreachableException extends \RuntimeException implements HttpCacheExceptionInterface
1919
{
2020
/**
21-
* @param string $host The host name that was contacted.
22-
* @param string $message The error message from the HTTP client.
23-
* @param string $details Further details about the request that caused the error.
24-
* @param \Exception $previous The exception from the HTTP client.
21+
* @param string $host the host name that was contacted
22+
* @param string $message the error message from the HTTP client
23+
* @param string $details further details about the request that caused the error
24+
* @param \Exception $previous the exception from the HTTP client
2525
*
2626
* @return ProxyUnreachableException
2727
*/

src/Exception/UnsupportedProxyOperationException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
class UnsupportedProxyOperationException extends \RuntimeException implements HttpCacheExceptionInterface
1919
{
2020
/**
21-
* @param string $method Name of the HTTP method that would be required.
21+
* @param string $method name of the HTTP method that would be required
2222
*
2323
* @return UnsupportedProxyOperationException
2424
*/

src/Handler/TagHandler.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ class TagHandler
4545
/**
4646
* Constructor.
4747
*
48-
* @param CacheInvalidator $invalidator The invalidator instance.
49-
* @param string $tagsHeader Header to use for tags, defaults to X-Cache-Tags.
50-
* @param int $headerLength Maximum header size in bytes, defaults to 7500.
48+
* @param CacheInvalidator $invalidator the invalidator instance
49+
* @param string $tagsHeader header to use for tags, defaults to X-Cache-Tags
50+
* @param int $headerLength maximum header size in bytes, defaults to 7500
5151
*
5252
* @throws UnsupportedProxyOperationException If CacheInvalidator does not support invalidate requests
5353
*/
@@ -96,7 +96,7 @@ public function getTagsHeaderValue()
9696
/**
9797
* Check whether the tag handler has any tags to set on the response.
9898
*
99-
* @return bool True if this handler will set at least one tag.
99+
* @return bool true if this handler will set at least one tag
100100
*/
101101
public function hasTags()
102102
{
@@ -108,7 +108,7 @@ public function hasTags()
108108
*
109109
* This must be called before any HTTP response is sent to the client.
110110
*
111-
* @param array $tags List of tags to add.
111+
* @param array $tags list of tags to add
112112
*
113113
* @return $this
114114
*/
@@ -154,9 +154,9 @@ public function invalidateTags(array $tags)
154154
/**
155155
* Make sure that the tags are valid.
156156
*
157-
* @param array $tags The tags to escape.
157+
* @param array $tags the tags to escape
158158
*
159-
* @return array Sane tags.
159+
* @return array sane tags
160160
*/
161161
protected function escapeTags(array $tags)
162162
{

src/ProxyClient/AbstractProxyClient.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ protected function queueRequest($method, $url, array $headers = array())
153153
* @param string $url URL
154154
* @param array $headers HTTP headers
155155
*
156-
* @return string A hash value for this request.
156+
* @return string a hash value for this request
157157
*/
158158
private function getSignature($method, $url, array $headers)
159159
{
@@ -261,8 +261,8 @@ protected function handleException(GuzzleExceptionCollection $exceptions)
261261
* @param string $url
262262
* @param string[] $allowedParts Array of allowed URL parts (optional)
263263
*
264-
* @throws InvalidUrlException If URL is invalid, the scheme is not http or
265-
* contains parts that are not expected.
264+
* @throws InvalidUrlException if URL is invalid, the scheme is not http or
265+
* contains parts that are not expected
266266
*
267267
* @return string The URL (with default scheme if there was no scheme)
268268
*/

src/ProxyClient/Invalidation/BanInterface.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ interface BanInterface extends ProxyClientInterface
3434
* host name, configure your proxy to copy the host to a custom HTTP header
3535
* such as X-Host.
3636
*
37-
* @param array $headers HTTP headers that path must match to be banned.
37+
* @param array $headers HTTP headers that path must match to be banned
3838
*
3939
* @return $this
4040
*/
@@ -49,12 +49,13 @@ public function ban(array $headers);
4949
* array('example.com', 'other.net'). If the parameter is empty, all hosts
5050
* are matched.
5151
52-
* @param string $path Regular expression pattern for URI to
53-
* invalidate.
54-
* @param string $contentType Regular expression pattern for the content
55-
* type to limit banning, for instance 'text'.
56-
* @param array|string $hosts Regular expression of a host name or list
57-
* of exact host names to limit banning.
52+
*
53+
* @param string $path regular expression pattern for URI to
54+
* invalidate
55+
* @param string $contentType regular expression pattern for the content
56+
* type to limit banning, for instance 'text'
57+
* @param array|string $hosts regular expression of a host name or list
58+
* of exact host names to limit banning
5859
*
5960
* @return $this
6061
*/

src/ProxyClient/Invalidation/PurgeInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ interface PurgeInterface extends ProxyClientInterface
3030
* If the $url is just a path, the proxy client class will add a default
3131
* host name.
3232
*
33-
* @param string $url Path or URL to purge.
33+
* @param string $url path or URL to purge
3434
* @param array $headers Extra HTTP headers to send to the caching proxy
3535
* (optional)
3636
*

0 commit comments

Comments
 (0)