Nsdocblocks

This commit is contained in:
Drak 2012-10-19 17:43:59 +01:00 committed by Fabien Potencier
parent dba9bc3595
commit 788cc2c7ef
43 changed files with 104 additions and 78 deletions

View File

@ -60,6 +60,9 @@ class WebProcessorTest extends \PHPUnit_Framework_TestCase
}
/**
* @param integer $level
* @param string $message
*
* @return array Record
*/
protected function getRecord($level = Logger::WARNING, $message = 'test')

View File

@ -27,7 +27,7 @@ class RouterCacheWarmer implements CacheWarmerInterface
/**
* Constructor.
*
* @param Router $router A Router instance
* @param RouterInterface $router A Router instance
*/
public function __construct(RouterInterface $router)
{

View File

@ -133,7 +133,7 @@ class Controller extends ContainerAware
* throw $this->createNotFoundException('Page not found!');
*
* @param string $message A message
* @param Exception $previous The previous exception
* @param \Exception $previous The previous exception
*
* @return NotFoundHttpException
*/

View File

@ -82,7 +82,7 @@ class LogoutUrlHelper extends Helper
* @param string $key The firewall key
* @param Boolean $absolute Whether to generate an absolute URL
* @return string The logout URL
* @throws InvalidArgumentException if no LogoutListener is registered for the key
* @throws \InvalidArgumentException if no LogoutListener is registered for the key
*/
private function generateLogoutUrl($key, $absolute)
{

View File

@ -102,6 +102,8 @@ class ProfilerController extends ContainerAware
/**
* Imports token data.
*
* @param Request $request
*
* @return Response A Response instance
*/
public function importAction(Request $request)

View File

@ -33,7 +33,7 @@ class TemplateManager
* Constructor.
*
* @param Profiler $profiler
* @param TwigEngine $templating
* @param EngineInterface $templating
* @param \Twig_Environment $twig
* @param array $templates
*/

View File

@ -11,6 +11,7 @@
namespace Symfony\Component\Config\Definition\Builder;
use Symfony\Component\Config\Definition\NodeInterface;
use Symfony\Component\Config\Definition\ArrayNode;
use Symfony\Component\Config\Definition\PrototypedArrayNode;
use Symfony\Component\Config\Definition\Exception\InvalidDefinitionException;

View File

@ -37,10 +37,10 @@ class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface
/**
* Constructor.
*
* @param integer $verbosity The verbosity level (self::VERBOSITY_QUIET, self::VERBOSITY_NORMAL,
* self::VERBOSITY_VERBOSE)
* @param Boolean $decorated Whether to decorate messages or not (null for auto-guessing)
* @param OutputFormatter $formatter Output formatter instance
* @param integer $verbosity The verbosity level (self::VERBOSITY_QUIET, self::VERBOSITY_NORMAL,
* self::VERBOSITY_VERBOSE)
* @param Boolean $decorated Whether to decorate messages or not (null for auto-guessing)
* @param OutputFormatterInterface $formatter Output formatter instance
*
* @api
*/

View File

@ -35,11 +35,11 @@ class StreamOutput extends Output
/**
* Constructor.
*
* @param mixed $stream A stream resource
* @param integer $verbosity The verbosity level (self::VERBOSITY_QUIET, self::VERBOSITY_NORMAL,
* self::VERBOSITY_VERBOSE)
* @param Boolean $decorated Whether to decorate messages or not (null for auto-guessing)
* @param OutputFormatter $formatter Output formatter instance
* @param mixed $stream A stream resource
* @param integer $verbosity The verbosity level (self::VERBOSITY_QUIET, self::VERBOSITY_NORMAL,
* self::VERBOSITY_VERBOSE)
* @param Boolean $decorated Whether to decorate messages or not (null for auto-guessing)
* @param OutputFormatterInterface $formatter Output formatter instance
*
* @throws \InvalidArgumentException When first argument is not a real stream
*

View File

@ -880,9 +880,9 @@ EOF;
/**
* Builds service calls from arguments
*
* @param array $arguments
* @param string &$calls By reference
* @param string &$behavior By reference
* @param array $arguments
* @param array &$calls By reference
* @param array &$behavior By reference
*/
private function getServiceCallsFromArguments(array $arguments, array &$calls, array &$behavior)
{

View File

@ -848,6 +848,8 @@ class FilesystemTest extends \PHPUnit_Framework_TestCase
/**
* Returns file permissions as three digits (i.e. 755)
*
* @param string $filepath
*
* @return integer
*/
private function getFilePermissions($filePath)

View File

@ -329,7 +329,7 @@ class Finder implements \IteratorAggregate, \Countable
*
* This can be slow as all the matching files and directories must be retrieved for comparison.
*
* @param Closure $closure An anonymous function
* @param \Closure $closure An anonymous function
*
* @return Finder The current Finder instance
*
@ -448,7 +448,7 @@ class Finder implements \IteratorAggregate, \Countable
* The anonymous function receives a \SplFileInfo and must return false
* to remove files.
*
* @param Closure $closure An anonymous function
* @param \Closure $closure An anonymous function
*
* @return Finder The current Finder instance
*

View File

@ -71,7 +71,7 @@ class DateTimeToLocalizedStringTransformer extends BaseDateTimeTransformer
/**
* Transforms a normalized date into a localized date string/array.
*
* @param DateTime $dateTime Normalized date.
* @param \DateTime $dateTime Normalized date.
*
* @return string|array Localized date string/array.
*
@ -108,7 +108,7 @@ class DateTimeToLocalizedStringTransformer extends BaseDateTimeTransformer
*
* @param string|array $value Localized date string/array
*
* @return DateTime Normalized date
* @return \DateTime Normalized date
*
* @throws UnexpectedTypeException if the given value is not a string
* @throws TransformationFailedException if the date could not be parsed

View File

@ -38,8 +38,8 @@ class FormTypeCsrfExtension extends AbstractTypeExtension
/**
* Adds a CSRF field to the form when the CSRF protection is enabled.
*
* @param FormBuilder $builder The form builder
* @param array $options The options
* @param FormBuilderInterface $builder The form builder
* @param array $options The options
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{

View File

@ -528,6 +528,10 @@ class FormValidatorTest extends \PHPUnit_Framework_TestCase
}
/**
* @param string $name
* @param string $dataClass
* @param array $options
*
* @return FormBuilder
*/
private function getBuilder($name = 'name', $dataClass = null, array $options = array())

View File

@ -48,7 +48,7 @@ abstract class FormPerformanceTestCase extends FormIntegrationTestCase
/**
* @param integer $maxRunningTime
* @throws InvalidArgumentException
* @throws \InvalidArgumentException
*/
public function setMaxRunningTime($maxRunningTime)
{

View File

@ -572,7 +572,7 @@ class PropertyPath implements \IteratorAggregate, PropertyPathInterface
* Searches for add and remove methods.
*
* @param \ReflectionClass $reflClass The reflection class for the given object
* @param string|null $singulars The singular form of the property name or null.
* @param array $singulars The singular form of the property name or null.
*
* @return array|null An array containing the adder and remover when found, null otherwise.
*

View File

@ -50,6 +50,8 @@ interface SessionHandlerInterface
/**
* Read session.
*
* @param string $sessionId
*
* @see http://php.net/sessionhandlerinterface.read
*
* @throws \RuntimeException On fatal error but not "record not found".

View File

@ -29,6 +29,8 @@ use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag;
class NativeSessionStorageTest extends \PHPUnit_Framework_TestCase
{
/**
* @param array $options
*
* @return NativeSessionStorage
*/
protected function getStorage(array $options = array())

View File

@ -43,6 +43,8 @@ class ExceptionHandler
/**
* Register the exception handler.
*
* @param Boolean $debug
*
* @return ExceptionHandler The registered exception handler
*/
public static function register($debug = true)

View File

@ -22,9 +22,9 @@ class AccessDeniedHttpException extends HttpException
/**
* Constructor.
*
* @param string $message The internal exception message
* @param Exception $previous The previous exception
* @param integer $code The internal exception code
* @param string $message The internal exception message
* @param \Exception $previous The previous exception
* @param integer $code The internal exception code
*/
public function __construct($message = null, \Exception $previous = null, $code = 0)
{

View File

@ -21,10 +21,10 @@ class MethodNotAllowedHttpException extends HttpException
/**
* Constructor.
*
* @param array $allow An array of allowed methods
* @param string $message The internal exception message
* @param Exception $previous The previous exception
* @param integer $code The internal exception code
* @param array $allow An array of allowed methods
* @param string $message The internal exception message
* @param \Exception $previous The previous exception
* @param integer $code The internal exception code
*/
public function __construct(array $allow, $message = null, \Exception $previous = null, $code = 0)
{

View File

@ -21,9 +21,9 @@ class NotFoundHttpException extends HttpException
/**
* Constructor.
*
* @param string $message The internal exception message
* @param Exception $previous The previous exception
* @param integer $code The internal exception code
* @param string $message The internal exception message
* @param \Exception $previous The previous exception
* @param integer $code The internal exception code
*/
public function __construct($message = null, \Exception $previous = null, $code = 0)
{

View File

@ -29,7 +29,7 @@ class RedisMock
}
/**
* Add a memcached server to connection pool
* Add a server to connection pool
*
* @param string $host
* @param integer $port

View File

@ -53,6 +53,8 @@ function intl_get_error_message()
/**
* Stub implementation for the intl_error_name function of the intl extension
*
* @param integer $errorCode
*
* @return String will be the same as the name of the error code constant
*
* @see Symfony\Component\Locale\Stub\StubIntl::getErrorName

View File

@ -79,7 +79,7 @@ class FullTransformer
/**
* Format a DateTime using ICU dateformat pattern
*
* @param DateTime $dateTime A DateTime object to be used to generate the formatted value
* @param \DateTime $dateTime A DateTime object to be used to generate the formatted value
*
* @return string The formatted value
*/
@ -127,12 +127,12 @@ class FullTransformer
/**
* Parse a pattern based string to a timestamp value
*
* @param DateTime $dateTime A configured DateTime object to use to perform the date calculation
* @param \DateTime $dateTime A configured DateTime object to use to perform the date calculation
* @param string $value String to convert to a time value
*
* @return int The corresponding Unix timestamp
*
* @throws InvalidArgumentException When the value can not be matched with pattern
* @throws \InvalidArgumentException When the value can not be matched with pattern
*/
public function parse(\DateTime $dateTime, $value)
{
@ -278,8 +278,8 @@ class FullTransformer
* Calculates the Unix timestamp based on the matched values by the reverse matching regular
* expression of parse()
*
* @param DateTime $dateTime The DateTime object to be used to calculate the timestamp
* @param array $options An array with the matched values to be used to calculate the timestamp
* @param \DateTime $dateTime The DateTime object to be used to calculate the timestamp
* @param array $options An array with the matched values to be used to calculate the timestamp
*
* @return Boolean|int The calculated timestamp or false if matched date is invalid
*/

View File

@ -75,7 +75,7 @@ class TimeZoneTransformer extends Transformer
* @see http://www.twinsun.com/tz/tz-link.htm
*
* @throws NotImplementedException When the GMT time zone have minutes offset different than zero
* @throws InvalidArgumentException When the value can not be matched with pattern
* @throws \InvalidArgumentException When the value can not be matched with pattern
*/
public static function getEtcTimeZoneId($formattedTimeZone)
{

View File

@ -22,8 +22,8 @@ abstract class Transformer
* Format a value using a configured DateTime as date/time source
*
*
* @param DateTime $dateTime A DateTime object to be used to generate the formatted value
* @param int $length The formatted value string length
* @param \DateTime $dateTime A DateTime object to be used to generate the formatted value
* @param int $length The formatted value string length
*
* @return string The formatted value
*/

View File

@ -79,7 +79,7 @@ class StubLocale
*
* @return array The country names with their codes as keys
*
* @throws InvalidArgumentException When the locale is different than 'en'
* @throws \InvalidArgumentException When the locale is different than 'en'
*/
public static function getDisplayCountries($locale)
{
@ -103,7 +103,7 @@ class StubLocale
*
* @return array The language names with their codes as keys
*
* @throws InvalidArgumentException When the locale is different than 'en'
* @throws \InvalidArgumentException When the locale is different than 'en'
*/
public static function getDisplayLanguages($locale)
{
@ -127,7 +127,7 @@ class StubLocale
*
* @return array The locale names with their codes as keys
*
* @throws InvalidArgumentException When the locale is different than 'en'
* @throws \InvalidArgumentException When the locale is different than 'en'
*/
public static function getDisplayLocales($locale)
{
@ -163,7 +163,7 @@ class StubLocale
*
* @return array The currencies names with their codes as keys
*
* @throws InvalidArgumentException When the locale is different than 'en'
* @throws \InvalidArgumentException When the locale is different than 'en'
*/
public static function getDisplayCurrencies($locale)
{
@ -429,7 +429,7 @@ class StubLocale
*
* @see http://www.php.net/manual/en/locale.lookup.php
*
* @throws RuntimeException When the intl extension is not loaded
* @throws \RuntimeException When the intl extension is not loaded
*/
public static function lookup(array $langtag, $locale, $canonicalize = false, $default = null)
{
@ -494,7 +494,7 @@ class StubLocale
*
* @return array
*
* @throws InvalidArgumentException When the locale is different than 'en'
* @throws \InvalidArgumentException When the locale is different than 'en'
*/
private static function getStubData($locale, $cacheVariable, $stubDataDir)
{

View File

@ -575,7 +575,7 @@ class Process
*
* @param float $timeout The timeout in seconds
*
* @return integer The exitcode of the process
* @return integer The exit-code of the process
*
* @throws \RuntimeException if the process got signaled
*/

View File

@ -61,10 +61,10 @@ class XmlFileLoader extends FileLoader
/**
* Parses a node from a loaded XML file.
*
* @param RouteCollection $collection the collection to associate with the node
* @param DOMElement $node the node to parse
* @param string $path the path of the XML file being processed
* @param string $file
* @param RouteCollection $collection the collection to associate with the node
* @param \DOMElement $node the node to parse
* @param string $path the path of the XML file being processed
* @param string $file
*/
protected function parseNode(RouteCollection $collection, \DOMElement $node, $path, $file)
{

View File

@ -123,7 +123,7 @@ class YamlFileLoader extends FileLoader
*
* @return array
*
* @throws InvalidArgumentException if one of the provided config keys is not supported
* @throws \InvalidArgumentException if one of the provided config keys is not supported
*/
private function normalizeRouteConfig(array $config)
{

View File

@ -29,9 +29,9 @@ class AclCollectionCache
/**
* Constructor.
*
* @param AclProviderInterface $aclProvider
* @param ObjectIdentityRetrievalStrategy $oidRetrievalStrategy
* @param SecurityIdentityRetrievalStrategy $sidRetrievalStrategy
* @param AclProviderInterface $aclProvider
* @param ObjectIdentityRetrievalStrategyInterface $oidRetrievalStrategy
* @param SecurityIdentityRetrievalStrategyInterface $sidRetrievalStrategy
*/
public function __construct(AclProviderInterface $aclProvider, ObjectIdentityRetrievalStrategyInterface $oidRetrievalStrategy, SecurityIdentityRetrievalStrategyInterface $sidRetrievalStrategy)
{

View File

@ -27,11 +27,11 @@ final class PersistentToken implements PersistentTokenInterface
/**
* Constructor
*
* @param string $class
* @param string $username
* @param string $series
* @param string $tokenValue
* @param DateTime $lastUsed
* @param string $class
* @param string $username
* @param string $series
* @param string $tokenValue
* @param \DateTime $lastUsed
*/
public function __construct($class, $username, $series, $tokenValue, \DateTime $lastUsed)
{

View File

@ -39,9 +39,9 @@ interface TokenProviderInterface
/**
* Updates the token according to this data.
*
* @param string $series
* @param string $tokenValue
* @param DateTime $lastUsed
* @param string $series
* @param string $tokenValue
* @param \DateTime $lastUsed
*/
public function updateToken($series, $tokenValue, \DateTime $lastUsed);

View File

@ -33,7 +33,7 @@ class Firewall
/**
* Constructor.
*
* @param FirewallMap $map A FirewallMap instance
* @param FirewallMapInterface $map A FirewallMapInterface instance
* @param EventDispatcherInterface $dispatcher An EventDispatcherInterface instance
*/
public function __construct(FirewallMapInterface $map, EventDispatcherInterface $dispatcher)

View File

@ -176,7 +176,8 @@ class GetSetMethodNormalizer extends SerializerAwareNormalizer implements Normal
/**
* Checks if a method's name is get.* and can be called without parameters.
*
* @param ReflectionMethod $method the method to check
* @param \ReflectionMethod $method the method to check
*
* @return Boolean whether the method is a getter.
*/
private function isGetMethod(\ReflectionMethod $method)

View File

@ -59,6 +59,8 @@ class UrlPackage extends Package
/**
* Returns the base URL for a path.
*
* @param string $path
*
* @return string The base URL
*/
public function getBaseUrl($path)

View File

@ -74,7 +74,7 @@ class CoreAssetsHelper extends Helper implements PackageInterface
*
* @return PackageInterface An asset package
*
* @throws InvalidArgumentException If there is no package by that name
* @throws \InvalidArgumentException If there is no package by that name
*/
public function getPackage($name = null)
{

View File

@ -49,14 +49,17 @@ abstract class FileDumper implements DumperInterface
/**
* Transforms a domain of a message catalogue to its string representation.
*
* @return The string representation
* @param MessageCatalogue $messages
* @param string $domain
*
* @return string representation
*/
abstract protected function format(MessageCatalogue $messages, $domain);
/**
* Gets the file extension of the dumper.
*
* @return The file extension
* @return string file extension
*/
abstract protected function getExtension();
}

View File

@ -68,7 +68,7 @@ class MoFileLoader extends ArrayLoader implements LoaderInterface
* @param resource $resource
*
* @return array
* @throws InvalidArgumentException If stream content has an invalid format.
* @throws \InvalidArgumentException If stream content has an invalid format.
*/
private function parse($resource)
{

View File

@ -78,7 +78,7 @@ class XmlFileLoader extends FileLoader
/**
* Parses a collection of "constraint" XML nodes.
*
* @param SimpleXMLElement $nodes The XML nodes
* @param \SimpleXMLElement $nodes The XML nodes
*
* @return array The Constraint instances
*/
@ -112,7 +112,7 @@ class XmlFileLoader extends FileLoader
/**
* Parses a collection of "value" XML nodes.
*
* @param SimpleXMLElement $nodes The XML nodes
* @param \SimpleXMLElement $nodes The XML nodes
*
* @return array The values
*/
@ -146,7 +146,7 @@ class XmlFileLoader extends FileLoader
/**
* Parses a collection of "option" XML nodes.
*
* @param SimpleXMLElement $nodes The XML nodes
* @param \SimpleXMLElement $nodes The XML nodes
*
* @return array The options
*/

View File

@ -608,11 +608,11 @@ class Parser
}
/**
* Returns true if the string is unindented collection item
* Returns true if the string is un-indented collection item
*
* @return Boolean Returns true if the string is unindented collection item, false otherwise
* @return Boolean Returns true if the string is un-indented collection item, false otherwise
*/
private function isStringUnIndentedCollectionItem($string)
private function isStringUnIndentedCollectionItem()
{
return (0 === strpos($this->currentLine, '- '));
}