minor #13586 [DX][Config] Changed return type definition for some methods 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
This commit is contained in:
Fabien Potencier 2015-02-16 10:51:32 +01:00
commit 31bfc9508b
2 changed files with 19 additions and 14 deletions

View File

@ -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);

View File

@ -59,7 +59,7 @@ abstract class NodeDefinition implements NodeParentInterface
*
* @param NodeParentInterface $parent The parent
*
* @return NodeDefinition
* @return NodeDefinition|$this
*/
public function setParent(NodeParentInterface $parent)
{
@ -73,7 +73,7 @@ abstract class NodeDefinition implements NodeParentInterface
*
* @param string $info The info text
*
* @return NodeDefinition
* @return NodeDefinition|$this
*/
public function info($info)
{
@ -85,7 +85,7 @@ abstract class NodeDefinition implements NodeParentInterface
*
* @param string|array $example
*
* @return NodeDefinition
* @return NodeDefinition|$this
*/
public function example($example)
{
@ -98,7 +98,7 @@ abstract class NodeDefinition implements NodeParentInterface
* @param string $key
* @param mixed $value
*
* @return NodeDefinition
* @return NodeDefinition|$this
*/
public function attribute($key, $value)
{
@ -149,7 +149,7 @@ abstract class NodeDefinition implements NodeParentInterface
*
* @param mixed $value The default value
*
* @return NodeDefinition
* @return NodeDefinition|$this
*/
public function defaultValue($value)
{
@ -162,7 +162,7 @@ abstract class NodeDefinition implements NodeParentInterface
/**
* Sets the node as required.
*
* @return NodeDefinition
* @return NodeDefinition|$this
*/
public function isRequired()
{
@ -176,7 +176,7 @@ abstract class NodeDefinition implements NodeParentInterface
*
* @param mixed $value
*
* @return NodeDefinition
* @return NodeDefinition|$this
*/
public function treatNullLike($value)
{
@ -190,7 +190,7 @@ abstract class NodeDefinition implements NodeParentInterface
*
* @param mixed $value
*
* @return NodeDefinition
* @return NodeDefinition|$this
*/
public function treatTrueLike($value)
{
@ -204,7 +204,7 @@ abstract class NodeDefinition implements NodeParentInterface
*
* @param mixed $value
*
* @return NodeDefinition
* @return NodeDefinition|$this
*/
public function treatFalseLike($value)
{
@ -216,7 +216,7 @@ abstract class NodeDefinition implements NodeParentInterface
/**
* Sets null as the default value.
*
* @return NodeDefinition
* @return NodeDefinition|$this
*/
public function defaultNull()
{
@ -226,7 +226,7 @@ abstract class NodeDefinition implements NodeParentInterface
/**
* Sets true as the default value.
*
* @return NodeDefinition
* @return NodeDefinition|$this
*/
public function defaultTrue()
{
@ -236,7 +236,7 @@ abstract class NodeDefinition implements NodeParentInterface
/**
* Sets false as the default value.
*
* @return NodeDefinition
* @return NodeDefinition|$this
*/
public function defaultFalse()
{
@ -256,7 +256,7 @@ abstract class NodeDefinition implements NodeParentInterface
/**
* Denies the node value being empty.
*
* @return NodeDefinition
* @return NodeDefinition|$this
*/
public function cannotBeEmpty()
{
@ -284,7 +284,7 @@ abstract class NodeDefinition implements NodeParentInterface
*
* @param bool $deny Whether the overwriting is forbidden or not
*
* @return NodeDefinition
* @return NodeDefinition|$this
*/
public function cannotBeOverwritten($deny = true)
{