Skip to content

Commit

Permalink
Cleanup more @return annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Aug 17, 2021
1 parent 0ae4c94 commit 1b8585c
Show file tree
Hide file tree
Showing 36 changed files with 85 additions and 87 deletions.
2 changes: 1 addition & 1 deletion Bundle/Bundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function build(ContainerBuilder $container)
/**
* Returns the bundle's container extension.
*
* @return ExtensionInterface|null The container extension
* @return ExtensionInterface|null
*
* @throws \LogicException
*/
Expand Down
8 changes: 4 additions & 4 deletions Bundle/BundleInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,21 @@ 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
* @return ExtensionInterface|null
*/
public function getContainerExtension();

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

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

Expand All @@ -65,7 +65,7 @@ public function getNamespace();
*
* The path should always be returned as a Unix path (with /).
*
* @return string The Bundle absolute path
* @return string
*/
public function getPath();
}
2 changes: 0 additions & 2 deletions CacheWarmer/CacheWarmerAggregate.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,6 @@ public function warmUp(string $cacheDir)

/**
* Checks whether this warmer is optional or not.
*
* @return bool always false
*/
public function isOptional(): bool
{
Expand Down
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: 1 addition & 1 deletion Controller/ArgumentResolverInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ interface ArgumentResolverInterface
/**
* Returns the arguments to pass to the controller.
*
* @return array An array of arguments to pass to the controller
* @return array
*
* @throws \RuntimeException When no value could be provided for a required argument
*/
Expand Down
2 changes: 1 addition & 1 deletion Controller/ControllerResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function getController(Request $request)
/**
* Returns a callable for the given controller.
*
* @return callable A PHP callable
* @return callable
*
* @throws \InvalidArgumentException When the controller cannot be created
*/
Expand Down
18 changes: 9 additions & 9 deletions DataCollector/ConfigDataCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function lateCollect()
/**
* Gets the token.
*
* @return string|null The token
* @return string|null
*/
public function getToken()
{
Expand All @@ -104,7 +104,7 @@ public function getToken()
/**
* Gets the Symfony version.
*
* @return string The Symfony version
* @return string
*/
public function getSymfonyVersion()
{
Expand Down Expand Up @@ -165,7 +165,7 @@ public function getSymfonyEol()
/**
* Gets the PHP version.
*
* @return string The PHP version
* @return string
*/
public function getPhpVersion()
{
Expand All @@ -175,7 +175,7 @@ public function getPhpVersion()
/**
* Gets the PHP version extra part.
*
* @return string|null The extra part
* @return string|null
*/
public function getPhpVersionExtra()
{
Expand Down Expand Up @@ -209,7 +209,7 @@ public function getPhpTimezone()
/**
* Gets the environment.
*
* @return string The environment
* @return string
*/
public function getEnv()
{
Expand All @@ -229,7 +229,7 @@ public function isDebug()
/**
* Returns true if the XDebug is enabled.
*
* @return bool true if XDebug is enabled, false otherwise
* @return bool
*/
public function hasXDebug()
{
Expand All @@ -239,7 +239,7 @@ public function hasXDebug()
/**
* Returns true if APCu is enabled.
*
* @return bool true if APCu is enabled, false otherwise
* @return bool
*/
public function hasApcu()
{
Expand All @@ -249,7 +249,7 @@ public function hasApcu()
/**
* Returns true if Zend OPcache is enabled.
*
* @return bool true if Zend OPcache is enabled, false otherwise
* @return bool
*/
public function hasZendOpcache()
{
Expand All @@ -264,7 +264,7 @@ public function getBundles()
/**
* Gets the PHP SAPI name.
*
* @return string The environment
* @return string
*/
public function getSapiName()
{
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();
}
4 changes: 2 additions & 2 deletions DataCollector/EventDataCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function setCalledListeners(array $listeners)
/**
* Gets the called listeners.
*
* @return array An array of called listeners
* @return array
*
* @see TraceableEventDispatcher
*/
Expand Down Expand Up @@ -131,7 +131,7 @@ public function setOrphanedEvents(array $events)
/**
* Gets the orphaned events.
*
* @return array An array of orphaned events
* @return array
*
* @see TraceableEventDispatcher
*/
Expand Down
10 changes: 5 additions & 5 deletions DataCollector/ExceptionDataCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function reset()
/**
* Checks if the exception is not null.
*
* @return bool true if the exception is not null, false otherwise
* @return bool
*/
public function hasException()
{
Expand All @@ -67,7 +67,7 @@ public function getException()
/**
* Gets the exception message.
*
* @return string The exception message
* @return string
*/
public function getMessage()
{
Expand All @@ -77,7 +77,7 @@ public function getMessage()
/**
* Gets the exception code.
*
* @return int The exception code
* @return int
*/
public function getCode()
{
Expand All @@ -87,7 +87,7 @@ public function getCode()
/**
* Gets the status code.
*
* @return int The status code
* @return int
*/
public function getStatusCode()
{
Expand All @@ -97,7 +97,7 @@ public function getStatusCode()
/**
* Gets the exception trace.
*
* @return array The exception trace
* @return array
*/
public function getTrace()
{
Expand Down
4 changes: 2 additions & 2 deletions DataCollector/MemoryDataCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function lateCollect()
/**
* Gets the memory.
*
* @return int The memory
* @return int
*/
public function getMemory()
{
Expand All @@ -68,7 +68,7 @@ public function getMemory()
/**
* Gets the PHP memory limit.
*
* @return int The memory limit
* @return int
*/
public function getMemoryLimit()
{
Expand Down
4 changes: 2 additions & 2 deletions DataCollector/RequestDataCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ public function getDotenvVars()
*
* The _route request attributes is automatically set by the Router Matcher.
*
* @return string The route
* @return string
*/
public function getRoute()
{
Expand All @@ -334,7 +334,7 @@ public function getIdentifier()
*
* The _route_params request attributes is automatically set by the RouterListener.
*
* @return array The parameters
* @return array
*/
public function getRouteParams()
{
Expand Down
4 changes: 2 additions & 2 deletions DataCollector/RouterDataCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,15 @@ public function getRedirect()
}

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

/**
* @return string|null The target route
* @return string|null
*/
public function getTargetRoute()
{
Expand Down
8 changes: 4 additions & 4 deletions DataCollector/TimeDataCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function setEvents(array $events)
/**
* Gets the request events.
*
* @return StopwatchEvent[] The request events
* @return StopwatchEvent[]
*/
public function getEvents()
{
Expand All @@ -102,7 +102,7 @@ public function getEvents()
/**
* Gets the request elapsed time.
*
* @return float The elapsed time
* @return float
*/
public function getDuration()
{
Expand All @@ -120,7 +120,7 @@ public function getDuration()
*
* This is the time spent until the beginning of the request handling.
*
* @return float The elapsed time
* @return float
*/
public function getInitTime()
{
Expand All @@ -142,7 +142,7 @@ public function getStartTime()
}

/**
* @return bool whether or not the stopwatch component is installed
* @return bool
*/
public function isStopwatchInstalled()
{
Expand Down
2 changes: 1 addition & 1 deletion DependencyInjection/Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ abstract class Extension extends BaseExtension
/**
* Gets the annotated classes to cache.
*
* @return array An array of classes
* @return array
*/
public function getAnnotatedClassesToCompile()
{
Expand Down
2 changes: 1 addition & 1 deletion Event/KernelEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function isMainRequest(): bool
/**
* Checks if this is a master request.
*
* @return bool True if the request is a master request
* @return bool
*
* @deprecated since symfony/http-kernel 5.3, use isMainRequest() instead
*/
Expand Down
2 changes: 1 addition & 1 deletion Event/RequestEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function setResponse(Response $response)
/**
* Returns whether a response was set.
*
* @return bool Whether a response was set
* @return bool
*/
public function hasResponse()
{
Expand Down
2 changes: 1 addition & 1 deletion Event/ViewEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function __construct(HttpKernelInterface $kernel, Request $request, int $
/**
* Returns the return value of the controller.
*
* @return mixed The controller return value
* @return mixed
*/
public function getControllerResult()
{
Expand Down
4 changes: 2 additions & 2 deletions Exception/HttpExceptionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ interface HttpExceptionInterface extends \Throwable
/**
* Returns the status code.
*
* @return int An HTTP response status code
* @return int
*/
public function getStatusCode();

/**
* Returns response headers.
*
* @return array Response headers
* @return array
*/
public function getHeaders();
}
2 changes: 1 addition & 1 deletion Fragment/FragmentHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function addRenderer(FragmentRendererInterface $renderer)
*
* @param string|ControllerReference $uri A URI as a string or a ControllerReference instance
*
* @return string|null The Response content or null when the Response is streamed
* @return string|null
*
* @throws \InvalidArgumentException when the renderer does not exist
* @throws \LogicException when no main request is being handled
Expand Down
2 changes: 1 addition & 1 deletion Fragment/FragmentRendererInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function render($uri, Request $request, array $options = []);
/**
* Gets the name of the strategy.
*
* @return string The strategy name
* @return string
*/
public function getName();
}
Loading

0 comments on commit 1b8585c

Please sign in to comment.