Skip to content

Commit

Permalink
Merge branch '5.4' into 6.0
Browse files Browse the repository at this point in the history
* 5.4:
  [Serializer] cs fix
  Cleanup more `@return` annotations
  [Form] Fix phpdoc on FormBuilderInterface
  • Loading branch information
nicolas-grekas committed Aug 17, 2021
2 parents e47a3e6 + 1b8585c commit 9a4e1c0
Show file tree
Hide file tree
Showing 27 changed files with 4 additions and 117 deletions.
2 changes: 0 additions & 2 deletions Bundle/Bundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ public function build(ContainerBuilder $container)
/**
* Returns the bundle's container extension.
*
* @return ExtensionInterface|null The container extension
*
* @throws \LogicException
*/
public function getContainerExtension(): ?ExtensionInterface
Expand Down
8 changes: 0 additions & 8 deletions Bundle/BundleInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,31 +41,23 @@ public function build(ContainerBuilder $container);

/**
* Returns the container extension that should be implicitly loaded.
*
* @return ExtensionInterface|null The default extension or null if there is none
*/
public function getContainerExtension(): ?ExtensionInterface;

/**
* Returns the bundle name (the class short name).
*
* @return string The Bundle name
*/
public function getName(): string;

/**
* Gets the Bundle namespace.
*
* @return string The Bundle namespace
*/
public function getNamespace(): string;

/**
* Gets the Bundle directory path.
*
* The path should always be returned as a Unix path (with /).
*
* @return string The Bundle absolute path
*/
public function getPath(): string;
}
2 changes: 1 addition & 1 deletion CacheWarmer/CacheWarmerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ interface CacheWarmerInterface extends WarmableInterface
* A warmer should return true if the cache can be
* generated incrementally and on-demand.
*
* @return bool true if the warmer is optional, false otherwise
* @return bool
*/
public function isOptional();
}
2 changes: 0 additions & 2 deletions Controller/ArgumentResolverInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ interface ArgumentResolverInterface
/**
* Returns the arguments to pass to the controller.
*
* @return array An array of arguments to pass to the controller
*
* @throws \RuntimeException When no value could be provided for a required argument
*/
public function getArguments(Request $request, callable $controller): array;
Expand Down
2 changes: 0 additions & 2 deletions Controller/ControllerResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@ public function getController(Request $request): callable|false
/**
* Returns a callable for the given controller.
*
* @return callable A PHP callable
*
* @throws \InvalidArgumentException When the controller cannot be created
*/
protected function createController(string $controller): callable
Expand Down
2 changes: 1 addition & 1 deletion DataCollector/DataCollectorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function collect(Request $request, Response $response, \Throwable $except
/**
* Returns the name of the collector.
*
* @return string The collector name
* @return string
*/
public function getName();
}
6 changes: 0 additions & 6 deletions DataCollector/RouterDataCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,11 @@ public function getRedirect(): bool
return $this->data['redirect'];
}

/**
* @return string|null The target URL
*/
public function getTargetUrl(): ?string
{
return $this->data['url'];
}

