Commit 8fca0d62 authored by Fabien Potencier's avatar Fabien Potencier

merged branch hhamon/phpdoc_fixes (PR #212)

Commits
-------

79e2684f [Silex] use @inheritdoc instead of a new phpdoc block.
46dc1dff [Silex] added missing PHPDoc blocks.

Discussion
----------

[Silex] added missing PHPDoc blocks.
parents 94be9476 79e2684f
...@@ -314,7 +314,7 @@ class Application extends \Pimple implements HttpKernelInterface, EventSubscribe ...@@ -314,7 +314,7 @@ class Application extends \Pimple implements HttpKernelInterface, EventSubscribe
* Mounts an application under the given route prefix. * Mounts an application under the given route prefix.
* *
* @param string $prefix The route prefix * @param string $prefix The route prefix
* @param ControllerCollection|ControllerProviderInterface $app A ControllerCollection or an ControllerProviderInterface instance * @param ControllerCollection|ControllerProviderInterface $app A ControllerCollection or a ControllerProviderInterface instance
*/ */
public function mount($prefix, $app) public function mount($prefix, $app)
{ {
...@@ -330,7 +330,7 @@ class Application extends \Pimple implements HttpKernelInterface, EventSubscribe ...@@ -330,7 +330,7 @@ class Application extends \Pimple implements HttpKernelInterface, EventSubscribe
} }
/** /**
* Handles the request and deliver the response. * Handles the request and delivers the response.
* *
* @param Request $request Request to process * @param Request $request Request to process
*/ */
...@@ -343,6 +343,9 @@ class Application extends \Pimple implements HttpKernelInterface, EventSubscribe ...@@ -343,6 +343,9 @@ class Application extends \Pimple implements HttpKernelInterface, EventSubscribe
$this->handle($request)->send(); $this->handle($request)->send();
} }
/**
* {@inheritdoc}
*/
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true) public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
{ {
$this->beforeDispatched = false; $this->beforeDispatched = false;
...@@ -356,6 +359,8 @@ class Application extends \Pimple implements HttpKernelInterface, EventSubscribe ...@@ -356,6 +359,8 @@ class Application extends \Pimple implements HttpKernelInterface, EventSubscribe
/** /**
* Handles onEarlyKernelRequest events. * Handles onEarlyKernelRequest events.
*
* @param KernelEvent $event The event to handle
*/ */
public function onEarlyKernelRequest(KernelEvent $event) public function onEarlyKernelRequest(KernelEvent $event)
{ {
...@@ -369,6 +374,8 @@ class Application extends \Pimple implements HttpKernelInterface, EventSubscribe ...@@ -369,6 +374,8 @@ class Application extends \Pimple implements HttpKernelInterface, EventSubscribe
/** /**
* Handles onKernelRequest events. * Handles onKernelRequest events.
*
* @param KernelEvent $event The event to handle
*/ */
public function onKernelRequest(KernelEvent $event) public function onKernelRequest(KernelEvent $event)
{ {
......
...@@ -24,6 +24,11 @@ class Compiler ...@@ -24,6 +24,11 @@ class Compiler
{ {
protected $version; protected $version;
/**
* Compiles the Silex source code into one single Phar file.
*
* @param string $pharFile Name of the output Phar file
*/
public function compile($pharFile = 'silex.phar') public function compile($pharFile = 'silex.phar')
{ {
if (file_exists($pharFile)) { if (file_exists($pharFile)) {
......
...@@ -38,6 +38,8 @@ class Controller ...@@ -38,6 +38,8 @@ class Controller
/** /**
* Gets the controller's route. * Gets the controller's route.
*
* @return Route
*/ */
public function getRoute() public function getRoute()
{ {
...@@ -46,6 +48,8 @@ class Controller ...@@ -46,6 +48,8 @@ class Controller
/** /**
* Gets the controller's route name. * Gets the controller's route name.
*
* @return string
*/ */
public function getRouteName() public function getRouteName()
{ {
...@@ -56,6 +60,7 @@ class Controller ...@@ -56,6 +60,7 @@ class Controller
* Sets the controller's route. * Sets the controller's route.
* *
* @param string $routeName * @param string $routeName
* @return Controller $this The current Controller instance
*/ */
public function bind($routeName) public function bind($routeName)
{ {
...@@ -73,6 +78,7 @@ class Controller ...@@ -73,6 +78,7 @@ class Controller
* *
* @param string $variable The variable name * @param string $variable The variable name
* @param string $regexp The regexp to apply * @param string $regexp The regexp to apply
* @return Controller $this The current Controller instance
*/ */
public function assert($variable, $regexp) public function assert($variable, $regexp)
{ {
...@@ -86,6 +92,7 @@ class Controller ...@@ -86,6 +92,7 @@ class Controller
* *
* @param string $variable The variable name * @param string $variable The variable name
* @param mixed $default The default value * @param mixed $default The default value
* @return Controller $this The current Controller instance
*/ */
public function value($variable, $default) public function value($variable, $default)
{ {
...@@ -99,6 +106,7 @@ class Controller ...@@ -99,6 +106,7 @@ class Controller
* *
* @param string $variable The variable name * @param string $variable The variable name
* @param mixed $callback A PHP callback that converts the original value * @param mixed $callback A PHP callback that converts the original value
* @return Controller $this The current Controller instance
*/ */
public function convert($variable, $callback) public function convert($variable, $callback)
{ {
...@@ -112,8 +120,8 @@ class Controller ...@@ -112,8 +120,8 @@ class Controller
/** /**
* Sets the requirement for the HTTP method. * Sets the requirement for the HTTP method.
* *
* @param string $method The HTTP method name. Multiple methods can be supplied, * @param string $method The HTTP method name. Multiple methods can be supplied, delimited by a pipe character '|', eg. 'GET|POST'.
* delimited by a pipe character '|', eg. 'GET|POST'. * @return Controller $this The current Controller instance
*/ */
public function method($method) public function method($method)
{ {
...@@ -124,6 +132,8 @@ class Controller ...@@ -124,6 +132,8 @@ class Controller
/** /**
* Sets the requirement of HTTP (no HTTPS) on this controller. * Sets the requirement of HTTP (no HTTPS) on this controller.
*
* @return Controller $this The current Controller instance
*/ */
public function requireHttp() public function requireHttp()
{ {
...@@ -134,6 +144,8 @@ class Controller ...@@ -134,6 +144,8 @@ class Controller
/** /**
* Sets the requirement of HTTPS on this controller. * Sets the requirement of HTTPS on this controller.
*
* @return Controller $this The current Controller instance
*/ */
public function requireHttps() public function requireHttps()
{ {
......
...@@ -21,6 +21,11 @@ use Symfony\Component\HttpFoundation\Request; ...@@ -21,6 +21,11 @@ use Symfony\Component\HttpFoundation\Request;
*/ */
class HttpCache extends BaseHttpCache class HttpCache extends BaseHttpCache
{ {
/**
* Handles the Request and delivers the Response.
*
* @param Request $request The Request objet
*/
public function run(Request $request = null) public function run(Request $request = null)
{ {
if (null === $request) { if (null === $request) {
......
...@@ -29,6 +29,11 @@ class LazyUrlMatcher implements UrlMatcherInterface ...@@ -29,6 +29,11 @@ class LazyUrlMatcher implements UrlMatcherInterface
$this->factory = $factory; $this->factory = $factory;
} }
/**
* Returns the corresponding UrlMatcherInterface instance.
*
* @return UrlMatcherInterface
*/
public function getUrlMatcher() public function getUrlMatcher()
{ {
$urlMatcher = call_user_func($this->factory); $urlMatcher = call_user_func($this->factory);
......
...@@ -23,9 +23,9 @@ class StringResponseConverter ...@@ -23,9 +23,9 @@ class StringResponseConverter
/** /**
* Does the conversion * Does the conversion
* *
* @param $response The response string * @param string $response The response string
* *
* @return A response object * @return A Response object
*/ */
public function convert($response) public function convert($response)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment