Skip to content
Merged
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
30 changes: 15 additions & 15 deletions src/CacheInvalidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function __construct(ProxyClientInterface $cache)
* refreshPath works and INVALIDATE is about all other invalidation
* methods.
*
* @param string $operation one of the class constants.
* @param string $operation one of the class constants
*
* @return bool
*
Expand All @@ -123,7 +123,7 @@ public function supports($operation)
*
* @return $this
*
* @throws \Exception When trying to override the event dispatcher.
* @throws \Exception when trying to override the event dispatcher
*/
public function setEventDispatcher(EventDispatcherInterface $eventDispatcher)
{
Expand Down Expand Up @@ -156,7 +156,7 @@ public function getEventDispatcher()
*
* @return $this
*
* @deprecated Use getEventDispatcher()->addSubscriber($subscriber) instead.
* @deprecated use getEventDispatcher()->addSubscriber($subscriber) instead
*/
public function addSubscriber(EventSubscriberInterface $subscriber)
{
Expand All @@ -172,7 +172,7 @@ public function addSubscriber(EventSubscriberInterface $subscriber)
*
* @return $this
*
* @deprecated Use constructor argument to TagHandler instead.
* @deprecated use constructor argument to TagHandler instead
*/
public function setTagsHeader($tagsHeader)
{
Expand All @@ -188,7 +188,7 @@ public function setTagsHeader($tagsHeader)
*
* @return string
*
* @deprecated Use TagHandler::getTagsHeaderName instead.
* @deprecated use TagHandler::getTagsHeaderName instead
*/
public function getTagsHeader()
{
Expand Down Expand Up @@ -247,7 +247,7 @@ public function refreshPath($path, array $headers = array())
*
* @see BanInterface::ban()
*
* @param array $headers HTTP headers that path must match to be banned.
* @param array $headers HTTP headers that path must match to be banned
*
* @throws UnsupportedProxyOperationException If HTTP cache does not support BAN requests
*
Expand Down Expand Up @@ -275,12 +275,12 @@ public function invalidate(array $headers)
*
* @see BanInterface::banPath()
*
* @param string $path Regular expression pattern for URI to
* invalidate.
* @param string $contentType Regular expression pattern for the content
* type to limit banning, for instance 'text'.
* @param array|string $hosts Regular expression of a host name or list of
* exact host names to limit banning.
* @param string $path regular expression pattern for URI to
* invalidate
* @param string $contentType regular expression pattern for the content
* type to limit banning, for instance 'text'
* @param array|string $hosts regular expression of a host name or list of
* exact host names to limit banning
*
* @throws UnsupportedProxyOperationException If HTTP cache does not support BAN requests
*
Expand All @@ -307,7 +307,7 @@ public function invalidateRegex($path, $contentType = null, $hosts = null)
*
* @return $this
*
* @deprecated Use TagHandler::invalidateTags instead.
* @deprecated use TagHandler::invalidateTags instead
*/
public function invalidateTags(array $tags)
{
Expand All @@ -323,9 +323,9 @@ public function invalidateTags(array $tags)
/**
* Send all pending invalidation requests.
*
* @return int The number of cache invalidations performed per caching server.
* @return int the number of cache invalidations performed per caching server
*
* @throws ExceptionCollection If any errors occurred during flush.
* @throws ExceptionCollection if any errors occurred during flush
*/
public function flush()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/InvalidUrlException.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
class InvalidUrlException extends InvalidArgumentException implements HttpCacheExceptionInterface
{
/**
* @param string $url The invalid URL.
* @param string $url the invalid URL
* @param string $reason Further explanation why the URL was invalid (optional)
*
* @return InvalidUrlException
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/MissingHostException.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
class MissingHostException extends \RuntimeException implements HttpCacheExceptionInterface
{
/**
* @param string $path The path that was asked to be invalidated.
* @param string $path the path that was asked to be invalidated
*
* @return MissingHostException
*/
Expand Down
10 changes: 5 additions & 5 deletions src/Exception/ProxyResponseException.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
class ProxyResponseException extends \RuntimeException implements HttpCacheExceptionInterface
{
/**
* @param string $host The host name that was contacted.
* @param string $statusCode The status code of the reply.
* @param string $statusMessage The error message.
* @param string $details Further details about the request that caused the error.
* @param \Exception $previous The exception from the HTTP client.
* @param string $host the host name that was contacted
* @param string $statusCode the status code of the reply
* @param string $statusMessage the error message
* @param string $details further details about the request that caused the error
* @param \Exception $previous the exception from the HTTP client
*
* @return ProxyUnreachableException
*/
Expand Down
8 changes: 4 additions & 4 deletions src/Exception/ProxyUnreachableException.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
class ProxyUnreachableException extends \RuntimeException implements HttpCacheExceptionInterface
{
/**
* @param string $host The host name that was contacted.
* @param string $message The error message from the HTTP client.
* @param string $details Further details about the request that caused the error.
* @param \Exception $previous The exception from the HTTP client.
* @param string $host the host name that was contacted
* @param string $message the error message from the HTTP client
* @param string $details further details about the request that caused the error
* @param \Exception $previous the exception from the HTTP client
*
* @return ProxyUnreachableException
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/UnsupportedProxyOperationException.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
class UnsupportedProxyOperationException extends \RuntimeException implements HttpCacheExceptionInterface
{
/**
* @param string $method Name of the HTTP method that would be required.
* @param string $method name of the HTTP method that would be required
*
* @return UnsupportedProxyOperationException
*/
Expand Down
14 changes: 7 additions & 7 deletions src/Handler/TagHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ class TagHandler
/**
* Constructor.
*
* @param CacheInvalidator $invalidator The invalidator instance.
* @param string $tagsHeader Header to use for tags, defaults to X-Cache-Tags.
* @param int $headerLength Maximum header size in bytes, defaults to 7500.
* @param CacheInvalidator $invalidator the invalidator instance
* @param string $tagsHeader header to use for tags, defaults to X-Cache-Tags
* @param int $headerLength maximum header size in bytes, defaults to 7500
*
* @throws UnsupportedProxyOperationException If CacheInvalidator does not support invalidate requests
*/
Expand Down Expand Up @@ -96,7 +96,7 @@ public function getTagsHeaderValue()
/**
* Check whether the tag handler has any tags to set on the response.
*
* @return bool True if this handler will set at least one tag.
* @return bool true if this handler will set at least one tag
*/
public function hasTags()
{
Expand All @@ -108,7 +108,7 @@ public function hasTags()
*
* This must be called before any HTTP response is sent to the client.
*
* @param array $tags List of tags to add.
* @param array $tags list of tags to add
*
* @return $this
*/
Expand Down Expand Up @@ -154,9 +154,9 @@ public function invalidateTags(array $tags)
/**
* Make sure that the tags are valid.
*
* @param array $tags The tags to escape.
* @param array $tags the tags to escape
*
* @return array Sane tags.
* @return array sane tags
*/
protected function escapeTags(array $tags)
{
Expand Down
6 changes: 3 additions & 3 deletions src/ProxyClient/AbstractProxyClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ protected function queueRequest($method, $url, array $headers = array())
* @param string $url URL
* @param array $headers HTTP headers
*
* @return string A hash value for this request.
* @return string a hash value for this request
*/
private function getSignature($method, $url, array $headers)
{
Expand Down Expand Up @@ -261,8 +261,8 @@ protected function handleException(GuzzleExceptionCollection $exceptions)
* @param string $url
* @param string[] $allowedParts Array of allowed URL parts (optional)
*
* @throws InvalidUrlException If URL is invalid, the scheme is not http or
* contains parts that are not expected.
* @throws InvalidUrlException if URL is invalid, the scheme is not http or
* contains parts that are not expected
*
* @return string The URL (with default scheme if there was no scheme)
*/
Expand Down
15 changes: 8 additions & 7 deletions src/ProxyClient/Invalidation/BanInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ interface BanInterface extends ProxyClientInterface
* host name, configure your proxy to copy the host to a custom HTTP header
* such as X-Host.
*
* @param array $headers HTTP headers that path must match to be banned.
* @param array $headers HTTP headers that path must match to be banned
*
* @return $this
*/
Expand All @@ -49,12 +49,13 @@ public function ban(array $headers);
* array('example.com', 'other.net'). If the parameter is empty, all hosts
* are matched.

* @param string $path Regular expression pattern for URI to
* invalidate.
* @param string $contentType Regular expression pattern for the content
* type to limit banning, for instance 'text'.
* @param array|string $hosts Regular expression of a host name or list
* of exact host names to limit banning.
*
* @param string $path regular expression pattern for URI to
* invalidate
* @param string $contentType regular expression pattern for the content
* type to limit banning, for instance 'text'
* @param array|string $hosts regular expression of a host name or list
* of exact host names to limit banning
*
* @return $this
*/
Expand Down
2 changes: 1 addition & 1 deletion src/ProxyClient/Invalidation/PurgeInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ interface PurgeInterface extends ProxyClientInterface
* If the $url is just a path, the proxy client class will add a default
* host name.
*
* @param string $url Path or URL to purge.
* @param string $url path or URL to purge
* @param array $headers Extra HTTP headers to send to the caching proxy
* (optional)
*
Expand Down
2 changes: 1 addition & 1 deletion src/ProxyClient/Invalidation/RefreshInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ interface RefreshInterface extends ProxyClientInterface
* If the $url is just a path, the proxy client class will add a default
* host name.
*
* @param string $url Path or URL to refresh.
* @param string $url path or URL to refresh
* @param array $headers Extra HTTP headers to send to the caching proxy
* (optional)
*
Expand Down
2 changes: 1 addition & 1 deletion src/ProxyClient/Nginx.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class Nginx extends AbstractProxyClient implements PurgeInterface, RefreshInterf
* requests (optional). This is required
* if you purge relative URLs and the domain
* is not part of your `proxy_cache_key`
* @param string $purgeLocation Path that triggers purge (optional).
* @param string $purgeLocation path that triggers purge (optional)
* @param ClientInterface $client HTTP client (optional). If no HTTP client
* is supplied, a default one will be
* created.
Expand Down
4 changes: 2 additions & 2 deletions src/ProxyClient/ProxyClientInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ interface ProxyClientInterface
/**
* Send all pending invalidation requests.
*
* @return int The number of cache invalidations performed per caching server.
* @return int the number of cache invalidations performed per caching server
*
* @throws ExceptionCollection If any errors occurred during flush.
* @throws ExceptionCollection if any errors occurred during flush
*/
public function flush();
}
2 changes: 1 addition & 1 deletion src/ProxyClient/Symfony.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Symfony extends AbstractProxyClient implements PurgeInterface, RefreshInte
*
* - purge_method: HTTP method that identifies purge requests.
*
* @param array $options The purge_method that should be used.
* @param array $options the purge_method that should be used
*/
public function __construct(array $servers, $baseUrl = null, ClientInterface $client = null, array $options = array())
{
Expand Down
4 changes: 2 additions & 2 deletions src/ProxyClient/Varnish.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ class Varnish extends AbstractProxyClient implements BanInterface, PurgeInterfac
/**
* Set the default headers that get merged with the provided headers in self::ban().
*
* @param array $headers Hashmap with keys being the header names, values
* the header values.
* @param array $headers hashmap with keys being the header names, values
* the header values
*/
public function setDefaultBanHeaders(array $headers)
{
Expand Down
10 changes: 5 additions & 5 deletions src/SymfonyCache/AccessControlledSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ abstract class AccessControlledSubscriber implements EventSubscriberInterface
*
* If neither parameter is set, the filter is IP 127.0.0.1
*
* @param RequestMatcher|null $requestMatcher Request matcher configured to only match allowed requests.
* @param string|string[]|null $ips IP or list of IPs that are allowed to send requests.
* @param RequestMatcher|null $requestMatcher request matcher configured to only match allowed requests
* @param string|string[]|null $ips IP or list of IPs that are allowed to send requests
*
* @throws \InvalidArgumentException If both $requestMatcher and $ips are set.
* @throws \InvalidArgumentException if both $requestMatcher and $ips are set
*/
public function __construct(RequestMatcher $requestMatcher = null, $ips = null)
{
Expand All @@ -59,9 +59,9 @@ public function __construct(RequestMatcher $requestMatcher = null, $ips = null)
/**
* Check whether the request is allowed.
*
* @param Request $request The request to check.
* @param Request $request the request to check
*
* @return bool Whether access is granted.
* @return bool whether access is granted
*/
protected function isRequestAllowed(Request $request)
{
Expand Down
6 changes: 3 additions & 3 deletions src/SymfonyCache/CacheEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ class CacheEvent extends Event
* Make sure your $kernel implements CacheInvalidationInterface. Creating the event with other
* HttpCache classes is deprecated and will no longer be supported in version 2 of this library.
*
* @param CacheInvalidationInterface|HttpCache $kernel The kernel raising with this event.
* @param Request $request The request being processed.
* @param CacheInvalidationInterface|HttpCache $kernel the kernel raising with this event
* @param Request $request the request being processed
*/
public function __construct($kernel, Request $request)
{
Expand Down Expand Up @@ -75,7 +75,7 @@ public function getRequest()
}

/**
* @return Response|null The response if one was set.
* @return Response|null the response if one was set
*/
public function getResponse()
{
Expand Down
2 changes: 1 addition & 1 deletion src/SymfonyCache/UserContextSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ private function isSessionName($name)
*
* @param Request $request
*
* @return Request The request that will return the user context hash value.
* @return Request the request that will return the user context hash value
*/
private function generateHashLookupRequest(Request $request)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Test/NginxTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ abstract class NginxTestCase extends ProxyTestCase
*
* @throws \Exception
*
* @return string the path to the NGINX server configuration file to use with this test.
* @return string the path to the NGINX server configuration file to use with this test
*/
protected function getConfigFile()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Test/VarnishTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ abstract class VarnishTestCase extends ProxyTestCase
*
* @throws \Exception
*
* @return string the path to the varnish server configuration file to use with this test.
* @return string the path to the varnish server configuration file to use with this test
*/
protected function getConfigFile()
{
Expand Down
2 changes: 1 addition & 1 deletion src/UserContext/HashGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function generateHash()
/**
* Register a provider to be called for updating a UserContext before generating the Hash.
*
* @param ContextProviderInterface $provider A context provider to be called to get context information about the current request.
* @param ContextProviderInterface $provider a context provider to be called to get context information about the current request
*/
private function registerProvider(ContextProviderInterface $provider)
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/Varnish/UserContextTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ abstract class UserContextTestCase extends VarnishTestCase
/**
* Assert that the context cache status is as expected.
*
* @param string $hashCache The cache status of the context request.
* @param string $hashCache the cache status of the context request
*/
abstract protected function assertContextCache($hashCache);

Expand Down
Loading