Skip to content

Commit

Permalink
minor #13586 [DX][Config] Changed return type definition for some met…
Browse files Browse the repository at this point in the history
…hods of NodeDefinition (Strate)

This PR was submitted for the 2.7 branch but it was merged into the 2.3 branch instead (closes #13586).

Discussion
----------

[DX][Config] Changed return type definition for some methods of NodeDefinition

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #12280
| License       | MIT

Discussed in #12280

Commits
-------

89ca585 Changed return type definition for some methods of NodeDefinition
  • Loading branch information
fabpot committed Feb 16, 2015
2 parents e18d2ad + 89ca585 commit 31bfc95
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
Expand Up @@ -22,6 +22,11 @@ class EnumNodeDefinition extends ScalarNodeDefinition
{
private $values;

/**
* @param array $values
*
* @return EnumNodeDefinition|$this
*/
public function values(array $values)
{
$values = array_unique($values);
Expand Down
28 changes: 14 additions & 14 deletions src/Symfony/Component/Config/Definition/Builder/NodeDefinition.php
Expand Up @@ -59,7 +59,7 @@ public function __construct($name, NodeParentInterface $parent = null)
*
* @param NodeParentInterface $parent The parent
*
* @return NodeDefinition
* @return NodeDefinition|$this
*/
public function setParent(NodeParentInterface $parent)
{
Expand All @@ -73,7 +73,7 @@ public function setParent(NodeParentInterface $parent)
*
* @param string $info The info text
*
* @return NodeDefinition
* @return NodeDefinition|$this
*/
public function info($info)
{
Expand All @@ -85,7 +85,7 @@ public function info($info)
*
* @param string|array $example
*
* @return NodeDefinition
* @return NodeDefinition|$this
*/
public function example($example)
{
Expand All @@ -98,7 +98,7 @@ public function example($example)
* @param string $key
* @param mixed $value
*
* @return NodeDefinition
* @return NodeDefinition|$this
*/
public function attribute($key, $value)
{
Expand Down Expand Up @@ -149,7 +149,7 @@ public function getNode($forceRootNode = false)
*
* @param mixed $value The default value
*
* @return NodeDefinition
* @return NodeDefinition|$this
*/
public function defaultValue($value)
{
Expand All @@ -162,7 +162,7 @@ public function defaultValue($value)
/**
* Sets the node as required.
*
* @return NodeDefinition
* @return NodeDefinition|$this
*/
public function isRequired()
{
Expand All @@ -176,7 +176,7 @@ public function isRequired()
*
* @param mixed $value
*
* @return NodeDefinition
* @return NodeDefinition|$this
*/
public function treatNullLike($value)
{
Expand All @@ -190,7 +190,7 @@ public function treatNullLike($value)
*
* @param mixed $value
*
* @return NodeDefinition
* @return NodeDefinition|$this
*/
public function treatTrueLike($value)
{
Expand All @@ -204,7 +204,7 @@ public function treatTrueLike($value)
*
* @param mixed $value
*
* @return NodeDefinition
* @return NodeDefinition|$this
*/
public function treatFalseLike($value)
{
Expand All @@ -216,7 +216,7 @@ public function treatFalseLike($value)
/**
* Sets null as the default value.
*
* @return NodeDefinition
* @return NodeDefinition|$this
*/
public function defaultNull()
{
Expand All @@ -226,7 +226,7 @@ public function defaultNull()
/**
* Sets true as the default value.
*
* @return NodeDefinition
* @return NodeDefinition|$this
*/
public function defaultTrue()
{
Expand All @@ -236,7 +236,7 @@ public function defaultTrue()
/**
* Sets false as the default value.
*
* @return NodeDefinition
* @return NodeDefinition|$this
*/
public function defaultFalse()
{
Expand All @@ -256,7 +256,7 @@ public function beforeNormalization()
/**
* Denies the node value being empty.
*
* @return NodeDefinition
* @return NodeDefinition|$this
*/
public function cannotBeEmpty()
{
Expand Down Expand Up @@ -284,7 +284,7 @@ public function validate()
*
* @param bool $deny Whether the overwriting is forbidden or not
*
* @return NodeDefinition
* @return NodeDefinition|$this
*/
public function cannotBeOverwritten($deny = true)
{
Expand Down

0 comments on commit 31bfc95

Please sign in to comment.