From 84f5b8021c8da661f06796aea719d52b41e8a192 Mon Sep 17 00:00:00 2001
From: Ivan Fedorov
Date: Wed, 28 Jul 2021 14:44:03 +0200
Subject: [PATCH] update stubs after rebase on master
---
PhpStormStubsMap.php | 3 +
date/date.php | 4 +-
gd/gd.php | 15 +-
imap/imap.php | 4 +-
intl/intl.php | 462 +++++++++---------
ldap/ldap.php | 22 +-
mbstring/mbstring.php | 4 +-
mysqli/mysqli.php | 19 +-
openssl/openssl.php | 2 +-
pcntl/pcntl.php | 7 +-
sockets/sockets.php | 15 +-
standard/standard_4.php | 2 +-
standard/standard_9.php | 3 +-
tests/BaseClassesTest.php | 2 +-
tests/Parsers/Visitors/ASTVisitor.php | 18 +-
tests/StubsStructureTest.php | 11 +-
.../Stubs/StubsTestDataProviders.php | 2 +-
17 files changed, 327 insertions(+), 268 deletions(-)
diff --git a/PhpStormStubsMap.php b/PhpStormStubsMap.php
index a1427f451..6b0a3176d 100644
--- a/PhpStormStubsMap.php
+++ b/PhpStormStubsMap.php
@@ -7593,6 +7593,7 @@ final class PhpStormStubsMap
'ILL_ILLTRP' => 'pcntl/pcntl.php',
'ILL_PRVOPC' => 'pcntl/pcntl.php',
'ILL_PRVREG' => 'pcntl/pcntl.php',
+ 'IMAGETYPE_AVIF' => 'standard/standard_defines.php',
'IMAGETYPE_BMP' => 'standard/standard_defines.php',
'IMAGETYPE_COUNT' => 'standard/standard_defines.php',
'IMAGETYPE_GIF' => 'standard/standard_defines.php',
@@ -11352,6 +11353,7 @@ final class PhpStormStubsMap
'SO_FREE' => 'imap/imap.php',
'SO_KEEPALIVE' => 'sockets/sockets.php',
'SO_LINGER' => 'sockets/sockets.php',
+ 'SO_MARK' => 'sockets/sockets.php',
'SO_NOSERVER' => 'imap/imap.php',
'SO_OOBINLINE' => 'sockets/sockets.php',
'SO_PASSCRED' => 'sockets/sockets.php',
@@ -12151,6 +12153,7 @@ final class PhpStormStubsMap
'T_PRIVATE' => 'tokenizer/tokenizer.php',
'T_PROTECTED' => 'tokenizer/tokenizer.php',
'T_PUBLIC' => 'tokenizer/tokenizer.php',
+ 'T_READONLY' => 'tokenizer/tokenizer.php',
'T_REQUIRE' => 'tokenizer/tokenizer.php',
'T_REQUIRE_ONCE' => 'tokenizer/tokenizer.php',
'T_RETURN' => 'tokenizer/tokenizer.php',
diff --git a/date/date.php b/date/date.php
index dbef2165e..06023b5a1 100644
--- a/date/date.php
+++ b/date/date.php
@@ -462,7 +462,7 @@ function gmdate(string $format, ?int $timestamp) {}
#[Pure]
function mktime(
#[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] int $hour = null,
- #[PhpStormStubsElementAvailable(from: '8.0')] int $hour = null,
+ #[PhpStormStubsElementAvailable(from: '8.0')] int $hour,
?int $minute = null,
?int $second = null,
?int $month = null,
@@ -502,7 +502,7 @@ function mktime(
#[Pure]
function gmmktime(
#[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] int $hour = null,
- #[PhpStormStubsElementAvailable(from: '8.0')] int $hour = null,
+ #[PhpStormStubsElementAvailable(from: '8.0')] int $hour,
?int $minute = null,
?int $second = null,
?int $month = null,
diff --git a/gd/gd.php b/gd/gd.php
index 3e4b8b166..bf4bf54a9 100644
--- a/gd/gd.php
+++ b/gd/gd.php
@@ -1149,7 +1149,8 @@ function imagefilledpolygon(
GdImage $image,
array $points,
#[Deprecated(since: "8.1")] int $num_points_or_color,
- #[Required(from: '5.3', to: '7.4')] ?int $color = null
+ #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] ?int $color,
+ #[PhpStormStubsElementAvailable(from: '8.0')] ?int $color = null
): bool {}
/**
@@ -1343,7 +1344,8 @@ function imagepolygon(
GdImage $image,
array $points,
int $num_points_or_color,
- #[Required(from: '5.3', to: '7.4')] ?int $color = null
+ #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] ?int $color,
+ #[PhpStormStubsElementAvailable(from: '8.0')] ?int $color = null
): bool {}
/**
@@ -2246,7 +2248,8 @@ function imageopenpolygon(
GdImage $image,
array $points,
#[Deprecated(since: "8.1")] int $num_points_or_color,
- #[Required(from: '7.2', to: '7.4')] ?int $color = null
+ #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] ?int $color,
+ #[PhpStormStubsElementAvailable(from: '8.0')] ?int $color = null
): bool {}
/**
@@ -2922,7 +2925,11 @@ function imageaffinematrixconcat(array $matrix1, array $matrix2): array|false {}
* @return float[]|false Array with keys 0 to 5 and float values or FALSE on failure.
* @since 5.5
*/
-function imageaffinematrixget(int $type, #[Required(from: '8.0')] $options = null): array|false {}
+function imageaffinematrixget(
+ int $type,
+ #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $options = null,
+ #[PhpStormStubsElementAvailable(from: '8.0')] $options
+): array|false {}
/**
* Crop an image using the given coordinates and size, x, y, width and height
diff --git a/imap/imap.php b/imap/imap.php
index 2005b0599..df55d2936 100644
--- a/imap/imap.php
+++ b/imap/imap.php
@@ -3,7 +3,6 @@
// Start of imap v.
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
-use JetBrains\PhpStorm\Internal\Required;
/**
* Open an IMAP stream to a mailbox
@@ -495,7 +494,8 @@ function imap_fetchstructure(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection
*/
function imap_gc(
#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap,
- #[Required(from: '8.0')] int $flags = 0
+ #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] int $flags = 0,
+ #[PhpStormStubsElementAvailable(from: '8.0')] int $flags
): bool {}
/**
diff --git a/intl/intl.php b/intl/intl.php
index ca51457a9..debeaacb6 100644
--- a/intl/intl.php
+++ b/intl/intl.php
@@ -4,9 +4,8 @@
use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\ExpectedValues as EV;
-use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
-use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
-use JetBrains\PhpStorm\Internal\Required;
+use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware as TypeAware;
+use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable as ElementAvailable;
use JetBrains\PhpStorm\Pure;
class Collator
@@ -248,7 +247,7 @@ class Collator
* @param string $locale
*/
#[Pure]
- public function __construct(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $locale) {}
+ public function __construct(#[TypeAware(['8.0' => 'string'], default: '')] $locale) {}
/**
* (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -263,7 +262,7 @@ public function __construct(#[LanguageLevelTypeAware(['8.0' => 'string'], defaul
* @return Collator|null Return new instance of Collator object, or NULL
* on error.
*/
- public static function create(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $locale) {}
+ public static function create(#[TypeAware(['8.0' => 'string'], default: '')] $locale) {}
/**
* (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -296,8 +295,8 @@ public static function create(#[LanguageLevelTypeAware(['8.0' => 'string'], defa
*/
#[Pure]
public function compare(
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $string1,
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $string2
+ #[TypeAware(['8.0' => 'string'], default: '')] $string1,
+ #[TypeAware(['8.0' => 'string'], default: '')] $string2
) {}
/**
@@ -318,7 +317,7 @@ public function compare(
*/
public function sort(
array &$array,
- #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] #[EV([Collator::SORT_REGULAR])] $flags = null
+ #[TypeAware(['8.0' => 'int'], default: '')] #[EV([Collator::SORT_REGULAR])] $flags = null
) {}
/**
@@ -344,7 +343,7 @@ public function sortWithSortKeys(array &$array) {}
*/
public function asort(
array &$array,
- #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] #[EV([Collator::SORT_REGULAR])] $flags = null
+ #[TypeAware(['8.0' => 'int'], default: '')] #[EV([Collator::SORT_REGULAR])] $flags = null
) {}
/**
@@ -357,7 +356,7 @@ public function asort(
* @return int|false Attribute value, or boolean FALSE on error.
*/
#[Pure]
- public function getAttribute(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $attribute) {}
+ public function getAttribute(#[TypeAware(['8.0' => 'int'], default: '')] $attribute) {}
/**
* (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -370,8 +369,8 @@ public function getAttribute(#[LanguageLevelTypeAware(['8.0' => 'int'], default:
* @return bool TRUE on success or FALSE on failure.
*/
public function setAttribute(
- #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $attribute,
- #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $value
+ #[TypeAware(['8.0' => 'int'], default: '')] $attribute,
+ #[TypeAware(['8.0' => 'int'], default: '')] $value
) {}
/**
@@ -394,7 +393,7 @@ public function getStrength() {}
*
* @return bool TRUE on success or FALSE on failure.
*/
- public function setStrength(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] #[EV([Collator::PRIMARY])] $strength) {}
+ public function setStrength(#[TypeAware(['8.0' => 'int'], default: '')] #[EV([Collator::PRIMARY])] $strength) {}
/**
* (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -421,7 +420,7 @@ public function getErrorCode() {}
*/
#[Pure]
public function getLocale(
- #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')]
+ #[TypeAware(['8.0' => 'int'], default: '')]
#[EV([Locale::VALID_LOCALE, Locale::ACTUAL_LOCALE])]
$type = null
) {}
@@ -445,7 +444,7 @@ public function getErrorMessage() {}
* @return string the collation key for the string. Collation keys can be compared directly instead of strings.
*/
#[Pure]
- public function getSortKey(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $string) {}
+ public function getSortKey(#[TypeAware(['8.0' => 'string'], default: '')] $string) {}
}
class NumberFormatter
@@ -907,9 +906,9 @@ class NumberFormatter
*/
#[Pure]
public function __construct(
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $locale,
- #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $style,
- #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $pattern = null
+ #[TypeAware(['8.0' => 'string'], default: '')] $locale,
+ #[TypeAware(['8.0' => 'int'], default: '')] $style,
+ #[TypeAware(['8.0' => 'string|null'], default: '')] $pattern = null
) {}
/**
@@ -937,9 +936,9 @@ public function __construct(
* @return NumberFormatter|false NumberFormatter object or FALSE on error.
*/
public static function create(
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $locale,
- #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] #[EV([NumberFormatter::PATTERN_DECIMAL, NumberFormatter::PATTERN_RULEBASED])] $style,
- #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $pattern = null
+ #[TypeAware(['8.0' => 'string'], default: '')] $locale,
+ #[TypeAware(['8.0' => 'int'], default: '')] #[EV([NumberFormatter::PATTERN_DECIMAL, NumberFormatter::PATTERN_RULEBASED])] $style,
+ #[TypeAware(['8.0' => 'string|null'], default: '')] $pattern = null
) {}
/**
@@ -958,8 +957,8 @@ public static function create(
*/
#[Pure]
public function format(
- #[LanguageLevelTypeAware(['8.0' => 'int|float'], default: '')] $num,
- #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type = null
+ #[TypeAware(['8.0' => 'int|float'], default: '')] $num,
+ #[TypeAware(['8.0' => 'int'], default: '')] $type = null
) {}
/**
@@ -979,8 +978,8 @@ public function format(
* @return mixed The value of the parsed number or FALSE on error.
*/
public function parse(
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $string,
- #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type = NumberFormatter::TYPE_DOUBLE,
+ #[TypeAware(['8.0' => 'string'], default: '')] $string,
+ #[TypeAware(['8.0' => 'int'], default: '')] $type = NumberFormatter::TYPE_DOUBLE,
&$offset = null
) {}
@@ -998,8 +997,8 @@ public function parse(
*/
#[Pure]
public function formatCurrency(
- #[LanguageLevelTypeAware(['8.0' => 'float'], default: '')] $amount,
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $currency
+ #[TypeAware(['8.0' => 'float'], default: '')] $amount,
+ #[TypeAware(['8.0' => 'string'], default: '')] $currency
) {}
/**
@@ -1017,7 +1016,7 @@ public function formatCurrency(
*
* @return float|false The parsed numeric value or FALSE on error.
*/
- public function parseCurrency(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $string, &$currency, &$offset = null) {}
+ public function parseCurrency(#[TypeAware(['8.0' => 'string'], default: '')] $string, &$currency, &$offset = null) {}
/**
* (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -1033,8 +1032,8 @@ public function parseCurrency(#[LanguageLevelTypeAware(['8.0' => 'string'], defa
* @return bool TRUE on success or FALSE on failure.
*/
public function setAttribute(
- #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $attribute,
- #[LanguageLevelTypeAware(['8.0' => 'int|float'], default: '')] $value
+ #[TypeAware(['8.0' => 'int'], default: '')] $attribute,
+ #[TypeAware(['8.0' => 'int|float'], default: '')] $value
) {}
/**
@@ -1048,7 +1047,7 @@ public function setAttribute(
* @return int|false Return attribute value on success, or FALSE on error.
*/
#[Pure]
- public function getAttribute(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $attribute) {}
+ public function getAttribute(#[TypeAware(['8.0' => 'int'], default: '')] $attribute) {}
/**
* (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -1065,8 +1064,8 @@ public function getAttribute(#[LanguageLevelTypeAware(['8.0' => 'int'], default:
* @return bool TRUE on success or FALSE on failure.
*/
public function setTextAttribute(
- #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $attribute,
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $value
+ #[TypeAware(['8.0' => 'int'], default: '')] $attribute,
+ #[TypeAware(['8.0' => 'string'], default: '')] $value
) {}
/**
@@ -1080,7 +1079,7 @@ public function setTextAttribute(
* @return string|false Return attribute value on success, or FALSE on error.
*/
#[Pure]
- public function getTextAttribute(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $attribute) {}
+ public function getTextAttribute(#[TypeAware(['8.0' => 'int'], default: '')] $attribute) {}
/**
* (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -1096,8 +1095,8 @@ public function getTextAttribute(#[LanguageLevelTypeAware(['8.0' => 'int'], defa
* @return bool TRUE on success or FALSE on failure.
*/
public function setSymbol(
- #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $symbol,
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $value
+ #[TypeAware(['8.0' => 'int'], default: '')] $symbol,
+ #[TypeAware(['8.0' => 'string'], default: '')] $value
) {}
/**
@@ -1111,7 +1110,7 @@ public function setSymbol(
* @return string|false The symbol string or FALSE on error.
*/
#[Pure]
- public function getSymbol(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $symbol) {}
+ public function getSymbol(#[TypeAware(['8.0' => 'int'], default: '')] $symbol) {}
/**
* (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -1124,7 +1123,7 @@ public function getSymbol(#[LanguageLevelTypeAware(['8.0' => 'int'], default: ''
*
* @return bool TRUE on success or FALSE on failure.
*/
- public function setPattern(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $pattern) {}
+ public function setPattern(#[TypeAware(['8.0' => 'string'], default: '')] $pattern) {}
/**
* (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -1149,7 +1148,7 @@ public function getPattern() {}
*/
#[Pure]
public function getLocale(
- #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] #[EV([Locale::VALID_LOCALE, Locale::ACTUAL_LOCALE])] $type = null
+ #[TypeAware(['8.0' => 'int'], default: '')] #[EV([Locale::VALID_LOCALE, Locale::ACTUAL_LOCALE])] $type = null
) {}
/**
@@ -1229,8 +1228,8 @@ class Normalizer
* @return string|false The normalized string or FALSE if an error occurred.
*/
public static function normalize(
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $string,
- #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $form = Normalizer::FORM_C
+ #[TypeAware(['8.0' => 'string'], default: '')] $string,
+ #[TypeAware(['8.0' => 'int'], default: '')] $form = Normalizer::FORM_C
) {}
/**
@@ -1244,8 +1243,8 @@ public static function normalize(
* @return bool TRUE if normalized, FALSE otherwise or if there an error
*/
public static function isNormalized(
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $string,
- #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $form = Normalizer::FORM_C
+ #[TypeAware(['8.0' => 'string'], default: '')] $string,
+ #[TypeAware(['8.0' => 'int'], default: '')] $form = Normalizer::FORM_C
) {}
/**
@@ -1258,7 +1257,7 @@ public static function isNormalized(
*/
public static function getRawDecomposition(
string $string,
- #[PhpStormStubsElementAvailable(from: '8.0')] int $form = 16
+ #[ElementAvailable(from: '8.0')] int $form = 16
) {}
}
@@ -1343,7 +1342,7 @@ public static function getDefault() {}
*
* @return bool TRUE on success or FALSE on failure.
*/
- public static function setDefault(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $locale) {}
+ public static function setDefault(#[TypeAware(['8.0' => 'string'], default: '')] $locale) {}
/**
* (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -1354,7 +1353,7 @@ public static function setDefault(#[LanguageLevelTypeAware(['8.0' => 'string'],
*
* @return string|null The language code associated with the language or NULL in case of error.
*/
- public static function getPrimaryLanguage(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $locale) {}
+ public static function getPrimaryLanguage(#[TypeAware(['8.0' => 'string'], default: '')] $locale) {}
/**
* (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -1365,7 +1364,7 @@ public static function getPrimaryLanguage(#[LanguageLevelTypeAware(['8.0' => 'st
*
* @return string|null The script subtag for the locale or NULL if not present
*/
- public static function getScript(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $locale) {}
+ public static function getScript(#[TypeAware(['8.0' => 'string'], default: '')] $locale) {}
/**
* (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -1376,7 +1375,7 @@ public static function getScript(#[LanguageLevelTypeAware(['8.0' => 'string'], d
*
* @return string|null The region subtag for the locale or NULL if not present
*/
- public static function getRegion(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $locale) {}
+ public static function getRegion(#[TypeAware(['8.0' => 'string'], default: '')] $locale) {}
/**
* (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -1387,7 +1386,7 @@ public static function getRegion(#[LanguageLevelTypeAware(['8.0' => 'string'], d
*
* @return array Associative array containing the keyword-value pairs for this locale
*/
- public static function getKeywords(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $locale) {}
+ public static function getKeywords(#[TypeAware(['8.0' => 'string'], default: '')] $locale) {}
/**
* (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -1403,8 +1402,8 @@ public static function getKeywords(#[LanguageLevelTypeAware(['8.0' => 'string'],
* $in_locale.
*/
public static function getDisplayScript(
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $locale,
- #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $displayLocale = null
+ #[TypeAware(['8.0' => 'string'], default: '')] $locale,
+ #[TypeAware(['8.0' => 'string|null'], default: '')] $displayLocale = null
) {}
/**
@@ -1421,8 +1420,8 @@ public static function getDisplayScript(
* $in_locale.
*/
public static function getDisplayRegion(
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $locale,
- #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $displayLocale = null
+ #[TypeAware(['8.0' => 'string'], default: '')] $locale,
+ #[TypeAware(['8.0' => 'string|null'], default: '')] $displayLocale = null
) {}
/**
@@ -1436,8 +1435,8 @@ public static function getDisplayRegion(
* @return string Display name of the locale in the format appropriate for $in_locale.
*/
public static function getDisplayName(
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $locale,
- #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $displayLocale = null
+ #[TypeAware(['8.0' => 'string'], default: '')] $locale,
+ #[TypeAware(['8.0' => 'string|null'], default: '')] $displayLocale = null
) {}
/**
@@ -1454,8 +1453,8 @@ public static function getDisplayName(
* $in_locale.
*/
public static function getDisplayLanguage(
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $locale,
- #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $displayLocale = null
+ #[TypeAware(['8.0' => 'string'], default: '')] $locale,
+ #[TypeAware(['8.0' => 'string|null'], default: '')] $displayLocale = null
) {}
/**
@@ -1472,8 +1471,8 @@ public static function getDisplayLanguage(
* $in_locale.
*/
public static function getDisplayVariant(
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $locale,
- #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $displayLocale = null
+ #[TypeAware(['8.0' => 'string'], default: '')] $locale,
+ #[TypeAware(['8.0' => 'string|null'], default: '')] $displayLocale = null
) {}
/**
@@ -1518,7 +1517,7 @@ public static function composeLocale(array $subtags) {}
* returned array will have variant0=>varX , variant1=>varY ,
* variant2=>varZ
*/
- public static function parseLocale(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $locale) {}
+ public static function parseLocale(#[TypeAware(['8.0' => 'string'], default: '')] $locale) {}
/**
* (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -1530,7 +1529,7 @@ public static function parseLocale(#[LanguageLevelTypeAware(['8.0' => 'string'],
* @return array|null The array containing the list of all variants subtag for the locale
* or NULL if not present
*/
- public static function getAllVariants(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $locale) {}
+ public static function getAllVariants(#[TypeAware(['8.0' => 'string'], default: '')] $locale) {}
/**
* (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -1549,9 +1548,9 @@ public static function getAllVariants(#[LanguageLevelTypeAware(['8.0' => 'string
* @return bool TRUE if $locale matches $langtag FALSE otherwise.
*/
public static function filterMatches(
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $languageTag,
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $locale,
- #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $canonicalize = false
+ #[TypeAware(['8.0' => 'string'], default: '')] $languageTag,
+ #[TypeAware(['8.0' => 'string'], default: '')] $locale,
+ #[TypeAware(['8.0' => 'bool'], default: '')] $canonicalize = false
) {}
/**
@@ -1576,9 +1575,9 @@ public static function filterMatches(
*/
public static function lookup(
array $languageTag,
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $locale,
- #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $canonicalize = false,
- #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $defaultLocale = null
+ #[TypeAware(['8.0' => 'string'], default: '')] $locale,
+ #[TypeAware(['8.0' => 'bool'], default: '')] $canonicalize = false,
+ #[TypeAware(['8.0' => 'string|null'], default: '')] $defaultLocale = null
) {}
/**
@@ -1586,7 +1585,7 @@ public static function lookup(
* @param string $locale
* @return string
*/
- public static function canonicalize(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $locale) {}
+ public static function canonicalize(#[TypeAware(['8.0' => 'string'], default: '')] $locale) {}
/**
* (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -1597,7 +1596,7 @@ public static function canonicalize(#[LanguageLevelTypeAware(['8.0' => 'string']
*
* @return string The corresponding locale identifier.
*/
- public static function acceptFromHttp(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $header) {}
+ public static function acceptFromHttp(#[TypeAware(['8.0' => 'string'], default: '')] $header) {}
}
class MessageFormatter
@@ -1619,8 +1618,8 @@ class MessageFormatter
*/
#[Pure]
public function __construct(
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $locale,
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $pattern
+ #[TypeAware(['8.0' => 'string'], default: '')] $locale,
+ #[TypeAware(['8.0' => 'string'], default: '')] $pattern
) {}
/**
@@ -1639,8 +1638,8 @@ public function __construct(
* @return MessageFormatter The formatter object
*/
public static function create(
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $locale,
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $pattern
+ #[TypeAware(['8.0' => 'string'], default: '')] $locale,
+ #[TypeAware(['8.0' => 'string'], default: '')] $pattern
) {}
/**
@@ -1674,8 +1673,8 @@ public function format(array $values) {}
* @return string|false The formatted pattern string or FALSE if an error occurred
*/
public static function formatMessage(
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $locale,
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $pattern,
+ #[TypeAware(['8.0' => 'string'], default: '')] $locale,
+ #[TypeAware(['8.0' => 'string'], default: '')] $pattern,
array $values
) {}
@@ -1689,7 +1688,7 @@ public static function formatMessage(
* @return array|false An array containing the items extracted, or FALSE on error
*/
#[Pure]
- public function parse(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $string) {}
+ public function parse(#[TypeAware(['8.0' => 'string'], default: '')] $string) {}
/**
* (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -1707,9 +1706,9 @@ public function parse(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')
* @return array|false An array containing items extracted, or FALSE on error
*/
public static function parseMessage(
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $locale,
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $pattern,
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $message
+ #[TypeAware(['8.0' => 'string'], default: '')] $locale,
+ #[TypeAware(['8.0' => 'string'], default: '')] $pattern,
+ #[TypeAware(['8.0' => 'string'], default: '')] $message
) {}
/**
@@ -1724,7 +1723,7 @@ public static function parseMessage(
*
* @return bool TRUE on success or FALSE on failure.
*/
- public function setPattern(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $pattern) {}
+ public function setPattern(#[TypeAware(['8.0' => 'string'], default: '')] $pattern) {}
/**
* (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -1822,12 +1821,12 @@ class IntlDateFormatter
*/
#[Pure]
public function __construct(
- #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $locale,
- #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $dateType,
- #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $timeType,
+ #[TypeAware(['8.0' => 'string|null'], default: '')] $locale,
+ #[TypeAware(['8.0' => 'int'], default: '')] $dateType,
+ #[TypeAware(['8.0' => 'int'], default: '')] $timeType,
$timezone = null,
$calendar = null,
- #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $pattern = ''
+ #[TypeAware(['8.0' => 'string|null'], default: '')] $pattern = ''
) {}
/**
@@ -1866,12 +1865,12 @@ public function __construct(
* @return IntlDateFormatter
*/
public static function create(
- #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $locale,
- #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $dateType,
- #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $timeType,
+ #[TypeAware(['8.0' => 'string|null'], default: '')] $locale,
+ #[TypeAware(['8.0' => 'int'], default: '')] $dateType,
+ #[TypeAware(['8.0' => 'int'], default: '')] $timeType,
$timezone = null,
- #[LanguageLevelTypeAware(['8.0' => 'IntlCalendar|int|null'], default: '')] $calendar = null,
- #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $pattern = ''
+ #[TypeAware(['8.0' => 'IntlCalendar|int|null'], default: '')] $calendar = null,
+ #[TypeAware(['8.0' => 'string|null'], default: '')] $pattern = ''
) {}
/**
@@ -1911,7 +1910,7 @@ public function getCalendar() {}
*
* @return bool TRUE on success or FALSE on failure.
*/
- public function setCalendar(#[LanguageLevelTypeAware(['8.0' => 'IntlCalendar|int|null'], default: '')] $calendar) {}
+ public function setCalendar(#[TypeAware(['8.0' => 'IntlCalendar|int|null'], default: '')] $calendar) {}
/**
* (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -2006,7 +2005,7 @@ public function setTimeZone($timezone) {}
* @return bool TRUE on success or FALSE on failure.
* Bad formatstrings are usually the cause of the failure.
*/
- public function setPattern(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $pattern) {}
+ public function setPattern(#[TypeAware(['8.0' => 'string'], default: '')] $pattern) {}
/**
* (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -2026,8 +2025,8 @@ public function getPattern() {}
*/
#[Pure]
public function getLocale(
- #[PhpStormStubsElementAvailable(from: '8.0')]
- #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')]
+ #[ElementAvailable(from: '8.0')]
+ #[TypeAware(['8.0' => 'int'], default: '')]
$type = null
) {}
@@ -2040,7 +2039,7 @@ public function getLocale(
*
* @return bool TRUE on success or FALSE on failure.
*/
- public function setLenient(#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $lenient) {}
+ public function setLenient(#[TypeAware(['8.0' => 'bool'], default: '')] $lenient) {}
/**
* (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -2063,7 +2062,7 @@ public function isLenient() {}
*
* @return string|false The formatted string or, if an error occurred, FALSE.
*/
- public function format($datetime = null, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $array = null) {}
+ public function format($datetime = null, #[ElementAvailable(from: '5.3', to: '7.4')] $array = null) {}
/**
* (PHP 5 >= 5.5.0, PECL intl >= 3.0.0)
@@ -2089,7 +2088,7 @@ public function format($datetime = null, #[PhpStormStubsElementAvailable(from: '
* The locale to use, or NULL to use the {@link "https://secure.php.net/manual/en/intl.configuration.php#ini.intl.default-locale" default one}.
* @return string|false A string with result or FALSE on failure.
*/
- public static function formatObject($datetime, $format = null, #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $locale = null) {}
+ public static function formatObject($datetime, $format = null, #[TypeAware(['8.0' => 'string|null'], default: '')] $locale = null) {}
/**
* (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -2107,7 +2106,7 @@ public static function formatObject($datetime, $format = null, #[LanguageLevelTy
*
* @return int timestamp parsed value
*/
- public function parse(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $string, &$offset = null) {}
+ public function parse(#[TypeAware(['8.0' => 'string'], default: '')] $string, &$offset = null) {}
/**
* (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -2124,7 +2123,7 @@ public function parse(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')
*
* @return array Localtime compatible array of integers : contains 24 hour clock value in tm_hour field
*/
- public function localtime(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $string, &$offset = null) {}
+ public function localtime(#[TypeAware(['8.0' => 'string'], default: '')] $string, &$offset = null) {}
/**
* (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -2155,9 +2154,9 @@ class ResourceBundle implements IteratorAggregate, Countable
*/
#[Pure]
public function __construct(
- #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $locale,
- #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $bundle,
- #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $fallback = true
+ #[TypeAware(['8.0' => 'string|null'], default: '')] $locale,
+ #[TypeAware(['8.0' => 'string|null'], default: '')] $bundle,
+ #[TypeAware(['8.0' => 'bool'], default: '')] $fallback = true
) {}
/**
@@ -2176,9 +2175,9 @@ public function __construct(
* @return ResourceBundle|false ResourceBundle object or FALSE on error.
*/
public static function create(
- #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $locale,
- #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $bundle,
- #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $fallback = true
+ #[TypeAware(['8.0' => 'string|null'], default: '')] $locale,
+ #[TypeAware(['8.0' => 'string|null'], default: '')] $bundle,
+ #[TypeAware(['8.0' => 'bool'], default: '')] $fallback = true
) {}
/**
@@ -2194,7 +2193,7 @@ public static function create(
* returned as ResourceBundle object.
*/
#[Pure]
- public function get($index, #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $fallback = true) {}
+ public function get($index, #[TypeAware(['8.0' => 'bool'], default: '')] $fallback = true) {}
/**
* (PHP >= 5.3.2, PECL intl >= 2.0.0)
@@ -2215,7 +2214,7 @@ public function count() {}
*
* @return array the list of locales supported by the bundle.
*/
- public static function getLocales(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $bundle) {}
+ public static function getLocales(#[TypeAware(['8.0' => 'string'], default: '')] $bundle) {}
/**
* (PHP >= 5.3.2, PECL intl >= 2.0.0)
@@ -2251,7 +2250,7 @@ class Transliterator
public const FORWARD = 0;
public const REVERSE = 1;
- #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
+ #[TypeAware(['8.1' => 'string'], default: '')]
public $id;
/**
@@ -2278,8 +2277,8 @@ final private function __construct() {}
* or NULL on failure.
*/
public static function create(
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $id,
- #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] #[EV([Transliterator::FORWARD, Transliterator::REVERSE])] $direction = null
+ #[TypeAware(['8.0' => 'string'], default: '')] $id,
+ #[TypeAware(['8.0' => 'int'], default: '')] #[EV([Transliterator::FORWARD, Transliterator::REVERSE])] $direction = null
) {}
/**
@@ -2299,8 +2298,8 @@ public static function create(
* or NULL on failure.
*/
public static function createFromRules(
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $rules,
- #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] #[EV([Transliterator::FORWARD, Transliterator::REVERSE])] $direction = null
+ #[TypeAware(['8.0' => 'string'], default: '')] $rules,
+ #[TypeAware(['8.0' => 'int'], default: '')] #[EV([Transliterator::FORWARD, Transliterator::REVERSE])] $direction = null
) {}
/**
@@ -2343,9 +2342,9 @@ public static function listIDs() {}
*/
#[Pure]
public function transliterate(
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $string,
- #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $start = null,
- #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $end = -1
+ #[TypeAware(['8.0' => 'string'], default: '')] $string,
+ #[TypeAware(['8.0' => 'int'], default: '')] $start = null,
+ #[TypeAware(['8.0' => 'int'], default: '')] $end = -1
) {}
/**
@@ -2406,7 +2405,7 @@ public function __construct() {}
*
* @return bool
*/
- public function isSuspicious(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $string, &$errorCode = null) {}
+ public function isSuspicious(#[TypeAware(['8.0' => 'string'], default: '')] $string, &$errorCode = null) {}
/**
* (PHP >= 5.4.0, PECL intl >= 2.0.0)
@@ -2421,8 +2420,8 @@ public function isSuspicious(#[LanguageLevelTypeAware(['8.0' => 'string'], defau
* @return bool
*/
public function areConfusable(
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $string1,
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $string2,
+ #[TypeAware(['8.0' => 'string'], default: '')] $string1,
+ #[TypeAware(['8.0' => 'string'], default: '')] $string2,
&$errorCode = null
) {}
@@ -2434,7 +2433,7 @@ public function areConfusable(
*
* @return void
*/
- public function setAllowedLocales(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $locales) {}
+ public function setAllowedLocales(#[TypeAware(['8.0' => 'string'], default: '')] $locales) {}
/**
* (PHP >= 5.4.0, PECL intl >= 2.0.0)
@@ -2444,7 +2443,7 @@ public function setAllowedLocales(#[LanguageLevelTypeAware(['8.0' => 'string'],
*
* @return void
*/
- public function setChecks(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $checks) {}
+ public function setChecks(#[TypeAware(['8.0' => 'int'], default: '')] $checks) {}
public function setRestrictionLevel(int $level) {}
}
@@ -2476,7 +2475,7 @@ public static function createInstance($timeZone = null, $locale = null) {}
/**
* @param float $timestamp
*/
- public function setGregorianChange(#[LanguageLevelTypeAware(['8.0' => 'float'], default: '')] $timestamp) {}
+ public function setGregorianChange(#[TypeAware(['8.0' => 'float'], default: '')] $timestamp) {}
/**
* @return float
@@ -2489,7 +2488,7 @@ public function getGregorianChange() {}
* @return bool
*/
#[Pure]
- public function isLeapYear(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $year) {}
+ public function isLeapYear(#[TypeAware(['8.0' => 'int'], default: '')] $year) {}
}
/**
@@ -2554,8 +2553,8 @@ class IntlCalendar
* @return bool Returns TRUE on success or FALSE on failure.
*/
public function add(
- #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $field,
- #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $value
+ #[TypeAware(['8.0' => 'int'], default: '')] $field,
+ #[TypeAware(['8.0' => 'int'], default: '')] $value
) {}
/**
@@ -2597,7 +2596,7 @@ public function before(IntlCalendar $other) {}
*
* @return bool Returns TRUE on success or FALSE on failure. Failure can only occur is invalid arguments are provided.
*/
- public function clear(#[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $field = null) {}
+ public function clear(#[TypeAware(['8.0' => 'int|null'], default: '')] $field = null) {}
/**
* (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -2651,7 +2650,7 @@ private function __construct() {}
* The created {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} instance or NULL on
* failure.
*/
- public static function createInstance($timezone = null, #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $locale = null) {}
+ public static function createInstance($timezone = null, #[TypeAware(['8.0' => 'string|null'], default: '')] $locale = null) {}
/**
* (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -2667,7 +2666,7 @@ public static function createInstance($timezone = null, #[LanguageLevelTypeAware
*
*/
#[Pure]
- public function equals(#[LanguageLevelTypeAware(['8.0' => 'IntlCalendar'], default: '')] $other) {}
+ public function equals(#[TypeAware(['8.0' => 'IntlCalendar'], default: '')] $other) {}
/**
* (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -2693,8 +2692,8 @@ public function equals(#[LanguageLevelTypeAware(['8.0' => 'IntlCalendar'], defau
*/
#[Pure]
public function fieldDifference(
- #[LanguageLevelTypeAware(['8.0' => 'float'], default: '')] $timestamp,
- #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $field
+ #[TypeAware(['8.0' => 'float'], default: '')] $timestamp,
+ #[TypeAware(['8.0' => 'int'], default: '')] $field
) {}
/**
@@ -2712,8 +2711,8 @@ public function fieldDifference(
* inside the {@link https://secure.php.net/manual/en/class.datetime.php DateTime} constructor is propagated.
*/
public static function fromDateTime(
- #[LanguageLevelTypeAware(['8.0' => 'DateTime|string'], default: '')] $datetime,
- #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] #[PhpStormStubsElementAvailable(from: '8.0')] $locale
+ #[TypeAware(['8.0' => 'DateTime|string'], default: '')] $datetime,
+ #[TypeAware(['8.0' => 'string|null'], default: '')] #[ElementAvailable(from: '8.0')] $locale
) {}
/**
@@ -2728,7 +2727,7 @@ public static function fromDateTime(
* @return int An integer with the value of the time field.
*/
#[Pure]
- public function get(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $field) {}
+ public function get(#[TypeAware(['8.0' => 'int'], default: '')] $field) {}
/**
* (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -2744,7 +2743,7 @@ public function get(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $fi
* with the given field or FALSE on failure.
*/
#[Pure]
- public function getActualMaximum(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $field) {}
+ public function getActualMaximum(#[TypeAware(['8.0' => 'int'], default: '')] $field) {}
/**
* (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -2760,7 +2759,7 @@ public function getActualMaximum(#[LanguageLevelTypeAware(['8.0' => 'int'], defa
* unit or FALSE on failure.
*/
#[Pure]
- public function getActualMinimum(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $field) {}
+ public function getActualMinimum(#[TypeAware(['8.0' => 'int'], default: '')] $field) {}
/**
* (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -2786,7 +2785,7 @@ public static function getAvailableLocales() {}
* IntlCalendar::DOW_TYPE_WEEKEND_CEASE or FALSE on failure.
*/
#[Pure]
- public function getDayOfWeekType(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $dayOfWeek) {}
+ public function getDayOfWeekType(#[TypeAware(['8.0' => 'int'], default: '')] $dayOfWeek) {}
/**
* (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -2831,7 +2830,7 @@ public function getFirstDayOfWeek() {}
* unit, or FALSE on failure.
*/
#[Pure]
- public function getGreatestMinimum(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $field) {}
+ public function getGreatestMinimum(#[TypeAware(['8.0' => 'int'], default: '')] $field) {}
/**
* (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -2850,9 +2849,9 @@ public function getGreatestMinimum(#[LanguageLevelTypeAware(['8.0' => 'int'], de
* @return Iterator|false An iterator that yields strings with the locale keyword values or FALSE on failure.
*/
public static function getKeywordValuesForLocale(
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $keyword,
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $locale,
- #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $onlyCommon
+ #[TypeAware(['8.0' => 'string'], default: '')] $keyword,
+ #[TypeAware(['8.0' => 'string'], default: '')] $locale,
+ #[TypeAware(['8.0' => 'bool'], default: '')] $onlyCommon
) {}
/**
@@ -2869,7 +2868,7 @@ public static function getKeywordValuesForLocale(
* unit or FALSE on failure.
*/
#[Pure]
- public function getLeastMaximum(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $field) {}
+ public function getLeastMaximum(#[TypeAware(['8.0' => 'int'], default: '')] $field) {}
/**
* (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -2886,7 +2885,7 @@ public function getLeastMaximum(#[LanguageLevelTypeAware(['8.0' => 'int'], defau
* @return string
*/
#[Pure]
- public function getLocale(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type) {}
+ public function getLocale(#[TypeAware(['8.0' => 'int'], default: '')] $type) {}
/**
* (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -2900,7 +2899,7 @@ public function getLocale(#[LanguageLevelTypeAware(['8.0' => 'int'], default: ''
* @return int
*/
#[Pure]
- public function getMaximum(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $field) {}
+ public function getMaximum(#[TypeAware(['8.0' => 'int'], default: '')] $field) {}
/**
* (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -2925,7 +2924,7 @@ public function getMinimalDaysInFirstWeek() {}
* An int representing a value for the given field in the field's unit or FALSE on failure.
*/
#[Pure]
- public function getMinimum(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $field) {}
+ public function getMinimum(#[TypeAware(['8.0' => 'int'], default: '')] $field) {}
/**
* (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -3003,7 +3002,7 @@ public function getType() {}
* ends or FALSE on failure.
*/
#[Pure]
- public function getWeekendTransition(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $dayOfWeek) {}
+ public function getWeekendTransition(#[TypeAware(['8.0' => 'int'], default: '')] $dayOfWeek) {}
/**
* (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -3058,7 +3057,7 @@ public function isLenient() {}
* {@link https://secure.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()} to disambiguate.
*/
#[Pure]
- public function isWeekend(#[LanguageLevelTypeAware(['8.0' => 'float|null'], default: '')] $timestamp = null) {}
+ public function isWeekend(#[TypeAware(['8.0' => 'float|null'], default: '')] $timestamp = null) {}
/**
* (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -3077,7 +3076,7 @@ public function isWeekend(#[LanguageLevelTypeAware(['8.0' => 'float|null'], defa
*
* @return bool Returns TRUE on success or FALSE on failure.
*/
- public function roll(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $field, $value) {}
+ public function roll(#[TypeAware(['8.0' => 'int'], default: '')] $field, $value) {}
/**
* (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -3091,7 +3090,7 @@ public function roll(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $f
*
* @return bool Assuming there are no argument errors, returns TRUE iif the field is set.
*/
- public function PS_UNRESERVE_PREFIX_isSet(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $field) {}
+ public function PS_UNRESERVE_PREFIX_isSet(#[TypeAware(['8.0' => 'int'], default: '')] $field) {}
/**
* (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -3148,7 +3147,7 @@ public function set($field, $value) {}
*
* @return bool Returns TRUE on success. Failure can only happen due to invalid parameters.
*/
- public function setFirstDayOfWeek(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $dayOfWeek) {}
+ public function setFirstDayOfWeek(#[TypeAware(['8.0' => 'int'], default: '')] $dayOfWeek) {}
/**
* (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -3159,7 +3158,7 @@ public function setFirstDayOfWeek(#[LanguageLevelTypeAware(['8.0' => 'int'], def
*
* @return bool Returns TRUE on success. Failure can only happen due to invalid parameters.
*/
- public function setLenient(#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $lenient) {}
+ public function setLenient(#[TypeAware(['8.0' => 'bool'], default: '')] $lenient) {}
/**
* (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -3172,7 +3171,7 @@ public function setLenient(#[LanguageLevelTypeAware(['8.0' => 'bool'], default:
* @return bool
* Returns TRUE on success. Failure can only happen due to invalid parameters.
*/
- public function setRepeatedWallTimeOption(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $option) {}
+ public function setRepeatedWallTimeOption(#[TypeAware(['8.0' => 'int'], default: '')] $option) {}
/**
* (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -3188,7 +3187,7 @@ public function setRepeatedWallTimeOption(#[LanguageLevelTypeAware(['8.0' => 'in
* Returns TRUE on success. Failure can only happen due to invalid parameters.
*
*/
- public function setSkippedWallTimeOption(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $option) {}
+ public function setSkippedWallTimeOption(#[TypeAware(['8.0' => 'int'], default: '')] $option) {}
/**
* (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -3201,7 +3200,7 @@ public function setSkippedWallTimeOption(#[LanguageLevelTypeAware(['8.0' => 'int
* @return bool
* Returns TRUE on success and FALSE on failure.
*/
- public function setTime(#[LanguageLevelTypeAware(['8.0' => 'float'], default: '')] $timestamp) {}
+ public function setTime(#[TypeAware(['8.0' => 'float'], default: '')] $timestamp) {}
/**
* (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -3262,7 +3261,7 @@ public function toDateTime() {}
* @param int $days
* @return bool
*/
- public function setMinimalDaysInFirstWeek(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $days) {}
+ public function setMinimalDaysInFirstWeek(#[TypeAware(['8.0' => 'int'], default: '')] $days) {}
}
/**
@@ -3315,7 +3314,7 @@ private function __construct() {}
* @param string $timezoneId
* @return int|false number of IDs or FALSE on failure
*/
- public static function countEquivalentIDs(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $timezoneId) {}
+ public static function countEquivalentIDs(#[TypeAware(['8.0' => 'string'], default: '')] $timezoneId) {}
/**
* (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -3341,7 +3340,7 @@ public static function createEnumeration($countryOrRawOffset) {}
* @param string $timezoneId
* @return IntlTimeZone|null a timezone object or NULL on failure
*/
- public static function createTimeZone(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $timezoneId) {}
+ public static function createTimeZone(#[TypeAware(['8.0' => 'string'], default: '')] $timezoneId) {}
/**
* (PHP 5 >=5.5.0)
@@ -3353,9 +3352,9 @@ public static function createTimeZone(#[LanguageLevelTypeAware(['8.0' => 'string
* @return IntlIterator|false an iterator or FALSE on failure
*/
public static function createTimeZoneIDEnumeration(
- #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type,
- #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $region = null,
- #[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $rawOffset = 0
+ #[TypeAware(['8.0' => 'int'], default: '')] $type,
+ #[TypeAware(['8.0' => 'string|null'], default: '')] $region = null,
+ #[TypeAware(['8.0' => 'int|null'], default: '')] $rawOffset = 0
) {}
/**
@@ -3365,7 +3364,7 @@ public static function createTimeZoneIDEnumeration(
* @param DateTimeZone $timezone
* @return IntlTimeZone|null a timezone object or NULL on failure
*/
- public static function fromDateTimeZone(#[LanguageLevelTypeAware(['8.0' => 'DateTimeZone'], default: '')] $timezone) {}
+ public static function fromDateTimeZone(#[TypeAware(['8.0' => 'DateTimeZone'], default: '')] $timezone) {}
/**
* (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -3375,7 +3374,7 @@ public static function fromDateTimeZone(#[LanguageLevelTypeAware(['8.0' => 'Date
* @param bool &$isSystemId [optional]
* @return string|false the timezone ID or FALSE on failure
*/
- public static function getCanonicalID(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $timezoneId, &$isSystemId) {}
+ public static function getCanonicalID(#[TypeAware(['8.0' => 'string'], default: '')] $timezoneId, &$isSystemId) {}
/**
* (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -3387,9 +3386,9 @@ public static function getCanonicalID(#[LanguageLevelTypeAware(['8.0' => 'string
*/
#[Pure]
public function getDisplayName(
- #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $dst = false,
- #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $style = 2,
- #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $locale
+ #[TypeAware(['8.0' => 'bool'], default: '')] $dst = false,
+ #[TypeAware(['8.0' => 'int'], default: '')] $style = 2,
+ #[TypeAware(['8.0' => 'string|null'], default: '')] $locale
) {}
/**
@@ -3410,8 +3409,8 @@ public function getDSTSavings() {}
* @return string|false the time zone ID or FALSE on failure
*/
public static function getEquivalentID(
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $timezoneId,
- #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $offset
+ #[TypeAware(['8.0' => 'string'], default: '')] $timezoneId,
+ #[TypeAware(['8.0' => 'int'], default: '')] $offset
) {}
/**
@@ -3469,8 +3468,8 @@ public function getID() {}
* @return bool boolean indication of success
*/
public function getOffset(
- #[LanguageLevelTypeAware(['8.0' => 'float'], default: '')] $timestamp,
- #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $local,
+ #[TypeAware(['8.0' => 'float'], default: '')] $timestamp,
+ #[TypeAware(['8.0' => 'bool'], default: '')] $local,
&$rawOffset,
&$dstOffset
) {}
@@ -3491,7 +3490,7 @@ public function getRawOffset() {}
* @param string $timezoneId
* @return string|false region or FALSE on failure
*/
- public static function getRegion(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $timezoneId) {}
+ public static function getRegion(#[TypeAware(['8.0' => 'string'], default: '')] $timezoneId) {}
/**
* (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -3776,7 +3775,7 @@ function collator_get_sort_key(Collator $object, string $string): string|false {
* @return NumberFormatter|false|null NumberFormatter object or FALSE on error.
*/
#[Pure]
-function numfmt_create(string $locale, int $style, #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: 'string')] $pattern = null): ?NumberFormatter {}
+function numfmt_create(string $locale, int $style, #[TypeAware(['8.0' => 'string|null'], default: 'string')] $pattern = null): ?NumberFormatter {}
/**
* (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -4460,11 +4459,13 @@ function msgfmt_get_error_message(MessageFormatter $formatter): string {}
#[Pure]
function datefmt_create(
?string $locale,
- #[Required(from: '5.3', to: '8.0')] int $dateType = 0,
- #[Required(from: '5.3', to: '8.0')] int $timeType = 0,
+ #[ElementAvailable(from: '5.3', to: '8.0')] int $dateType,
+ #[ElementAvailable(from: '8.1')] int $dateType = 0,
+ #[ElementAvailable(from: '5.3', to: '8.0')] int $timeType,
+ #[ElementAvailable(from: '8.1')] int $timeType = 0,
$timezone = null,
IntlCalendar|int|null $calendar = null,
- #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: 'string')] $pattern = null
+ #[TypeAware(['8.0' => 'string|null'], default: 'string')] $pattern = null
): ?IntlDateFormatter {}
/**
@@ -4521,7 +4522,7 @@ function datefmt_set_calendar(IntlDateFormatter $formatter, IntlCalendar|int|nul
#[Pure]
function datefmt_get_locale(
IntlDateFormatter $formatter,
- #[PhpStormStubsElementAvailable(from: '8.0')] int $type = ULOC_ACTUAL_LOCALE
+ #[ElementAvailable(from: '8.0')] int $type = ULOC_ACTUAL_LOCALE
): string|false {}
/**
@@ -4657,7 +4658,7 @@ function datefmt_is_lenient(IntlDateFormatter $formatter): bool {}
*/
function datefmt_set_lenient(
IntlDateFormatter $formatter,
- #[PhpStormStubsElementAvailable(from: '8.0')] bool $lenient
+ #[ElementAvailable(from: '8.0')] bool $lenient
): void {}
/**
@@ -4675,8 +4676,10 @@ function datefmt_set_lenient(
*/
#[Pure]
function datefmt_format(
- #[LanguageLevelTypeAware(['8.0' => 'IntlDateFormatter'], default: '')] #[Required(from: '8.0')] $formatter = null,
- #[Required(from: '8.0')] $datetime = null
+ #[TypeAware(['8.0' => 'IntlDateFormatter'], default: '')] #[ElementAvailable(from: '5.3', to: '7.4')] $formatter = null,
+ #[TypeAware(['8.0' => 'IntlDateFormatter'], default: '')] #[ElementAvailable(from: '8.0')] $formatter,
+ #[ElementAvailable(from: '5.3', to: '7.4')] $datetime = null,
+ #[ElementAvailable(from: '8.0')] $datetime
): string|false {}
/**
@@ -5136,7 +5139,7 @@ function intl_get($calendar, $field) {}
* @since 5.5
*/
#[Pure]
-#[LanguageLevelTypeAware(['8.1' => 'float|false'], default: 'float')]
+#[TypeAware(['8.1' => 'float|false'], default: 'float')]
function intlcal_get_time(IntlCalendar $calendar) {}
/**
@@ -5316,7 +5319,12 @@ function intlcal_set(IntlCalendar $calendar, int $year, int $month, int $dayOfMo
* @return bool Returns TRUE on success or FALSE on failure.
* @since 5.5
*/
-function intlcal_roll(IntlCalendar $calendar, int $field, #[Required(from: '8.0')] $value = null): bool {}
+function intlcal_roll(
+ IntlCalendar $calendar,
+ int $field,
+ #[ElementAvailable(from: '5.3', to: '7.4')] $value = null,
+ #[ElementAvailable(from: '8.0')] $value
+): bool {}
/**
* (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -5362,7 +5370,7 @@ function intlcal_clear(IntlCalendar $calendar, ?int $field = null): bool {}
* @since 5.5
*/
#[Pure]
-#[LanguageLevelTypeAware(['8.1' => 'int|false'], default: 'int')]
+#[TypeAware(['8.1' => 'int|false'], default: 'int')]
function intlcal_field_difference(IntlCalendar $calendar, float $timestamp, int $field) {}
/**
@@ -5383,7 +5391,7 @@ function intlcal_field_difference(IntlCalendar $calendar, float $timestamp, int
* @since 5.5
*/
#[Pure]
-#[LanguageLevelTypeAware(['8.1' => 'int|false'], default: 'int')]
+#[TypeAware(['8.1' => 'int|false'], default: 'int')]
function intlcal_get_actual_maximum(IntlCalendar $calendar, int $field) {}
/**
@@ -5404,7 +5412,7 @@ function intlcal_get_actual_maximum(IntlCalendar $calendar, int $field) {}
* @since 5.5
*/
#[Pure]
-#[LanguageLevelTypeAware(['8.1' => 'int|false'], default: 'int')]
+#[TypeAware(['8.1' => 'int|false'], default: 'int')]
function intlcal_get_actual_minimum(IntlCalendar $calendar, int $field) {}
/**
@@ -5428,7 +5436,7 @@ function intlcal_get_actual_minimum(IntlCalendar $calendar, int $field) {}
* @since 5.5
*/
#[Pure]
-#[LanguageLevelTypeAware(['8.1' => 'int|false'], default: 'int')]
+#[TypeAware(['8.1' => 'int|false'], default: 'int')]
function intlcal_get_day_of_week_type(IntlCalendar $calendar, int $dayOfWeek) {}
/**
@@ -5445,7 +5453,7 @@ function intlcal_get_day_of_week_type(IntlCalendar $calendar, int $dayOfWeek) {}
* @since 5.5
*/
#[Pure]
-#[LanguageLevelTypeAware(['8.1' => 'int|false'], default: 'int')]
+#[TypeAware(['8.1' => 'int|false'], default: 'int')]
function intlcal_get_first_day_of_week(IntlCalendar $calendar) {}
/**
@@ -5480,7 +5488,7 @@ function intlcal_greates_minimum($calendar, $field) {}
* @return int An integer with the value of the time field.
*/
#[Pure]
-#[LanguageLevelTypeAware(['8.1' => 'int|false'], default: 'int')]
+#[TypeAware(['8.1' => 'int|false'], default: 'int')]
function intlcal_get(IntlCalendar $calendar, int $field) {}
/**
@@ -5502,7 +5510,7 @@ function intlcal_get(IntlCalendar $calendar, int $field) {}
* @since 5.5
*/
#[Pure]
-#[LanguageLevelTypeAware(['8.1' => 'int|false'], default: 'int')]
+#[TypeAware(['8.1' => 'int|false'], default: 'int')]
function intlcal_get_least_maximum(IntlCalendar $calendar, int $field) {}
/**
@@ -5522,7 +5530,7 @@ function intlcal_get_least_maximum(IntlCalendar $calendar, int $field) {}
* @since 5.5
*/
#[Pure]
-#[LanguageLevelTypeAware(['8.1' => 'int|false'], default: 'int')]
+#[TypeAware(['8.1' => 'int|false'], default: 'int')]
function intlcal_get_greatest_minimum(IntlCalendar $calendar, int $field) {}
/**
@@ -5545,7 +5553,7 @@ function intlcal_get_greatest_minimum(IntlCalendar $calendar, int $field) {}
* @since 5.5
*/
#[Pure]
-#[LanguageLevelTypeAware(['8.1' => 'string|false'], default: 'string')]
+#[TypeAware(['8.1' => 'string|false'], default: 'string')]
function intlcal_get_locale(IntlCalendar $calendar, int $type) {}
/**
@@ -5578,7 +5586,7 @@ function intcal_get_maximum($calendar, $field) {}
* @since 5.5
*/
#[Pure]
-#[LanguageLevelTypeAware(['8.1' => 'int|false'], default: 'int')]
+#[TypeAware(['8.1' => 'int|false'], default: 'int')]
function intlcal_get_minimal_days_in_first_week(IntlCalendar $calendar) {}
/**
@@ -5598,7 +5606,7 @@ function intlcal_get_minimal_days_in_first_week(IntlCalendar $calendar) {}
* @since 5.5
*/
#[Pure]
-#[LanguageLevelTypeAware(['8.1' => 'int|false'], default: 'int')]
+#[TypeAware(['8.1' => 'int|false'], default: 'int')]
function intlcal_get_minimum(IntlCalendar $calendar, int $field) {}
/**
@@ -5649,7 +5657,7 @@ function intlcal_get_type(IntlCalendar $calendar): string {}
* @since 5.5
*/
#[Pure]
-#[LanguageLevelTypeAware(['8.1' => 'int|false'], default: 'int')]
+#[TypeAware(['8.1' => 'int|false'], default: 'int')]
function intlcal_get_weekend_transition(IntlCalendar $calendar, int $dayOfWeek) {}
/**
@@ -5717,7 +5725,7 @@ function intlcal_is_set(IntlCalendar $calendar, int $field): bool {}
* @since 5.5
*/
#[Pure]
-#[LanguageLevelTypeAware(['8.1' => 'int|false'], default: 'int')]
+#[TypeAware(['8.1' => 'int|false'], default: 'int')]
function intlcal_get_maximum(IntlCalendar $calendar, int $field) {}
/**
@@ -5898,7 +5906,7 @@ function intlcal_set_skipped_wall_time_option(IntlCalendar $calendar, int $optio
#[Pure]
function intlcal_from_date_time(
DateTime|string $datetime,
- #[PhpStormStubsElementAvailable(from: '8.0')] ?string $locale = null
+ #[ElementAvailable(from: '8.0')] ?string $locale = null
): ?IntlCalendar {}
/**
@@ -6138,7 +6146,11 @@ function intltz_get_tz_data_version(): string|false {}
* @since 5.5
*/
#[Pure]
-function intltz_has_same_rules(IntlTimeZone $timezone, #[Required(from: '8.0')] IntlTimeZone $other = null): bool {}
+function intltz_has_same_rules(
+ IntlTimeZone $timezone,
+ #[ElementAvailable(from: '5.5', to: '7.4')] IntlTimeZone $other = null,
+ #[ElementAvailable(from: '8.0')] IntlTimeZone $other
+): bool {}
/**
* (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -6444,7 +6456,7 @@ function intl_error_name(int $errorCode): string {}
* @since 7.3
*/
#[Pure]
-function normalizer_get_raw_decomposition(string $string, #[PhpStormStubsElementAvailable(from: '8.0')] int $form = Normalizer::FORM_C): ?string {}
+function normalizer_get_raw_decomposition(string $string, #[ElementAvailable(from: '8.0')] int $form = Normalizer::FORM_C): ?string {}
/**
* @return IntlTimeZone
@@ -6829,7 +6841,7 @@ private function __construct() {}
* @param string $locale
* @return IntlBreakIterator
*/
- public static function createCharacterInstance(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $locale = null) {}
+ public static function createCharacterInstance(#[TypeAware(['8.0' => 'string|null'], default: '')] $locale = null) {}
/**
* (PHP 5 >=5.5.0)
@@ -6846,7 +6858,7 @@ public static function createCodePointInstance() {}
* @param string $locale [optional]
* @return IntlBreakIterator
*/
- public static function createLineInstance(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $locale) {}
+ public static function createLineInstance(#[TypeAware(['8.0' => 'string|null'], default: '')] $locale) {}
/**
* (PHP 5 >=5.5.0)
@@ -6855,7 +6867,7 @@ public static function createLineInstance(#[LanguageLevelTypeAware(['8.0' => 'st
* @param string $locale [optional]
* @return IntlBreakIterator
*/
- public static function createSentenceInstance(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $locale) {}
+ public static function createSentenceInstance(#[TypeAware(['8.0' => 'string|null'], default: '')] $locale) {}
/**
* (PHP 5 >=5.5.0)
@@ -6864,7 +6876,7 @@ public static function createSentenceInstance(#[LanguageLevelTypeAware(['8.0' =>
* @param string $locale [optional]
* @return IntlBreakIterator
*/
- public static function createTitleInstance(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $locale) {}
+ public static function createTitleInstance(#[TypeAware(['8.0' => 'string|null'], default: '')] $locale) {}
/**
* (PHP 5 >=5.5.0)
@@ -6873,7 +6885,7 @@ public static function createTitleInstance(#[LanguageLevelTypeAware(['8.0' => 's
* @param string $locale [optional]
* @return IntlBreakIterator
*/
- public static function createWordInstance(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $locale) {}
+ public static function createWordInstance(#[TypeAware(['8.0' => 'string|null'], default: '')] $locale) {}
/**
* (PHP 5 >=5.5.0)
@@ -6897,7 +6909,7 @@ public function first() {}
* @link https://secure.php.net/manual/en/intlbreakiterator.following.php
* @param int $offset
*/
- public function following(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $offset) {}
+ public function following(#[TypeAware(['8.0' => 'int'], default: '')] $offset) {}
/**
* (PHP 5 >=5.5.0)
@@ -6924,7 +6936,7 @@ public function getErrorMessage() {}
* @param string $type
*/
#[Pure]
- public function getLocale(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type) {}
+ public function getLocale(#[TypeAware(['8.0' => 'int'], default: '')] $type) {}
/**
* (PHP 5 >=5.5.0)
@@ -6949,7 +6961,7 @@ public function getLocale(#[LanguageLevelTypeAware(['8.0' => 'int'], default: ''
*
*/
#[Pure]
- public function getPartsIterator(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $type = IntlPartsIterator::KEY_SEQUENTIAL) {}
+ public function getPartsIterator(#[TypeAware(['8.0' => 'string'], default: '')] $type = IntlPartsIterator::KEY_SEQUENTIAL) {}
/**
* (PHP 5 >=5.5.0)
@@ -6966,7 +6978,7 @@ public function getText() {}
* @param int $offset
*/
#[Pure]
- public function isBoundary(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $offset) {}
+ public function isBoundary(#[TypeAware(['8.0' => 'int'], default: '')] $offset) {}
/**
* (PHP 5 >=5.5.0)
@@ -6982,14 +6994,14 @@ public function last() {}
* @param int $offset [optional]
* @return int
*/
- public function next(#[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $offset = null) {}
+ public function next(#[TypeAware(['8.0' => 'int|null'], default: '')] $offset = null) {}
/**
* (PHP 5 >=5.5.0)
* @link https://secure.php.net/manual/en/intlbreakiterator.preceding.php
* @param int $offset
*/
- public function preceding(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $offset) {}
+ public function preceding(#[TypeAware(['8.0' => 'int'], default: '')] $offset) {}
/**
* (PHP 5 >=5.5.0)
@@ -7005,7 +7017,7 @@ public function previous() {}
* @link https://secure.php.net/manual/en/intlbreakiterator.settext.php
* @param string $text
*/
- public function setText(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $text) {}
+ public function setText(#[TypeAware(['8.0' => 'string'], default: '')] $text) {}
/**
* @return Traversable
@@ -7025,8 +7037,8 @@ class IntlRuleBasedBreakIterator extends IntlBreakIterator implements Traversabl
*/
#[Pure]
public function __construct(
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $rules,
- #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $compiled = false
+ #[TypeAware(['8.0' => 'string'], default: '')] $rules,
+ #[TypeAware(['8.0' => 'bool'], default: '')] $compiled = false
) {}
/**
@@ -7203,8 +7215,8 @@ class UConverter
*/
#[Pure]
public function __construct(
- #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $destination_encoding = null,
- #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $source_encoding = null
+ #[TypeAware(['8.0' => 'string|null'], default: '')] $destination_encoding = null,
+ #[TypeAware(['8.0' => 'string|null'], default: '')] $source_encoding = null
) {}
/**
@@ -7217,8 +7229,8 @@ public function __construct(
*/
#[Pure]
public function convert(
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $str,
- #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $reverse = false
+ #[TypeAware(['8.0' => 'string'], default: '')] $str,
+ #[TypeAware(['8.0' => 'bool'], default: '')] $reverse = false
) {}
/**
@@ -7232,9 +7244,9 @@ public function convert(
* @return mixed
*/
public function fromUCallback(
- #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $reason,
- #[LanguageLevelTypeAware(['8.0' => 'array'], default: '')] $source,
- #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $codePoint,
+ #[TypeAware(['8.0' => 'int'], default: '')] $reason,
+ #[TypeAware(['8.0' => 'array'], default: '')] $source,
+ #[TypeAware(['8.0' => 'int'], default: '')] $codePoint,
&$error
) {}
@@ -7245,7 +7257,7 @@ public function fromUCallback(
* @param string $name
* @return array
*/
- public static function getAliases(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name = null) {}
+ public static function getAliases(#[TypeAware(['8.0' => 'string'], default: '')] $name = null) {}
/**
* (PHP 5 >=5.5.0)
@@ -7335,7 +7347,7 @@ public function getSubstChars() {}
* @return string
*/
#[Pure]
- public static function reasonText(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $reason = 0) {}
+ public static function reasonText(#[TypeAware(['8.0' => 'int'], default: '')] $reason = 0) {}
/**
* (PHP 5 >=5.5.0)
@@ -7344,7 +7356,7 @@ public static function reasonText(#[LanguageLevelTypeAware(['8.0' => 'int'], def
* @param string $encoding
* @return void
*/
- public function setDestinationEncoding(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $encoding) {}
+ public function setDestinationEncoding(#[TypeAware(['8.0' => 'string'], default: '')] $encoding) {}
/**
* (PHP 5 >=5.5.0)
@@ -7353,7 +7365,7 @@ public function setDestinationEncoding(#[LanguageLevelTypeAware(['8.0' => 'strin
* @param string $encoding
* @return void
*/
- public function setSourceEncoding(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $encoding) {}
+ public function setSourceEncoding(#[TypeAware(['8.0' => 'string'], default: '')] $encoding) {}
/**
* (PHP 5 >=5.5.0)
@@ -7362,7 +7374,7 @@ public function setSourceEncoding(#[LanguageLevelTypeAware(['8.0' => 'string'],
* @param string $chars
* @return void
*/
- public function setSubstChars(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $chars) {}
+ public function setSubstChars(#[TypeAware(['8.0' => 'string'], default: '')] $chars) {}
/**
* (PHP 5 >=5.5.0)
@@ -7375,9 +7387,9 @@ public function setSubstChars(#[LanguageLevelTypeAware(['8.0' => 'string'], defa
* @return mixed
*/
public function toUCallback(
- #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $reason,
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $source,
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $codeUnits,
+ #[TypeAware(['8.0' => 'int'], default: '')] $reason,
+ #[TypeAware(['8.0' => 'string'], default: '')] $source,
+ #[TypeAware(['8.0' => 'string'], default: '')] $codeUnits,
&$error
) {}
@@ -7392,9 +7404,9 @@ public function toUCallback(
* @return string
*/
public static function transcode(
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $str,
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $toEncoding,
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $fromEncoding,
+ #[TypeAware(['8.0' => 'string'], default: '')] $str,
+ #[TypeAware(['8.0' => 'string'], default: '')] $toEncoding,
+ #[TypeAware(['8.0' => 'string'], default: '')] $fromEncoding,
?array $options = []
) {}
}
diff --git a/ldap/ldap.php b/ldap/ldap.php
index 34b66e512..93b8f0fb7 100644
--- a/ldap/ldap.php
+++ b/ldap/ldap.php
@@ -4,7 +4,6 @@
use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware as PhpVersionAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable as Available;
-use JetBrains\PhpStorm\Internal\Required;
/**
* PASSWD extended operation helper
@@ -19,9 +18,15 @@
*/
function ldap_exop_passwd(
#[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
- #[Required(from: '7.2', to: '7.2')] string $user = "",
- #[Required(from: '7.2', to: '7.2')] string $old_password = "",
- #[Required(from: '7.2', to: '7.2')] string $new_password = "",
+ #[Available(from: '7.1', to: '7.1')] string $user = "",
+ #[Available(from: '7.2', to: '7.2')] string $user,
+ #[Available(from: '7.3')] string $user = "",
+ #[Available(from: '7.1', to: '7.1')] string $old_password = "",
+ #[Available(from: '7.2', to: '7.2')] string $old_password,
+ #[Available(from: '7.3')] string $old_password = "",
+ #[Available(from: '7.1', to: '7.1')] string $new_password = "",
+ #[Available(from: '7.2', to: '7.2')] string $new_password,
+ #[Available(from: '7.3')] string $new_password = "",
#[Available(from: '7.3')] &$controls = []
): string|bool {}
@@ -73,8 +78,10 @@ function ldap_exop(#[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'res
function ldap_parse_exop(
#[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
#[PhpVersionAware(['8.1' => 'LDAP\Result'], default: 'resource')] $result,
- #[Required(from: '7.2', to: '7.4')] &$response_data = '',
- #[Required(from: '7.2', to: '7.4')] &$response_oid = ''
+ #[Available(from: '7.2', to: '7.4')] &$response_data,
+ #[Available(from: '8.0')] &$response_data = '',
+ #[Available(from: '7.2', to: '7.4')] &$response_oid,
+ #[Available(from: '8.0')] &$response_oid = ''
): bool {}
/**
@@ -1057,7 +1064,8 @@ function ldap_rename_ext(#[PhpVersionAware(['8.1' => 'LDAP\Connection'], default
function ldap_get_option(
#[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
int $option,
- #[Required(from: '5.3', to: '7.4')] &$value = null
+ #[Available(from: '5.3', to: '7.4')] &$value,
+ #[Available(from: '8.0')] &$value = null
): bool {}
/**
diff --git a/mbstring/mbstring.php b/mbstring/mbstring.php
index c1221cc96..561d466aa 100644
--- a/mbstring/mbstring.php
+++ b/mbstring/mbstring.php
@@ -815,9 +815,9 @@ function mb_decode_mimeheader(string $string): string {}
function mb_convert_variables(
string $to_encoding,
array|string $from_encoding,
- #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')]&$vars,
+ #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] &$vars,
#[PhpStormStubsElementAvailable(from: '8.0')] mixed &$var,
- mixed &...$vars
+ mixed &...$vars
): string|false {}
/**
diff --git a/mysqli/mysqli.php b/mysqli/mysqli.php
index fa2fb5d7e..6d499b0bd 100644
--- a/mysqli/mysqli.php
+++ b/mysqli/mysqli.php
@@ -7,7 +7,6 @@
use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
-use JetBrains\PhpStorm\Internal\Required;
/**
* mysqli_sql_exception
@@ -2071,7 +2070,11 @@ function mysqli_more_results(mysqli $mysql): bool {}
* @param string $query One or more queries which are separated by semicolons.
* @return bool Returns FALSE if the first statement failed. To retrieve subsequent errors from other statements you have to call mysqli_next_result() first.
*/
-function mysqli_multi_query(mysqli $mysql, #[Required(from: '8.0')] string $query = null): bool {}
+function mysqli_multi_query(
+ mysqli $mysql,
+ #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] string $query = null,
+ #[PhpStormStubsElementAvailable(from: '8.0')] string $query
+): bool {}
/**
* Prepare next result from multi_query
@@ -2223,7 +2226,11 @@ function mysqli_real_escape_string(mysqli $mysql, string $string): string {}
* @param string $query
* @return bool
*/
-function mysqli_real_query(mysqli $mysql, #[Required(from: '8.0')] string $query = null): bool {}
+function mysqli_real_query(
+ mysqli $mysql,
+ #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] string $query = null,
+ #[PhpStormStubsElementAvailable(from: '8.0')] string $query
+): bool {}
/**
* Get result from async query
@@ -2395,7 +2402,8 @@ function mysqli_stmt_send_long_data(mysqli_stmt $statement, int $param_num, stri
function mysqli_stmt_bind_param(
mysqli_stmt $statement,
string $types,
- #[Required(from: '5.3', to: '7.4')] mixed &...$vars
+ #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] mixed &$vars,
+ mixed &...$vars
): bool {}
/**
@@ -2407,7 +2415,8 @@ function mysqli_stmt_bind_param(
*/
function mysqli_stmt_bind_result(
mysqli_stmt $statement,
- #[Required(from: '5.3', to: '7.4')] mixed &...$vars
+ #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] mixed &$vars,
+ mixed &...$vars
): bool {}
/**
diff --git a/openssl/openssl.php b/openssl/openssl.php
index 916375b23..f749f9b19 100644
--- a/openssl/openssl.php
+++ b/openssl/openssl.php
@@ -807,7 +807,7 @@ function openssl_open(
string $encrypted_key,
#[LanguageLevelTypeAware(['8.0' => 'OpenSSLAsymmetricKey|OpenSSLCertificate|array|string'], default: 'resource|array|string')] $private_key,
#[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] string $cipher_algo = '',
- #[PhpStormStubsElementAvailable(from: '8.0')] string $cipher_algo = "RC4",
+ #[PhpStormStubsElementAvailable(from: '8.0')] string $cipher_algo,
?string $iv
): bool {}
diff --git a/pcntl/pcntl.php b/pcntl/pcntl.php
index 7fe8398d6..8362a7297 100644
--- a/pcntl/pcntl.php
+++ b/pcntl/pcntl.php
@@ -2,7 +2,7 @@
// Start of pcntl v.
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
-use JetBrains\PhpStorm\Internal\Required;
+use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Pure;
/**
@@ -459,7 +459,10 @@ function pcntl_sigtimedwait(array $signals, &$info, int $seconds = 0, int $nanos
* @return bool
* @since 7.1
*/
-function pcntl_async_signals(#[Required(from: '5.3', to: '7.4')] ?bool $enable = null): bool {}
+function pcntl_async_signals(
+ #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] ?bool $enable,
+ #[PhpStormStubsElementAvailable(from: '8.0')] ?bool $enable = null
+): bool {}
/**
* Get the current handler for specified signal.
diff --git a/sockets/sockets.php b/sockets/sockets.php
index c826339df..12976d4d6 100644
--- a/sockets/sockets.php
+++ b/sockets/sockets.php
@@ -2,7 +2,6 @@
// Start of sockets v.
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
-use JetBrains\PhpStorm\Internal\Required;
/**
* (PHP 7 >= 7.2.0)
@@ -703,7 +702,12 @@ function socket_send(Socket $socket, string $data, int $length, int $flags): int
* @return int|false
* @since 5.5
*/
-function socket_sendmsg(Socket $socket, array $message, #[Required(from: '5.3', to: '7.4')] int $flags = 0): int|false {}
+function socket_sendmsg(
+ Socket $socket,
+ array $message,
+ #[PhpStormStubsElementAvailable(from: '5.5', to: '7.4')] int $flags,
+ #[PhpStormStubsElementAvailable(from: '8.0')] int $flags = 0
+): int|false {}
/**
* Receives data from a socket whether or not it is connection-oriented
@@ -788,7 +792,12 @@ function socket_recvfrom(Socket $socket, &$data, int $length, int $flags, &$addr
* @return int|false
* @since 5.5
*/
-function socket_recvmsg(Socket $socket, array &$message, #[Required(from: '5.3', to: '7.4')] int $flags = null): int|false {}
+function socket_recvmsg(
+ Socket $socket,
+ array &$message,
+ #[PhpStormStubsElementAvailable(from: '5.5', to: '7.4')] int $flags,
+ #[PhpStormStubsElementAvailable(from: '8.0')] int $flags = 0
+): int|false {}
/**
* Sends a message to a socket, whether it is connected or not
diff --git a/standard/standard_4.php b/standard/standard_4.php
index 962625ae4..d55f0d7c6 100644
--- a/standard/standard_4.php
+++ b/standard/standard_4.php
@@ -367,7 +367,7 @@ function highlight_string(string $string, bool $return = false): string|bool {}
#[Pure]
function hrtime(
#[PhpStormStubsElementAvailable(from: '7.3', to: '7.4')] bool $as_number,
- #[PhpStormStubsElementAvailable(from: '8.0')]bool $as_number
+ #[PhpStormStubsElementAvailable(from: '8.0')] bool $as_number = false
): array|int|float|false {}
/**
diff --git a/standard/standard_9.php b/standard/standard_9.php
index 442298d0b..8c9efdac1 100644
--- a/standard/standard_9.php
+++ b/standard/standard_9.php
@@ -545,7 +545,8 @@ function array_udiff(
#[Pure]
function array_diff_assoc(
array $array,
- #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $arrays, array ...$arrays
+ #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $arrays,
+ array ...$arrays
): array {}
/**
diff --git a/tests/BaseClassesTest.php b/tests/BaseClassesTest.php
index 302520ddd..6af683371 100644
--- a/tests/BaseClassesTest.php
+++ b/tests/BaseClassesTest.php
@@ -155,7 +155,7 @@ function ($parameter) {
public function testClassInterfaces(PHPClass $class)
{
$className = $class->name;
- $stubClass = PhpStormStubsSingleton::getPhpStormStubs()->getClass($class->name);
+ $stubClass = PhpStormStubsSingleton::getPhpStormStubs()->getClass($class->name, null, false);
foreach ($class->interfaces as $interface) {
static::assertContains(
$interface,
diff --git a/tests/Parsers/Visitors/ASTVisitor.php b/tests/Parsers/Visitors/ASTVisitor.php
index a73fef763..95ea11494 100644
--- a/tests/Parsers/Visitors/ASTVisitor.php
+++ b/tests/Parsers/Visitors/ASTVisitor.php
@@ -117,12 +117,14 @@ public function combineParentInterfaces(PHPInterface $interface): array
$parents[] = $parentInterface;
if ($this->stubs->getInterface(
$parentInterface,
- $interface->stubBelongsToCore ? null : $interface->sourceFilePath
+ $interface->stubBelongsToCore ? null : $interface->sourceFilePath,
+ false
) !== null) {
foreach ($this->combineParentInterfaces(
$this->stubs->getInterface(
$parentInterface,
- $interface->stubBelongsToCore ? null : $interface->sourceFilePath
+ $interface->stubBelongsToCore ? null : $interface->sourceFilePath,
+ false
)
) as $value) {
$parents[] = $value;
@@ -143,11 +145,13 @@ public function combineImplementedInterfaces(PHPClass $class): array
$interfaces[] = $interface;
if ($this->stubs->getInterface(
$interface,
- $class->stubBelongsToCore ? null : $class->sourceFilePath
+ $class->stubBelongsToCore ? null : $class->sourceFilePath,
+ false
) !== null) {
$interfaces[] = $this->stubs->getInterface(
$interface,
- $class->stubBelongsToCore ? null : $class->sourceFilePath
+ $class->stubBelongsToCore ? null : $class->sourceFilePath,
+ false
)->parentInterfaces;
}
}
@@ -156,11 +160,13 @@ public function combineImplementedInterfaces(PHPClass $class): array
}
if ($this->stubs->getClass(
$class->parentClass,
- $class->stubBelongsToCore ? null : $class->sourceFilePath
+ $class->stubBelongsToCore ? null : $class->sourceFilePath,
+ false
) !== null) {
$inherited = $this->combineImplementedInterfaces($this->stubs->getClass(
$class->parentClass,
- $class->stubBelongsToCore ? null : $class->sourceFilePath
+ $class->stubBelongsToCore ? null : $class->sourceFilePath,
+ false
));
$interfaces[] = CommonUtils::flattenArray($inherited, false);
}
diff --git a/tests/StubsStructureTest.php b/tests/StubsStructureTest.php
index 5a08a6f7e..7a458a348 100644
--- a/tests/StubsStructureTest.php
+++ b/tests/StubsStructureTest.php
@@ -2,22 +2,23 @@
namespace StubTests;
-
use RecursiveArrayIterator;
use RecursiveIteratorIterator;
use StubTests\TestData\Providers\Stubs\PhpCoreStubsProvider;
class StubsStructureTest extends BaseStubsTest
{
-
/**
* @dataProvider \StubTests\TestData\Providers\Stubs\StubsTestDataProviders::stubsDirectoriesProvider
*/
public function testStubsDirectoryExistInMap($directory)
{
- self::assertContains($directory,
+ self::assertContains(
+ $directory,
iterator_to_array(new RecursiveIteratorIterator(
- new RecursiveArrayIterator(PhpCoreStubsProvider::$StubDirectoryMap)), false),
- "Stubs directories provider doesn't contain '$directory'. Please add '$directory' to 'PhpCoreStubsProvider::\%StubDirectoryMap'");
+ new RecursiveArrayIterator(PhpCoreStubsProvider::$StubDirectoryMap)
+ ), false),
+ "Stubs directories provider doesn't contain '$directory'. Please add '$directory' to 'PhpCoreStubsProvider::\%StubDirectoryMap'"
+ );
}
}
diff --git a/tests/TestData/Providers/Stubs/StubsTestDataProviders.php b/tests/TestData/Providers/Stubs/StubsTestDataProviders.php
index 7112ec2fb..50809518e 100644
--- a/tests/TestData/Providers/Stubs/StubsTestDataProviders.php
+++ b/tests/TestData/Providers/Stubs/StubsTestDataProviders.php
@@ -29,7 +29,7 @@ public static function allClassesProvider(): ?Generator
public static function coreFunctionsProvider(): ?Generator
{
$allFunctions = PhpStormStubsSingleton::getPhpStormStubs()->getFunctions();
- $coreFunctions = array_filter($allFunctions, fn(PHPFunction $function): bool => $function->stubBelongsToCore === true);
+ $coreFunctions = array_filter($allFunctions, fn (PHPFunction $function): bool => $function->stubBelongsToCore === true);
foreach ($coreFunctions as $coreFunction) {
yield "function $coreFunction->name" => [$coreFunction];
}