Skip to content

Commit

Permalink
CS Fixes - Replaced "array of type" by "Type[]" in PHPDoc block
Browse files Browse the repository at this point in the history
  • Loading branch information
raziel057 authored and fabpot committed Nov 19, 2012
1 parent b337655 commit 2379d86
Show file tree
Hide file tree
Showing 59 changed files with 390 additions and 232 deletions.
2 changes: 1 addition & 1 deletion src/Symfony/Component/BrowserKit/CookieJar.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public function updateFromResponse(Response $response, $uri = null)
/**
* Returns not yet expired cookies.
*
* @return array An array of cookies
* @return Cookie[] An array of cookies
*/
public function all()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/BrowserKit/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Request
* Constructor.
*
* @param string $uri The request URI
* @param array $method The HTTP method request
* @param string $method The HTTP method request
* @param array $parameters The request parameters
* @param array $files An array of uploaded files
* @param array $cookies An array of cookies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ private static function writeCacheFile($file, $content)
*
* @param array $classes
*
* @return array An array of sorted \ReflectionClass instances (dependencies added if needed)
* @return \ReflectionClass[] An array of sorted \ReflectionClass instances (dependencies added if needed)
*
* @throws \InvalidArgumentException When a class can't be loaded
*/
Expand Down
6 changes: 4 additions & 2 deletions src/Symfony/Component/Config/ConfigCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

namespace Symfony\Component\Config;

use Symfony\Component\Config\Resource\ResourceInterface;

