Skip to content

Commit f623912

Browse files
committed
Apply first scrutinizer suggestions
1 parent b7575d5 commit f623912

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

src/PhpArrayToXml.php

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ public function getTransformTags()
246246
/**
247247
* Set the numeric tag suffix
248248
*
249-
* @param null $value
249+
* @param null|string $value
250250
* @return PhpArrayToXml
251251
*/
252252
public function setNumericTagSuffix($value = null)
@@ -335,7 +335,7 @@ public function getCastNullValue()
335335
/**
336336
* Validate if a given value has a proper tag starting character to be used in XML
337337
*
338-
* @param null $value
338+
* @param null|string $value
339339
* @return bool
340340
*/
341341
public static function hasValidXmlTagStartingChar($value = null)
@@ -349,7 +349,7 @@ public static function hasValidXmlTagStartingChar($value = null)
349349
/**
350350
* Validate if a given value is a valid tag character
351351
*
352-
* @param null $value
352+
* @param null|string $value
353353
* @return bool
354354
*/
355355
public static function isValidXmlTagChar($value = null)
@@ -363,7 +363,7 @@ public static function isValidXmlTagChar($value = null)
363363
/**
364364
* Validate if a given value is a proper tag name to be used in XML
365365
*
366-
* @param null $value
366+
* @param null|string $value
367367
* @return bool
368368
*/
369369
public static function isValidXmlTag($value = null)
@@ -552,7 +552,7 @@ protected function isNumericKey($value)
552552
* Creates an element for DOMDocument
553553
*
554554
* @param $name
555-
* @param null $value
555+
* @param null|string $value
556556
* @param bool $cdata
557557
* @param array $attributes
558558
* @return DOMElement
@@ -584,7 +584,7 @@ protected function createElement($name, $value = null, $cdata = false, $attribut
584584
/**
585585
* Creates a valid tag name
586586
*
587-
* @param null $name
587+
* @param null|string $name
588588
* @return string
589589
*/
590590
protected function createValidTagName($name = null)
@@ -649,7 +649,7 @@ protected function replaceInvalidTagChars($value)
649649
/**
650650
* Creates a valid root name
651651
*
652-
* @param null $name
652+
* @param null|string $name
653653
* @return string
654654
*/
655655
protected function createValidRootName($name = null)
@@ -666,19 +666,17 @@ protected function createValidRootName($name = null)
666666
/**
667667
* Transforms a tag name (only when specified)
668668
*
669-
* @param null $name
669+
* @param null|string $name
670670
* @return null|string
671671
*/
672672
protected function transformTagName($name = null)
673673
{
674674
switch($this->getTransformTags()) {
675675
case self::LOWERCASE: {
676676
return strtolower($name);
677-
break;
678677
}
679678
case self::UPPERCASE: {
680679
return strtoupper($name);
681-
break;
682680
}
683681
default: {
684682
return $name;

0 commit comments

Comments
 (0)