Skip to content

Commit

Permalink
merged branch Tobion/phpdoc (PR symfony#4539)
Browse files Browse the repository at this point in the history
Commits
-------

680e732 [Routing] fix phpDoc

Discussion
----------

[Routing] fix phpDoc

using inheritdoc where possible and removing api tag when parent interface has one
as requested by stof and fabpot

---------------------------------------------------------------------------

by travisbot at 2012-06-09T16:14:53Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1577508) (merged 0a44632a into f8a09db).

---------------------------------------------------------------------------

by travisbot at 2012-06-10T19:36:25Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1585766) (merged 680e732 into 7bec078).
  • Loading branch information
fabpot committed Jun 12, 2012
2 parents 6e524e2 + 680e732 commit ef41e30
Show file tree
Hide file tree
Showing 17 changed files with 32 additions and 118 deletions.
7 changes: 1 addition & 6 deletions src/Symfony/Component/Config/Loader/DelegatingLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,7 @@ public function load($resource, $type = null)
}

/**
* Returns true if this class supports the given resource.
*
* @param mixed $resource A resource
* @param string $type The resource type
*
* @return Boolean true if this class supports the given resource, false otherwise
* {@inheritdoc}
*/
public function supports($resource, $type = null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ public function __construct(RouteCollection $routes)
$this->routes = $routes;
}

/**
* {@inheritdoc}
*/
public function getRoutes()
{
return $this->routes;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,12 @@
interface GeneratorDumperInterface
{
/**
* Dumps a set of routes to a PHP class.
*
* Available options:
*
* * class: The class name
* * base_class: The base class name
* Dumps a set of routes to a string representation of executable code
* that can then be used to generate a URL of such a route.
*
* @param array $options An array of options
*
* @return string A PHP class representing the generator class
* @return string Executable code
*/
function dump(array $options = array());

Expand Down
14 changes: 3 additions & 11 deletions src/Symfony/Component/Routing/Generator/UrlGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,31 +50,23 @@ public function __construct(RouteCollection $routes, RequestContext $context)
}

/**
* Sets the request context.
*
* @param RequestContext $context The context
*
* @api
* {@inheritdoc}
*/
public function setContext(RequestContext $context)
{
$this->context = $context;
}

/**
* Gets the request context.
*
* @return RequestContext The context
* {@inheritdoc}
*/
public function getContext()
{
return $this->context;
}

/**
* {@inheritDoc}
*
* @api
* {@inheritdoc}
*/
public function generate($name, $parameters = array(), $absolute = false)
{
Expand Down
15 changes: 3 additions & 12 deletions src/Symfony/Component/Routing/Loader/AnnotationClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,31 +160,22 @@ protected function addRoute(RouteCollection $collection, $annot, $globals, \Refl
}

/**
* Returns true if this class supports the given resource.
*
* @param mixed $resource A resource
* @param string $type The resource type
*
* @return Boolean True if this class supports the given resource, false otherwise
* {@inheritdoc}
*/
public function supports($resource, $type = null)
{
return is_string($resource) && preg_match('/^(?:\\\\?[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)+$/', $resource) && (!$type || 'annotation' === $type);
}

/**
* Sets the loader resolver.
*
* @param LoaderResolverInterface $resolver A LoaderResolverInterface instance
* {@inheritdoc}
*/
public function setResolver(LoaderResolverInterface $resolver)
{
}

/**
* Gets the loader resolver.
*
* @return LoaderResolverInterface A LoaderResolverInterface instance
* {@inheritdoc}
*/
public function getResolver()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,7 @@ public function load($path, $type = null)
}

/**
* Returns true if this class supports the given resource.
*
* @param mixed $resource A resource
* @param string $type The resource type
*
* @return Boolean True if this class supports the given resource, false otherwise
* {@inheritdoc}
*/
public function supports($resource, $type = null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,7 @@ public function load($file, $type = null)
}

/**
* Returns true if this class supports the given resource.
*
* @param mixed $resource A resource
* @param string $type The resource type
*
* @return Boolean True if this class supports the given resource, false otherwise
* {@inheritdoc}
*/
public function supports($resource, $type = null)
{
Expand Down
7 changes: 1 addition & 6 deletions src/Symfony/Component/Routing/Loader/ClosureLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,7 @@ public function load($closure, $type = null)
}

/**
* Returns true if this class supports the given resource.
*
* @param mixed $resource A resource
* @param string $type The resource type
*
* @return Boolean True if this class supports the given resource, false otherwise
* {@inheritdoc}
*
* @api
*/
Expand Down
7 changes: 1 addition & 6 deletions src/Symfony/Component/Routing/Loader/PhpFileLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,7 @@ public function load($file, $type = null)
}