/**
* ConfigCache manages PHP cache files.
*
Expand Down Expand Up @@ -83,8 +85,8 @@ public function isFresh()
/**
* Writes cache.
*
* @param string $content The content to write in the cache
* @param array $metadata An array of ResourceInterface instances
* @param string $content The content to write in the cache
* @param ResourceInterface[] $metadata An array of ResourceInterface instances
*
* @throws \RuntimeException When cache file can't be wrote
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Component/Config/Definition/BaseNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public function setAllowOverwrite($allow)
/**
* Sets the closures used for normalization.
*
* @param array $closures An array of Closures used for normalization
* @param \Closure[] $closures An array of Closures used for normalization
*/
public function setNormalizationClosures(array $closures)
{
Expand All @@ -168,7 +168,7 @@ public function setNormalizationClosures(array $closures)
/**
* Sets the closures used for final validation.
*
* @param array $closures An array of Closures used for final validation
* @param \Closure[] $closures An array of Closures used for final validation
*/
public function setFinalValidationClosures(array $closures)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public function end()
/**
* Builds the expressions.
*
* @param array $expressions An array of ExprBuilder instances to build
* @param ExprBuilder[] $expressions An array of ExprBuilder instances to build
*
* @return array
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Component/Console/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ public function find($name)
*
* @param string $namespace A namespace name
*
* @return array An array of Command instances
* @return Command[] An array of Command instances
*
* @api
*/
Expand Down Expand Up @@ -933,7 +933,7 @@ protected function getDefaultInputDefinition()
/**
* Gets the default commands that should always be available.
*
* @return array An array of default Command instances
* @return Command[] An array of default Command instances
*/
protected function getDefaultCommands()
{
Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Component/Console/Formatter/OutputFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ public static function escape($text)
/**
* Initializes console output formatter.
*
* @param Boolean $decorated Whether this formatter should actually decorate strings
* @param array $styles Array of "name => FormatterStyle" instances
* @param Boolean $decorated Whether this formatter should actually decorate strings
* @param FormatterStyle[] $styles Array of "name => FormatterStyle" instances
*
* @api
*/
Expand Down
8 changes: 4 additions & 4 deletions src/Symfony/Component/Console/Input/InputDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function setDefinition(array $definition)
/**
* Sets the InputArgument objects.
*
* @param array $arguments An array of InputArgument objects
* @param InputArgument[] $arguments An array of InputArgument objects
*
* @api
*/
Expand Down Expand Up @@ -178,7 +178,7 @@ public function hasArgument($name)
/**
* Gets the array of InputArgument objects.
*
* @return array An array of InputArgument objects
* @return InputArgument[] An array of InputArgument objects
*
* @api
*/
Expand Down Expand Up @@ -225,7 +225,7 @@ public function getArgumentDefaults()
/**
* Sets the InputOption objects.
*
* @param array $options An array of InputOption objects
* @param InputOption[] $options An array of InputOption objects
*
* @api
*/
Expand Down Expand Up @@ -310,7 +310,7 @@ public function hasOption($name)
/**
* Gets the array of InputOption objects.
*
* @return array An array of InputOption objects
* @return InputOption[] An array of InputOption objects
*
* @api
*/
Expand Down
5 changes: 4 additions & 1 deletion src/Symfony/Component/CssSelector/Node/OrNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,15 @@
*/
class OrNode implements NodeInterface
{
/**
* @var NodeInterface[]
*/
protected $items;

/**
* Constructor.
*
* @param array $items An array of NodeInterface objects
* @param NodeInterface[] $items An array of NodeInterface objects
*/
public function __construct($items)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function process(ContainerBuilder $container)
/**
* Checks for circular references.
*
* @param array $edges An array of Nodes
* @param ServiceReferenceGraphEdge[] $edges An array of Edges
*
* @throws ServiceCircularReferenceException When a circular reference is found.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,20 @@
*/
class RepeatedPass implements CompilerPassInterface
{
private $repeat;
/**
* @var Boolean
*/
private $repeat = false;

/**
* @var RepeatablePassInterface[]
*/
private $passes;

/**
* Constructor.
*
* @param array $passes An array of RepeatablePassInterface objects
* @param RepeatablePassInterface[] $passes An array of RepeatablePassInterface objects
*
* @throws InvalidArgumentException when the passes don't implement RepeatablePassInterface
*/
Expand Down Expand Up @@ -72,7 +79,7 @@ public function setRepeat()
/**
* Returns the passes
*
* @return array An array of RepeatablePassInterface objects
* @return RepeatablePassInterface[] An array of RepeatablePassInterface objects
*/
public function getPasses()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
*/
class ServiceReferenceGraph
{
/**
* @var ServiceReferenceGraphNode[]
*/
private $nodes;

/**
Expand Down Expand Up @@ -66,7 +69,7 @@ public function getNode($id)
/**
* Returns all nodes.
*
* @return array An array of all ServiceReferenceGraphNode objects
* @return ServiceReferenceGraphNode[] An array of all ServiceReferenceGraphNode objects
*/
public function getNodes()
{
Expand Down
4 changes: 4 additions & 0 deletions src/Symfony/Component/DependencyInjection/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@
*/
class Container implements IntrospectableContainerInterface
{
/**
* @var ParameterBagInterface
*/
protected $parameterBag;

protected $services;
protected $scopes;
protected $scopeChildren;
Expand Down
49 changes: 41 additions & 8 deletions src/Symfony/Component/DependencyInjection/ContainerBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,36 @@
*/
class ContainerBuilder extends Container implements TaggedContainerInterface
{
private $extensions = array();
private $extensionsByNs = array();
private $definitions = array();
private $aliases = array();
private $resources = array();
/**
* @var ExtensionInterface[]
*/
private $extensions = array();

/**
* @var ExtensionInterface[]
*/
private $extensionsByNs = array();

/**
* @var Definition[]
*/
private $definitions = array();

/**
* @var Alias[]
*/
private $aliases = array();

/**
* @var ResourceInterface[]
*/
private $resources = array();

private $extensionConfigs = array();

/**
* @var Compiler
*/
private $compiler;

/**
Expand Down Expand Up @@ -82,7 +106,7 @@ public function getExtension($name)
/**
* Returns all registered extensions.
*
* @return array An array of ExtensionInterface
* @return ExtensionInterface[] An array of ExtensionInterface
*
* @api
*/
Expand Down Expand Up @@ -133,6 +157,15 @@ public function addResource(ResourceInterface $resource)
return $this;
}

/**
* Sets the resources for this configuration.
*
* @param ResourceInterface[] $resources An array of resources
*
* @return ContainerBuilder The current instance
*
* @api
*/
public function setResources(array $resources)
{
$this->resources = $resources;
Expand Down Expand Up @@ -484,7 +517,7 @@ public function addAliases(array $aliases)
/**
* Sets the service aliases.
*
* @param array $aliases An array of service definitions
* @param array $aliases An array of aliases
*
* @api
*/
Expand Down Expand Up @@ -619,7 +652,7 @@ public function addDefinitions(array $definitions)
/**
* Sets the service definitions.
*
* @param array $definitions An array of service definitions
* @param Definition[] $definitions An array of service definitions
*
* @api
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/DependencyInjection/Definition.php
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ public function hasMethodCall($method)
/**
* Gets the methods to call after service initialization.
*
* @return array An array of method calls
* @return array An array of method calls
*
* @api
*/
Expand Down
8 changes: 4 additions & 4 deletions src/Symfony/Component/DomCrawler/Crawler.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public function addNodeList(\DOMNodeList $nodes)
/**
* Adds an array of \DOMNode instances to the list of nodes.
*
* @param array $nodes An array of \DOMNode instances
* @param \DOMNode[] $nodes An array of \DOMNode instances
*
* @api
*/
Expand Down Expand Up @@ -592,7 +592,7 @@ public function selectButton($value)
*
* @param string $method The method for the link (get by default)
*
* @return Link A Link instance
* @return Link A Link instance
*
* @throws \InvalidArgumentException If the current node list is empty
*
Expand All @@ -612,7 +612,7 @@ public function link($method = 'get')
/**
* Returns an array of Link objects for the nodes in the list.
*
* @return array An array of Link instances
* @return Link[] An array of Link instances
*
* @api
*/
Expand All @@ -632,7 +632,7 @@ public function links()
* @param array $values An array of values for the form fields
* @param string $method The method for the form
*
* @return Form A Form instance
* @return Form A Form instance
*
* @throws \InvalidArgumentException If the current node list is empty
*
Expand Down
10 changes: 9 additions & 1 deletion src/Symfony/Component/DomCrawler/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class Form extends Link implements \ArrayAccess
* @var \DOMNode
*/
private $button;

/**
* @var Field\FormField[]
*/
Expand Down Expand Up @@ -271,7 +272,7 @@ public function set(FormField $field)
/**
* Gets all fields.
*
* @return array An array of fields
* @return FormField[] An array of fields
*
* @api
*/
Expand Down Expand Up @@ -329,6 +330,13 @@ public function offsetUnset($name)
$this->fields->remove($name);
}

/**
* Sets current \DOMNode instance.
*
* @param \DOMNode $node A \DOMNode instance
*
* @throws \LogicException If given node is not a button or input or does not have a form ancestor
*/
protected function setNode(\DOMNode $node)
{
$this->button = $node;
Expand Down
Loading

0 comments on commit 2379d86

Please sign in to comment.