diff --git a/src/Parser/Property/AddressParser.php b/src/Parser/Property/AddressParser.php index 6e3c54c..2775e63 100644 --- a/src/Parser/Property/AddressParser.php +++ b/src/Parser/Property/AddressParser.php @@ -33,7 +33,7 @@ private function parseAddress(string $value): Address $countryName ) = explode(';', $value); - $this->convertEmptyStringToNull([ + $this->convertEmptyStringToNull( $postOfficeBox, $extendedAddress, $streetAddress, @@ -41,7 +41,7 @@ private function parseAddress(string $value): Address $region, $postalCode, $countryName - ]); + ); return new Address($postOfficeBox, $extendedAddress, $streetAddress, $locality, $region, $postalCode, $countryName); } diff --git a/src/Parser/Property/GenderParser.php b/src/Parser/Property/GenderParser.php index f0b311f..365f162 100644 --- a/src/Parser/Property/GenderParser.php +++ b/src/Parser/Property/GenderParser.php @@ -13,7 +13,7 @@ public function parseVcfString(string $value, array $parameters = []): NodeInter { @list($gender, $note) = explode(';', $value, 2); - $this->convertEmptyStringToNull([$note]); + $this->convertEmptyStringToNull($note); return new Gender($gender, $note); } diff --git a/src/Parser/Property/NameParser.php b/src/Parser/Property/NameParser.php index a91233e..81f5da2 100644 --- a/src/Parser/Property/NameParser.php +++ b/src/Parser/Property/NameParser.php @@ -13,13 +13,13 @@ public function parseVcfString(string $value, array $parameters = []): NodeInter { @list($firstName, $additional, $lastName, $prefix, $suffix) = explode(';', $value); - $this->convertEmptyStringToNull([ + $this->convertEmptyStringToNull( $lastName, $firstName, $additional, $prefix, $suffix - ]); + ); return new Name($lastName, $firstName, $additional, $prefix, $suffix); } diff --git a/src/Parser/Property/PropertyParser.php b/src/Parser/Property/PropertyParser.php index eaf52ca..cadcd8a 100644 --- a/src/Parser/Property/PropertyParser.php +++ b/src/Parser/Property/PropertyParser.php @@ -6,7 +6,7 @@ class PropertyParser { - protected function convertEmptyStringToNull(array $values): void + protected function convertEmptyStringToNull(&...$values): void { foreach ($values as &$value) { if ($value === '') {