Skip to content

Commit 32f41e4

Browse files
committed
[DoctrineBridge] fixed some CS
1 parent cdbeec1 commit 32f41e4

File tree

3 files changed

+20
-8
lines changed

3 files changed

+20
-8
lines changed

Encoder/DecoderInterface.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ interface DecoderInterface
2222
/**
2323
* Decodes a string into PHP data
2424
*
25-
* @param string $data data to decode
26-
* @param string $format format to decode from
25+
* @param string $data Data to decode
26+
* @param string $format Format to decode from
27+
*
2728
* @return mixed
2829
*/
2930
function decode($data, $format);

Encoder/EncoderInterface.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ interface EncoderInterface
2222
/**
2323
* Encodes data into a string
2424
*
25-
* @param mixed $data data to encode
26-
* @param string $format format to encode to
25+
* @param mixed $data Data to encode
26+
* @param string $format Format to encode to
27+
*
2728
* @return string
2829
*/
2930
function encode($data, $format);

Encoder/XmlEncoder.php

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ public function getRootNodeName()
9292
/**
9393
* @param DOMNode $node
9494
* @param string $val
95+
*
9596
* @return Boolean
9697
*/
9798
final protected function appendXMLString($node, $val)
@@ -110,6 +111,7 @@ final protected function appendXMLString($node, $val)
110111
/**
111112
* @param DOMNode $node
112113
* @param string $val
114+
*
113115
* @return Boolean
114116
*/
115117
final protected function appendText($node, $val)
@@ -123,6 +125,7 @@ final protected function appendText($node, $val)
123125
/**
124126
* @param DOMNode $node
125127
* @param string $val
128+
*
126129
* @return Boolean
127130
*/
128131
final protected function appendCData($node, $val)
@@ -136,6 +139,7 @@ final protected function appendCData($node, $val)
136139
/**
137140
* @param DOMNode $node
138141
* @param DOMDocumentFragment $fragment
142+
*
139143
* @return Boolean
140144
*/
141145
final protected function appendDocumentFragment($node, $fragment)
@@ -151,7 +155,9 @@ final protected function appendDocumentFragment($node, $fragment)
151155

152156
/**
153157
* Checks the name is a valid xml element name
158+
*
154159
* @param string $name
160+
*
155161
* @return Boolean
156162
*/
157163
final protected function isElementNameValid($name)
@@ -162,9 +168,10 @@ final protected function isElementNameValid($name)
162168
}
163169

164170
/**
165-
* Parse the input SimpleXmlElement into an array
171+
* Parse the input SimpleXmlElement into an array.
166172
*
167173
* @param SimpleXmlElement $node xml to parse
174+
*
168175
* @return array
169176
*/
170177
private function parseXml($node)
@@ -190,7 +197,7 @@ private function parseXml($node)
190197

191198
if ($key === 'item') {
192199
if (isset($value['@key'])) {
193-
$data[(string)$value['@key']] = $value['#'];
200+
$data[(string) $value['@key']] = $value['#'];
194201
} elseif (isset($data['item'])) {
195202
$tmp = $data['item'];
196203
unset($data['item']);
@@ -215,6 +222,7 @@ private function parseXml($node)
215222
*
216223
* @param DOMNode $parentNode
217224
* @param array|object $data data
225+
*
218226
* @return Boolean
219227
*/
220228
private function buildXml($parentNode, $data)
@@ -224,7 +232,7 @@ private function buildXml($parentNode, $data)
224232
if (is_array($data) || $data instanceof \Traversable) {
225233
foreach ($data as $key => $data) {
226234
//Ah this is the magic @ attribute types.
227-
if (0 === strpos($key, "@") && is_scalar($data) && $this->isElementNameValid($attributeName = substr($key,1))) {
235+
if (0 === strpos($key, "@") && is_scalar($data) && $this->isElementNameValid($attributeName = substr($key, 1))) {
228236
$parentNode->setAttribute($attributeName, $data);
229237
} elseif ($key === '#') {
230238
$append = $this->selectNodeType($parentNode, $data);
@@ -276,8 +284,9 @@ private function buildXml($parentNode, $data)
276284
*
277285
* @param DOMNode $parentNode
278286
* @param array|object $data
279-
* @param string $nodename
287+
* @param string $nodeName
280288
* @param string $key
289+
*
281290
* @return Boolean
282291
*/
283292
private function appendNode($parentNode, $data, $nodeName, $key = null)
@@ -300,6 +309,7 @@ private function appendNode($parentNode, $data, $nodeName, $key = null)
300309
*
301310
* @param DOMNode $node
302311
* @param mixed $val
312+
*
303313
* @return Boolean
304314
*/
305315
private function selectNodeType($node, $val)

0 commit comments

Comments
 (0)