Corrections signature méthodes

master 3.0.1
Julien Rosset 3 months ago
parent 78292f0bf3
commit 72d3e0ed4d

@ -50,7 +50,7 @@ trait TMultiLevelProperties {
*
* @throws UnexpectedValueException If property is not set AND $default is Null
*/
public function getProperty ($name, mixed $default = null) {
public function getProperty ($name, mixed $default = null): mixed {
if (!$this->hasProperty($name)) {
if ($default === null) {
throw new UnexpectedValueException('The "' . $name . '" property is not set');
@ -86,11 +86,11 @@ trait TMultiLevelProperties {
/**
* Get array of levels of a property name
*
* @param string|string[]|IArrayCast $propertyName The property name
* @param string|IArrayCast|string[] $propertyName The property name
*
* @return InsensitiveCaseKeyImmutableCollection The property levels
*/
private function getPropertyLevels ($propertyName): InsensitiveCaseKeyImmutableCollection {
private function getPropertyLevels (array|IArrayCast|string $propertyName): InsensitiveCaseKeyImmutableCollection {
if ($propertyName instanceof IArrayCast) {
$parts = $propertyName->toArray();
}

@ -15,5 +15,5 @@ interface IXmlStructure {
*
* @return mixed The extracted value
*/
public function parseXml (SimpleXMLElement $xmlNode);
public function parseXml (SimpleXMLElement $xmlNode): mixed;
}

@ -21,7 +21,7 @@ trait TAttributeListXmlStructure {
*
* @return $this
*/
public function setAttributesStructure (?AttributesXmlStructure $attributesStructure = null): self {
public function setAttributesStructure (?AttributesXmlStructure $attributesStructure = null): static {
$this->attributesStructure = $attributesStructure;
return $this;
}

Loading…
Cancel
Save