update stubs map + cs fixer
This commit is contained in:
parent
7e35064856
commit
8ed3223576
|
@ -4789,8 +4789,6 @@ const FUNCTIONS = array (
|
|||
'sodium_crypto_secretstream_xchacha20poly1305_init_pull' => 'sodium/sodium.php',
|
||||
'sodium_crypto_secretstream_xchacha20poly1305_init_push' => 'sodium/sodium.php',
|
||||
'sodium_crypto_secretstream_xchacha20poly1305_keygen' => 'sodium/sodium.php',
|
||||
'sodium_crypto_secretstream_xchacha20poly1305_pull' => 'sodium/sodium.php',
|
||||
'sodium_crypto_secretstream_xchacha20poly1305_push' => 'sodium/sodium.php',
|
||||
'sodium_crypto_secretstream_xchacha20poly1305_rekey' => 'sodium/sodium.php',
|
||||
'sodium_crypto_shorthash' => 'sodium/sodium.php',
|
||||
'sodium_crypto_shorthash_keygen' => 'sodium/sodium.php',
|
||||
|
|
|
@ -241,7 +241,9 @@ class SplFileInfo implements Stringable
|
|||
*/
|
||||
public function openFile(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $mode = 'r',
|
||||
#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $useIncludePath = false, $context = null) {}
|
||||
#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $useIncludePath = false,
|
||||
$context = null
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Sets the class name used with <b>SplFileInfo::openFile</b>
|
||||
|
@ -581,7 +583,9 @@ class SplFileObject extends SplFileInfo implements RecursiveIterator, SeekableIt
|
|||
public function __construct(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $mode = 'r',
|
||||
#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $useIncludePath = false, $context = null) {}
|
||||
#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $useIncludePath = false,
|
||||
$context = null
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Rewind the file to the first line
|
||||
|
|
|
@ -201,7 +201,8 @@ class DateTimeImmutable implements DateTimeInterface
|
|||
public static function createFromFormat(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $format,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $datetime,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'DateTimeZone|null'], default: 'DateTimeZone')] $timezone = null) {}
|
||||
#[LanguageLevelTypeAware(['8.0' => 'DateTimeZone|null'], default: 'DateTimeZone')] $timezone = null
|
||||
) {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >=5.6.0)<br/>
|
||||
|
@ -272,7 +273,8 @@ class DateTimeImmutable implements DateTimeInterface
|
|||
public function setISODate(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $year,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $week,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $dayOfWeek = 1) {}
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $dayOfWeek = 1
|
||||
) {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >=5.5.0)<br/>
|
||||
|
|
|
@ -56,7 +56,9 @@ class finfo
|
|||
#[Pure]
|
||||
public function file(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename = null,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = FILEINFO_NONE, $context = null) {}
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = FILEINFO_NONE,
|
||||
$context = null
|
||||
) {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.3.0, PECL fileinfo >= 0.1.0)<br/>
|
||||
|
|
|
@ -1147,7 +1147,8 @@ class NumberFormatter
|
|||
*/
|
||||
#[Pure]
|
||||
public function getLocale(
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int'], default: '')] #[EV([Locale::VALID_LOCALE, Locale::ACTUAL_LOCALE])] $type = null) {}
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int'], default: '')] #[EV([Locale::VALID_LOCALE, Locale::ACTUAL_LOCALE])] $type = null
|
||||
) {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/>
|
||||
|
@ -1823,7 +1824,8 @@ class IntlDateFormatter
|
|||
#[LanguageLevelTypeAware(['8.1' => 'int'], default: '')] $timeType,
|
||||
$timezone = null,
|
||||
$calendar = null,
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')] $pattern = '') {}
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')] $pattern = ''
|
||||
) {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/>
|
||||
|
|
|
@ -18,4 +18,4 @@ class Required
|
|||
#[ExpectedValues(Deprecated::PHP_VERSIONS)] $from,
|
||||
#[ExpectedValues(Deprecated::PHP_VERSIONS)] $to = null
|
||||
) {}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
namespace MongoDB {}
|
||||
|
||||
namespace MongoDB\Driver {
|
||||
|
||||
use MongoDB\BSON\Serializable;
|
||||
use MongoDB\Driver\Exception\AuthenticationException;
|
||||
use MongoDB\Driver\Exception\BulkWriteException;
|
||||
|
@ -30,7 +29,7 @@ namespace MongoDB\Driver {
|
|||
use MongoDB\Driver\Exception\WriteException;
|
||||
use Traversable;
|
||||
|
||||
/**
|
||||
/**
|
||||
* The MongoDB\Driver\Manager is the main entry point to the extension. It is responsible for maintaining connections to MongoDB (be it standalone server, replica set, or sharded cluster).
|
||||
* No connection to MongoDB is made upon instantiating the Manager. This means the MongoDB\Driver\Manager can always be constructed, even though one or more MongoDB servers are down.
|
||||
* Any write or query can throw connection exceptions as connections are created lazily. A MongoDB server may also become unavailable during the life time of the script. It is therefore important that all actions on the Manager to be wrapped in try/catch statements.
|
||||
|
@ -1385,11 +1384,10 @@ namespace MongoDB\Driver {
|
|||
}
|
||||
|
||||
namespace MongoDB\Driver\Exception {
|
||||
|
||||
use MongoDB\Driver\WriteResult;
|
||||
use Throwable;
|
||||
|
||||
/**
|
||||
/**
|
||||
* Thrown when the driver encounters a runtime error (e.g. internal error from » libmongoc).
|
||||
* @link https://php.net/manual/en/class.mongodb-driver-exception-runtimeexception.php
|
||||
* @since 1.0.0
|
||||
|
@ -1837,7 +1835,6 @@ namespace MongoDB\Driver\Monitoring {
|
|||
*/
|
||||
|
||||
namespace MongoDB\BSON {
|
||||
|
||||
use DateTime;
|
||||
use DateTimeInterface;
|
||||
use JetBrains\PhpStorm\Deprecated;
|
||||
|
@ -1845,7 +1842,7 @@ namespace MongoDB\BSON {
|
|||
use MongoDB\Driver\Exception\InvalidArgumentException;
|
||||
use MongoDB\Driver\Exception\UnexpectedValueException;
|
||||
|
||||
/**
|
||||
/**
|
||||
* Converts a BSON string to its Canonical Extended JSON representation.
|
||||
* The canonical format prefers type fidelity at the expense of concise output and is most suited for producing
|
||||
* output that can be converted back to BSON without any loss of type information
|
||||
|
|
|
@ -206,7 +206,8 @@ class mysqli
|
|||
*/
|
||||
public function begin_transaction(
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int'], default: '')] $flags = 0,
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')] $name = null) {}
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')] $name = null
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Changes the user of the specified database connection
|
||||
|
|
|
@ -276,7 +276,9 @@ class SoapClient
|
|||
*/
|
||||
#[Deprecated]
|
||||
public function __call(
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')] $name, array $args) {}
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')] $name,
|
||||
array $args
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Calls a SOAP function
|
||||
|
@ -324,7 +326,8 @@ class SoapClient
|
|||
array $args,
|
||||
#[LanguageLevelTypeAware(['8.1' => 'array|null'], default: '')] $options = null,
|
||||
$inputHeaders = null,
|
||||
&$outputHeaders = null) {}
|
||||
&$outputHeaders = null
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Returns last SOAP request
|
||||
|
@ -410,7 +413,8 @@ class SoapClient
|
|||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')] $location,
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')] $action,
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int'], default: '')] $version,
|
||||
#[LanguageLevelTypeAware(["8.0" => 'bool'], default: 'int')] $oneWay = false) {}
|
||||
#[LanguageLevelTypeAware(["8.0" => 'bool'], default: 'int')] $oneWay = false
|
||||
) {}
|
||||
|
||||
/**
|
||||
* The __setCookie purpose
|
||||
|
@ -647,7 +651,8 @@ class SoapServer
|
|||
*/
|
||||
public function setClass(
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')] $class,
|
||||
#[LanguageLevelTypeAware(['8.1' => 'mixed'], default: '')] ...$args) {}
|
||||
#[LanguageLevelTypeAware(['8.1' => 'mixed'], default: '')] ...$args
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Sets the object which will be used to handle SOAP requests
|
||||
|
|
|
@ -72,7 +72,8 @@ class SQLite3
|
|||
public function open(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = SQLITE3_OPEN_READWRITE|SQLITE3_OPEN_CREATE,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $encryptionKey = null) {}
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $encryptionKey = null
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Closes the database connection
|
||||
|
@ -476,7 +477,8 @@ class SQLite3Stmt
|
|||
*/
|
||||
private function __construct(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'SQLite3'], default: '')] $sqlite3,
|
||||
#[PhpStormStubsElementAvailable(from: '8.0')] string $query) {}
|
||||
#[PhpStormStubsElementAvailable(from: '8.0')] string $query
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Retrieves the SQL of the prepared statement. If expanded is FALSE, the unmodified SQL is retrieved.
|
||||
|
|
|
@ -54,7 +54,7 @@ class BaseFunctionsTest extends BaseStubsTest
|
|||
$phpstormFunction = $stubFunctions[$functionName];
|
||||
$filteredStubParameters = array_filter(
|
||||
$phpstormFunction->parameters,
|
||||
fn($parameter) => BasePHPElement::entitySuitesCurrentPhpVersion($parameter)
|
||||
fn ($parameter) => BasePHPElement::entitySuitesCurrentPhpVersion($parameter)
|
||||
);
|
||||
static::assertSameSize(
|
||||
$function->parameters,
|
||||
|
|
|
@ -207,8 +207,8 @@ class Utils
|
|||
public static function parameterSuiteCurrentPhpVersionBasedOnAttribute(PHPParameter $parameter): bool
|
||||
{
|
||||
if (!empty($parameter->availableVersionsRangeFromAttribute)) {
|
||||
return ($parameter->availableVersionsRangeFromAttribute['from'] <= (doubleval(getenv('PHP_VERSION')) ?? PhpVersions::getFirst())
|
||||
&& $parameter->availableVersionsRangeFromAttribute['to'] >= (doubleval(getenv('PHP_VERSION')) ?? PhpVersions::getLatest()));
|
||||
return $parameter->availableVersionsRangeFromAttribute['from'] <= (doubleval(getenv('PHP_VERSION')) ?? PhpVersions::getFirst())
|
||||
&& $parameter->availableVersionsRangeFromAttribute['to'] >= (doubleval(getenv('PHP_VERSION')) ?? PhpVersions::getLatest());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue