Skip to content

Commit 07d49c0

Browse files
Merge branch '3.4' into 4.3
* 3.4: (21 commits) [SecurityBundle] fix return type declarations [BrowserKit] fix return type declarations [PropertyInfo] fix return type declarations [Bridge/Doctrine] fix return type declarations [Form] fix return type declarations [Console] fix return type declarations [Intl] fix return type declarations [Templating] fix return type declarations [DomCrawler] fix return type declarations [Validator] fix return type declarations [Process] fix return type declarations [Workflow] fix return type declarations [Cache] fix return type declarations [Serializer] fix return type declarations [Translation] fix return type declarations [DI] fix return type declarations [Config] fix return type declarations [HttpKernel] Fix return type declarations [Security] Fix return type declarations [Routing] Fix return type declarations ...
2 parents 1a359ca + 24a60c0 commit 07d49c0

File tree

4 files changed

+24
-9
lines changed

4 files changed

+24
-9
lines changed

Definition/ArrayNode.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,13 @@ public function setNormalizeKeys($normalizeKeys)
3838
}
3939

4040
/**
41-
* Normalizes keys between the different configuration formats.
41+
* {@inheritdoc}
4242
*
4343
* Namely, you mostly have foo_bar in YAML while you have foo-bar in XML.
4444
* After running this method, all keys are normalized to foo_bar.
4545
*
4646
* If you have a mixed key like foo-bar_moo, it will not be altered.
4747
* The key will also not be altered if the target key already exists.
48-
*
49-
* @param mixed $value
50-
*
51-
* @return array The value with normalized keys
5248
*/
5349
protected function preNormalize($value)
5450
{

Definition/BaseNode.php

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,21 +97,37 @@ public static function resetPlaceholders(): void
9797
self::$placeholders = [];
9898
}
9999

100+
/**
101+
* @param string $key
102+
*/
100103
public function setAttribute($key, $value)
101104
{
102105
$this->attributes[$key] = $value;
103106
}
104107

108+
/**
109+
* @param string $key
110+
*
111+
* @return mixed
112+
*/
105113
public function getAttribute($key, $default = null)
106114
{
107115
return isset($this->attributes[$key]) ? $this->attributes[$key] : $default;
108116
}
109117

118+
/**
119+
* @param string $key
120+
*
121+
* @return bool
122+
*/
110123
public function hasAttribute($key)
111124
{
112125
return isset($this->attributes[$key]);
113126
}
114127

128+
/**
129+
* @return array
130+
*/
115131
public function getAttributes()
116132
{
117133
return $this->attributes;
@@ -122,6 +138,9 @@ public function setAttributes(array $attributes)
122138
$this->attributes = $attributes;
123139
}
124140

141+
/**
142+
* @param string $key
143+
*/
125144
public function removeAttribute($key)
126145
{
127146
unset($this->attributes[$key]);
@@ -140,7 +159,7 @@ public function setInfo($info)
140159
/**
141160
* Returns info message.
142161
*
143-
* @return string The info text
162+
* @return string|null The info text
144163
*/
145164
public function getInfo()
146165
{
@@ -160,7 +179,7 @@ public function setExample($example)
160179
/**
161180
* Retrieves the example configuration for this node.
162181
*
163-
* @return string|array The example
182+
* @return string|array|null The example
164183
*/
165184
public function getExample()
166185
{

Definition/PrototypedArrayNode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function setKeyAttribute($attribute, $remove = true)
7878
/**
7979
* Retrieves the name of the attribute which value should be used as key.
8080
*
81-
* @return string The name of the attribute
81+
* @return string|null The name of the attribute
8282
*/
8383
public function getKeyAttribute()
8484
{

Util/XmlUtils.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ public static function loadFile($file, $schemaOrCallable = null)
152152
* @param \DOMElement $element A \DOMElement instance
153153
* @param bool $checkPrefix Check prefix in an element or an attribute name
154154
*
155-
* @return array A PHP array
155+
* @return mixed
156156
*/
157157
public static function convertDomElementToArray(\DOMElement $element, $checkPrefix = true)
158158
{

0 commit comments

Comments
 (0)