MDL-81634 core: Fix all implicitly defined nullables

Note: This does not impact third-party libraries.
This commit is contained in:
Andrew Nicols
2024-08-02 14:11:12 +08:00
parent 8a6e8563fd
commit 024e36be17
391 changed files with 782 additions and 782 deletions
+2 -2
View File
@@ -48,7 +48,7 @@ class iri {
* @param string|null $type if none passed $type will be 'element'
* @return string a valid IRI value
*/
public static function generate(string $value, string $type = null): string {
public static function generate(string $value, ?string $type = null): string {
if (self::check($value)) {
return $value;
}
@@ -69,7 +69,7 @@ class iri {
* @param string|null $type if $value is a fake IRI, the $type must be provided.
* @return string the original value used in iri::generate.
*/
public static function extract(string $value, string $type = null): string {
public static function extract(string $value, ?string $type = null): string {
if (empty($type)) {
$type = 'element';
}