From e47f808376fc2e20401f15fb3ed45e4143c7d43e Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Mon, 28 Feb 2011 10:22:26 +0100 Subject: [PATCH] [Config] Tweak phpDoc --- .../Component/Config/Definition/ArrayNode.php | 6 ------ .../Component/Config/Definition/BaseNode.php | 14 ++++---------- .../Config/Definition/Builder/MergeBuilder.php | 4 ++-- .../Config/Definition/Builder/NodeBuilder.php | 10 +++++----- .../Config/Definition/Builder/TreeBuilder.php | 2 +- .../Component/Config/Definition/NodeInterface.php | 4 ++-- .../Component/Config/Definition/Processor.php | 2 +- .../Config/Definition/PrototypeNodeInterface.php | 1 - .../Component/Config/Definition/VariableNode.php | 3 +-- 9 files changed, 16 insertions(+), 30 deletions(-) diff --git a/src/Symfony/Component/Config/Definition/ArrayNode.php b/src/Symfony/Component/Config/Definition/ArrayNode.php index 28aea51b70..22995779f4 100644 --- a/src/Symfony/Component/Config/Definition/ArrayNode.php +++ b/src/Symfony/Component/Config/Definition/ArrayNode.php @@ -61,7 +61,6 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface * Sets the xml remappings that should be performed. * * @param array $remappings an array of the form array(array(string, string)) - * @return void */ public function setXmlRemappings(array $remappings) { @@ -73,7 +72,6 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface * contain. By default this is zero, meaning no elements. * * @param integer $number - * @return void */ public function setMinNumberOfElements($number) { @@ -99,7 +97,6 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface * * @param string $attribute The name of the attribute which value is to be used as a key * @param Boolean $remove Whether or not to remove the key - * @return void */ public function setKeyAttribute($attribute, $remove = true) { @@ -112,7 +109,6 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface * defined in any of the configuration files. * * @param Boolean $boolean - * @return void */ public function setAddIfNotSet($boolean) { @@ -124,7 +120,6 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface * be unset. * * @param Boolean $allow - * @return void */ public function setAllowFalse($allow) { @@ -135,7 +130,6 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface * Sets whether new keys can be defined in subsequent configurations. * * @param Boolean $allow - * @return void */ public function setAllowNewKeys($allow) { diff --git a/src/Symfony/Component/Config/Definition/BaseNode.php b/src/Symfony/Component/Config/Definition/BaseNode.php index 43ff3f4df9..5578d361d1 100644 --- a/src/Symfony/Component/Config/Definition/BaseNode.php +++ b/src/Symfony/Component/Config/Definition/BaseNode.php @@ -57,7 +57,6 @@ abstract class BaseNode implements NodeInterface * * @param mixed $originalValue * @param mixed $equivalentValue - * @return void */ public function addEquivalentValue($originalValue, $equivalentValue) { @@ -67,8 +66,7 @@ abstract class BaseNode implements NodeInterface /** * Set this node as required. * - * @param boolean $boolean Required node - * @return void + * @param Boolean $boolean Required node */ public function setRequired($boolean) { @@ -78,8 +76,7 @@ abstract class BaseNode implements NodeInterface /** * Sets if this node can be overridden. * - * @param boolean $allow - * @return void + * @param Boolean $allow */ public function setAllowOverwrite($allow) { @@ -90,7 +87,6 @@ abstract class BaseNode implements NodeInterface * Sets the closures used for normalization. * * @param array $closures An array of Closures used for normalization - * @return void */ public function setNormalizationClosures(array $closures) { @@ -101,7 +97,6 @@ abstract class BaseNode implements NodeInterface * Sets the closures used for final validation. * * @param array $closures An array of Closures used for final validation - * @return void */ public function setFinalValidationClosures(array $closures) { @@ -111,7 +106,7 @@ abstract class BaseNode implements NodeInterface /** * Checks if this node is required. * - * @return boolean + * @return Boolean */ public function isRequired() { @@ -232,8 +227,7 @@ abstract class BaseNode implements NodeInterface * Validates the type of a Node. * * @param mixed $value The value to validate - * @return void - * @throws \InvalidTypeException when the value is invalid + * @throws InvalidTypeException when the value is invalid */ abstract protected function validateType($value); diff --git a/src/Symfony/Component/Config/Definition/Builder/MergeBuilder.php b/src/Symfony/Component/Config/Definition/Builder/MergeBuilder.php index e05d3c2e61..22e004be85 100644 --- a/src/Symfony/Component/Config/Definition/Builder/MergeBuilder.php +++ b/src/Symfony/Component/Config/Definition/Builder/MergeBuilder.php @@ -37,7 +37,7 @@ class MergeBuilder /** * Sets whether the node can be unset. * - * @param boolean $allow + * @param Boolean $allow * @return Symfony\Component\Config\Definition\Builder\MergeBuilder */ public function allowUnset($allow = true) @@ -50,7 +50,7 @@ class MergeBuilder /** * Sets whether the node can be overwritten. * - * @param boolean $deny Whether the overwriting is forbidden or not + * @param Boolean $deny Whether the overwriting is forbidden or not * * @return Symfony\Component\Config\Definition\Builder\MergeBuilder */ diff --git a/src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php b/src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php index c7044dc9f3..bf80e5f233 100644 --- a/src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php +++ b/src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php @@ -149,7 +149,7 @@ class NodeBuilder } /** - * Creates a child boolean node. + * Creates a child Boolean node. * * @param string $name The name of the node * @@ -349,7 +349,7 @@ class NodeBuilder } /** - * Sets an attribute to use as key. + * Set the attribute which value is to be used as key. * * This is useful when you have an indexed array that should be an * associative array. You can select an item from within the array @@ -363,7 +363,7 @@ class NodeBuilder * becomes * * array( - * 'id' => array('foo' => 'bar'), + * 'my_name' => array('foo' => 'bar'), * ) * * If you'd like "'id' => 'my_name'" to still be present in the resulting @@ -399,7 +399,7 @@ class NodeBuilder /** * Sets whether the node can be overwritten. * - * @param boolean $deny Whether the overwriting is forbidden or not + * @param Boolean $deny Whether the overwriting is forbidden or not * * @return Symfony\Component\Config\Definition\Builder\NodeBuilder */ @@ -425,7 +425,7 @@ class NodeBuilder /** * Sets whether the node can be unset. * - * @param boolean $allow + * @param Boolean $allow * * @return Symfony\Component\Config\Definition\Builder\NodeBuilder */ diff --git a/src/Symfony/Component/Config/Definition/Builder/TreeBuilder.php b/src/Symfony/Component/Config/Definition/Builder/TreeBuilder.php index 060bb9af0c..d7dbf6a93d 100644 --- a/src/Symfony/Component/Config/Definition/Builder/TreeBuilder.php +++ b/src/Symfony/Component/Config/Definition/Builder/TreeBuilder.php @@ -80,7 +80,7 @@ class TreeBuilder } /** - * Creates a boolean node. + * Creates a Boolean node. * * @param NodeBuilder $node The builder of the node * diff --git a/src/Symfony/Component/Config/Definition/NodeInterface.php b/src/Symfony/Component/Config/Definition/NodeInterface.php index 4fddce01cb..7a3402341c 100644 --- a/src/Symfony/Component/Config/Definition/NodeInterface.php +++ b/src/Symfony/Component/Config/Definition/NodeInterface.php @@ -38,14 +38,14 @@ interface NodeInterface /** * Returns true when the node is required. * - * @return boolean If the node is required + * @return Boolean If the node is required */ function isRequired(); /** * Returns true when the node has a default value. * - * @return boolean If the node has a default value + * @return Boolean If the node has a default value */ function hasDefaultValue(); diff --git a/src/Symfony/Component/Config/Definition/Processor.php b/src/Symfony/Component/Config/Definition/Processor.php index 2688b0a973..729bd6fd45 100644 --- a/src/Symfony/Component/Config/Definition/Processor.php +++ b/src/Symfony/Component/Config/Definition/Processor.php @@ -25,7 +25,7 @@ class Processor * * @param NodeInterface $configTree The node tree to process * @param array $configs An array of configuration items - * @return boolean + * @return Boolean */ public function process(NodeInterface $configTree, array $configs) { diff --git a/src/Symfony/Component/Config/Definition/PrototypeNodeInterface.php b/src/Symfony/Component/Config/Definition/PrototypeNodeInterface.php index dcf39e84a3..81be01fce5 100644 --- a/src/Symfony/Component/Config/Definition/PrototypeNodeInterface.php +++ b/src/Symfony/Component/Config/Definition/PrototypeNodeInterface.php @@ -22,7 +22,6 @@ interface PrototypeNodeInterface extends NodeInterface * Sets the name of the node. * * @param string $name The name of the node - * @return void */ function setName($name); } \ No newline at end of file diff --git a/src/Symfony/Component/Config/Definition/VariableNode.php b/src/Symfony/Component/Config/Definition/VariableNode.php index 327143b984..056018130d 100644 --- a/src/Symfony/Component/Config/Definition/VariableNode.php +++ b/src/Symfony/Component/Config/Definition/VariableNode.php @@ -55,8 +55,7 @@ class VariableNode extends BaseNode implements PrototypeNodeInterface /** * Sets if this node is allowed to have an empty value. * - * @param boolean $boolean True if this entity will accept empty values. - * @return void + * @param Boolean $boolean True if this entity will accept empty values. */ public function setAllowEmptyValue($boolean) {