/**
* Returns true if this class supports the given resource.
*
* @param mixed $resource A resource
* @param string $type The resource type
*
* @return Boolean True if this class supports the given resource, false otherwise
* {@inheritdoc}
*
* @api
*/
Expand Down
7 changes: 1 addition & 6 deletions src/Symfony/Component/Routing/Loader/XmlFileLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,7 @@ protected function parseNode(RouteCollection $collection, \DOMElement $node, $pa
}

/**
* Returns true if this class supports the given resource.
*
* @param mixed $resource A resource
* @param string $type The resource type
*
* @return Boolean True if this class supports the given resource, false otherwise
* {@inheritdoc}
*
* @api
*/
Expand Down
7 changes: 1 addition & 6 deletions src/Symfony/Component/Routing/Loader/YamlFileLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,7 @@ public function load($file, $type = null)
}

/**
* Returns true if this class supports the given resource.
*
* @param mixed $resource A resource
* @param string $type The resource type
*
* @return Boolean True if this class supports the given resource, false otherwise
* {@inheritdoc}
*
* @api
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ public function __construct(RouteCollection $routes)
}

/**
* Gets the routes to dump.
*
* @return RouteCollection A RouteCollection instance
* {@inheritdoc}
*/
public function getRoutes()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,17 @@
interface MatcherDumperInterface
{
/**
* Dumps a set of routes to a PHP class.
*
* Available options:
*
* * class: The class name
* * base_class: The base class name
* Dumps a set of routes to a string representation of executable code
* that can then be used to match a request against these routes.
*
* @param array $options An array of options
*
* @return string A PHP class representing the matcher class
* @return string Executable code
*/
function dump(array $options = array());

/**
* Gets the routes to match.
* Gets the routes to dump.
*
* @return RouteCollection A RouteCollection instance
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@
abstract class RedirectableUrlMatcher extends UrlMatcher implements RedirectableUrlMatcherInterface
{
/**
* @see UrlMatcher::match()
*
* @api
* {@inheritdoc}
*/
public function match($pathinfo)
{
Expand Down
21 changes: 3 additions & 18 deletions src/Symfony/Component/Routing/Matcher/UrlMatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,38 +50,23 @@ public function __construct(RouteCollection $routes, RequestContext $context)
}

/**
* Sets the request context.
*
* @param RequestContext $context The context
*
* @api
* {@inheritdoc}
*/
public function setContext(RequestContext $context)
{
$this->context = $context;
}

/**
* Gets the request context.
*
* @return RequestContext The context
* {@inheritdoc}
*/
public function getContext()
{
return $this->context;
}

/**
* Tries to match a URL with a set of routes.
*
* @param string $pathinfo The path info to be parsed (raw format, i.e. not urldecoded)
*
* @return array An array of parameters
*
* @throws ResourceNotFoundException If the resource could not be found
* @throws MethodNotAllowedException If the resource was found but the request method is not allowed
*
* @api
* {@inheritdoc}
*/
public function match($pathinfo)
{
Expand Down
6 changes: 1 addition & 5 deletions src/Symfony/Component/Routing/RouteCompiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,7 @@ class RouteCompiler implements RouteCompilerInterface
const REGEX_DELIMITER = '#';

/**
* Compiles the current route instance.
*
* @param Route $route A Route instance
*
* @return CompiledRoute A CompiledRoute instance
* {@inheritDoc}
*
* @throws \LogicException If a variable is referenced more than once
*/
Expand Down
12 changes: 3 additions & 9 deletions src/Symfony/Component/Routing/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,7 @@ public function getOption($key)
}

/**
* Gets the RouteCollection instance associated with this Router.
*
* @return RouteCollection A RouteCollection instance
* {@inheritdoc}
*/
public function getRouteCollection()
{
Expand All @@ -142,9 +140,7 @@ public function getRouteCollection()
}

/**
* Sets the request context.
*
* @param RequestContext $context The context
* {@inheritdoc}
*/
public function setContext(RequestContext $context)
{
Expand All @@ -155,9 +151,7 @@ public function setContext(RequestContext $context)
}

/**
* Gets the request context.
*
* @return RequestContext The context
* {@inheritdoc}
*/
public function getContext()
{
Expand Down

0 comments on commit ef41e30

Please sign in to comment.