/**
* @return string|null The target route
*/
public function getTargetRoute(): ?string
{
return $this->data['route'];
Expand Down
2 changes: 0 additions & 2 deletions DependencyInjection/Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ abstract class Extension extends BaseExtension

/**
* Gets the annotated classes to cache.
*
* @return array An array of classes
*/
public function getAnnotatedClassesToCompile(): array
{
Expand Down
2 changes: 0 additions & 2 deletions Event/RequestEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ public function setResponse(Response $response)

/**
* Returns whether a response was set.
*
* @return bool Whether a response was set
*/
public function hasResponse(): bool
{
Expand Down
4 changes: 0 additions & 4 deletions Exception/HttpExceptionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,11 @@ interface HttpExceptionInterface extends \Throwable
{
/**
* Returns the status code.
*
* @return int An HTTP response status code
*/
public function getStatusCode(): int;

/**
* Returns response headers.
*
* @return array Response headers
*/
public function getHeaders(): array;
}
2 changes: 0 additions & 2 deletions Fragment/FragmentHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ public function addRenderer(FragmentRendererInterface $renderer)
*
* * ignore_errors: true to return an empty string in case of an error
*
* @return string|null The Response content or null when the Response is streamed
*
* @throws \InvalidArgumentException when the renderer does not exist
* @throws \LogicException when no main request is being handled
*/
Expand Down
2 changes: 0 additions & 2 deletions Fragment/FragmentRendererInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ public function render(string|ControllerReference $uri, Request $request, array

/**
* Gets the name of the strategy.
*
* @return string The strategy name
*/
public function getName(): string;
}
2 changes: 0 additions & 2 deletions Fragment/FragmentUriGeneratorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ interface FragmentUriGeneratorInterface
* @param bool $absolute Whether to generate an absolute URL or not
* @param bool $strict Whether to allow non-scalar attributes or not
* @param bool $sign Whether to sign the URL or not
*
* @return string A fragment URI
*/
public function generate(ControllerReference $controller, Request $request = null, bool $absolute = false, bool $strict = true, bool $sign = true): string;
}
2 changes: 0 additions & 2 deletions Fragment/HIncludeFragmentRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ public function __construct(Environment $twig = null, UriSigner $signer = null,

/**
* Checks if a templating engine has been set.
*
* @return bool true if the templating engine has been set, false otherwise
*/
public function hasTemplating(): bool
{
Expand Down
2 changes: 0 additions & 2 deletions Fragment/RoutableFragmentRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ public function setFragmentPath(string $path)
*
* @param bool $absolute Whether to generate an absolute URL or not
* @param bool $strict Whether to allow non-scalar attributes or not
*
* @return string A fragment URI
*/
protected function generateFragmentUri(ControllerReference $reference, Request $request, bool $absolute = false, bool $strict = true): string
{
Expand Down
6 changes: 0 additions & 6 deletions HttpCache/HttpCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ public function getStore(): StoreInterface

/**
* Returns an array of events that took place during processing of the last request.
*
* @return array An array of events
*/
public function getTraces(): array
{
Expand All @@ -140,8 +138,6 @@ private function addTraces(Response $response)

/**
* Returns a log message for the events of the last request processing.
*
* @return string A log message
*/
public function getLog(): string
{
Expand Down Expand Up @@ -519,8 +515,6 @@ protected function forward(Request $request, bool $catch = false, Response $entr

/**
* Checks whether the cache entry is "fresh enough" to satisfy the Request.
*
* @return bool true if the cache entry if fresh enough, false otherwise
*/
protected function isFreshEnough(Request $request, Response $entry): bool
{
Expand Down
4 changes: 0 additions & 4 deletions HttpCache/Store.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,6 @@ public function lookup(Request $request): ?Response
* Existing entries are read and any that match the response are removed. This
* method calls write with the new list of cache entries.
*
* @return string The key under which the response is stored
*
* @throws \RuntimeException
*/
public function write(Request $request, Response $response): string
Expand Down Expand Up @@ -413,8 +411,6 @@ public function getPath(string $key)
* If the same URI can have more than one representation, based on some
* headers, use a Vary header to indicate them, and each representation will
* be stored independently under the same cache key.
*
* @return string A key for the given Request
*/
protected function generateCacheKey(Request $request): string
{
Expand Down
4 changes: 0 additions & 4 deletions HttpCache/SurrogateInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ public function createCacheStrategy(): ResponseCacheStrategyInterface;

/**
* Checks that at least one surrogate has Surrogate capability.
*
* @return bool true if one surrogate has Surrogate capability, false otherwise
*/
public function hasSurrogateCapability(Request $request): bool;

Expand All @@ -47,8 +45,6 @@ public function addSurrogateControl(Response $response);

/**
* Checks that the Response needs to be parsed for Surrogate tags.
*
* @return bool true if the Response needs to be parsed, false otherwise
*/
public function needsParsing(Response $response): bool;

Expand Down
2 changes: 0 additions & 2 deletions HttpKernelBrowser.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,6 @@ protected function filterRequest(DomRequest $request): Request
* an invalid UploadedFile is returned with an error set to UPLOAD_ERR_INI_SIZE.
*
* @see UploadedFile
*
* @return array An array with all uploaded files marked as already moved
*/
protected function filterFiles(array $files): array
{
Expand Down
12 changes: 0 additions & 12 deletions Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,6 @@ public function isDebug(): bool

/**
* Gets the application root dir (path of the project's composer file).
*
* @return string The project root dir
*/
public function getProjectDir(): string
{
Expand Down Expand Up @@ -400,8 +398,6 @@ protected function build(ContainerBuilder $container)
* Gets the container class.
*
* @throws \InvalidArgumentException If the generated classname is invalid
*
* @return string The container class
*/
protected function getContainerClass(): string
{
Expand Down Expand Up @@ -587,8 +583,6 @@ protected function initializeContainer()

/**
* Returns the kernel parameters.
*
* @return array An array of kernel parameters
*/
protected function getKernelParameters(): array
{
Expand Down Expand Up @@ -621,8 +615,6 @@ protected function getKernelParameters(): array
/**
* Builds the service container.
*
* @return ContainerBuilder The compiled service container
*
* @throws \RuntimeException
*/
protected function buildContainer(): ContainerBuilder
Expand Down Expand Up @@ -741,8 +733,6 @@ protected function dumpContainer(ConfigCache $cache, ContainerBuilder $container

/**
* Returns a loader for the container.
*
* @return DelegatingLoader The loader
*/
protected function getContainerLoader(ContainerInterface $container): DelegatingLoader
{
Expand Down Expand Up @@ -793,8 +783,6 @@ private function preBoot(): ContainerInterface
*
* We don't use the PHP php_strip_whitespace() function
* as we want the content to be readable and well-formatted.
*
* @return string The PHP string with the comments removed
*/
public static function stripComments(string $source): string
{
Expand Down
14 changes: 0 additions & 14 deletions KernelInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,24 +74,18 @@ public function getBundle(string $name): BundleInterface;
* where BundleName is the name of the bundle
* and the remaining part is the relative path in the bundle.
*
* @return string The absolute path of the resource
*
* @throws \InvalidArgumentException if the file cannot be found or the name is not valid
* @throws \RuntimeException if the name contains invalid/unsafe characters
*/
public function locateResource(string $name): string;

/**
* Gets the environment.
*
* @return string The current environment
*/
public function getEnvironment(): string;

/**
* Checks if debug mode is enabled.
*
* @return bool true if debug mode is enabled, false otherwise
*/
public function isDebug(): bool;

Expand All @@ -107,8 +101,6 @@ public function getContainer(): ContainerInterface;

/**
* Gets the request start time (not available if debug is disabled).
*
* @return float The request start timestamp
*/
public function getStartTime(): float;

Expand All @@ -118,8 +110,6 @@ public function getStartTime(): float;
* Since Symfony 5.2, the cache directory should be used for caches that are written at runtime.
* For caches and artifacts that can be warmed at compile-time and deployed as read-only,
* use the new "build directory" returned by the {@see getBuildDir()} method.
*
* @return string The cache directory
*/
public function getCacheDir(): string;

Expand All @@ -133,15 +123,11 @@ public function getBuildDir(): string;

/**
* Gets the log directory.
*
* @return string The log directory
*/
public function getLogDir(): string;

/**
* Gets the charset of the application.
*
* @return string The charset
*/
public function getCharset(): string;
}
4 changes: 2 additions & 2 deletions Log/DebugLoggerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ interface DebugLoggerInterface
* timestamp, message, priority, and priorityName.
* It can also have an optional context key containing an array.
*
* @return array An array of logs
* @return array
*/
public function getLogs(Request $request = null);

/**
* Returns the number of errors.
*
* @return int The number of errors
* @return int
*/
public function countErrors(Request $request = null);

Expand Down
Loading

0 comments on commit 9a4e1c0

Please sign in to comment.