fix a couple of typehints for PHP 8.1

This commit is contained in:
Ivan Fedorov 2021-07-08 22:10:39 +03:00 committed by Ivan Fedorov
parent c437f94b10
commit 9d40eddf3b
2 changed files with 2 additions and 2 deletions

View File

@ -227,7 +227,7 @@ class SimpleXMLElement implements Traversable, ArrayAccess, Countable, Iterator,
*/
public function addAttribute(
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName,
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $value = null,
#[LanguageLevelTypeAware(['8.0' => 'string', '8.1' => 'string|null'], default: '')] $value = null,
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace = null
) {}

View File

@ -2271,7 +2271,7 @@ class Transliterator
* or <b>NULL</b> on failure.
*/
public static function create(
#[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')] $id,
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')] $id,
#[LanguageLevelTypeAware(['8.1' => 'int'], default: '')] #[EV([Transliterator::FORWARD, Transliterator::REVERSE])] $direction = null
) {}