Tentative return types (#1234)
[phpstorm-stubs] add tentative return type hints
This commit is contained in:
parent
ff1b35d145
commit
27d6f9e08e
157
Core/Core_c.php
157
Core/Core_c.php
|
@ -3,6 +3,7 @@
|
|||
// Start of Core v.5.3.6-13ubuntu3.2
|
||||
use JetBrains\PhpStorm\ExpectedValues;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\TentativeType;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
/**
|
||||
|
@ -40,7 +41,8 @@ interface IteratorAggregate extends Traversable
|
|||
* <b>Traversable</b>
|
||||
* @throws Exception on failure.
|
||||
*/
|
||||
public function getIterator();
|
||||
#[TentativeType]
|
||||
public function getIterator(): Traversable;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -55,21 +57,24 @@ interface Iterator extends Traversable
|
|||
* @link https://php.net/manual/en/iterator.current.php
|
||||
* @return mixed Can return any type.
|
||||
*/
|
||||
public function current();
|
||||
#[TentativeType]
|
||||
public function current(): mixed;
|
||||
|
||||
/**
|
||||
* Move forward to next element
|
||||
* @link https://php.net/manual/en/iterator.next.php
|
||||
* @return void Any returned value is ignored.
|
||||
*/
|
||||
public function next();
|
||||
#[TentativeType]
|
||||
public function next(): void;
|
||||
|
||||
/**
|
||||
* Return the key of the current element
|
||||
* @link https://php.net/manual/en/iterator.key.php
|
||||
* @return string|float|int|bool|null scalar on success, or null on failure.
|
||||
*/
|
||||
public function key();
|
||||
#[TentativeType]
|
||||
public function key(): mixed;
|
||||
|
||||
/**
|
||||
* Checks if current position is valid
|
||||
|
@ -77,14 +82,16 @@ interface Iterator extends Traversable
|
|||
* @return bool The return value will be casted to boolean and then evaluated.
|
||||
* Returns true on success or false on failure.
|
||||
*/
|
||||
public function valid();
|
||||
#[TentativeType]
|
||||
public function valid(): bool;
|
||||
|
||||
/**
|
||||
* Rewind the Iterator to the first element
|
||||
* @link https://php.net/manual/en/iterator.rewind.php
|
||||
* @return void Any returned value is ignored.
|
||||
*/
|
||||
public function rewind();
|
||||
#[TentativeType]
|
||||
public function rewind(): void;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -104,7 +111,8 @@ interface ArrayAccess
|
|||
* <p>
|
||||
* The return value will be casted to boolean if non-boolean was returned.
|
||||
*/
|
||||
public function offsetExists(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $offset);
|
||||
#[TentativeType]
|
||||
public function offsetExists(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $offset): bool;
|
||||
|
||||
/**
|
||||
* Offset to retrieve
|
||||
|
@ -114,7 +122,8 @@ interface ArrayAccess
|
|||
* </p>
|
||||
* @return mixed Can return all value types.
|
||||
*/
|
||||
public function offsetGet(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $offset);
|
||||
#[TentativeType]
|
||||
public function offsetGet(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $offset): mixed;
|
||||
|
||||
/**
|
||||
* Offset to set
|
||||
|
@ -127,10 +136,11 @@ interface ArrayAccess
|
|||
* </p>
|
||||
* @return void
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function offsetSet(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $offset,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value
|
||||
);
|
||||
): void;
|
||||
|
||||
/**
|
||||
* Offset to unset
|
||||
|
@ -140,7 +150,8 @@ interface ArrayAccess
|
|||
* </p>
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $offset);
|
||||
#[TentativeType]
|
||||
public function offsetUnset(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $offset): void;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -180,7 +191,7 @@ interface Throwable extends Stringable
|
|||
* @return string
|
||||
* @since 7.0
|
||||
*/
|
||||
public function getMessage();
|
||||
public function getMessage(): string;
|
||||
|
||||
/**
|
||||
* Gets the exception code
|
||||
|
@ -201,7 +212,7 @@ interface Throwable extends Stringable
|
|||
* @return string Returns the name of the file from which the object was thrown.
|
||||
* @since 7.0
|
||||
*/
|
||||
public function getFile();
|
||||
public function getFile(): string;
|
||||
|
||||
/**
|
||||
* Gets the line on which the object was instantiated
|
||||
|
@ -209,7 +220,7 @@ interface Throwable extends Stringable
|
|||
* @return int Returns the line number where the thrown object was instantiated.
|
||||
* @since 7.0
|
||||
*/
|
||||
public function getLine();
|
||||
public function getLine(): int;
|
||||
|
||||
/**
|
||||
* Gets the stack trace
|
||||
|
@ -220,7 +231,7 @@ interface Throwable extends Stringable
|
|||
* </p>
|
||||
* @since 7.0
|
||||
*/
|
||||
public function getTrace();
|
||||
public function getTrace(): array;
|
||||
|
||||
/**
|
||||
* Gets the stack trace as a string
|
||||
|
@ -228,7 +239,7 @@ interface Throwable extends Stringable
|
|||
* @return string Returns the stack trace as a string.
|
||||
* @since 7.0
|
||||
*/
|
||||
public function getTraceAsString();
|
||||
public function getTraceAsString(): string;
|
||||
|
||||
/**
|
||||
* Returns the previous Throwable
|
||||
|
@ -236,6 +247,7 @@ interface Throwable extends Stringable
|
|||
* @return null|Throwable Returns the previous {@see Throwable} if available, or <b>NULL</b> otherwise.
|
||||
* @since 7.0
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.0' => 'Throwable|null'], default: '')]
|
||||
public function getPrevious();
|
||||
|
||||
/**
|
||||
|
@ -246,6 +258,7 @@ interface Throwable extends Stringable
|
|||
*/
|
||||
public function __toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Exception is the base class for
|
||||
* all Exceptions.
|
||||
|
@ -270,7 +283,7 @@ class Exception implements Throwable
|
|||
* @link https://php.net/manual/en/exception.clone.php
|
||||
* @return void
|
||||
*/
|
||||
final private function __clone() {}
|
||||
final private function __clone(): void {}
|
||||
|
||||
/**
|
||||
* Construct the exception. Note: The message is NOT binary safe.
|
||||
|
@ -292,7 +305,7 @@ class Exception implements Throwable
|
|||
* @return string the Exception message as a string.
|
||||
*/
|
||||
#[Pure]
|
||||
final public function getMessage() {}
|
||||
final public function getMessage(): string {}
|
||||
|
||||
/**
|
||||
* Gets the Exception code
|
||||
|
@ -311,7 +324,7 @@ class Exception implements Throwable
|
|||
* @return string the filename in which the exception was created.
|
||||
*/
|
||||
#[Pure]
|
||||
final public function getFile() {}
|
||||
final public function getFile(): string {}
|
||||
|
||||
/**
|
||||
* Gets the line in which the exception occurred
|
||||
|
@ -319,7 +332,7 @@ class Exception implements Throwable
|
|||
* @return int the line number where the exception was created.
|
||||
*/
|
||||
#[Pure]
|
||||
final public function getLine() {}
|
||||
final public function getLine(): int {}
|
||||
|
||||
/**
|
||||
* Gets the stack trace
|
||||
|
@ -327,7 +340,7 @@ class Exception implements Throwable
|
|||
* @return array the Exception stack trace as an array.
|
||||
*/
|
||||
#[Pure]
|
||||
final public function getTrace() {}
|
||||
final public function getTrace(): array {}
|
||||
|
||||
/**
|
||||
* Returns previous Exception
|
||||
|
@ -336,7 +349,7 @@ class Exception implements Throwable
|
|||
* or null otherwise.
|
||||
*/
|
||||
#[Pure]
|
||||
final public function getPrevious() {}
|
||||
final public function getPrevious(): ?Throwable {}
|
||||
|
||||
/**
|
||||
* Gets the stack trace as a string
|
||||
|
@ -344,16 +357,18 @@ class Exception implements Throwable
|
|||
* @return string the Exception stack trace as a string.
|
||||
*/
|
||||
#[Pure]
|
||||
final public function getTraceAsString() {}
|
||||
final public function getTraceAsString(): string {}
|
||||
|
||||
/**
|
||||
* String representation of the exception
|
||||
* @link https://php.net/manual/en/exception.tostring.php
|
||||
* @return string the string representation of the exception.
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')]
|
||||
public function __toString() {}
|
||||
|
||||
public function __wakeup() {}
|
||||
#[TentativeType]
|
||||
public function __wakeup(): void {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -394,7 +409,7 @@ class Error implements Throwable
|
|||
* @return string
|
||||
* @since 7.0
|
||||
*/
|
||||
final public function getMessage() {}
|
||||
final public function getMessage(): string {}
|
||||
|
||||
/**
|
||||
* Gets the exception code
|
||||
|
@ -415,7 +430,7 @@ class Error implements Throwable
|
|||
* @return string Returns the name of the file from which the object was thrown.
|
||||
* @since 7.0
|
||||
*/
|
||||
final public function getFile() {}
|
||||
final public function getFile(): string {}
|
||||
|
||||
/**
|
||||
* Gets the line on which the object was instantiated
|
||||
|
@ -423,7 +438,7 @@ class Error implements Throwable
|
|||
* @return int Returns the line number where the thrown object was instantiated.
|
||||
* @since 7.0
|
||||
*/
|
||||
final public function getLine() {}
|
||||
final public function getLine(): int {}
|
||||
|
||||
/**
|
||||
* Gets the stack trace
|
||||
|
@ -434,7 +449,7 @@ class Error implements Throwable
|
|||
* </p>
|
||||
* @since 7.0
|
||||
*/
|
||||
final public function getTrace() {}
|
||||
final public function getTrace(): array {}
|
||||
|
||||
/**
|
||||
* Gets the stack trace as a string
|
||||
|
@ -442,7 +457,7 @@ class Error implements Throwable
|
|||
* @return string Returns the stack trace as a string.
|
||||
* @since 7.0
|
||||
*/
|
||||
final public function getTraceAsString() {}
|
||||
final public function getTraceAsString(): string {}
|
||||
|
||||
/**
|
||||
* Returns the previous Throwable
|
||||
|
@ -450,7 +465,7 @@ class Error implements Throwable
|
|||
* @return null|Throwable Returns the previous {@see Throwable} if available, or <b>NULL</b> otherwise.
|
||||
* @since 7.0
|
||||
*/
|
||||
final public function getPrevious() {}
|
||||
final public function getPrevious(): ?Throwable {}
|
||||
|
||||
/**
|
||||
* Gets a string representation of the thrown object
|
||||
|
@ -458,7 +473,7 @@ class Error implements Throwable
|
|||
* @return string <p>Returns the string representation of the thrown object.</p>
|
||||
* @since 7.0
|
||||
*/
|
||||
public function __toString() {}
|
||||
public function __toString(): string {}
|
||||
|
||||
/**
|
||||
* Clone the error
|
||||
|
@ -466,9 +481,10 @@ class Error implements Throwable
|
|||
* @return void
|
||||
* @link https://php.net/manual/en/error.clone.php
|
||||
*/
|
||||
final private function __clone() {}
|
||||
final private function __clone(): void {}
|
||||
|
||||
public function __wakeup() {}
|
||||
#[TentativeType]
|
||||
public function __wakeup(): void {}
|
||||
}
|
||||
|
||||
class ValueError extends Error {}
|
||||
|
@ -546,7 +562,7 @@ class ErrorException extends Exception
|
|||
* @param int $line [optional] The line number where the exception is thrown.
|
||||
* @param Exception $previous [optional] The previous exception used for the exception chaining.
|
||||
*/
|
||||
#[\JetBrains\PhpStorm\Pure]
|
||||
#[Pure]
|
||||
public function __construct(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $message = "",
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $code = 0,
|
||||
|
@ -561,7 +577,7 @@ class ErrorException extends Exception
|
|||
* @link https://php.net/manual/en/errorexception.getseverity.php
|
||||
* @return int the severity level of the exception.
|
||||
*/
|
||||
final public function getSeverity() {}
|
||||
final public function getSeverity(): int {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -600,7 +616,7 @@ final class Closure
|
|||
* This determines the visibility of protected and private methods of the bound object.
|
||||
* @return Closure|false Returns the newly created Closure object or FALSE on failure
|
||||
*/
|
||||
public function bindTo(?object $newThis, object|string|null $newScope = 'static') {}
|
||||
public function bindTo(?object $newThis, object|string|null $newScope = 'static'): ?Closure {}
|
||||
|
||||
/**
|
||||
* This method is a static version of Closure::bindTo().
|
||||
|
@ -613,7 +629,7 @@ final class Closure
|
|||
* This determines the visibility of protected and private methods of the bound object.
|
||||
* @return Closure|false Returns the newly created Closure object or FALSE on failure
|
||||
*/
|
||||
public static function bind(Closure $closure, ?object $newThis, object|string|null $newScope = 'static') {}
|
||||
public static function bind(Closure $closure, ?object $newThis, object|string|null $newScope = 'static'): ?Closure {}
|
||||
|
||||
/**
|
||||
* Temporarily binds the closure to newthis, and calls it with any given parameters.
|
||||
|
@ -623,14 +639,14 @@ final class Closure
|
|||
* @return mixed
|
||||
* @since 7.0
|
||||
*/
|
||||
public function call(object $newThis, mixed ...$args) {}
|
||||
public function call(object $newThis, mixed ...$args): mixed {}
|
||||
|
||||
/**
|
||||
* @param callable $callback
|
||||
* @return Closure
|
||||
* @since 7.1
|
||||
*/
|
||||
public static function fromCallable(callable $callback) {}
|
||||
public static function fromCallable(callable $callback): Closure {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -648,7 +664,8 @@ interface Countable
|
|||
* The return value is cast to an integer.
|
||||
* </p>
|
||||
*/
|
||||
public function count();
|
||||
#[TentativeType]
|
||||
public function count(): int;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -682,7 +699,7 @@ class WeakReference
|
|||
* @return object|null
|
||||
* @since 7.4
|
||||
*/
|
||||
public function get() {}
|
||||
public function get(): ?object {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -693,7 +710,7 @@ class WeakReference
|
|||
*
|
||||
* @since 8.0
|
||||
*/
|
||||
final class WeakMap implements \ArrayAccess, \Countable, \IteratorAggregate
|
||||
final class WeakMap implements ArrayAccess, Countable, IteratorAggregate
|
||||
{
|
||||
/**
|
||||
* Returns {@see true} if the value for the object is contained in
|
||||
|
@ -702,7 +719,7 @@ final class WeakMap implements \ArrayAccess, \Countable, \IteratorAggregate
|
|||
* @param object $object Any object
|
||||
* @return bool
|
||||
*/
|
||||
public function offsetExists($object) {}
|
||||
public function offsetExists($object): bool {}
|
||||
|
||||
/**
|
||||
* Returns the existsing value by an object.
|
||||
|
@ -710,7 +727,7 @@ final class WeakMap implements \ArrayAccess, \Countable, \IteratorAggregate
|
|||
* @param object $object Any object
|
||||
* @return mixed Value associated with the key object
|
||||
*/
|
||||
public function offsetGet($object) {}
|
||||
public function offsetGet($object): mixed {}
|
||||
|
||||
/**
|
||||
* Sets a new value for an object.
|
||||
|
@ -719,7 +736,7 @@ final class WeakMap implements \ArrayAccess, \Countable, \IteratorAggregate
|
|||
* @param mixed $value Any value
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($object, mixed $value) {}
|
||||
public function offsetSet($object, mixed $value): void {}
|
||||
|
||||
/**
|
||||
* Force removes an object value from the {@see WeakMap} instance.
|
||||
|
@ -727,21 +744,21 @@ final class WeakMap implements \ArrayAccess, \Countable, \IteratorAggregate
|
|||
* @param object $object Any object
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($object) {}
|
||||
public function offsetUnset($object): void {}
|
||||
|
||||
/**
|
||||
* Returns an iterator in the "[object => mixed]" format.
|
||||
*
|
||||
* @return Traversable
|
||||
*/
|
||||
public function getIterator() {}
|
||||
public function getIterator(): Iterator {}
|
||||
|
||||
/**
|
||||
* Returns the number of items in the {@see WeakMap} instance.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function count() {}
|
||||
public function count(): int {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -759,7 +776,7 @@ interface Stringable
|
|||
* @return string Returns string representation of the object that
|
||||
* implements this interface (and/or "__toString" magic method).
|
||||
*/
|
||||
public function __toString();
|
||||
public function __toString(): string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -823,15 +840,16 @@ final class Attribute
|
|||
final class InternalIterator implements Iterator
|
||||
{
|
||||
private function __construct() {}
|
||||
public function current() {}
|
||||
|
||||
public function next() {}
|
||||
public function current(): mixed {}
|
||||
|
||||
public function key() {}
|
||||
public function next(): void {}
|
||||
|
||||
public function valid() {}
|
||||
public function key(): mixed {}
|
||||
|
||||
public function rewind() {}
|
||||
public function valid(): bool {}
|
||||
|
||||
public function rewind(): void {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -844,7 +862,7 @@ interface UnitEnum
|
|||
/**
|
||||
* @return static[]
|
||||
*/
|
||||
public static function cases();
|
||||
public static function cases(): array;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -858,13 +876,13 @@ interface BackedEnum extends UnitEnum
|
|||
* @param int|string $value
|
||||
* @return static
|
||||
*/
|
||||
public static function from(int|string $value);
|
||||
public static function from(int|string $value): static;
|
||||
|
||||
/**
|
||||
* @param int|string $value
|
||||
* @return static|null
|
||||
*/
|
||||
public static function tryFrom(int|string $value);
|
||||
public static function tryFrom(int|string $value): ?static;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -881,13 +899,13 @@ interface IntBackedEnum extends BackedEnum
|
|||
* @param int $value
|
||||
* @return static
|
||||
*/
|
||||
public static function from(int $value);
|
||||
public static function from(int $value): static;
|
||||
|
||||
/**
|
||||
* @param int $value
|
||||
* @return static|null
|
||||
*/
|
||||
public static function tryFrom(int $value);
|
||||
public static function tryFrom(int $value): ?static;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -925,7 +943,7 @@ final class Fiber
|
|||
* @throws FiberError If the fiber has already been started.
|
||||
* @throws Throwable If the fiber callable throws an uncaught exception.
|
||||
*/
|
||||
public function start(mixed ...$args) {}
|
||||
public function start(mixed ...$args): mixed {}
|
||||
|
||||
/**
|
||||
* Resumes the fiber, returning the given value from {@see Fiber::suspend()}.
|
||||
|
@ -938,7 +956,7 @@ final class Fiber
|
|||
* @throws FiberError If the fiber has not started, is running, or has terminated.
|
||||
* @throws Throwable If the fiber callable throws an uncaught exception.
|
||||
*/
|
||||
public function resume(mixed $value = null) {}
|
||||
public function resume(mixed $value = null): mixed {}
|
||||
|
||||
/**
|
||||
* Throws the given exception into the fiber from {@see Fiber::suspend()}.
|
||||
|
@ -951,36 +969,36 @@ final class Fiber
|
|||
* @throws FiberError If the fiber has not started, is running, or has terminated.
|
||||
* @throws Throwable If the fiber callable throws an uncaught exception.
|
||||
*/
|
||||
public function throw(Throwable $exception) {}
|
||||
public function throw(Throwable $exception): mixed {}
|
||||
|
||||
/**
|
||||
* @return bool True if the fiber has been started.
|
||||
*/
|
||||
public function isStarted() {}
|
||||
public function isStarted(): bool {}
|
||||
|
||||
/**
|
||||
* @return bool True if the fiber is suspended.
|
||||
*/
|
||||
public function isSuspended() {}
|
||||
public function isSuspended(): bool {}
|
||||
|
||||
/**
|
||||
* @return bool True if the fiber is currently running.
|
||||
*/
|
||||
public function isRunning() {}
|
||||
public function isRunning(): bool {}
|
||||
|
||||
/**
|
||||
* @return bool True if the fiber has completed execution (returned or threw).
|
||||
*/
|
||||
public function isTerminated() {}
|
||||
public function isTerminated(): bool {}
|
||||
|
||||
/**
|
||||
* @return mixed Return value of the fiber callback. NULL is returned if the fiber does not have a return statement.
|
||||
*
|
||||
* @throws FiberError If the fiber has not terminated or the fiber threw an exception.
|
||||
*/
|
||||
public function getReturn() {}
|
||||
public function getReturn(): mixed {}
|
||||
|
||||
public static function getCurrent() {}
|
||||
public static function getCurrent(): ?Fiber {}
|
||||
|
||||
/**
|
||||
* @return self|null Returns the currently executing fiber instance or NULL if in {main}.
|
||||
|
@ -999,7 +1017,7 @@ final class Fiber
|
|||
* @throws FiberError Thrown if not within a fiber (i.e., if called from {main}).
|
||||
* @throws Throwable Exception provided to {@see Fiber::throw()}.
|
||||
*/
|
||||
public static function suspend(mixed $value = null) {}
|
||||
public static function suspend(mixed $value = null): mixed {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1013,7 +1031,8 @@ final class FiberError extends Error
|
|||
/**
|
||||
* @since 8.1
|
||||
*/
|
||||
#[Attribute(Attribute::TARGET_METHOD)] final class ReturnTypeWillChange
|
||||
#[Attribute(Attribute::TARGET_METHOD)]
|
||||
final class ReturnTypeWillChange
|
||||
{
|
||||
public function __construct() {}
|
||||
}
|
||||
|
|
102
PDO/PDO.php
102
PDO/PDO.php
|
@ -5,6 +5,7 @@ use JetBrains\PhpStorm\ArrayShape;
|
|||
use JetBrains\PhpStorm\Deprecated;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
use JetBrains\PhpStorm\Internal\TentativeType;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
/**
|
||||
|
@ -938,7 +939,8 @@ class PDO
|
|||
* Emulated prepared statements does not communicate with the database server
|
||||
* so <b>PDO::prepare</b> does not check the statement.
|
||||
*/
|
||||
public function prepare(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $query, array $options = []) {}
|
||||
#[TentativeType]
|
||||
public function prepare(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $query, array $options = []): PDOStatement|false {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)<br/>
|
||||
|
@ -964,7 +966,8 @@ class PDO
|
|||
* <b>Note</b>: An exception is raised even when the <b>PDO::ATTR_ERRMODE</b>
|
||||
* attribute is not <b>PDO::ERRMODE_EXCEPTION</b>.
|
||||
*/
|
||||
public function beginTransaction() {}
|
||||
#[TentativeType]
|
||||
public function beginTransaction(): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)<br/>
|
||||
|
@ -973,7 +976,8 @@ class PDO
|
|||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
* @throws PDOException if there is no active transaction.
|
||||
*/
|
||||
public function commit() {}
|
||||
#[TentativeType]
|
||||
public function commit(): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)<br/>
|
||||
|
@ -982,7 +986,8 @@ class PDO
|
|||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
* @throws PDOException if there is no active transaction.
|
||||
*/
|
||||
public function rollBack() {}
|
||||
#[TentativeType]
|
||||
public function rollBack(): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.3.3, Bundled pdo_pgsql, PHP 7)<br/>
|
||||
|
@ -990,7 +995,8 @@ class PDO
|
|||
* @link https://php.net/manual/en/pdo.intransaction.php
|
||||
* @return bool <b>TRUE</b> if a transaction is currently active, and <b>FALSE</b> if not.
|
||||
*/
|
||||
public function inTransaction() {}
|
||||
#[TentativeType]
|
||||
public function inTransaction(): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)<br/>
|
||||
|
@ -1000,10 +1006,11 @@ class PDO
|
|||
* @param mixed $value
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function setAttribute(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $attribute,
|
||||
#[LanguageLevelTypeAware(['8.1' => 'mixed'], default: '')] $value
|
||||
) {}
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)<br/>
|
||||
|
@ -1033,7 +1040,8 @@ class PDO
|
|||
* $db->exec() or die(print_r($db->errorInfo(), true));
|
||||
* </code>
|
||||
*/
|
||||
public function exec(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $statement) {}
|
||||
#[TentativeType]
|
||||
public function exec(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $statement): int|false {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0)<br/>
|
||||
|
@ -1109,7 +1117,8 @@ class PDO
|
|||
* <b>PDO::lastInsertId</b> triggers an
|
||||
* IM001 SQLSTATE.
|
||||
*/
|
||||
public function lastInsertId(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $name = null) {}
|
||||
#[TentativeType]
|
||||
public function lastInsertId(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $name = null): string|false {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)<br/>
|
||||
|
@ -1137,7 +1146,8 @@ class PDO
|
|||
* <p>
|
||||
* Returns <b>NULL</b> if no operation has been run on the database handle.
|
||||
*/
|
||||
public function errorCode() {}
|
||||
#[TentativeType]
|
||||
public function errorCode(): ?string {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)<br/>
|
||||
|
@ -1179,7 +1189,8 @@ class PDO
|
|||
* information for an operation performed on a particular statement handle.
|
||||
*/
|
||||
#[ArrayShape([0 => "string", 1 => "int", 2 => "string"])]
|
||||
public function errorInfo() {}
|
||||
#[TentativeType]
|
||||
public function errorInfo(): array {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0)<br/>
|
||||
|
@ -1204,7 +1215,8 @@ class PDO
|
|||
* @return mixed A successful call returns the value of the requested PDO attribute.
|
||||
* An unsuccessful call returns null.
|
||||
*/
|
||||
public function getAttribute(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $attribute) {}
|
||||
#[TentativeType]
|
||||
public function getAttribute(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $attribute): mixed {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.1)<br/>
|
||||
|
@ -1220,10 +1232,11 @@ class PDO
|
|||
* SQL statement. Returns <b>FALSE</b> if the driver does not support quoting in
|
||||
* this way.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function quote(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $string,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type = PDO::PARAM_INT
|
||||
) {}
|
||||
): string|false {}
|
||||
|
||||
final public function __wakeup() {}
|
||||
|
||||
|
@ -1236,7 +1249,8 @@ class PDO
|
|||
* @return array <b>PDO::getAvailableDrivers</b> returns an array of PDO driver names. If
|
||||
* no drivers are available, it returns an empty array.
|
||||
*/
|
||||
public static function getAvailableDrivers() {}
|
||||
#[TentativeType]
|
||||
public static function getAvailableDrivers(): array {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.0, PHP 7, PECL pdo_sqlite >= 1.0.0)<br/>
|
||||
|
@ -1297,9 +1311,10 @@ class PDOStatement implements IteratorAggregate
|
|||
* fail and an error is emitted.
|
||||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
* @throws \PDOException On error if PDO::ERRMODE_EXCEPTION option is true.
|
||||
* @throws PDOException On error if PDO::ERRMODE_EXCEPTION option is true.
|
||||
*/
|
||||
public function execute(#[LanguageLevelTypeAware(['8.0' => 'array|null'], default: '')] $params = null) {}
|
||||
#[TentativeType]
|
||||
public function execute(#[LanguageLevelTypeAware(['8.0' => 'array|null'], default: '')] $params = null): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)<br/>
|
||||
|
@ -1329,11 +1344,12 @@ class PDOStatement implements IteratorAggregate
|
|||
* @return mixed The return value of this function on success depends on the fetch type. In
|
||||
* all cases, <b>FALSE</b> is returned on failure.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function fetch(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $mode = PDO::FETCH_BOTH,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $cursorOrientation = PDO::FETCH_ORI_NEXT,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $cursorOffset = 0
|
||||
) {}
|
||||
): mixed {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)<br/>
|
||||
|
@ -1365,13 +1381,14 @@ class PDOStatement implements IteratorAggregate
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function bindParam(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $param,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] &$var,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type = PDO::PARAM_INT,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $maxLength = null,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $driverOptions = null
|
||||
) {}
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)<br/>
|
||||
|
@ -1396,13 +1413,14 @@ class PDOStatement implements IteratorAggregate
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function bindColumn(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $column,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] &$var,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type = PDO::PARAM_INT,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $maxLength = null,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $driverOptions = null
|
||||
) {}
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 1.0.0)<br/>
|
||||
|
@ -1424,11 +1442,12 @@ class PDOStatement implements IteratorAggregate
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function bindValue(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $param,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type = PDO::PARAM_INT
|
||||
) {}
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)<br/>
|
||||
|
@ -1436,7 +1455,8 @@ class PDOStatement implements IteratorAggregate
|
|||
* @link https://php.net/manual/en/pdostatement.rowcount.php
|
||||
* @return int the number of rows.
|
||||
*/
|
||||
public function rowCount() {}
|
||||
#[TentativeType]
|
||||
public function rowCount(): int {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.9.0)<br/>
|
||||
|
@ -1454,7 +1474,8 @@ class PDOStatement implements IteratorAggregate
|
|||
* There is no way to return another column from the same row if you
|
||||
* use <b>PDOStatement::fetchColumn</b> to retrieve data.
|
||||
*/
|
||||
public function fetchColumn(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $column = 0) {}
|
||||
#[TentativeType]
|
||||
public function fetchColumn(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $column = 0): mixed {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)<br/>
|
||||
|
@ -1500,11 +1521,12 @@ class PDOStatement implements IteratorAggregate
|
|||
* ORDER BY clauses in SQL to restrict results before retrieving and
|
||||
* processing them with PHP.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function fetchAll(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $mode = PDO::FETCH_BOTH,
|
||||
#[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $fetch_argument = null,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] ...$args
|
||||
) {}
|
||||
): array {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.4)<br/>
|
||||
|
@ -1519,7 +1541,8 @@ class PDOStatement implements IteratorAggregate
|
|||
* @return mixed an instance of the required class with property names that
|
||||
* correspond to the column names or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function fetchObject(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $class = "stdClass", array $constructorArgs = []) {}
|
||||
#[TentativeType]
|
||||
public function fetchObject(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $class = "stdClass", array $constructorArgs = []): object|false {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)<br/>
|
||||
|
@ -1529,7 +1552,8 @@ class PDOStatement implements IteratorAggregate
|
|||
* <b>PDOStatement::errorCode</b> only retrieves error codes
|
||||
* for operations performed with PDOStatement objects.
|
||||
*/
|
||||
public function errorCode() {}
|
||||
#[TentativeType]
|
||||
public function errorCode(): ?string {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)<br/>
|
||||
|
@ -1557,7 +1581,8 @@ class PDOStatement implements IteratorAggregate
|
|||
* </tr>
|
||||
*/
|
||||
#[ArrayShape([0 => "string", 1 => "int", 2 => "string"])]
|
||||
public function errorInfo() {}
|
||||
#[TentativeType]
|
||||
public function errorInfo(): array {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0)<br/>
|
||||
|
@ -1567,10 +1592,11 @@ class PDOStatement implements IteratorAggregate
|
|||
* @param mixed $value
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function setAttribute(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $attribute,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value
|
||||
) {}
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0)<br/>
|
||||
|
@ -1579,7 +1605,8 @@ class PDOStatement implements IteratorAggregate
|
|||
* @param int $name
|
||||
* @return mixed the attribute value.
|
||||
*/
|
||||
public function getAttribute(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $name) {}
|
||||
#[TentativeType]
|
||||
public function getAttribute(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $name): mixed {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0)<br/>
|
||||
|
@ -1589,7 +1616,8 @@ class PDOStatement implements IteratorAggregate
|
|||
* PDOStatement object. If there is no result set,
|
||||
* <b>PDOStatement::columnCount</b> returns 0.
|
||||
*/
|
||||
public function columnCount() {}
|
||||
#[TentativeType]
|
||||
public function columnCount(): int {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0)<br/>
|
||||
|
@ -1651,7 +1679,8 @@ class PDOStatement implements IteratorAggregate
|
|||
* Returns <b>FALSE</b> if the requested column does not exist in the result set,
|
||||
* or if no result set exists.
|
||||
*/
|
||||
public function getColumnMeta(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $column) {}
|
||||
#[TentativeType]
|
||||
public function getColumnMeta(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $column): array|false {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0)<br/>
|
||||
|
@ -1691,7 +1720,8 @@ class PDOStatement implements IteratorAggregate
|
|||
* @link https://php.net/manual/en/pdostatement.nextrowset.php
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function nextRowset() {}
|
||||
#[TentativeType]
|
||||
public function nextRowset(): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.9.0)<br/>
|
||||
|
@ -1699,25 +1729,27 @@ class PDOStatement implements IteratorAggregate
|
|||
* @link https://php.net/manual/en/pdostatement.closecursor.php
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function closeCursor() {}
|
||||
#[TentativeType]
|
||||
public function closeCursor(): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.9.0)<br/>
|
||||
* Dump an SQL prepared command
|
||||
* @link https://php.net/manual/en/pdostatement.debugdumpparams.php
|
||||
* @return bool No value is returned.
|
||||
* @return bool|null No value is returned.
|
||||
*/
|
||||
public function debugDumpParams() {}
|
||||
#[TentativeType]
|
||||
public function debugDumpParams(): ?bool {}
|
||||
|
||||
final public function __wakeup() {}
|
||||
|
||||
final public function __sleep() {}
|
||||
|
||||
/**
|
||||
* @return Iterator
|
||||
* @since 8.0
|
||||
* @return Traversable
|
||||
*/
|
||||
public function getIterator() {}
|
||||
public function getIterator(): Iterator {}
|
||||
}
|
||||
|
||||
final class PDORow
|
||||
|
|
192
Phar/Phar.php
192
Phar/Phar.php
|
@ -4,6 +4,7 @@
|
|||
use JetBrains\PhpStorm\ArrayShape;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
use JetBrains\PhpStorm\Internal\TentativeType;
|
||||
|
||||
/**
|
||||
* The PharException class provides a phar-specific exception class
|
||||
|
@ -71,7 +72,8 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* </p>
|
||||
* @return void no return value, exception is thrown on failure.
|
||||
*/
|
||||
public function addEmptyDir(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $directory) {}
|
||||
#[TentativeType]
|
||||
public function addEmptyDir(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $directory): void {}
|
||||
|
||||
/**
|
||||
* (Unknown)<br/>
|
||||
|
@ -86,10 +88,11 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* </p>
|
||||
* @return void no return value, exception is thrown on failure.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function addFile(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $localName = null
|
||||
) {}
|
||||
): void {}
|
||||
|
||||
/**
|
||||
* (Unknown)<br/>
|
||||
|
@ -103,10 +106,11 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* </p>
|
||||
* @return void no return value, exception is thrown on failure.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function addFromString(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $localName,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $contents
|
||||
) {}
|
||||
): void {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 2.0.0)<br/>
|
||||
|
@ -125,10 +129,11 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* mapping internal path of file to the full path of the file on the
|
||||
* filesystem.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function buildFromDirectory(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $directory,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $pattern = null
|
||||
) {}
|
||||
): array {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 2.0.0)<br/>
|
||||
|
@ -146,10 +151,11 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* mapping internal path of file to the full path of the file on the
|
||||
* filesystem.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function buildFromIterator(
|
||||
Traversable $iterator,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $baseDirectory = null
|
||||
) {}
|
||||
): array {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 2.0.0)<br/>
|
||||
|
@ -162,7 +168,8 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* </p>
|
||||
* @return void No value is returned.
|
||||
*/
|
||||
public function compressFiles(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $compression) {}
|
||||
#[TentativeType]
|
||||
public function compressFiles(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $compression): void {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 2.0.0)<br/>
|
||||
|
@ -188,12 +195,13 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* compressing tar archives. For decompressing, the default file extensions
|
||||
* are .phar and .phar.tar.
|
||||
* </p>
|
||||
* @return static a <b>Phar</b> object.
|
||||
* @return static|null a <b>Phar</b> object.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function compress(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $compression,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $extension = null
|
||||
) {}
|
||||
): ?Phar {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 2.0.0)<br/>
|
||||
|
@ -206,9 +214,10 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* that all executable phar archives must contain .phar
|
||||
* in their filename.
|
||||
* </p>
|
||||
* @return static A <b>Phar</b> object is returned.
|
||||
* @return static|null A <b>Phar</b> object is returned.
|
||||
*/
|
||||
public function decompress(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $extension = null) {}
|
||||
#[TentativeType]
|
||||
public function decompress(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $extension = null): ?Phar {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 2.0.0)<br/>
|
||||
|
@ -238,14 +247,15 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* and .phar.tar.bz2. For zip-based phar archives, the
|
||||
* default extension is .phar.zip.
|
||||
* </p>
|
||||
* @return Phar The method returns a <b>Phar</b> object on success and throws an
|
||||
* @return Phar|null The method returns a <b>Phar</b> object on success and throws an
|
||||
* exception on failure.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function convertToExecutable(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $format = 9021976,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $compression = 9021976,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $extension = null
|
||||
) {}
|
||||
): ?Phar {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 2.0.0)<br/>
|
||||
|
@ -273,14 +283,15 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* For zip-based archives, the
|
||||
* default extension is .zip.
|
||||
* </p>
|
||||
* @return PharData The method returns a <b>PharData</b> object on success and throws an
|
||||
* @return PharData|null The method returns a <b>PharData</b> object on success and throws an
|
||||
* exception on failure.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function convertToData(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $format = 9021976,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $compression = 9021976,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $extension = null
|
||||
) {}
|
||||
): ?PharData {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 2.0.0)<br/>
|
||||
|
@ -304,7 +315,8 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* @return int The number of files contained within this phar, or 0 (the number zero)
|
||||
* if none.
|
||||
*/
|
||||
public function count(#[PhpStormStubsElementAvailable(from: '8.0')] int $mode = COUNT_NORMAL) {}
|
||||
#[TentativeType]
|
||||
public function count(#[PhpStormStubsElementAvailable(from: '8.0')] int $mode = COUNT_NORMAL): int {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 2.0.0)<br/>
|
||||
|
@ -343,17 +355,19 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* @return bool returns <b>TRUE</b> on success, but it is better to check for thrown exception,
|
||||
* and assume success if none is thrown.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function extractTo(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $directory,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'array|string|null'], default: '')] $files = null,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $overwrite = false
|
||||
) {}
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* @see setAlias
|
||||
* @return string
|
||||
*/
|
||||
public function getAlias() {}
|
||||
/**
|
||||
* @return string|null
|
||||
* @see setAlias
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function getAlias(): ?string {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 1.0.0)<br/>
|
||||
|
@ -364,7 +378,8 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* @return mixed any PHP variable that can be serialized and is stored as meta-data for the Phar archive,
|
||||
* or <b>NULL</b> if no meta-data is stored.
|
||||
*/
|
||||
public function getMetadata(#[PhpStormStubsElementAvailable(from: '8.0')] array $unserializeOptions = []) {}
|
||||
#[TentativeType]
|
||||
public function getMetadata(#[PhpStormStubsElementAvailable(from: '8.0')] array $unserializeOptions = []): mixed {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 1.0.0)<br/>
|
||||
|
@ -372,7 +387,8 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* @link https://php.net/manual/en/phar.getmodified.php
|
||||
* @return bool <b>TRUE</b> if the phar has been modified since opened, <b>FALSE</b> if not.
|
||||
*/
|
||||
public function getModified() {}
|
||||
#[TentativeType]
|
||||
public function getModified(): bool {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 1.0.0)<br/>
|
||||
|
@ -388,7 +404,8 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* is set to true.
|
||||
*/
|
||||
#[ArrayShape(["hash" => "string", "hash_type" => "string"])]
|
||||
public function getSignature() {}
|
||||
#[TentativeType]
|
||||
public function getSignature(): array|false {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 1.0.0)<br/>
|
||||
|
@ -397,7 +414,8 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* @return string a string containing the contents of the bootstrap loader (stub) of
|
||||
* the current Phar archive.
|
||||
*/
|
||||
public function getStub() {}
|
||||
#[TentativeType]
|
||||
public function getStub(): string {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 1.0.0)<br/>
|
||||
|
@ -409,7 +427,8 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* its manifest. See Phar file format
|
||||
* documentation for more information.
|
||||
*/
|
||||
public function getVersion() {}
|
||||
#[TentativeType]
|
||||
public function getVersion(): string {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 1.2.0)<br/>
|
||||
|
@ -417,7 +436,8 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* @link https://php.net/manual/en/phar.hasmetadata.php
|
||||
* @return bool <b>TRUE</b> if meta-data has been set, and <b>FALSE</b> if not.
|
||||
*/
|
||||
public function hasMetadata() {}
|
||||
#[TentativeType]
|
||||
public function hasMetadata(): bool {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 1.0.0)<br/>
|
||||
|
@ -425,7 +445,8 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* @link https://php.net/manual/en/phar.isbuffering.php
|
||||
* @return bool <b>TRUE</b> if the write operations are being buffer, <b>FALSE</b> otherwise.
|
||||
*/
|
||||
public function isBuffering() {}
|
||||
#[TentativeType]
|
||||
public function isBuffering(): bool {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 2.0.0)<br/>
|
||||
|
@ -433,7 +454,8 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* @link https://php.net/manual/en/phar.iscompressed.php
|
||||
* @return mixed Phar::GZ, Phar::BZ2 or <b>FALSE</b>
|
||||
*/
|
||||
public function isCompressed() {}
|
||||
#[TentativeType]
|
||||
public function isCompressed(): int|false {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 2.0.0)<br/>
|
||||
|
@ -445,7 +467,8 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> if the phar archive matches the file format requested by the parameter
|
||||
*/
|
||||
public function isFileFormat(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $format) {}
|
||||
#[TentativeType]
|
||||
public function isFileFormat(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $format): bool {}
|
||||
|
||||
/**
|
||||
* (Unknown)<br/>
|
||||
|
@ -453,7 +476,8 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* @link https://php.net/manual/en/phar.iswritable.php
|
||||
* @return bool <b>TRUE</b> if the phar archive can be modified
|
||||
*/
|
||||
public function isWritable() {}
|
||||
#[TentativeType]
|
||||
public function isWritable(): bool {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 1.0.0)<br/>
|
||||
|
@ -464,7 +488,8 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> if the file exists within the phar, or <b>FALSE</b> if not.
|
||||
*/
|
||||
public function offsetExists($localName) {}
|
||||
#[TentativeType]
|
||||
public function offsetExists($localName): bool {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 1.0.0)<br/>
|
||||
|
@ -476,7 +501,8 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* @return PharFileInfo A <b>PharFileInfo</b> object is returned that can be used to
|
||||
* iterate over a file's contents or to retrieve information about the current file.
|
||||
*/
|
||||
public function offsetGet($localName) {}
|
||||
#[TentativeType]
|
||||
public function offsetGet($localName): SplFileInfo {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 1.0.0)<br/>
|
||||
|
@ -490,7 +516,8 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* </p>
|
||||
* @return void No return values.
|
||||
*/
|
||||
public function offsetSet($localName, $value) {}
|
||||
#[TentativeType]
|
||||
public function offsetSet($localName, $value): void {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 1.0.0)<br/>
|
||||
|
@ -501,7 +528,8 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function offsetUnset($localName) {}
|
||||
#[TentativeType]
|
||||
public function offsetUnset($localName): void {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 1.2.1)<br/>
|
||||
|
@ -513,7 +541,8 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* </p>
|
||||
* @return bool
|
||||
*/
|
||||
public function setAlias(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $alias) {}
|
||||
#[TentativeType]
|
||||
public function setAlias(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $alias): bool {}
|
||||
|
||||
/**
|
||||
* (Unknown)<br/>
|
||||
|
@ -527,10 +556,11 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function setDefaultStub(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $index = null,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $webIndex = null
|
||||
) {}
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 1.0.0)<br/>
|
||||
|
@ -541,7 +571,8 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* </p>
|
||||
* @return void No value is returned.
|
||||
*/
|
||||
public function setMetadata(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $metadata) {}
|
||||
#[TentativeType]
|
||||
public function setMetadata(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $metadata): void {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 1.1.0)<br/>
|
||||
|
@ -566,10 +597,11 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* </p>
|
||||
* @return void No value is returned.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function setSignatureAlgorithm(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $algo,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $privateKey = null
|
||||
) {}
|
||||
): void {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 1.0.0)<br/>
|
||||
|
@ -594,7 +626,8 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* @link https://php.net/manual/en/phar.startbuffering.php
|
||||
* @return void No value is returned.
|
||||
*/
|
||||
public function startBuffering() {}
|
||||
#[TentativeType]
|
||||
public function startBuffering(): void {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 1.0.0)<br/>
|
||||
|
@ -602,7 +635,8 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* @link https://php.net/manual/en/phar.stopbuffering.php
|
||||
* @return void No value is returned.
|
||||
*/
|
||||
public function stopBuffering() {}
|
||||
#[TentativeType]
|
||||
public function stopBuffering(): void {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 1.0.0)<br/>
|
||||
|
@ -610,7 +644,7 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* @link https://php.net/manual/en/phar.apiversion.php
|
||||
* @return string The API version string as in "1.0.0".
|
||||
*/
|
||||
final public static function apiVersion() {}
|
||||
final public static function apiVersion(): string {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 1.0.0)<br/>
|
||||
|
@ -623,7 +657,7 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> if compression/decompression is available, <b>FALSE</b> if not.
|
||||
*/
|
||||
final public static function canCompress(int $compression = 0) {}
|
||||
final public static function canCompress(int $compression = 0): bool {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 1.0.0)<br/>
|
||||
|
@ -631,7 +665,7 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* @link https://php.net/manual/en/phar.canwrite.php
|
||||
* @return bool <b>TRUE</b> if write access is enabled, <b>FALSE</b> if it is disabled.
|
||||
*/
|
||||
final public static function canWrite() {}
|
||||
final public static function canWrite(): bool {}
|
||||
|
||||
/**
|
||||
* (Unknown)<br/>
|
||||
|
@ -643,7 +677,7 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* that allows the created Phar archive to work with or without the Phar extension
|
||||
* enabled.
|
||||
*/
|
||||
final public static function createDefaultStub(?string $index = null, ?string $webIndex = null) {}
|
||||
final public static function createDefaultStub(?string $index = null, ?string $webIndex = null): string {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 1.2.0)<br/>
|
||||
|
@ -654,7 +688,7 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* the zlib extension or the
|
||||
* bz2 extension.
|
||||
*/
|
||||
final public static function getSupportedCompression() {}
|
||||
final public static function getSupportedCompression(): array {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 1.1.0)<br/>
|
||||
|
@ -663,7 +697,7 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* @return string[] an array containing any of "MD5", "SHA-1",
|
||||
* "SHA-256", "SHA-512", or "OpenSSL".
|
||||
*/
|
||||
final public static function getSupportedSignatures() {}
|
||||
final public static function getSupportedSignatures(): array {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 2.0.0)<br/>
|
||||
|
@ -671,7 +705,7 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* @link https://php.net/manual/en/phar.interceptfilefuncs.php
|
||||
* @return void
|
||||
*/
|
||||
final public static function interceptFileFuncs() {}
|
||||
final public static function interceptFileFuncs(): void {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 1.2.0)<br/>
|
||||
|
@ -686,7 +720,7 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> if the filename is valid, <b>FALSE</b> if not.
|
||||
*/
|
||||
final public static function isValidPharFilename(string $filename, bool $executable = true) {}
|
||||
final public static function isValidPharFilename(string $filename, bool $executable = true): bool {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 1.0.0)<br/>
|
||||
|
@ -703,7 +737,7 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
final public static function loadPhar(string $filename, ?string $alias = null) {}
|
||||
final public static function loadPhar(string $filename, ?string $alias = null): bool {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 1.0.0)<br/>
|
||||
|
@ -718,7 +752,7 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
final public static function mapPhar(?string $alias = null, int $offset = 0) {}
|
||||
final public static function mapPhar(?string $alias = null, int $offset = 0): bool {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 2.0.0)<br/>
|
||||
|
@ -730,7 +764,7 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* </p>
|
||||
* @return string the filename if valid, empty string otherwise.
|
||||
*/
|
||||
final public static function running(bool $returnPhar = true) {}
|
||||
final public static function running(bool $returnPhar = true): string {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 2.0.0)<br/>
|
||||
|
@ -745,7 +779,7 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* </p>
|
||||
* @return void No return. <b>PharException</b> is thrown on failure.
|
||||
*/
|
||||
final public static function mount(string $pharPath, string $externalPath) {}
|
||||
final public static function mount(string $pharPath, string $externalPath): void {}
|
||||
|
||||
/**
|
||||
* (Unknown)<br/>
|
||||
|
@ -760,7 +794,7 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* </p>
|
||||
* @return void No return.
|
||||
*/
|
||||
final public static function mungServer(array $variables) {}
|
||||
final public static function mungServer(array $variables): void {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 2.0.0)<br/>
|
||||
|
@ -772,7 +806,7 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
* @throws PharException
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
final public static function unlinkArchive(string $filename) {}
|
||||
final public static function unlinkArchive(string $filename): bool {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 2.0.0)<br/>
|
||||
|
@ -858,7 +892,7 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek
|
|||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: 'string')] $fileNotFoundScript = null,
|
||||
array $mimeTypes = null,
|
||||
?callable $rewrite = null
|
||||
) {}
|
||||
): void {}
|
||||
|
||||
/**
|
||||
* Returns whether current entry is a directory and not '.' or '..'
|
||||
|
@ -970,13 +1004,15 @@ class PharData extends Phar
|
|||
* @param string $localName
|
||||
* @return bool
|
||||
*/
|
||||
public function offsetExists($localName) {}
|
||||
#[TentativeType]
|
||||
public function offsetExists($localName): bool {}
|
||||
|
||||
/**
|
||||
* @param string $localName
|
||||
* @return string
|
||||
* @return SplFileInfo
|
||||
*/
|
||||
public function offsetGet($localName) {}
|
||||
#[TentativeType]
|
||||
public function offsetGet($localName): SplFileInfo {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 2.0.0)<br/>
|
||||
|
@ -990,7 +1026,8 @@ class PharData extends Phar
|
|||
* </p>
|
||||
* @return void No return values.
|
||||
*/
|
||||
public function offsetSet($localName, $value) {}
|
||||
#[TentativeType]
|
||||
public function offsetSet($localName, $value): void {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 2.0.0)<br/>
|
||||
|
@ -999,9 +1036,10 @@ class PharData extends Phar
|
|||
* @param string $localName <p>
|
||||
* The filename (relative path) to modify in the tar/zip archive.
|
||||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($localName) {}
|
||||
#[TentativeType]
|
||||
public function offsetUnset($localName): void {}
|
||||
|
||||
/**
|
||||
* Returns whether current entry is a directory and not '.' or '..'
|
||||
|
@ -1099,7 +1137,8 @@ class PharFileInfo extends SplFileInfo
|
|||
* </p>
|
||||
* @return void No value is returned.
|
||||
*/
|
||||
public function chmod(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $perms) {}
|
||||
#[TentativeType]
|
||||
public function chmod(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $perms): void {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 2.0.0)<br/>
|
||||
|
@ -1137,7 +1176,8 @@ class PharFileInfo extends SplFileInfo
|
|||
* @link https://php.net/manual/en/pharfileinfo.getcompressedsize.php
|
||||
* @return int The size in bytes of the file within the Phar archive on disk.
|
||||
*/
|
||||
public function getCompressedSize() {}
|
||||
#[TentativeType]
|
||||
public function getCompressedSize(): int {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 1.0.0)<br/>
|
||||
|
@ -1145,9 +1185,11 @@ class PharFileInfo extends SplFileInfo
|
|||
* @link https://php.net/manual/en/pharfileinfo.getcrc32.php
|
||||
* @return int The <b>crc32</b> checksum of the file within the Phar archive.
|
||||
*/
|
||||
public function getCRC32() {}
|
||||
#[TentativeType]
|
||||
public function getCRC32(): int {}
|
||||
|
||||
public function getContent() {}
|
||||
#[TentativeType]
|
||||
public function getContent(): string {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 1.0.0)<br/>
|
||||
|
@ -1158,7 +1200,8 @@ class PharFileInfo extends SplFileInfo
|
|||
* @return mixed any PHP variable that can be serialized and is stored as meta-data for the file,
|
||||
* or <b>NULL</b> if no meta-data is stored.
|
||||
*/
|
||||
public function getMetadata(#[PhpStormStubsElementAvailable(from: '8.0')] array $unserializeOptions = []) {}
|
||||
#[TentativeType]
|
||||
public function getMetadata(#[PhpStormStubsElementAvailable(from: '8.0')] array $unserializeOptions = []): mixed {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 1.0.0)<br/>
|
||||
|
@ -1166,7 +1209,8 @@ class PharFileInfo extends SplFileInfo
|
|||
* @link https://php.net/manual/en/pharfileinfo.getpharflags.php
|
||||
* @return int The Phar flags (always 0 in the current implementation)
|
||||
*/
|
||||
public function getPharFlags() {}
|
||||
#[TentativeType]
|
||||
public function getPharFlags(): int {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 1.2.0)<br/>
|
||||
|
@ -1174,7 +1218,8 @@ class PharFileInfo extends SplFileInfo
|
|||
* @link https://php.net/manual/en/pharfileinfo.hasmetadata.php
|
||||
* @return bool <b>FALSE</b> if no metadata is set or is <b>NULL</b>, <b>TRUE</b> if metadata is not <b>NULL</b>
|
||||
*/
|
||||
public function hasMetadata() {}
|
||||
#[TentativeType]
|
||||
public function hasMetadata(): bool {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 1.0.0)<br/>
|
||||
|
@ -1186,7 +1231,8 @@ class PharFileInfo extends SplFileInfo
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> if the file is compressed within the Phar archive, <b>FALSE</b> if not.
|
||||
*/
|
||||
public function isCompressed(#[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $compression = 9021976) {}
|
||||
#[TentativeType]
|
||||
public function isCompressed(#[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $compression = 9021976): bool {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 1.0.0)<br/>
|
||||
|
@ -1194,7 +1240,8 @@ class PharFileInfo extends SplFileInfo
|
|||
* @link https://php.net/manual/en/pharfileinfo.iscrcchecked.php
|
||||
* @return bool <b>TRUE</b> if the file has had its CRC verified, <b>FALSE</b> if not.
|
||||
*/
|
||||
public function isCRCChecked() {}
|
||||
#[TentativeType]
|
||||
public function isCRCChecked(): bool {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL phar >= 1.0.0)<br/>
|
||||
|
@ -1205,6 +1252,7 @@ class PharFileInfo extends SplFileInfo
|
|||
* </p>
|
||||
* @return void No value is returned.
|
||||
*/
|
||||
public function setMetadata(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $metadata) {}
|
||||
#[TentativeType]
|
||||
public function setMetadata(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $metadata): void {}
|
||||
}
|
||||
// End of Phar v.2.0.1
|
||||
|
|
|
@ -5786,6 +5786,7 @@ const FUNCTIONS = array (
|
|||
'xdebug_call_line' => 'xdebug/xdebug.php',
|
||||
'xdebug_clear_aggr_profiling_data' => 'xdebug/xdebug.php',
|
||||
'xdebug_code_coverage_started' => 'xdebug/xdebug.php',
|
||||
'xdebug_connect_to_client' => 'xdebug/xdebug.php',
|
||||
'xdebug_debug_zval' => 'xdebug/xdebug.php',
|
||||
'xdebug_debug_zval_stdout' => 'xdebug/xdebug.php',
|
||||
'xdebug_disable' => 'xdebug/xdebug.php',
|
||||
|
@ -5810,6 +5811,7 @@ const FUNCTIONS = array (
|
|||
'xdebug_is_debugger_active' => 'xdebug/xdebug.php',
|
||||
'xdebug_is_enabled' => 'xdebug/xdebug.php',
|
||||
'xdebug_memory_usage' => 'xdebug/xdebug.php',
|
||||
'xdebug_notify' => 'xdebug/xdebug.php',
|
||||
'xdebug_peak_memory_usage' => 'xdebug/xdebug.php',
|
||||
'xdebug_print_function_stack' => 'xdebug/xdebug.php',
|
||||
'xdebug_set_filter' => 'xdebug/xdebug.php',
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
use JetBrains\PhpStorm\Deprecated;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\TentativeType;
|
||||
|
||||
/**
|
||||
* The reflection class.
|
||||
|
@ -17,7 +18,8 @@ class Reflection
|
|||
* @param int $modifiers Bitfield of the modifiers to get.
|
||||
* @return array An array of modifier names.
|
||||
*/
|
||||
public static function getModifierNames(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $modifiers) {}
|
||||
#[TentativeType]
|
||||
public static function getModifierNames(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $modifiers): array {}
|
||||
|
||||
/**
|
||||
* Exports
|
||||
|
|
|
@ -30,7 +30,7 @@ final class ReflectionAttribute implements Reflector
|
|||
* @since 8.0
|
||||
*/
|
||||
#[Pure]
|
||||
public function getName() {}
|
||||
public function getName(): string {}
|
||||
|
||||
/**
|
||||
* Returns the target of the attribute as a bit mask format.
|
||||
|
@ -39,7 +39,7 @@ final class ReflectionAttribute implements Reflector
|
|||
* @since 8.0
|
||||
*/
|
||||
#[Pure]
|
||||
public function getTarget() {}
|
||||
public function getTarget(): int {}
|
||||
|
||||
/**
|
||||
* Returns {@see true} if the attribute is repeated.
|
||||
|
@ -48,7 +48,7 @@ final class ReflectionAttribute implements Reflector
|
|||
* @since 8.0
|
||||
*/
|
||||
#[Pure]
|
||||
public function isRepeated() {}
|
||||
public function isRepeated(): bool {}
|
||||
|
||||
/**
|
||||
* Gets list of passed attribute's arguments.
|
||||
|
@ -57,7 +57,7 @@ final class ReflectionAttribute implements Reflector
|
|||
* @since 8.0
|
||||
*/
|
||||
#[Pure]
|
||||
public function getArguments() {}
|
||||
public function getArguments(): array {}
|
||||
|
||||
/**
|
||||
* Creates a new instance of the attribute with passed arguments
|
||||
|
@ -65,7 +65,7 @@ final class ReflectionAttribute implements Reflector
|
|||
* @return object
|
||||
* @since 8.0
|
||||
*/
|
||||
public function newInstance() {}
|
||||
public function newInstance(): object {}
|
||||
|
||||
/**
|
||||
* ReflectionAttribute cannot be cloned
|
||||
|
@ -73,9 +73,9 @@ final class ReflectionAttribute implements Reflector
|
|||
* @return void
|
||||
* @since 8.0
|
||||
*/
|
||||
private function __clone() {}
|
||||
private function __clone(): void {}
|
||||
|
||||
public function __toString() {}
|
||||
public function __toString(): string {}
|
||||
|
||||
public static function export() {}
|
||||
}
|
||||
|
|
|
@ -2,8 +2,9 @@
|
|||
|
||||
use JetBrains\PhpStorm\Deprecated;
|
||||
use JetBrains\PhpStorm\Immutable;
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
use JetBrains\PhpStorm\Internal\TentativeType;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
/**
|
||||
|
@ -47,7 +48,7 @@ class ReflectionClass implements Reflector
|
|||
* @link https://php.net/manual/en/reflectionclass.construct.php
|
||||
* @param string|object $objectOrClass Either a string containing the name of
|
||||
* the class to reflect, or an object.
|
||||
* @throws \ReflectionException if the class does not exist.
|
||||
* @throws ReflectionException if the class does not exist.
|
||||
*/
|
||||
public function __construct(#[LanguageLevelTypeAware(['8.0' => 'object|string'], default: '')] $objectOrClass) {}
|
||||
|
||||
|
@ -71,6 +72,7 @@ class ReflectionClass implements Reflector
|
|||
* @link https://php.net/manual/en/reflectionclass.tostring.php
|
||||
* @return string A string representation of this {@see ReflectionClass} instance.
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')]
|
||||
public function __toString() {}
|
||||
|
||||
/**
|
||||
|
@ -80,7 +82,8 @@ class ReflectionClass implements Reflector
|
|||
* @return string The class name.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getName() {}
|
||||
#[TentativeType]
|
||||
public function getName(): string {}
|
||||
|
||||
/**
|
||||
* Checks if class is defined internally by an extension, or the core
|
||||
|
@ -89,7 +92,8 @@ class ReflectionClass implements Reflector
|
|||
* @return bool Returns {@see true} on success or {@see false} on failure.
|
||||
*/
|
||||
#[Pure]
|
||||
public function isInternal() {}
|
||||
#[TentativeType]
|
||||
public function isInternal(): bool {}
|
||||
|
||||
/**
|
||||
* Checks if user defined
|
||||
|
@ -98,7 +102,8 @@ class ReflectionClass implements Reflector
|
|||
* @return bool Returns {@see true} on success or {@see false} on failure.
|
||||
*/
|
||||
#[Pure]
|
||||
public function isUserDefined() {}
|
||||
#[TentativeType]
|
||||
public function isUserDefined(): bool {}
|
||||
|
||||
/**
|
||||
* Checks if the class is instantiable
|
||||
|
@ -107,7 +112,8 @@ class ReflectionClass implements Reflector
|
|||
* @return bool Returns {@see true} on success or {@see false} on failure.
|
||||
*/
|
||||
#[Pure]
|
||||
public function isInstantiable() {}
|
||||
#[TentativeType]
|
||||
public function isInstantiable(): bool {}
|
||||
|
||||
/**
|
||||
* Returns whether this class is cloneable
|
||||
|
@ -117,7 +123,8 @@ class ReflectionClass implements Reflector
|
|||
* @since 5.4
|
||||
*/
|
||||
#[Pure]
|
||||
public function isCloneable() {}
|
||||
#[TentativeType]
|
||||
public function isCloneable(): bool {}
|
||||
|
||||
/**
|
||||
* Gets the filename of the file in which the class has been defined
|
||||
|
@ -128,7 +135,8 @@ class ReflectionClass implements Reflector
|
|||
* is returned.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getFileName() {}
|
||||
#[TentativeType]
|
||||
public function getFileName(): string|false {}
|
||||
|
||||
/**
|
||||
* Gets starting line number
|
||||
|
@ -137,7 +145,8 @@ class ReflectionClass implements Reflector
|
|||
* @return int The starting line number, as an integer.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getStartLine() {}
|
||||
#[TentativeType]
|
||||
public function getStartLine(): int|false {}
|
||||
|
||||
/**
|
||||
* Gets end line
|
||||
|
@ -147,7 +156,8 @@ class ReflectionClass implements Reflector
|
|||
* {@see false} if unknown.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getEndLine() {}
|
||||
#[TentativeType]
|
||||
public function getEndLine(): int|false {}
|
||||
|
||||
/**
|
||||
* Gets doc comments
|
||||
|
@ -156,7 +166,8 @@ class ReflectionClass implements Reflector
|
|||
* @return string|false The doc comment if it exists, otherwise {@see false}
|
||||
*/
|
||||
#[Pure]
|
||||
public function getDocComment() {}
|
||||
#[TentativeType]
|
||||
public function getDocComment(): string|false {}
|
||||
|
||||
/**
|
||||
* Gets the constructor of the class
|
||||
|
@ -166,7 +177,8 @@ class ReflectionClass implements Reflector
|
|||
* the class' constructor, or {@see null} if the class has no constructor.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getConstructor() {}
|
||||
#[TentativeType]
|
||||
public function getConstructor(): ?ReflectionMethod {}
|
||||
|
||||
/**
|
||||
* Checks if method is defined
|
||||
|
@ -175,7 +187,8 @@ class ReflectionClass implements Reflector
|
|||
* @param string $name Name of the method being checked for.
|
||||
* @return bool Returns {@see true} if it has the method, otherwise {@see false}
|
||||
*/
|
||||
public function hasMethod(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name) {}
|
||||
#[TentativeType]
|
||||
public function hasMethod(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): bool {}
|
||||
|
||||
/**
|
||||
* Gets a <b>ReflectionMethod</b> for a class method.
|
||||
|
@ -183,10 +196,11 @@ class ReflectionClass implements Reflector
|
|||
* @link https://php.net/manual/en/reflectionclass.getmethod.php
|
||||
* @param string $name The method name to reflect.
|
||||
* @return ReflectionMethod A {@see ReflectionMethod}
|
||||
* @throws \ReflectionException if the method does not exist.
|
||||
* @throws ReflectionException if the method does not exist.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getMethod(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name) {}
|
||||
#[TentativeType]
|
||||
public function getMethod(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): ReflectionMethod {}
|
||||
|
||||
/**
|
||||
* Gets an array of methods for the class.
|
||||
|
@ -198,7 +212,8 @@ class ReflectionClass implements Reflector
|
|||
* reflecting each method.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getMethods(#[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $filter = null) {}
|
||||
#[TentativeType]
|
||||
public function getMethods(#[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $filter = null): array {}
|
||||
|
||||
/**
|
||||
* Checks if property is defined
|
||||
|
@ -207,7 +222,8 @@ class ReflectionClass implements Reflector
|
|||
* @param string $name Name of the property being checked for.
|
||||
* @return bool Returns {@see true} if it has the property, otherwise {@see false}
|
||||
*/
|
||||
public function hasProperty(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name) {}
|
||||
#[TentativeType]
|
||||
public function hasProperty(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): bool {}
|
||||
|
||||
/**
|
||||
* Gets a <b>ReflectionProperty</b> for a class's property
|
||||
|
@ -218,7 +234,8 @@ class ReflectionClass implements Reflector
|
|||
* @throws ReflectionException If no property exists by that name.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getProperty(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name) {}
|
||||
#[TentativeType]
|
||||
public function getProperty(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): ReflectionProperty {}
|
||||
|
||||
/**
|
||||
* Gets properties
|
||||
|
@ -230,18 +247,20 @@ class ReflectionClass implements Reflector
|
|||
* @return ReflectionProperty[]
|
||||
*/
|
||||
#[Pure]
|
||||
public function getProperties(#[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $filter = null) {}
|
||||
#[TentativeType]
|
||||
public function getProperties(#[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $filter = null): array {}
|
||||
|
||||
/**
|
||||
* Gets a ReflectionClassConstant for a class's property
|
||||
*
|
||||
* @link https://php.net/manual/en/reflectionclass.getreflectionconstant.php
|
||||
* @param string $name The class constant name.
|
||||
* @return ReflectionClassConstant A {@see ReflectionClassConstant}.
|
||||
* @return ReflectionClassConstant|false A {@see ReflectionClassConstant}.
|
||||
* @since 7.1
|
||||
*/
|
||||
#[Pure]
|
||||
public function getReflectionConstant(string $name) {}
|
||||
#[TentativeType]
|
||||
public function getReflectionConstant(string $name): ReflectionClassConstant|false {}
|
||||
|
||||
/**
|
||||
* Gets class constants
|
||||
|
@ -252,7 +271,8 @@ class ReflectionClass implements Reflector
|
|||
* @since 7.1
|
||||
*/
|
||||
#[Pure]
|
||||
public function getReflectionConstants(#[PhpStormStubsElementAvailable(from: '8.0')] ?int $filter = ReflectionClassConstant::IS_PUBLIC|ReflectionClassConstant::IS_PROTECTED|ReflectionClassConstant::IS_PRIVATE) {}
|
||||
#[TentativeType]
|
||||
public function getReflectionConstants(#[PhpStormStubsElementAvailable(from: '8.0')] ?int $filter = ReflectionClassConstant::IS_PUBLIC|ReflectionClassConstant::IS_PROTECTED|ReflectionClassConstant::IS_PRIVATE): array {}
|
||||
|
||||
/**
|
||||
* Checks if constant is defined
|
||||
|
@ -261,7 +281,8 @@ class ReflectionClass implements Reflector
|
|||
* @param string $name The name of the constant being checked for.
|
||||
* @return bool Returns {@see true} if the constant is defined, otherwise {@see false}
|
||||
*/
|
||||
public function hasConstant(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name) {}
|
||||
#[TentativeType]
|
||||
public function hasConstant(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): bool {}
|
||||
|
||||
/**
|
||||
* Gets constants
|
||||
|
@ -272,7 +293,8 @@ class ReflectionClass implements Reflector
|
|||
* the values the value of the constants.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getConstants(#[PhpStormStubsElementAvailable(from: '8.0')] ?int $filter = ReflectionClassConstant::IS_PUBLIC|ReflectionClassConstant::IS_PROTECTED|ReflectionClassConstant::IS_PRIVATE) {}
|
||||
#[TentativeType]
|
||||
public function getConstants(#[PhpStormStubsElementAvailable(from: '8.0')] ?int $filter = ReflectionClassConstant::IS_PUBLIC|ReflectionClassConstant::IS_PROTECTED|ReflectionClassConstant::IS_PRIVATE): array {}
|
||||
|
||||
/**
|
||||
* Gets defined constant
|
||||
|
@ -283,7 +305,8 @@ class ReflectionClass implements Reflector
|
|||
* Returns {@see false} if the constant was not found in the class.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getConstant(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name) {}
|
||||
#[TentativeType]
|
||||
public function getConstant(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): mixed {}
|
||||
|
||||
/**
|
||||
* Gets the interfaces
|
||||
|
@ -293,7 +316,8 @@ class ReflectionClass implements Reflector
|
|||
* names and the array values as {@see ReflectionClass} objects.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getInterfaces() {}
|
||||
#[TentativeType]
|
||||
public function getInterfaces(): array {}
|
||||
|
||||
/**
|
||||
* Gets the interface names
|
||||
|
@ -302,7 +326,8 @@ class ReflectionClass implements Reflector
|
|||
* @return string[] A numerical array with interface names as the values.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getInterfaceNames() {}
|
||||
#[TentativeType]
|
||||
public function getInterfaceNames(): array {}
|
||||
|
||||
/**
|
||||
* Checks if the class is anonymous
|
||||
|
@ -312,7 +337,8 @@ class ReflectionClass implements Reflector
|
|||
* @since 7.0
|
||||
*/
|
||||
#[Pure]
|
||||
public function isAnonymous() {}
|
||||
#[TentativeType]
|
||||
public function isAnonymous(): bool {}
|
||||
|
||||
/**
|
||||
* Checks if the class is an interface
|
||||
|
@ -321,19 +347,20 @@ class ReflectionClass implements Reflector
|
|||
* @return bool Returns {@see true} on success or {@see false} on failure.
|
||||
*/
|
||||
#[Pure]
|
||||
public function isInterface() {}
|
||||
#[TentativeType]
|
||||
public function isInterface(): bool {}
|
||||
|
||||
/**
|
||||
* Returns an array of traits used by this class
|
||||
*
|
||||
* @link https://php.net/manual/en/reflectionclass.gettraits.php
|
||||
* @return ReflectionClass[]|null an array with trait names in keys and
|
||||
* @return ReflectionClass[] an array with trait names in keys and
|
||||
* instances of trait's {@see ReflectionClass} in values.
|
||||
* Returns {@see null} in case of an error.
|
||||
* @since 5.4
|
||||
*/
|
||||
#[Pure]
|
||||
public function getTraits() {}
|
||||
#[TentativeType]
|
||||
public function getTraits(): array {}
|
||||
|
||||
/**
|
||||
* Returns an array of names of traits used by this class
|
||||
|
@ -344,7 +371,8 @@ class ReflectionClass implements Reflector
|
|||
* @since 5.4
|
||||
*/
|
||||
#[Pure]
|
||||
public function getTraitNames() {}
|
||||
#[TentativeType]
|
||||
public function getTraitNames(): array {}
|
||||
|
||||
/**
|
||||
* Returns an array of trait aliases
|
||||
|
@ -356,7 +384,8 @@ class ReflectionClass implements Reflector
|
|||
* @since 5.4
|
||||
*/
|
||||
#[Pure]
|
||||
public function getTraitAliases() {}
|
||||
#[TentativeType]
|
||||
public function getTraitAliases(): array {}
|
||||
|
||||
/**
|
||||
* Returns whether this is a trait
|
||||
|
@ -367,7 +396,8 @@ class ReflectionClass implements Reflector
|
|||
* @since 5.4
|
||||
*/
|
||||
#[Pure]
|
||||
public function isTrait() {}
|
||||
#[TentativeType]
|
||||
public function isTrait(): bool {}
|
||||
|
||||
/**
|
||||
* Checks if class is abstract
|
||||
|
@ -376,7 +406,8 @@ class ReflectionClass implements Reflector
|
|||
* @return bool Returns {@see true} on success or {@see false} on failure.
|
||||
*/
|
||||
#[Pure]
|
||||
public function isAbstract() {}
|
||||
#[TentativeType]
|
||||
public function isAbstract(): bool {}
|
||||
|
||||
/**
|
||||
* Checks if class is final
|
||||
|
@ -385,7 +416,8 @@ class ReflectionClass implements Reflector
|
|||
* @return bool Returns {@see true} on success or {@see false} on failure.
|
||||
*/
|
||||
#[Pure]
|
||||
public function isFinal() {}
|
||||
#[TentativeType]
|
||||
public function isFinal(): bool {}
|
||||
|
||||
/**
|
||||
* Gets modifiers
|
||||
|
@ -394,7 +426,8 @@ class ReflectionClass implements Reflector
|
|||
* @return int bitmask of modifier constants.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getModifiers() {}
|
||||
#[TentativeType]
|
||||
public function getModifiers(): int {}
|
||||
|
||||
/**
|
||||
* Checks class for instance
|
||||
|
@ -404,7 +437,8 @@ class ReflectionClass implements Reflector
|
|||
* @return bool Returns {@see true} on success or {@see false} on failure.
|
||||
*/
|
||||
#[Pure]
|
||||
public function isInstance(#[LanguageLevelTypeAware(['8.0' => 'object'], default: '')] $object) {}
|
||||
#[TentativeType]
|
||||
public function isInstance(#[LanguageLevelTypeAware(['8.0' => 'object'], default: '')] $object): bool {}
|
||||
|
||||
/**
|
||||
* Creates a new class instance from given arguments.
|
||||
|
@ -429,20 +463,22 @@ class ReflectionClass implements Reflector
|
|||
* onwards, this exception is limited only to internal classes that are final.
|
||||
* @since 5.4
|
||||
*/
|
||||
public function newInstanceWithoutConstructor() {}
|
||||
#[TentativeType]
|
||||
public function newInstanceWithoutConstructor(): object {}
|
||||
|
||||
/**
|
||||
* Creates a new class instance from given arguments.
|
||||
*
|
||||
* @link https://php.net/manual/en/reflectionclass.newinstanceargs.php
|
||||
* @param array $args The parameters to be passed to the class constructor as an array.
|
||||
* @return object a new instance of the class.
|
||||
* @return object|null a new instance of the class.
|
||||
* @throws ReflectionException if the class constructor is not public or if
|
||||
* the class does not have a constructor and the $args parameter contains
|
||||
* one or more parameters.
|
||||
* @since 5.1.3
|
||||
*/
|
||||
public function newInstanceArgs(array $args = []) {}
|
||||
#[TentativeType]
|
||||
public function newInstanceArgs(array $args = []): ?object {}
|
||||
|
||||
/**
|
||||
* Gets parent class
|
||||
|
@ -452,7 +488,8 @@ class ReflectionClass implements Reflector
|
|||
* if there's no parent.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getParentClass() {}
|
||||
#[TentativeType]
|
||||
public function getParentClass(): ReflectionClass|false {}
|
||||
|
||||
/**
|
||||
* Checks if a subclass
|
||||
|
@ -463,17 +500,19 @@ class ReflectionClass implements Reflector
|
|||
* @return bool {@see true} on success or {@see false} on failure.
|
||||
*/
|
||||
#[Pure]
|
||||
public function isSubclassOf(#[LanguageLevelTypeAware(['8.0' => 'ReflectionClass|string'], default: '')] $class) {}
|
||||
#[TentativeType]
|
||||
public function isSubclassOf(#[LanguageLevelTypeAware(['8.0' => 'ReflectionClass|string'], default: '')] $class): bool {}
|
||||
|
||||
/**
|
||||
* Gets static properties
|
||||
*
|
||||
* @link https://php.net/manual/en/reflectionclass.getstaticproperties.php
|
||||
* @return mixed[] The static properties, as an array where the keys hold
|
||||
* @return array|null The static properties, as an array where the keys hold
|
||||
* the name and the values the value of the properties.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getStaticProperties() {}
|
||||
#[TentativeType]
|
||||
public function getStaticProperties(): ?array {}
|
||||
|
||||
/**
|
||||
* Gets static property value
|
||||
|
@ -486,10 +525,11 @@ class ReflectionClass implements Reflector
|
|||
* @return mixed The value of the static property.
|
||||
*/
|
||||
#[Pure]
|
||||
#[TentativeType]
|
||||
public function getStaticPropertyValue(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $default = null
|
||||
) {}
|
||||
): mixed {}
|
||||
|
||||
/**
|
||||
* Sets static property value
|
||||
|
@ -499,10 +539,11 @@ class ReflectionClass implements Reflector
|
|||
* @param mixed $value New property value.
|
||||
* @return void No value is returned.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function setStaticPropertyValue(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value
|
||||
) {}
|
||||
): void {}
|
||||
|
||||
/**
|
||||
* Gets default properties
|
||||
|
@ -515,7 +556,8 @@ class ReflectionClass implements Reflector
|
|||
* not take visibility modifiers into account.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getDefaultProperties() {}
|
||||
#[TentativeType]
|
||||
public function getDefaultProperties(): array {}
|
||||
|
||||
/**
|
||||
* An alias of {@see ReflectionClass::isIterable} method.
|
||||
|
@ -524,7 +566,8 @@ class ReflectionClass implements Reflector
|
|||
* @return bool Returns {@see true} on success or {@see false} on failure.
|
||||
*/
|
||||
#[Pure]
|
||||
public function isIterateable() {}
|
||||
#[TentativeType]
|
||||
public function isIterateable(): bool {}
|
||||
|
||||
/**
|
||||
* Check whether this class is iterable
|
||||
|
@ -534,7 +577,8 @@ class ReflectionClass implements Reflector
|
|||
* @since 7.2
|
||||
*/
|
||||
#[Pure]
|
||||
public function isIterable() {}
|
||||
#[TentativeType]
|
||||
public function isIterable(): bool {}
|
||||
|
||||
/**
|
||||
* Checks whether it implements an interface.
|
||||
|
@ -543,17 +587,19 @@ class ReflectionClass implements Reflector
|
|||
* @param string $interface The interface name.
|
||||
* @return bool Returns {@see true} on success or {@see false} on failure.
|
||||
*/
|
||||
public function implementsInterface(#[LanguageLevelTypeAware(['8.0' => 'ReflectionClass|string'], default: '')] $interface) {}
|
||||
#[TentativeType]
|
||||
public function implementsInterface(#[LanguageLevelTypeAware(['8.0' => 'ReflectionClass|string'], default: '')] $interface): bool {}
|
||||
|
||||
/**
|
||||
* Gets a <b>ReflectionExtension</b> object for the extension which defined the class
|
||||
*
|
||||
* @link https://php.net/manual/en/reflectionclass.getextension.php
|
||||
* @return ReflectionExtension A {@see ReflectionExtension} object representing
|
||||
* @return ReflectionExtension|null A {@see ReflectionExtension} object representing
|
||||
* the extension which defined the class, or {@see null} for user-defined classes.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getExtension() {}
|
||||
#[TentativeType]
|
||||
public function getExtension(): ?ReflectionExtension {}
|
||||
|
||||
/**
|
||||
* Gets the name of the extension which defined the class
|
||||
|
@ -563,7 +609,8 @@ class ReflectionClass implements Reflector
|
|||
* or {@see false} for user-defined classes.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getExtensionName() {}
|
||||
#[TentativeType]
|
||||
public function getExtensionName(): string|false {}
|
||||
|
||||
/**
|
||||
* Checks if in namespace
|
||||
|
@ -571,7 +618,8 @@ class ReflectionClass implements Reflector
|
|||
* @link https://php.net/manual/en/reflectionclass.innamespace.php
|
||||
* @return bool {@see true} on success or {@see false} on failure.
|
||||
*/
|
||||
public function inNamespace() {}
|
||||
#[TentativeType]
|
||||
public function inNamespace(): bool {}
|
||||
|
||||
/**
|
||||
* Gets namespace name
|
||||
|
@ -580,7 +628,8 @@ class ReflectionClass implements Reflector
|
|||
* @return string The namespace name.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getNamespaceName() {}
|
||||
#[TentativeType]
|
||||
public function getNamespaceName(): string {}
|
||||
|
||||
/**
|
||||
* Gets short name
|
||||
|
@ -589,7 +638,8 @@ class ReflectionClass implements Reflector
|
|||
* @return string The class short name.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getShortName() {}
|
||||
#[TentativeType]
|
||||
public function getShortName(): string {}
|
||||
|
||||
/**
|
||||
* Returns an array of function attributes.
|
||||
|
@ -600,7 +650,7 @@ class ReflectionClass implements Reflector
|
|||
* @since 8.0
|
||||
*/
|
||||
#[Pure]
|
||||
public function getAttributes(?string $name = null, int $flags = 0) {}
|
||||
public function getAttributes(?string $name = null, int $flags = 0): array {}
|
||||
|
||||
/**
|
||||
* Clones object
|
||||
|
@ -608,8 +658,8 @@ class ReflectionClass implements Reflector
|
|||
* @link https://php.net/manual/en/reflectionclass.clone.php
|
||||
* @return void
|
||||
*/
|
||||
final private function __clone() {}
|
||||
final private function __clone(): void {}
|
||||
|
||||
#[PhpStormStubsElementAvailable('8.1')]
|
||||
public function isEnum() {}
|
||||
public function isEnum(): bool {}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ use JetBrains\PhpStorm\Deprecated;
|
|||
use JetBrains\PhpStorm\Immutable;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
use JetBrains\PhpStorm\Internal\TentativeType;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
/**
|
||||
|
@ -92,7 +93,8 @@ class ReflectionClassConstant implements Reflector
|
|||
* @since 7.1
|
||||
*/
|
||||
#[Pure]
|
||||
public function getDeclaringClass() {}
|
||||
#[TentativeType]
|
||||
public function getDeclaringClass(): ReflectionClass {}
|
||||
|
||||
/**
|
||||
* Gets doc comments
|
||||
|
@ -102,7 +104,8 @@ class ReflectionClassConstant implements Reflector
|
|||
* @since 7.1
|
||||
*/
|
||||
#[Pure]
|
||||
public function getDocComment() {}
|
||||
#[TentativeType]
|
||||
public function getDocComment(): string|false {}
|
||||
|
||||
/**
|
||||
* Gets the class constant modifiers
|
||||
|
@ -113,7 +116,8 @@ class ReflectionClassConstant implements Reflector
|
|||
* @since 7.1
|
||||
*/
|
||||
#[Pure]
|
||||
public function getModifiers() {}
|
||||
#[TentativeType]
|
||||
public function getModifiers(): int {}
|
||||
|
||||
/**
|
||||
* Get name of the constant
|
||||
|
@ -123,7 +127,8 @@ class ReflectionClassConstant implements Reflector
|
|||
* @since 7.1
|
||||
*/
|
||||
#[Pure]
|
||||
public function getName() {}
|
||||
#[TentativeType]
|
||||
public function getName(): string {}
|
||||
|
||||
/**
|
||||
* Gets value
|
||||
|
@ -133,7 +138,8 @@ class ReflectionClassConstant implements Reflector
|
|||
* @since 7.1
|
||||
*/
|
||||
#[Pure]
|
||||
public function getValue() {}
|
||||
#[TentativeType]
|
||||
public function getValue(): mixed {}
|
||||
|
||||
/**
|
||||
* Checks if class constant is private
|
||||
|
@ -143,7 +149,8 @@ class ReflectionClassConstant implements Reflector
|
|||
* @since 7.1
|
||||
*/
|
||||
#[Pure]
|
||||
public function isPrivate() {}
|
||||
#[TentativeType]
|
||||
public function isPrivate(): bool {}
|
||||
|
||||
/**
|
||||
* Checks if class constant is protected
|
||||
|
@ -153,7 +160,8 @@ class ReflectionClassConstant implements Reflector
|
|||
* @since 7.1
|
||||
*/
|
||||
#[Pure]
|
||||
public function isProtected() {}
|
||||
#[TentativeType]
|
||||
public function isProtected(): bool {}
|
||||
|
||||
/**
|
||||
* Checks if class constant is public
|
||||
|
@ -163,7 +171,8 @@ class ReflectionClassConstant implements Reflector
|
|||
* @since 7.1
|
||||
*/
|
||||
#[Pure]
|
||||
public function isPublic() {}
|
||||
#[TentativeType]
|
||||
public function isPublic(): bool {}
|
||||
|
||||
/**
|
||||
* Returns the string representation of the ReflectionClassConstant object.
|
||||
|
@ -172,7 +181,7 @@ class ReflectionClassConstant implements Reflector
|
|||
* @return string
|
||||
* @since 7.1
|
||||
*/
|
||||
public function __toString() {}
|
||||
public function __toString(): string {}
|
||||
|
||||
/**
|
||||
* Returns an array of constant attributes.
|
||||
|
@ -183,21 +192,21 @@ class ReflectionClassConstant implements Reflector
|
|||
* @since 8.0
|
||||
*/
|
||||
#[Pure]
|
||||
public function getAttributes(?string $name = null, int $flags = 0) {}
|
||||
public function getAttributes(?string $name = null, int $flags = 0): array {}
|
||||
|
||||
/**
|
||||
* ReflectionClassConstant cannot be cloned
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
final private function __clone() {}
|
||||
final private function __clone(): void {}
|
||||
|
||||
#[PhpStormStubsElementAvailable('8.1')]
|
||||
public function isEnumCase() {}
|
||||
public function isEnumCase(): bool {}
|
||||
|
||||
/**
|
||||
* @since 8.1
|
||||
* @return bool
|
||||
* @since 8.1
|
||||
*/
|
||||
public function isFinal(): bool {}
|
||||
}
|
||||
|
|
|
@ -12,26 +12,26 @@ class ReflectionEnum extends ReflectionClass
|
|||
* @param string $name
|
||||
* @return bool
|
||||
*/
|
||||
public function hasCase(string $name) {}
|
||||
public function hasCase(string $name): bool {}
|
||||
|
||||
/**
|
||||
* @return ReflectionEnumPureCase[]|ReflectionEnumBackedCase[]
|
||||
*/
|
||||
public function getCases() {}
|
||||
public function getCases(): array {}
|
||||
|
||||
/**
|
||||
* @throws ReflectionException If no found single reflection object for the corresponding case
|
||||
* @return ReflectionEnumPureCase|ReflectionEnumBackedCase
|
||||
* @throws ReflectionException If no found single reflection object for the corresponding case
|
||||
*/
|
||||
public function getCase(string $name) {}
|
||||
public function getCase(string $name): ReflectionEnumUnitCase {}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isBacked() {}
|
||||
public function isBacked(): bool {}
|
||||
|
||||
/**
|
||||
* @return ReflectionType|null
|
||||
*/
|
||||
public function getBackingType() {}
|
||||
public function getBackingType(): ?ReflectionType {}
|
||||
}
|
||||
|
|
|
@ -8,8 +8,5 @@ class ReflectionEnumBackedCase extends ReflectionEnumUnitCase
|
|||
{
|
||||
public function __construct(object|string $class, string $constant) {}
|
||||
|
||||
/**
|
||||
* @return int|string
|
||||
*/
|
||||
public function getBackingValue() {}
|
||||
public function getBackingValue(): int|string {}
|
||||
}
|
||||
|
|
|
@ -8,10 +8,10 @@ class ReflectionEnumUnitCase extends ReflectionClassConstant
|
|||
{
|
||||
public function __construct(object|string $class, string $constant) {}
|
||||
|
||||
public function getValue() {}
|
||||
public function getValue(): UnitEnum {}
|
||||
|
||||
/**
|
||||
* @return ReflectionEnum
|
||||
*/
|
||||
public function getEnum() {}
|
||||
public function getEnum(): ReflectionEnum {}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
use JetBrains\PhpStorm\Deprecated;
|
||||
use JetBrains\PhpStorm\Immutable;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\TentativeType;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
/**
|
||||
|
@ -24,7 +25,7 @@ class ReflectionExtension implements Reflector
|
|||
*
|
||||
* @link https://php.net/manual/en/reflectionextension.construct.php
|
||||
* @param string $name Name of the extension.
|
||||
* @throws \ReflectionException if the extension does not exist.
|
||||
* @throws ReflectionException if the extension does not exist.
|
||||
*/
|
||||
public function __construct(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name) {}
|
||||
|
||||
|
@ -51,6 +52,7 @@ class ReflectionExtension implements Reflector
|
|||
* @return string the exported extension as a string, in the same way as
|
||||
* the {@see ReflectionExtension::export()}.
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')]
|
||||
public function __toString() {}
|
||||
|
||||
/**
|
||||
|
@ -60,16 +62,18 @@ class ReflectionExtension implements Reflector
|
|||
* @return string The extensions name.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getName() {}
|
||||
#[TentativeType]
|
||||
public function getName(): string {}
|
||||
|
||||
/**
|
||||
* Gets extension version
|
||||
*
|
||||
* @link https://php.net/manual/en/reflectionextension.getversion.php
|
||||
* @return string The version of the extension.
|
||||
* @return string|null The version of the extension.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getVersion() {}
|
||||
#[TentativeType]
|
||||
public function getVersion(): ?string {}
|
||||
|
||||
/**
|
||||
* Gets extension functions
|
||||
|
@ -80,7 +84,8 @@ class ReflectionExtension implements Reflector
|
|||
* names. If no function are defined, an empty array is returned.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getFunctions() {}
|
||||
#[TentativeType]
|
||||
public function getFunctions(): array {}
|
||||
|
||||
/**
|
||||
* Gets constants
|
||||
|
@ -89,7 +94,8 @@ class ReflectionExtension implements Reflector
|
|||
* @return array An associative array with constant names as keys.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getConstants() {}
|
||||
#[TentativeType]
|
||||
public function getConstants(): array {}
|
||||
|
||||
/**
|
||||
* Gets extension ini entries
|
||||
|
@ -99,7 +105,8 @@ class ReflectionExtension implements Reflector
|
|||
* with their defined values as values.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getINIEntries() {}
|
||||
#[TentativeType]
|
||||
public function getINIEntries(): array {}
|
||||
|
||||
/**
|
||||
* Gets classes
|
||||
|
@ -110,7 +117,8 @@ class ReflectionExtension implements Reflector
|
|||
* an empty array is returned.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getClasses() {}
|
||||
#[TentativeType]
|
||||
public function getClasses(): array {}
|
||||
|
||||
/**
|
||||
* Gets class names
|
||||
|
@ -120,7 +128,8 @@ class ReflectionExtension implements Reflector
|
|||
* If no classes are defined, an empty array is returned.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getClassNames() {}
|
||||
#[TentativeType]
|
||||
public function getClassNames(): array {}
|
||||
|
||||
/**
|
||||
* Gets dependencies
|
||||
|
@ -130,7 +139,8 @@ class ReflectionExtension implements Reflector
|
|||
* either Required, Optional or Conflicts as the values.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getDependencies() {}
|
||||
#[TentativeType]
|
||||
public function getDependencies(): array {}
|
||||
|
||||
/**
|
||||
* Print extension info
|
||||
|
@ -138,7 +148,8 @@ class ReflectionExtension implements Reflector
|
|||
* @link https://php.net/manual/en/reflectionextension.info.php
|
||||
* @return void Print extension info
|
||||
*/
|
||||
public function info() {}
|
||||
#[TentativeType]
|
||||
public function info(): void {}
|
||||
|
||||
/**
|
||||
* Returns whether this extension is persistent
|
||||
|
@ -148,7 +159,8 @@ class ReflectionExtension implements Reflector
|
|||
* @since 5.4
|
||||
*/
|
||||
#[Pure]
|
||||
public function isPersistent() {}
|
||||
#[TentativeType]
|
||||
public function isPersistent(): bool {}
|
||||
|
||||
/**
|
||||
* Returns whether this extension is temporary
|
||||
|
@ -158,7 +170,8 @@ class ReflectionExtension implements Reflector
|
|||
* @since 5.4
|
||||
*/
|
||||
#[Pure]
|
||||
public function isTemporary() {}
|
||||
#[TentativeType]
|
||||
public function isTemporary(): bool {}
|
||||
|
||||
/**
|
||||
* Clones
|
||||
|
@ -166,5 +179,5 @@ class ReflectionExtension implements Reflector
|
|||
* @link https://php.net/manual/en/reflectionextension.clone.php
|
||||
* @return void No value is returned, if called a fatal error will occur.
|
||||
*/
|
||||
final private function __clone() {}
|
||||
final private function __clone(): void {}
|
||||
}
|
||||
|
|
|
@ -7,29 +7,13 @@ final class ReflectionFiber
|
|||
{
|
||||
public function __construct(Fiber $fiber) {}
|
||||
|
||||
/**
|
||||
* @return Fiber
|
||||
*/
|
||||
public function getFiber() {}
|
||||
public function getFiber(): Fiber {}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getExecutingFile() {}
|
||||
public function getExecutingFile(): string {}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getExecutingLine() {}
|
||||
public function getExecutingLine(): int {}
|
||||
|
||||
/**
|
||||
* @return callable
|
||||
*/
|
||||
public function getCallable() {}
|
||||
public function getCallable(): callable {}
|
||||
|
||||
/**
|
||||
* @param int $options
|
||||
* @return array
|
||||
*/
|
||||
public function getTrace(int $options = DEBUG_BACKTRACE_PROVIDE_OBJECT) {}
|
||||
public function getTrace(int $options = DEBUG_BACKTRACE_PROVIDE_OBJECT): array {}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
use JetBrains\PhpStorm\Deprecated;
|
||||
use JetBrains\PhpStorm\Immutable;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\TentativeType;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
/**
|
||||
|
@ -40,6 +41,7 @@ class ReflectionFunction extends ReflectionFunctionAbstract
|
|||
*
|
||||
* @link https://php.net/manual/en/reflectionfunction.tostring.php
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')]
|
||||
public function __toString() {}
|
||||
|
||||
/**
|
||||
|
@ -65,7 +67,8 @@ class ReflectionFunction extends ReflectionFunctionAbstract
|
|||
*/
|
||||
#[Deprecated(since: '8.0')]
|
||||
#[Pure]
|
||||
public function isDisabled() {}
|
||||
#[TentativeType]
|
||||
public function isDisabled(): bool {}
|
||||
|
||||
/**
|
||||
* Invokes function
|
||||
|
@ -76,7 +79,8 @@ class ReflectionFunction extends ReflectionFunctionAbstract
|
|||
* like {@see call_user_func} is.
|
||||
* @return mixed Returns the result of the invoked function call.
|
||||
*/
|
||||
public function invoke(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] ...$args) {}
|
||||
#[TentativeType]
|
||||
public function invoke(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] ...$args): mixed {}
|
||||
|
||||
/**
|
||||
* Invokes function args
|
||||
|
@ -86,7 +90,8 @@ class ReflectionFunction extends ReflectionFunctionAbstract
|
|||
* like {@see call_user_func_array} works.
|
||||
* @return mixed the result of the invoked function
|
||||
*/
|
||||
public function invokeArgs(array $args) {}
|
||||
#[TentativeType]
|
||||
public function invokeArgs(array $args): mixed {}
|
||||
|
||||
/**
|
||||
* Returns a dynamically created closure for the function
|
||||
|
@ -95,5 +100,6 @@ class ReflectionFunction extends ReflectionFunctionAbstract
|
|||
* @return Closure Returns {@see Closure} or {@see null} in case of an error.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getClosure() {}
|
||||
#[TentativeType]
|
||||
public function getClosure(): Closure {}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
use JetBrains\PhpStorm\Immutable;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
use JetBrains\PhpStorm\Internal\TentativeType;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
/**
|
||||
|
@ -26,7 +27,7 @@ abstract class ReflectionFunctionAbstract implements Reflector
|
|||
* @link https://php.net/manual/en/reflectionfunctionabstract.clone.php
|
||||
* @return void
|
||||
*/
|
||||
final private function __clone() {}
|
||||
final private function __clone(): void {}
|
||||
|
||||
/**
|
||||
* Checks if function in namespace
|
||||
|
@ -34,7 +35,8 @@ abstract class ReflectionFunctionAbstract implements Reflector
|
|||
* @link https://php.net/manual/en/reflectionfunctionabstract.innamespace.php
|
||||
* @return bool {@see true} if it's in a namespace, otherwise {@see false}
|
||||
*/
|
||||
public function inNamespace() {}
|
||||
#[TentativeType]
|
||||
public function inNamespace(): bool {}
|
||||
|
||||
/**
|
||||
* Checks if closure
|
||||
|
@ -43,7 +45,8 @@ abstract class ReflectionFunctionAbstract implements Reflector
|
|||
* @return bool {@see true} if it's a closure, otherwise {@see false}
|
||||
*/
|
||||
#[Pure]
|
||||
public function isClosure() {}
|
||||
#[TentativeType]
|
||||
public function isClosure(): bool {}
|
||||
|
||||
/**
|
||||
* Checks if deprecated
|
||||
|
@ -52,7 +55,8 @@ abstract class ReflectionFunctionAbstract implements Reflector
|
|||
* @return bool {@see true} if it's deprecated, otherwise {@see false}
|
||||
*/
|
||||
#[Pure]
|
||||
public function isDeprecated() {}
|
||||
#[TentativeType]
|
||||
public function isDeprecated(): bool {}
|
||||
|
||||
/**
|
||||
* Checks if is internal
|
||||
|
@ -61,7 +65,8 @@ abstract class ReflectionFunctionAbstract implements Reflector
|
|||
* @return bool {@see true} if it's internal, otherwise {@see false}
|
||||
*/
|
||||
#[Pure]
|
||||
public function isInternal() {}
|
||||
#[TentativeType]
|
||||
public function isInternal(): bool {}
|
||||
|
||||
/**
|
||||
* Checks if user defined
|
||||
|
@ -70,7 +75,8 @@ abstract class ReflectionFunctionAbstract implements Reflector
|
|||
* @return bool {@see true} if it's user-defined, otherwise {@see false}
|
||||
*/
|
||||
#[Pure]
|
||||
public function isUserDefined() {}
|
||||
#[TentativeType]
|
||||
public function isUserDefined(): bool {}
|
||||
|
||||
/**
|
||||
* Returns whether this function is a generator
|
||||
|
@ -80,7 +86,8 @@ abstract class ReflectionFunctionAbstract implements Reflector
|
|||
* @since 5.5
|
||||
*/
|
||||
#[Pure]
|
||||
public function isGenerator() {}
|
||||
#[TentativeType]
|
||||
public function isGenerator(): bool {}
|
||||
|
||||
/**
|
||||
* Returns whether this function is variadic
|
||||
|
@ -90,7 +97,8 @@ abstract class ReflectionFunctionAbstract implements Reflector
|
|||
* @since 5.6
|
||||
*/
|
||||
#[Pure]
|
||||
public function isVariadic() {}
|
||||
#[TentativeType]
|
||||
public function isVariadic(): bool {}
|
||||
|
||||
/**
|
||||
* Returns this pointer bound to closure
|
||||
|
@ -99,7 +107,8 @@ abstract class ReflectionFunctionAbstract implements Reflector
|
|||
* @return object|null Returns $this pointer or {@see null} in case of an error.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getClosureThis() {}
|
||||
#[TentativeType]
|
||||
public function getClosureThis(): ?object {}
|
||||
|
||||
/**
|
||||
* Returns the scope associated to the closure
|
||||
|
@ -110,7 +119,8 @@ abstract class ReflectionFunctionAbstract implements Reflector
|
|||
* @since 5.4
|
||||
*/
|
||||
#[Pure]
|
||||
public function getClosureScopeClass() {}
|
||||
#[TentativeType]
|
||||
public function getClosureScopeClass(): ?ReflectionClass {}
|
||||
|
||||
/**
|
||||
* Gets doc comment
|
||||
|
@ -119,7 +129,8 @@ abstract class ReflectionFunctionAbstract implements Reflector
|
|||
* @return string|false The doc comment if it exists, otherwise {@see false}
|
||||
*/
|
||||
#[Pure]
|
||||
public function getDocComment() {}
|
||||
#[TentativeType]
|
||||
public function getDocComment(): string|false {}
|
||||
|
||||
/**
|
||||
* Gets end line number
|
||||
|
@ -129,7 +140,8 @@ abstract class ReflectionFunctionAbstract implements Reflector
|
|||
* or {@see false} if unknown.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getEndLine() {}
|
||||
#[TentativeType]
|
||||
public function getEndLine(): int|false {}
|
||||
|
||||
/**
|
||||
* Gets extension info
|
||||
|
@ -139,16 +151,18 @@ abstract class ReflectionFunctionAbstract implements Reflector
|
|||
* {@see ReflectionExtension} object or {@see null} instead.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getExtension() {}
|
||||
#[TentativeType]
|
||||
public function getExtension(): ?ReflectionExtension {}
|
||||
|
||||
/**
|
||||
* Gets extension name
|
||||
*
|
||||
* @link https://php.net/manual/en/reflectionfunctionabstract.getextensionname.php
|
||||
* @return string|null The extension's name or {@see null} instead.
|
||||
* @return string|false The extension's name or {@see false} instead.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getExtensionName() {}
|
||||
#[TentativeType]
|
||||
public function getExtensionName(): string|false {}
|
||||
|
||||
/**
|
||||
* Gets file name
|
||||
|
@ -157,7 +171,8 @@ abstract class ReflectionFunctionAbstract implements Reflector
|
|||
* @return string|false The file name or {@see false} in case of error.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getFileName() {}
|
||||
#[TentativeType]
|
||||
public function getFileName(): string|false {}
|
||||
|
||||
/**
|
||||
* Gets function name
|
||||
|
@ -166,7 +181,8 @@ abstract class ReflectionFunctionAbstract implements Reflector
|
|||
* @return string The name of the function.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getName() {}
|
||||
#[TentativeType]
|
||||
public function getName(): string {}
|
||||
|
||||
/**
|
||||
* Gets namespace name
|
||||
|
@ -175,7 +191,8 @@ abstract class ReflectionFunctionAbstract implements Reflector
|
|||
* @return string The namespace name.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getNamespaceName() {}
|
||||
#[TentativeType]
|
||||
public function getNamespaceName(): string {}
|
||||
|
||||
/**
|
||||
* Gets number of parameters
|
||||
|
@ -185,7 +202,8 @@ abstract class ReflectionFunctionAbstract implements Reflector
|
|||
* @since 5.0.3
|
||||
*/
|
||||
#[Pure]
|
||||
public function getNumberOfParameters() {}
|
||||
#[TentativeType]
|
||||
public function getNumberOfParameters(): int {}
|
||||
|
||||
/**
|
||||
* Gets number of required parameters
|
||||
|
@ -195,7 +213,8 @@ abstract class ReflectionFunctionAbstract implements Reflector
|
|||
* @since 5.0.3
|
||||
*/
|
||||
#[Pure]
|
||||
public function getNumberOfRequiredParameters() {}
|
||||
#[TentativeType]
|
||||
public function getNumberOfRequiredParameters(): int {}
|
||||
|
||||
/**
|
||||
* Gets parameters
|
||||
|
@ -204,7 +223,8 @@ abstract class ReflectionFunctionAbstract implements Reflector
|
|||
* @return ReflectionParameter[] The parameters, as a ReflectionParameter objects.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getParameters() {}
|
||||
#[TentativeType]
|
||||
public function getParameters(): array {}
|
||||
|
||||
/**
|
||||
* Gets the specified return type of a function
|
||||
|
@ -223,7 +243,8 @@ abstract class ReflectionFunctionAbstract implements Reflector
|
|||
],
|
||||
default: 'ReflectionType|null'
|
||||
)]
|
||||
public function getReturnType() {}
|
||||
#[TentativeType]
|
||||
public function getReturnType(): ?ReflectionType {}
|
||||
|
||||
/**
|
||||
* Gets function short name
|
||||
|
@ -232,7 +253,8 @@ abstract class ReflectionFunctionAbstract implements Reflector
|
|||
* @return string The short name of the function.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getShortName() {}
|
||||
#[TentativeType]
|
||||
public function getShortName(): string {}
|
||||
|
||||
/**
|
||||
* Gets starting line number
|
||||
|
@ -241,7 +263,8 @@ abstract class ReflectionFunctionAbstract implements Reflector
|
|||
* @return int|false The starting line number or {@see false} if unknown.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getStartLine() {}
|
||||
#[TentativeType]
|
||||
public function getStartLine(): int|false {}
|
||||
|
||||
/**
|
||||
* Gets static variables
|
||||
|
@ -250,7 +273,8 @@ abstract class ReflectionFunctionAbstract implements Reflector
|
|||
* @return array An array of static variables.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getStaticVariables() {}
|
||||
#[TentativeType]
|
||||
public function getStaticVariables(): array {}
|
||||
|
||||
/**
|
||||
* Checks if returns reference
|
||||
|
@ -258,7 +282,8 @@ abstract class ReflectionFunctionAbstract implements Reflector
|
|||
* @link https://php.net/manual/en/reflectionfunctionabstract.returnsreference.php
|
||||
* @return bool {@see true} if it returns a reference, otherwise {@see false}
|
||||
*/
|
||||
public function returnsReference() {}
|
||||
#[TentativeType]
|
||||
public function returnsReference(): bool {}
|
||||
|
||||
/**
|
||||
* Checks if the function has a specified return type
|
||||
|
@ -268,7 +293,8 @@ abstract class ReflectionFunctionAbstract implements Reflector
|
|||
* type, otherwise {@see false}.
|
||||
* @since 7.0
|
||||
*/
|
||||
public function hasReturnType() {}
|
||||
#[TentativeType]
|
||||
public function hasReturnType(): bool {}
|
||||
|
||||
/**
|
||||
* Returns an array of function attributes.
|
||||
|
@ -279,7 +305,7 @@ abstract class ReflectionFunctionAbstract implements Reflector
|
|||
* @since 8.0
|
||||
*/
|
||||
#[Pure]
|
||||
public function getAttributes(?string $name = null, int $flags = 0) {}
|
||||
public function getAttributes(?string $name = null, int $flags = 0): array {}
|
||||
|
||||
#[PhpStormStubsElementAvailable('8.1')]
|
||||
#[Pure]
|
||||
|
@ -295,5 +321,6 @@ abstract class ReflectionFunctionAbstract implements Reflector
|
|||
|
||||
#[PhpStormStubsElementAvailable('8.1')]
|
||||
#[Pure]
|
||||
#[TentativeType]
|
||||
public function isStatic(): bool {}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
|
||||
use JetBrains\PhpStorm\Internal\TentativeType;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
/**
|
||||
|
@ -27,7 +28,8 @@ class ReflectionGenerator
|
|||
* @since 7.0
|
||||
*/
|
||||
#[Pure]
|
||||
public function getExecutingLine() {}
|
||||
#[TentativeType]
|
||||
public function getExecutingLine(): int {}
|
||||
|
||||
/**
|
||||
* Gets the file name of the currently executing generator
|
||||
|
@ -38,7 +40,8 @@ class ReflectionGenerator
|
|||
* @since 7.0
|
||||
*/
|
||||
#[Pure]
|
||||
public function getExecutingFile() {}
|
||||
#[TentativeType]
|
||||
public function getExecutingFile(): string {}
|
||||
|
||||
/**
|
||||
* Gets the trace of the executing generator
|
||||
|
@ -57,7 +60,8 @@ class ReflectionGenerator
|
|||
* @since 7.0
|
||||
*/
|
||||
#[Pure]
|
||||
public function getTrace(int $options = DEBUG_BACKTRACE_PROVIDE_OBJECT) {}
|
||||
#[TentativeType]
|
||||
public function getTrace(int $options = DEBUG_BACKTRACE_PROVIDE_OBJECT): array {}
|
||||
|
||||
/**
|
||||
* Gets the function name of the generator
|
||||
|
@ -69,7 +73,8 @@ class ReflectionGenerator
|
|||
* @since 7.0
|
||||
*/
|
||||
#[Pure]
|
||||
public function getFunction() {}
|
||||
#[TentativeType]
|
||||
public function getFunction(): ReflectionFunctionAbstract {}
|
||||
|
||||
/**
|
||||
* Gets the function name of the generator
|
||||
|
@ -80,7 +85,8 @@ class ReflectionGenerator
|
|||
* @since 7.0
|
||||
*/
|
||||
#[Pure]
|
||||
public function getThis() {}
|
||||
#[TentativeType]
|
||||
public function getThis(): ?object {}
|
||||
|
||||
/**
|
||||
* Gets the executing Generator object
|
||||
|
@ -90,5 +96,6 @@ class ReflectionGenerator
|
|||
* @since 7.0
|
||||
*/
|
||||
#[Pure]
|
||||
public function getExecutingGenerator() {}
|
||||
#[TentativeType]
|
||||
public function getExecutingGenerator(): Generator {}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ use JetBrains\PhpStorm\Deprecated;
|
|||
use JetBrains\PhpStorm\Immutable;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
use JetBrains\PhpStorm\Internal\TentativeType;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
/**
|
||||
|
@ -72,7 +73,7 @@ class ReflectionMethod extends ReflectionFunctionAbstract
|
|||
* method name delimited by ::.
|
||||
* @param string|null $method Name of the method if the first argument is a
|
||||
* classname or an object.
|
||||
* @throws \ReflectionException if the class or method does not exist.
|
||||
* @throws ReflectionException if the class or method does not exist.
|
||||
*/
|
||||
public function __construct(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'object|string'], default: '')] $objectOrMethod,
|
||||
|
@ -101,6 +102,7 @@ class ReflectionMethod extends ReflectionFunctionAbstract
|
|||
* @link https://php.net/manual/en/reflectionmethod.tostring.php
|
||||
* @return string A string representation of this {@see ReflectionMethod} instance.
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')]
|
||||
public function __toString() {}
|
||||
|
||||
/**
|
||||
|
@ -110,7 +112,8 @@ class ReflectionMethod extends ReflectionFunctionAbstract
|
|||
* @return bool Returns {@see true} if the method is public, otherwise {@see false}
|
||||
*/
|
||||
#[Pure]
|
||||
public function isPublic() {}
|
||||
#[TentativeType]
|
||||
public function isPublic(): bool {}
|
||||
|
||||
/**
|
||||
* Checks if method is private
|
||||
|
@ -119,7 +122,8 @@ class ReflectionMethod extends ReflectionFunctionAbstract
|
|||
* @return bool Returns {@see true} if the method is private, otherwise {@see false}
|
||||
*/
|
||||
#[Pure]
|
||||
public function isPrivate() {}
|
||||
#[TentativeType]
|
||||
public function isPrivate(): bool {}
|
||||
|
||||
/**
|
||||
* Checks if method is protected
|
||||
|
@ -128,7 +132,8 @@ class ReflectionMethod extends ReflectionFunctionAbstract
|
|||
* @return bool Returns {@see true} if the method is protected, otherwise {@see false}
|
||||
*/
|
||||
#[Pure]
|
||||
public function isProtected() {}
|
||||
#[TentativeType]
|
||||
public function isProtected(): bool {}
|
||||
|
||||
/**
|
||||
* Checks if method is abstract
|
||||
|
@ -137,7 +142,8 @@ class ReflectionMethod extends ReflectionFunctionAbstract
|
|||
* @return bool Returns {@see true} if the method is abstract, otherwise {@see false}
|
||||
*/
|
||||
#[Pure]
|
||||
public function isAbstract() {}
|
||||
#[TentativeType]
|
||||
public function isAbstract(): bool {}
|
||||
|
||||
/**
|
||||
* Checks if method is final
|
||||
|
@ -146,7 +152,8 @@ class ReflectionMethod extends ReflectionFunctionAbstract
|
|||
* @return bool Returns {@see true} if the method is final, otherwise {@see false}
|
||||
*/
|
||||
#[Pure]
|
||||
public function isFinal() {}
|
||||
#[TentativeType]
|
||||
public function isFinal(): bool {}
|
||||
|
||||
/**
|
||||
* Checks if method is static
|
||||
|
@ -155,7 +162,8 @@ class ReflectionMethod extends ReflectionFunctionAbstract
|
|||
* @return bool Returns {@see true} if the method is static, otherwise {@see false}
|
||||
*/
|
||||
#[Pure]
|
||||
public function isStatic() {}
|
||||
#[TentativeType]
|
||||
public function isStatic(): bool {}
|
||||
|
||||
/**
|
||||
* Checks if method is a constructor
|
||||
|
@ -164,7 +172,8 @@ class ReflectionMethod extends ReflectionFunctionAbstract
|
|||
* @return bool Returns {@see true} if the method is a constructor, otherwise {@see false}
|
||||
*/
|
||||
#[Pure]
|
||||
public function isConstructor() {}
|
||||
#[TentativeType]
|
||||
public function isConstructor(): bool {}
|
||||
|
||||
/**
|
||||
* Checks if method is a destructor
|
||||
|
@ -173,7 +182,8 @@ class ReflectionMethod extends ReflectionFunctionAbstract
|
|||
* @return bool Returns {@see true} if the method is a destructor, otherwise {@see false}
|
||||
*/
|
||||
#[Pure]
|
||||
public function isDestructor() {}
|
||||
#[TentativeType]
|
||||
public function isDestructor(): bool {}
|
||||
|
||||
/**
|
||||
* Returns a dynamically created closure for the method
|
||||
|
@ -184,7 +194,8 @@ class ReflectionMethod extends ReflectionFunctionAbstract
|
|||
* @since 5.4
|
||||
*/
|
||||
#[Pure]
|
||||
public function getClosure(#[LanguageLevelTypeAware(['8.0' => 'object|null'], default: '')] $object = null) {}
|
||||
#[TentativeType]
|
||||
public function getClosure(#[LanguageLevelTypeAware(['8.0' => 'object|null'], default: '')] $object = null): Closure {}
|
||||
|
||||
/**
|
||||
* Gets the method modifiers
|
||||
|
@ -204,7 +215,8 @@ class ReflectionMethod extends ReflectionFunctionAbstract
|
|||
* - {@see ReflectionMethod::IS_FINAL} - Indicates that the method is final.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getModifiers() {}
|
||||
#[TentativeType]
|
||||
public function getModifiers(): int {}
|
||||
|
||||
/**
|
||||
* Invokes a reflected method.
|
||||
|
@ -234,7 +246,8 @@ class ReflectionMethod extends ReflectionFunctionAbstract
|
|||
* instance of the class that this method was declared in or the method
|
||||
* invocation failed.
|
||||
*/
|
||||
public function invokeArgs(#[LanguageLevelTypeAware(['8.0' => 'object|null'], default: '')] $object, array $args) {}
|
||||
#[TentativeType]
|
||||
public function invokeArgs(#[LanguageLevelTypeAware(['8.0' => 'object|null'], default: '')] $object, array $args): mixed {}
|
||||
|
||||
/**
|
||||
* Gets declaring class for the reflected method.
|
||||
|
@ -244,7 +257,8 @@ class ReflectionMethod extends ReflectionFunctionAbstract
|
|||
* reflected method is part of.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getDeclaringClass() {}
|
||||
#[TentativeType]
|
||||
public function getDeclaringClass(): ReflectionClass {}
|
||||
|
||||
/**
|
||||
* Gets the method prototype (if there is one).
|
||||
|
@ -254,7 +268,8 @@ class ReflectionMethod extends ReflectionFunctionAbstract
|
|||
* @throws ReflectionException if the method does not have a prototype
|
||||
*/
|
||||
#[Pure]
|
||||
public function getPrototype() {}
|
||||
#[TentativeType]
|
||||
public function getPrototype(): ReflectionMethod {}
|
||||
|
||||
/**
|
||||
* Set method accessibility
|
||||
|
@ -265,7 +280,8 @@ class ReflectionMethod extends ReflectionFunctionAbstract
|
|||
* @since 5.3.2
|
||||
*/
|
||||
#[PhpStormStubsElementAvailable(to: "8.0")]
|
||||
public function setAccessible(#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $accessible) {}
|
||||
#[TentativeType]
|
||||
public function setAccessible(#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $accessible): void {}
|
||||
|
||||
/**
|
||||
* Set method accessibility
|
||||
|
@ -277,5 +293,6 @@ class ReflectionMethod extends ReflectionFunctionAbstract
|
|||
*/
|
||||
#[Pure]
|
||||
#[PhpStormStubsElementAvailable(from: "8.1")]
|
||||
public function setAccessible(bool $accessible) {}
|
||||
#[TentativeType]
|
||||
public function setAccessible(bool $accessible): void {}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
|
||||
use JetBrains\PhpStorm\Internal\TentativeType;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
/**
|
||||
|
@ -27,5 +28,6 @@ class ReflectionNamedType extends ReflectionType
|
|||
* @since 8.0 method was removed from the parent {@see ReflectionType} class.
|
||||
*/
|
||||
#[Pure]
|
||||
public function isBuiltin() {}
|
||||
#[TentativeType]
|
||||
public function isBuiltin(): bool {}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
use JetBrains\PhpStorm\Deprecated;
|
||||
use JetBrains\PhpStorm\Immutable;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\TentativeType;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
/**
|
||||
|
@ -27,7 +28,7 @@ class ReflectionParameter implements Reflector
|
|||
* @param callable $function The function to reflect parameters from.
|
||||
* @param string|int $param Either an integer specifying the position
|
||||
* of the parameter (starting with zero), or a the parameter name as string.
|
||||
* @throws \ReflectionException if the function or parameter does not exist.
|
||||
* @throws ReflectionException if the function or parameter does not exist.
|
||||
*/
|
||||
public function __construct($function, #[LanguageLevelTypeAware(['8.0' => 'string|int'], default: '')] $param) {}
|
||||
|
||||
|
@ -52,6 +53,7 @@ class ReflectionParameter implements Reflector
|
|||
* @link https://php.net/manual/en/reflectionparameter.tostring.php
|
||||
* @return string
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')]
|
||||
public function __toString() {}
|
||||
|
||||
/**
|
||||
|
@ -61,7 +63,8 @@ class ReflectionParameter implements Reflector
|
|||
* @return string The name of the reflected parameter.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getName() {}
|
||||
#[TentativeType]
|
||||
public function getName(): string {}
|
||||
|
||||
/**
|
||||
* Checks if passed by reference
|
||||
|
@ -70,7 +73,8 @@ class ReflectionParameter implements Reflector
|
|||
* @return bool {@see true} if the parameter is passed in by reference, otherwise {@see false}
|
||||
*/
|
||||
#[Pure]
|
||||
public function isPassedByReference() {}
|
||||
#[TentativeType]
|
||||
public function isPassedByReference(): bool {}
|
||||
|
||||
/**
|
||||
* Returns whether this parameter can be passed by value
|
||||
|
@ -80,7 +84,8 @@ class ReflectionParameter implements Reflector
|
|||
* Returns {@see null} in case of an error.
|
||||
* @since 5.4
|
||||
*/
|
||||
public function canBePassedByValue() {}
|
||||
#[TentativeType]
|
||||
public function canBePassedByValue(): bool {}
|
||||
|
||||
/**
|
||||
* Gets declaring function
|
||||
|
@ -90,7 +95,8 @@ class ReflectionParameter implements Reflector
|
|||
* @since 5.2.3
|
||||
*/
|
||||
#[Pure]
|
||||
public function getDeclaringFunction() {}
|
||||
#[TentativeType]
|
||||
public function getDeclaringFunction(): ReflectionFunctionAbstract {}
|
||||
|
||||
/**
|
||||
* Gets declaring class
|
||||
|
@ -100,7 +106,8 @@ class ReflectionParameter implements Reflector
|
|||
* called on function.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getDeclaringClass() {}
|
||||
#[TentativeType]
|
||||
public function getDeclaringClass(): ?ReflectionClass {}
|
||||
|
||||
/**
|
||||
* Gets the class type hinted for the parameter as a ReflectionClass object.
|
||||
|
@ -111,7 +118,8 @@ class ReflectionParameter implements Reflector
|
|||
*/
|
||||
#[Deprecated(reason: "Use ReflectionParameter::getType() and the ReflectionType APIs should be used instead.", since: "8.0")]
|
||||
#[Pure]
|
||||
public function getClass() {}
|
||||
#[TentativeType]
|
||||
public function getClass(): ?ReflectionClass {}
|
||||
|
||||
/**
|
||||
* Checks if the parameter has a type associated with it.
|
||||
|
@ -120,7 +128,8 @@ class ReflectionParameter implements Reflector
|
|||
* @return bool {@see true} if a type is specified, {@see false} otherwise.
|
||||
* @since 7.0
|
||||
*/
|
||||
public function hasType() {}
|
||||
#[TentativeType]
|
||||
public function hasType(): bool {}
|
||||
|
||||
/**
|
||||
* Gets a parameter's type
|
||||
|
@ -139,7 +148,8 @@ class ReflectionParameter implements Reflector
|
|||
],
|
||||
default: 'ReflectionType|null'
|
||||
)]
|
||||
public function getType() {}
|
||||
#[TentativeType]
|
||||
public function getType(): ?ReflectionType {}
|
||||
|
||||
/**
|
||||
* Checks if parameter expects an array
|
||||
|
@ -150,7 +160,8 @@ class ReflectionParameter implements Reflector
|
|||
*/
|
||||
#[Deprecated(reason: "Use ReflectionParameter::getType() and the ReflectionType APIs should be used instead.", since: "8.0")]
|
||||
#[Pure]
|
||||
public function isArray() {}
|
||||
#[TentativeType]
|
||||
public function isArray(): bool {}
|
||||
|
||||
/**
|
||||
* Returns whether parameter MUST be callable
|
||||
|
@ -163,7 +174,8 @@ class ReflectionParameter implements Reflector
|
|||
*/
|
||||
#[Deprecated(reason: "Use ReflectionParameter::getType() and the ReflectionType APIs should be used instead.", since: "8.0")]
|
||||
#[Pure]
|
||||
public function isCallable() {}
|
||||
#[TentativeType]
|
||||
public function isCallable(): bool {}
|
||||
|
||||
/**
|
||||
* Checks if null is allowed
|
||||
|
@ -172,7 +184,8 @@ class ReflectionParameter implements Reflector
|
|||
* @return bool Returns {@see true} if {@see null} is allowed,
|
||||
* otherwise {@see false}
|
||||
*/
|
||||
public function allowsNull() {}
|
||||
#[TentativeType]
|
||||
public function allowsNull(): bool {}
|
||||
|
||||
/**
|
||||
* Gets parameter position
|
||||
|
@ -182,7 +195,8 @@ class ReflectionParameter implements Reflector
|
|||
* @since 5.2.3
|
||||
*/
|
||||
#[Pure]
|
||||
public function getPosition() {}
|
||||
#[TentativeType]
|
||||
public function getPosition(): int {}
|
||||
|
||||
/**
|
||||
* Checks if optional
|
||||
|
@ -192,7 +206,8 @@ class ReflectionParameter implements Reflector
|
|||
* @since 5.0.3
|
||||
*/
|
||||
#[Pure]
|
||||
public function isOptional() {}
|
||||
#[TentativeType]
|
||||
public function isOptional(): bool {}
|
||||
|
||||
/**
|
||||
* Checks if a default value is available
|
||||
|
@ -202,18 +217,20 @@ class ReflectionParameter implements Reflector
|
|||
* @since 5.0.3
|
||||
*/
|
||||
#[Pure]
|
||||
public function isDefaultValueAvailable() {}
|
||||
#[TentativeType]
|
||||
public function isDefaultValueAvailable(): bool {}
|
||||
|
||||
/**
|
||||
* Gets default parameter value
|
||||
*
|
||||
* @link https://php.net/manual/en/reflectionparameter.getdefaultvalue.php
|
||||
* @return mixed The parameters default value.
|
||||
* @throws \ReflectionException if the parameter is not optional
|
||||
* @throws ReflectionException if the parameter is not optional
|
||||
* @since 5.0.3
|
||||
*/
|
||||
#[Pure]
|
||||
public function getDefaultValue() {}
|
||||
#[TentativeType]
|
||||
public function getDefaultValue(): mixed {}
|
||||
|
||||
/**
|
||||
* Returns whether the default value of this parameter is constant
|
||||
|
@ -223,18 +240,20 @@ class ReflectionParameter implements Reflector
|
|||
* @since 5.4.6
|
||||
*/
|
||||
#[Pure]
|
||||
public function isDefaultValueConstant() {}
|
||||
#[TentativeType]
|
||||
public function isDefaultValueConstant(): bool {}
|
||||
|
||||
/**
|
||||
* Returns the default value's constant name if default value is constant or null
|
||||
*
|
||||
* @link https://php.net/manual/en/reflectionparameter.getdefaultvalueconstantname.php
|
||||
* @return string|null Returns string on success or {@see null} on failure.
|
||||
* @throws \ReflectionException if the parameter is not optional
|
||||
* @throws ReflectionException if the parameter is not optional
|
||||
* @since 5.4.6
|
||||
*/
|
||||
#[Pure]
|
||||
public function getDefaultValueConstantName() {}
|
||||
#[TentativeType]
|
||||
public function getDefaultValueConstantName(): ?string {}
|
||||
|
||||
/**
|
||||
* Returns whether this function is variadic
|
||||
|
@ -244,7 +263,8 @@ class ReflectionParameter implements Reflector
|
|||
* @since 5.6
|
||||
*/
|
||||
#[Pure]
|
||||
public function isVariadic() {}
|
||||
#[TentativeType]
|
||||
public function isVariadic(): bool {}
|
||||
|
||||
/**
|
||||
* Returns information about whether the parameter is a promoted.
|
||||
|
@ -253,7 +273,7 @@ class ReflectionParameter implements Reflector
|
|||
* @since 8.0
|
||||
*/
|
||||
#[Pure]
|
||||
public function isPromoted() {}
|
||||
public function isPromoted(): bool {}
|
||||
|
||||
/**
|
||||
* Returns an array of parameter attributes.
|
||||
|
@ -264,7 +284,7 @@ class ReflectionParameter implements Reflector
|
|||
* @since 8.0
|
||||
*/
|
||||
#[Pure]
|
||||
public function getAttributes(?string $name = null, int $flags = 0) {}
|
||||
public function getAttributes(?string $name = null, int $flags = 0): array {}
|
||||
|
||||
/**
|
||||
* Clone
|
||||
|
@ -272,5 +292,5 @@ class ReflectionParameter implements Reflector
|
|||
* @link https://php.net/manual/en/reflectionparameter.clone.php
|
||||
* @return void
|
||||
*/
|
||||
final private function __clone() {}
|
||||
final private function __clone(): void {}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ use JetBrains\PhpStorm\Deprecated;
|
|||
use JetBrains\PhpStorm\Immutable;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
use JetBrains\PhpStorm\Internal\TentativeType;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
/**
|
||||
|
@ -74,7 +75,7 @@ class ReflectionProperty implements Reflector
|
|||
* @link https://php.net/manual/en/reflectionproperty.construct.php
|
||||
* @param string|object $class The class name, that contains the property.
|
||||
* @param string $property The name of the property being reflected.
|
||||
* @throws \ReflectionException if the class or property does not exist.
|
||||
* @throws ReflectionException if the class or property does not exist.
|
||||
*/
|
||||
public function __construct(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'object|string'], default: '')] $class,
|
||||
|
@ -102,6 +103,7 @@ class ReflectionProperty implements Reflector
|
|||
* @link https://php.net/manual/en/reflectionproperty.tostring.php
|
||||
* @return string
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')]
|
||||
public function __toString() {}
|
||||
|
||||
/**
|
||||
|
@ -111,7 +113,8 @@ class ReflectionProperty implements Reflector
|
|||
* @return string The name of the reflected property.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getName() {}
|
||||
#[TentativeType]
|
||||
public function getName(): string {}
|
||||
|
||||
/**
|
||||
* Gets value
|
||||
|
@ -124,7 +127,8 @@ class ReflectionProperty implements Reflector
|
|||
* @return mixed The current value of the property.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getValue(#[LanguageLevelTypeAware(['8.0' => 'object|null'], default: '')] $object = null) {}
|
||||
#[TentativeType]
|
||||
public function getValue(#[LanguageLevelTypeAware(['8.0' => 'object|null'], default: '')] $object = null): mixed {}
|
||||
|
||||
/**
|
||||
* Set property value
|
||||
|
@ -136,10 +140,11 @@ class ReflectionProperty implements Reflector
|
|||
* @param mixed $value The new value.
|
||||
* @return void No value is returned.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function setValue(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $objectOrValue,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value = null
|
||||
) {}
|
||||
): void {}
|
||||
|
||||
/**
|
||||
* Checks if property is public
|
||||
|
@ -148,7 +153,8 @@ class ReflectionProperty implements Reflector
|
|||
* @return bool Return {@see true} if the property is public, {@see false} otherwise.
|
||||
*/
|
||||
#[Pure]
|
||||
public function isPublic() {}
|
||||
#[TentativeType]
|
||||
public function isPublic(): bool {}
|
||||
|
||||
/**
|
||||
* Checks if property is private
|
||||
|
@ -157,7 +163,8 @@ class ReflectionProperty implements Reflector
|
|||
* @return bool Return {@see true} if the property is private, {@see false} otherwise.
|
||||
*/
|
||||
#[Pure]
|
||||
public function isPrivate() {}
|
||||
#[TentativeType]
|
||||
public function isPrivate(): bool {}
|
||||
|
||||
/**
|
||||
* Checks if property is protected
|
||||
|
@ -166,7 +173,8 @@ class ReflectionProperty implements Reflector
|
|||
* @return bool Returns {@see true} if the property is protected, {@see false} otherwise.
|
||||
*/
|
||||
#[Pure]
|
||||
public function isProtected() {}
|
||||
#[TentativeType]
|
||||
public function isProtected(): bool {}
|
||||
|
||||
/**
|
||||
* Checks if property is static
|
||||
|
@ -175,7 +183,8 @@ class ReflectionProperty implements Reflector
|
|||
* @return bool Retruns {@see true} if the property is static, {@see false} otherwise.
|
||||
*/
|
||||
#[Pure]
|
||||
public function isStatic() {}
|
||||
#[TentativeType]
|
||||
public function isStatic(): bool {}
|
||||
|
||||
/**
|
||||
* Checks if default value
|
||||
|
@ -185,7 +194,8 @@ class ReflectionProperty implements Reflector
|
|||
* compile-time, or {@see false} if it was created at run-time.
|
||||
*/
|
||||
#[Pure]
|
||||
public function isDefault() {}
|
||||
#[TentativeType]
|
||||
public function isDefault(): bool {}
|
||||
|
||||
/**
|
||||
* Gets modifiers
|
||||
|
@ -194,7 +204,8 @@ class ReflectionProperty implements Reflector
|
|||
* @return int A numeric representation of the modifiers.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getModifiers() {}
|
||||
#[TentativeType]
|
||||
public function getModifiers(): int {}
|
||||
|
||||
/**
|
||||
* Gets declaring class
|
||||
|
@ -203,7 +214,8 @@ class ReflectionProperty implements Reflector
|
|||
* @return ReflectionClass A {@see ReflectionClass} object.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getDeclaringClass() {}
|
||||
#[TentativeType]
|
||||
public function getDeclaringClass(): ReflectionClass {}
|
||||
|
||||
/**
|
||||
* Gets doc comment
|
||||
|
@ -212,7 +224,8 @@ class ReflectionProperty implements Reflector
|
|||
* @return string|false The doc comment if it exists, otherwise {@see false}
|
||||
*/
|
||||
#[Pure]
|
||||
public function getDocComment() {}
|
||||
#[TentativeType]
|
||||
public function getDocComment(): string|false {}
|
||||
|
||||
/**
|
||||
* Set property accessibility
|
||||
|
@ -222,7 +235,8 @@ class ReflectionProperty implements Reflector
|
|||
* @return void No value is returned.
|
||||
*/
|
||||
#[PhpStormStubsElementAvailable(to: "8.0")]
|
||||
public function setAccessible(#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $accessible) {}
|
||||
#[TentativeType]
|
||||
public function setAccessible(#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $accessible): void {}
|
||||
|
||||
/**
|
||||
* Set property accessibility
|
||||
|
@ -234,7 +248,8 @@ class ReflectionProperty implements Reflector
|
|||
*/
|
||||
#[Pure]
|
||||
#[PhpStormStubsElementAvailable(from: "8.1")]
|
||||
public function setAccessible(bool $accessible) {}
|
||||
#[TentativeType]
|
||||
public function setAccessible(bool $accessible): void {}
|
||||
|
||||
/**
|
||||
* Gets property type
|
||||
|
@ -252,7 +267,8 @@ class ReflectionProperty implements Reflector
|
|||
],
|
||||
default: 'ReflectionNamedType|null'
|
||||
)]
|
||||
public function getType() {}
|
||||
#[TentativeType]
|
||||
public function getType(): ?ReflectionType {}
|
||||
|
||||
/**
|
||||
* Checks if property has type
|
||||
|
@ -261,7 +277,8 @@ class ReflectionProperty implements Reflector
|
|||
* @return bool Returns {@see true} if a type is specified, {@see false} otherwise.
|
||||
* @since 7.4
|
||||
*/
|
||||
public function hasType() {}
|
||||
#[TentativeType]
|
||||
public function hasType(): bool {}
|
||||
|
||||
/**
|
||||
* Checks if property is initialized
|
||||
|
@ -273,7 +290,8 @@ class ReflectionProperty implements Reflector
|
|||
* @since 7.4
|
||||
*/
|
||||
#[Pure]
|
||||
public function isInitialized(?object $object = null) {}
|
||||
#[TentativeType]
|
||||
public function isInitialized(?object $object = null): bool {}
|
||||
|
||||
/**
|
||||
* Returns information about whether the property was promoted.
|
||||
|
@ -282,7 +300,7 @@ class ReflectionProperty implements Reflector
|
|||
* @since 8.0
|
||||
*/
|
||||
#[Pure]
|
||||
public function isPromoted() {}
|
||||
public function isPromoted(): bool {}
|
||||
|
||||
/**
|
||||
* Clone
|
||||
|
@ -290,20 +308,21 @@ class ReflectionProperty implements Reflector
|
|||
* @link https://php.net/manual/en/reflectionproperty.clone.php
|
||||
* @return void
|
||||
*/
|
||||
final private function __clone() {}
|
||||
final private function __clone(): void {}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
* @since 8.0
|
||||
*/
|
||||
public function hasDefaultValue() {}
|
||||
public function hasDefaultValue(): bool {}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
* @since 8.0
|
||||
*/
|
||||
#[Pure]
|
||||
public function getDefaultValue() {}
|
||||
#[TentativeType]
|
||||
public function getDefaultValue(): mixed {}
|
||||
|
||||
/**
|
||||
* @param null|string $name
|
||||
|
@ -312,11 +331,11 @@ class ReflectionProperty implements Reflector
|
|||
* @since 8.0
|
||||
*/
|
||||
#[Pure]
|
||||
public function getAttributes(?string $name = null, int $flags = 0) {}
|
||||
public function getAttributes(?string $name = null, int $flags = 0): array {}
|
||||
|
||||
/**
|
||||
* @since 8.1
|
||||
* @return bool
|
||||
* @since 8.1
|
||||
*/
|
||||
public function isReadOnly(): bool {}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ class ReflectionReference
|
|||
public static function fromArrayElement(
|
||||
array $array,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|int'], default: '')] $key
|
||||
) {}
|
||||
): ?ReflectionReference {}
|
||||
|
||||
/**
|
||||
* Returns unique identifier for the reference. The return value format is unspecified
|
||||
|
@ -38,12 +38,12 @@ class ReflectionReference
|
|||
* @return int|string Returns an integer or string of unspecified format.
|
||||
*/
|
||||
#[Pure]
|
||||
public function getId() {}
|
||||
public function getId(): string {}
|
||||
|
||||
/**
|
||||
* ReflectionReference cannot be cloned
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function __clone() {}
|
||||
private function __clone(): void {}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
use JetBrains\PhpStorm\Deprecated;
|
||||
use JetBrains\PhpStorm\Internal\TentativeType;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
/**
|
||||
|
@ -18,7 +19,8 @@ abstract class ReflectionType implements Stringable
|
|||
* @return bool Returns {@see true} if {@see null} is allowed, otherwise {@see false}
|
||||
* @since 7.0
|
||||
*/
|
||||
public function allowsNull() {}
|
||||
#[TentativeType]
|
||||
public function allowsNull(): bool {}
|
||||
|
||||
/**
|
||||
* Checks if it is a built-in type
|
||||
|
@ -41,12 +43,12 @@ abstract class ReflectionType implements Stringable
|
|||
* @see ReflectionNamedType::getName()
|
||||
*/
|
||||
#[Deprecated(since: "7.1")]
|
||||
public function __toString() {}
|
||||
public function __toString(): string {}
|
||||
|
||||
/**
|
||||
* Cloning of this class is prohibited
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
final private function __clone() {}
|
||||
final private function __clone(): void {}
|
||||
}
|
||||
|
|
|
@ -13,5 +13,5 @@ class ReflectionUnionType extends ReflectionType
|
|||
* @return ReflectionNamedType[]
|
||||
*/
|
||||
#[Pure]
|
||||
public function getTypes() {}
|
||||
public function getTypes(): array {}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
use JetBrains\PhpStorm\Immutable;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\TentativeType;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
/**
|
||||
|
@ -22,7 +23,7 @@ class ReflectionZendExtension implements Reflector
|
|||
*
|
||||
* @link https://php.net/manual/en/reflectionzendextension.construct.php
|
||||
* @param string $name
|
||||
* @throws \ReflectionException if the extension does not exist.
|
||||
* @throws ReflectionException if the extension does not exist.
|
||||
* @since 5.4
|
||||
*/
|
||||
public function __construct(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name) {}
|
||||
|
@ -47,6 +48,7 @@ class ReflectionZendExtension implements Reflector
|
|||
* @return string
|
||||
* @since 5.4
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')]
|
||||
public function __toString() {}
|
||||
|
||||
/**
|
||||
|
@ -57,7 +59,8 @@ class ReflectionZendExtension implements Reflector
|
|||
* @since 5.4
|
||||
*/
|
||||
#[Pure]
|
||||
public function getName() {}
|
||||
#[TentativeType]
|
||||
public function getName(): string {}
|
||||
|
||||
/**
|
||||
* Gets version
|
||||
|
@ -67,7 +70,8 @@ class ReflectionZendExtension implements Reflector
|
|||
* @since 5.4
|
||||
*/
|
||||
#[Pure]
|
||||
public function getVersion() {}
|
||||
#[TentativeType]
|
||||
public function getVersion(): string {}
|
||||
|
||||
/**
|
||||
* Gets author
|
||||
|
@ -77,7 +81,8 @@ class ReflectionZendExtension implements Reflector
|
|||
* @since 5.4
|
||||
*/
|
||||
#[Pure]
|
||||
public function getAuthor() {}
|
||||
#[TentativeType]
|
||||
public function getAuthor(): string {}
|
||||
|
||||
/**
|
||||
* Gets URL
|
||||
|
@ -87,7 +92,8 @@ class ReflectionZendExtension implements Reflector
|
|||
* @since 5.4
|
||||
*/
|
||||
#[Pure]
|
||||
public function getURL() {}
|
||||
#[TentativeType]
|
||||
public function getURL(): string {}
|
||||
|
||||
/**
|
||||
* Gets copyright
|
||||
|
@ -97,7 +103,8 @@ class ReflectionZendExtension implements Reflector
|
|||
* @since 5.4
|
||||
*/
|
||||
#[Pure]
|
||||
public function getCopyright() {}
|
||||
#[TentativeType]
|
||||
public function getCopyright(): string {}
|
||||
|
||||
/**
|
||||
* Clone handler
|
||||
|
@ -106,5 +113,5 @@ class ReflectionZendExtension implements Reflector
|
|||
* @return void
|
||||
* @since 5.4
|
||||
*/
|
||||
final private function __clone() {}
|
||||
final private function __clone(): void {}
|
||||
}
|
||||
|
|
472
SPL/SPL.php
472
SPL/SPL.php
File diff suppressed because it is too large
Load Diff
617
SPL/SPL_c1.php
617
SPL/SPL_c1.php
File diff suppressed because it is too large
Load Diff
|
@ -2,6 +2,7 @@
|
|||
|
||||
// Start of SimpleXML v.0.1
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\TentativeType;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
/**
|
||||
|
@ -19,7 +20,7 @@ class SimpleXMLElement implements Traversable, ArrayAccess, Countable, Iterator,
|
|||
* Use TRUE to specify that data is a path or URL to an XML document instead of string data.
|
||||
* @param string $namespaceOrPrefix Namespace prefix or URI.
|
||||
* @param bool $isPrefix TRUE if ns is a prefix, FALSE if it's a URI; defaults to FALSE.
|
||||
* @throws \Exception if the XML data could not be parsed.
|
||||
* @throws Exception if the XML data could not be parsed.
|
||||
* @since 5.0.1
|
||||
*/
|
||||
#[Pure]
|
||||
|
@ -52,7 +53,8 @@ class SimpleXMLElement implements Traversable, ArrayAccess, Countable, Iterator,
|
|||
* successfully and <b>FALSE</b> otherwise.
|
||||
* @since 5.0.1
|
||||
*/
|
||||
public function asXML(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $filename = null) {}
|
||||
#[TentativeType]
|
||||
public function asXML(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $filename = null): string|bool {}
|
||||
|
||||
/**
|
||||
* Alias of <b>SimpleXMLElement::asXML</b>
|
||||
|
@ -67,7 +69,8 @@ class SimpleXMLElement implements Traversable, ArrayAccess, Countable, Iterator,
|
|||
* parameter is specified, it returns true if the file was written
|
||||
* successfully and false otherwise.
|
||||
*/
|
||||
public function saveXML(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $filename = null) {}
|
||||
#[TentativeType]
|
||||
public function saveXML(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $filename = null): string|bool {}
|
||||
|
||||
/**
|
||||
* Runs XPath query on XML data
|
||||
|
@ -75,10 +78,11 @@ class SimpleXMLElement implements Traversable, ArrayAccess, Countable, Iterator,
|
|||
* @param string $expression <p>
|
||||
* An XPath path
|
||||
* </p>
|
||||
* @return static[]|false an array of SimpleXMLElement objects or <b>FALSE</b> in
|
||||
* @return static[]|false|null an array of SimpleXMLElement objects or <b>FALSE</b> in
|
||||
* case of an error.
|
||||
*/
|
||||
public function xpath(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $expression) {}
|
||||
#[TentativeType]
|
||||
public function xpath(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $expression): array|false|null {}
|
||||
|
||||
/**
|
||||
* Creates a prefix/ns context for the next XPath query
|
||||
|
@ -94,10 +98,11 @@ class SimpleXMLElement implements Traversable, ArrayAccess, Countable, Iterator,
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function registerXPathNamespace(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $prefix,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $namespace
|
||||
) {}
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* Identifies an element's attributes
|
||||
|
@ -116,10 +121,11 @@ class SimpleXMLElement implements Traversable, ArrayAccess, Countable, Iterator,
|
|||
* object that already represents an attribute and not a tag.
|
||||
* @since 5.0.1
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function attributes(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespaceOrPrefix = null,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $isPrefix = false
|
||||
) {}
|
||||
): ?SimpleXMLElement {}
|
||||
|
||||
/**
|
||||
* Finds children of given node
|
||||
|
@ -133,15 +139,16 @@ class SimpleXMLElement implements Traversable, ArrayAccess, Countable, Iterator,
|
|||
* <i>ns</i> will be regarded as a namespace
|
||||
* URL.
|
||||
* </p>
|
||||
* @return static a <b>SimpleXMLElement</b> element, whether the node
|
||||
* @return static|null a <b>SimpleXMLElement</b> element, whether the node
|
||||
* has children or not.
|
||||
* @since 5.0.1
|
||||
*/
|
||||
#[Pure]
|
||||
#[TentativeType]
|
||||
public function children(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespaceOrPrefix = null,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $isPrefix = false
|
||||
) {}
|
||||
): ?SimpleXMLElement {}
|
||||
|
||||
/**
|
||||
* Returns namespaces used in document
|
||||
|
@ -155,7 +162,8 @@ class SimpleXMLElement implements Traversable, ArrayAccess, Countable, Iterator,
|
|||
* @since 5.1.2
|
||||
*/
|
||||
#[Pure]
|
||||
public function getNamespaces(#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $recursive = false) {}
|
||||
#[TentativeType]
|
||||
public function getNamespaces(#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $recursive = false): array {}
|
||||
|
||||
/**
|
||||
* Returns namespaces declared in document
|
||||
|
@ -173,10 +181,11 @@ class SimpleXMLElement implements Traversable, ArrayAccess, Countable, Iterator,
|
|||
* @since 5.1.2
|
||||
*/
|
||||
#[Pure]
|
||||
#[TentativeType]
|
||||
public function getDocNamespaces(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $recursive = false,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $fromRoot = true
|
||||
) {}
|
||||
): array|false {}
|
||||
|
||||
/**
|
||||
* Gets the name of the XML element
|
||||
|
@ -186,7 +195,8 @@ class SimpleXMLElement implements Traversable, ArrayAccess, Countable, Iterator,
|
|||
* @since 5.1.3
|
||||
*/
|
||||
#[Pure]
|
||||
public function getName() {}
|
||||
#[TentativeType]
|
||||
public function getName(): string {}
|
||||
|
||||
/**
|
||||
* Adds a child element to the XML node
|
||||
|
@ -200,15 +210,16 @@ class SimpleXMLElement implements Traversable, ArrayAccess, Countable, Iterator,
|
|||
* @param string $namespace [optional] <p>
|
||||
* If specified, the namespace to which the child element belongs.
|
||||
* </p>
|
||||
* @return static The addChild method returns a SimpleXMLElement
|
||||
* @return static|null The addChild method returns a SimpleXMLElement
|
||||
* object representing the child added to the XML node.
|
||||
* @since 5.1.3
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function addChild(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $value = null,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace = null
|
||||
) {}
|
||||
): ?SimpleXMLElement {}
|
||||
|
||||
/**
|
||||
* Adds an attribute to the SimpleXML element
|
||||
|
@ -225,11 +236,12 @@ class SimpleXMLElement implements Traversable, ArrayAccess, Countable, Iterator,
|
|||
* @return void No value is returned.
|
||||
* @since 5.1.3
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function addAttribute(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string', '8.1' => 'string|null'], default: '')] $value = null,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace = null
|
||||
) {}
|
||||
): void {}
|
||||
|
||||
/**
|
||||
* (No version information available, might only be in SVN)<br/>
|
||||
|
@ -237,6 +249,7 @@ class SimpleXMLElement implements Traversable, ArrayAccess, Countable, Iterator,
|
|||
* @link https://php.net/manual/en/simplexmlelement.tostring.php
|
||||
* @return string the string content on success or an empty string on failure.
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')]
|
||||
public function __toString() {}
|
||||
|
||||
/**
|
||||
|
@ -245,7 +258,8 @@ class SimpleXMLElement implements Traversable, ArrayAccess, Countable, Iterator,
|
|||
* @return int the number of elements of an element.
|
||||
*/
|
||||
#[Pure]
|
||||
public function count() {}
|
||||
#[TentativeType]
|
||||
public function count(): int {}
|
||||
|
||||
/**
|
||||
* Class provides access to children by position, and attributes by name
|
||||
|
@ -287,7 +301,8 @@ class SimpleXMLElement implements Traversable, ArrayAccess, Countable, Iterator,
|
|||
* @link https://php.net/manual/en/simplexmliterator.rewind.php
|
||||
* @return void No value is returned.
|
||||
*/
|
||||
public function rewind() {}
|
||||
#[TentativeType]
|
||||
public function rewind(): void {}
|
||||
|
||||
/**
|
||||
* Check whether the current element is valid
|
||||
|
@ -295,42 +310,48 @@ class SimpleXMLElement implements Traversable, ArrayAccess, Countable, Iterator,
|
|||
* @return bool <b>TRUE</b> if the current element is valid, otherwise <b>FALSE</b>
|
||||
*/
|
||||
#[Pure]
|
||||
public function valid() {}
|
||||
#[TentativeType]
|
||||
public function valid(): bool {}
|
||||
|
||||
/**
|
||||
* Returns the current element
|
||||
* @link https://php.net/manual/en/simplexmliterator.current.php
|
||||
* @return static|null the current element as a <b>SimpleXMLElement</b> object or <b>NULL</b> on failure.
|
||||
* @return static the current element as a <b>SimpleXMLElement</b> object or <b>NULL</b> on failure.
|
||||
*/
|
||||
#[Pure]
|
||||
public function current() {}
|
||||
#[TentativeType]
|
||||
public function current(): SimpleXMLElement {}
|
||||
|
||||
/**
|
||||
* Return current key
|
||||
* @link https://php.net/manual/en/simplexmliterator.key.php
|
||||
* @return string|false the XML tag name of the element referenced by the current <b>SimpleXMLIterator</b> object or <b>FALSE</b>
|
||||
* @return string the XML tag name of the element referenced by the current <b>SimpleXMLIterator</b> object
|
||||
*/
|
||||
public function key() {}
|
||||
#[TentativeType]
|
||||
public function key(): string {}
|
||||
|
||||
/**
|
||||
* Move to next element
|
||||
* @link https://php.net/manual/en/simplexmliterator.next.php
|
||||
* @return void No value is returned.
|
||||
*/
|
||||
public function next() {}
|
||||
#[TentativeType]
|
||||
public function next(): void {}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
* @since 8.0
|
||||
*/
|
||||
#[Pure]
|
||||
public function hasChildren() {}
|
||||
#[TentativeType]
|
||||
public function hasChildren(): bool {}
|
||||
|
||||
/**
|
||||
* @since 8.0
|
||||
*/
|
||||
#[Pure]
|
||||
public function getChildren() {}
|
||||
#[TentativeType]
|
||||
public function getChildren(): ?SimpleXMLElement {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
use JetBrains\PhpStorm\ArrayShape;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
use JetBrains\PhpStorm\Internal\TentativeType;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
class CURLFile
|
||||
|
@ -35,7 +36,8 @@ class CURLFile
|
|||
* @since 5.5
|
||||
*/
|
||||
#[Pure]
|
||||
public function getFilename() {}
|
||||
#[TentativeType]
|
||||
public function getFilename(): string {}
|
||||
|
||||
/**
|
||||
* Get MIME type
|
||||
|
@ -44,7 +46,8 @@ class CURLFile
|
|||
* @since 5.5
|
||||
*/
|
||||
#[Pure]
|
||||
public function getMimeType() {}
|
||||
#[TentativeType]
|
||||
public function getMimeType(): string {}
|
||||
|
||||
/**
|
||||
* Get file name for POST
|
||||
|
@ -53,7 +56,8 @@ class CURLFile
|
|||
* @since 5.5
|
||||
*/
|
||||
#[Pure]
|
||||
public function getPostFilename() {}
|
||||
#[TentativeType]
|
||||
public function getPostFilename(): string {}
|
||||
|
||||
/**
|
||||
* Set MIME type
|
||||
|
@ -61,7 +65,8 @@ class CURLFile
|
|||
* @param string $mime_type
|
||||
* @since 5.5
|
||||
*/
|
||||
public function setMimeType(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $mime_type) {}
|
||||
#[TentativeType]
|
||||
public function setMimeType(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $mime_type): void {}
|
||||
|
||||
/**
|
||||
* Set file name for POST
|
||||
|
@ -69,7 +74,8 @@ class CURLFile
|
|||
* @param string $posted_filename
|
||||
* @since 5.5
|
||||
*/
|
||||
public function setPostFilename(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $posted_filename) {}
|
||||
#[TentativeType]
|
||||
public function setPostFilename(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $posted_filename): void {}
|
||||
|
||||
/**
|
||||
* @link https://secure.php.net/manual/en/curlfile.wakeup.php
|
||||
|
@ -78,6 +84,7 @@ class CURLFile
|
|||
*/
|
||||
public function __wakeup() {}
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize a cURL session
|
||||
* @link https://php.net/manual/en/function.curl-init.php
|
||||
|
@ -2181,7 +2188,7 @@ function curl_share_init() {}
|
|||
* </tbody>
|
||||
*
|
||||
* </table>
|
||||
* @param string $value <p><table>
|
||||
* @param string $value <p><table>
|
||||
*
|
||||
* <thead>
|
||||
* <tr>
|
||||
|
@ -2253,6 +2260,7 @@ function curl_strerror(int $error_code): ?string {}
|
|||
*/
|
||||
#[Pure]
|
||||
function curl_unescape(#[LanguageLevelTypeAware(['8.0' => 'CurlHandle'], default: 'resource')] $handle, string $string): string|false {}
|
||||
|
||||
/**
|
||||
* Perform a cURL session
|
||||
* @link https://php.net/manual/en/function.curl-exec.php
|
||||
|
@ -2400,7 +2408,7 @@ function curl_multi_select(#[LanguageLevelTypeAware(['8.0' => 'CurlMultiHandle']
|
|||
* @param int $option <p>
|
||||
* One of the <b>CURLMOPT_*</b> constants.
|
||||
* </p>
|
||||
* @param mixed $value <p>
|
||||
* @param mixed $value <p>
|
||||
* The value to be set on <em>option</em>.
|
||||
* </p>
|
||||
* <p>
|
||||
|
|
192
date/date_c.php
192
date/date_c.php
|
@ -3,6 +3,7 @@
|
|||
use JetBrains\PhpStorm\ArrayShape;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
use JetBrains\PhpStorm\Internal\TentativeType;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
/**
|
||||
|
@ -86,10 +87,11 @@ interface DateTimeInterface
|
|||
* The https://secure.php.net/manual/en/class.dateinterval.php DateInterval} object representing the
|
||||
* difference between the two dates.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function diff(
|
||||
DateTimeInterface $targetObject,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $absolute = false
|
||||
);
|
||||
): DateInterval;
|
||||
|
||||
/**
|
||||
* (PHP 5 >=5.5.0)<br/>
|
||||
|
@ -102,8 +104,8 @@ interface DateTimeInterface
|
|||
* Returns the formatted date string on success or <b>FALSE</b> on failure.
|
||||
* Since PHP8, it always returns <b>STRING</b>.
|
||||
*/
|
||||
#[LanguageLevelTypeAware(["8.0" => "string"], default: "string|false")]
|
||||
public function format(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $format);
|
||||
#[TentativeType]
|
||||
public function format(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $format): string;
|
||||
|
||||
/**
|
||||
* (PHP 5 >=5.5.0)<br/>
|
||||
|
@ -113,7 +115,8 @@ interface DateTimeInterface
|
|||
* or <b>FALSE</b> on failure. Since PHP8, it always returns <b>INT</b>.
|
||||
*/
|
||||
#[LanguageLevelTypeAware(["8.0" => "int"], default: "int|false")]
|
||||
public function getOffset();
|
||||
#[TentativeType]
|
||||
public function getOffset(): int;
|
||||
|
||||
/**
|
||||
* (PHP 5 >=5.5.0)<br/>
|
||||
|
@ -121,7 +124,8 @@ interface DateTimeInterface
|
|||
* @return int
|
||||
* Returns the Unix timestamp representing the date.
|
||||
*/
|
||||
public function getTimestamp();
|
||||
#[TentativeType]
|
||||
public function getTimestamp(): int|false;
|
||||
|
||||
/**
|
||||
* (PHP 5 >=5.5.0)<br/>
|
||||
|
@ -131,7 +135,8 @@ interface DateTimeInterface
|
|||
* Returns a {@link https://secure.php.net/manual/en/class.datetimezone.php DateTimeZone} object on success
|
||||
* or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function getTimezone();
|
||||
#[TentativeType]
|
||||
public function getTimezone(): DateTimeZone|false;
|
||||
|
||||
/**
|
||||
* (PHP 5 >=5.5.0)<br/>
|
||||
|
@ -139,7 +144,8 @@ interface DateTimeInterface
|
|||
* @link https://secure.php.net/manual/en/datetime.wakeup.php
|
||||
* @return void Initializes a DateTime object.
|
||||
*/
|
||||
public function __wakeup();
|
||||
#[TentativeType]
|
||||
public function __wakeup(): void;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -187,7 +193,8 @@ class DateTimeImmutable implements DateTimeInterface
|
|||
* @param DateInterval $interval
|
||||
* @return static
|
||||
*/
|
||||
public function add(DateInterval $interval) {}
|
||||
#[TentativeType]
|
||||
public function add(DateInterval $interval): DateTimeImmutable {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >=5.5.0)<br/>
|
||||
|
@ -198,11 +205,12 @@ class DateTimeImmutable implements DateTimeInterface
|
|||
* @param null|DateTimeZone $timezone [optional]
|
||||
* @return DateTimeImmutable|false
|
||||
*/
|
||||
#[TentativeType]
|
||||
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
|
||||
) {}
|
||||
): DateTimeImmutable|false {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >=5.6.0)<br/>
|
||||
|
@ -211,7 +219,8 @@ class DateTimeImmutable implements DateTimeInterface
|
|||
* @param DateTime $object The mutable DateTime object that you want to convert to an immutable version. This object is not modified, but instead a new DateTimeImmutable object is created containing the same date time and timezone information.
|
||||
* @return DateTimeImmutable returns a new DateTimeImmutable instance.
|
||||
*/
|
||||
public static function createFromMutable(DateTime $object) {}
|
||||
#[TentativeType]
|
||||
public static function createFromMutable(DateTime $object): DateTimeImmutable {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >=5.5.0)<br/>
|
||||
|
@ -220,19 +229,21 @@ class DateTimeImmutable implements DateTimeInterface
|
|||
* @return array|false Returns array containing info about warnings and errors.
|
||||
*/
|
||||
#[ArrayShape(["warning_count" => "int", "warnings" => "string[]", "error_count" => "int", "errors" => "string[]"])]
|
||||
public static function getLastErrors() {}
|
||||
#[TentativeType]
|
||||
public static function getLastErrors(): array|false {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >=5.5.0)<br/>
|
||||
* Alters the timestamp
|
||||
* @link https://secure.php.net/manual/en/datetimeimmutable.modify.php
|
||||
* @param string $modifier <p>A date/time string. Valid formats are explained in
|
||||
* @param string $modifier <p>A date/time string. Valid formats are explained in
|
||||
* {@link https://secure.php.net/manual/en/datetime.formats.php Date and Time Formats}.</p>
|
||||
* @return static|false Returns the newly created object or false on failure.
|
||||
* Returns the {@link https://secure.php.net/manual/en/class.datetimeimmutable.php DateTimeImmutable} object for method chaining or <b>FALSE</b> on failure.
|
||||
*/
|
||||
#[Pure]
|
||||
public function modify(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $modifier) {}
|
||||
#[TentativeType]
|
||||
public function modify(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $modifier): DateTimeImmutable|false {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >=5.5.0)<br/>
|
||||
|
@ -254,27 +265,29 @@ class DateTimeImmutable implements DateTimeInterface
|
|||
* @return static|false
|
||||
* Returns the {@link https://secure.php.net/manual/en/class.datetimeimmutable.php DateTimeImmutable} object for method chaining or <b>FALSE</b> on failure.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function setDate(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $year,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $month,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $day
|
||||
) {}
|
||||
): DateTimeImmutable {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >=5.5.0)<br/>
|
||||
* Sets the ISO date
|
||||
* @link https://php.net/manual/en/class.datetimeimmutable.php
|
||||
* @param int $year <p>Year of the date.</p>
|
||||
* @param int $week <p>Week of the date.</p>
|
||||
* @param int $week <p>Week of the date.</p>
|
||||
* @param int $dayOfWeek [optional] <p>Offset from the first day of the week.</p>
|
||||
* @return static|false
|
||||
* Returns the {@link https://secure.php.net/manual/en/class.datetimeimmutable.php DateTimeImmutable} object for method chaining or <b>FALSE</b> on failure.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function setISODate(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $year,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $week,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $dayOfWeek = 1
|
||||
) {}
|
||||
): DateTimeImmutable {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >=5.5.0)<br/>
|
||||
|
@ -287,22 +300,24 @@ class DateTimeImmutable implements DateTimeInterface
|
|||
* @return static|false
|
||||
* Returns the {@link https://secure.php.net/manual/en/class.datetimeimmutable.php DateTimeImmutable} object for method chaining or <b>FALSE</b> on failure.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function setTime(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $hour,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $minute,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $second = 0,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $microsecond = 0
|
||||
) {}
|
||||
): DateTimeImmutable {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >=5.5.0)<br/>
|
||||
* Sets the date and time based on an Unix timestamp
|
||||
* @link https://secure.php.net/manual/en/datetimeimmutable.settimestamp.php
|
||||
* @param int $timestamp <p>Unix timestamp representing the date.</p>
|
||||
* @return static|false
|
||||
* @return static
|
||||
* Returns the {@link https://secure.php.net/manual/en/class.datetimeimmutable.php DateTimeImmutable} object for method chaining or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function setTimestamp(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $timestamp) {}
|
||||
#[TentativeType]
|
||||
public function setTimestamp(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $timestamp): DateTimeImmutable {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >=5.5.0)<br/>
|
||||
|
@ -312,10 +327,11 @@ class DateTimeImmutable implements DateTimeInterface
|
|||
* A {@link https://secure.php.net/manual/en/class.datetimezone.php DateTimeZone} object representing the
|
||||
* desired time zone.
|
||||
* </p>
|
||||
* @return static|false
|
||||
* @return static
|
||||
* Returns the {@link https://secure.php.net/manual/en/class.datetimeimmutable.php DateTimeImmutable} object for method chaining or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function setTimezone(DateTimeZone $timezone) {}
|
||||
#[TentativeType]
|
||||
public function setTimezone(DateTimeZone $timezone): DateTimeImmutable {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >=5.5.0)<br/>
|
||||
|
@ -324,10 +340,11 @@ class DateTimeImmutable implements DateTimeInterface
|
|||
* @param DateInterval $interval <p>
|
||||
* A {@link https://secure.php.net/manual/en/class.dateinterval.php DateInterval} object
|
||||
* </p>
|
||||
* @return static|false
|
||||
* @return static
|
||||
* Returns the {@link https://secure.php.net/manual/en/class.datetimeimmutable.php DateTimeImmutable} object for method chaining or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function sub(DateInterval $interval) {}
|
||||
#[TentativeType]
|
||||
public function sub(DateInterval $interval): DateTimeImmutable {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >=5.5.0)<br/>
|
||||
|
@ -339,10 +356,11 @@ class DateTimeImmutable implements DateTimeInterface
|
|||
* The {@link https://secure.php.net/manual/en/class.dateinterval.php DateInterval} object representing the
|
||||
* difference between the two dates or <b>FALSE</b> on failure.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function diff(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'DateTimeInterface'], default: '')] $targetObject,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $absolute = false
|
||||
) {}
|
||||
): DateInterval {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >=5.5.0)<br/>
|
||||
|
@ -354,7 +372,8 @@ class DateTimeImmutable implements DateTimeInterface
|
|||
* @return string
|
||||
* Returns the formatted date string on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function format(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $format) {}
|
||||
#[TentativeType]
|
||||
public function format(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $format): string {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >=5.5.0)<br/>
|
||||
|
@ -363,7 +382,8 @@ class DateTimeImmutable implements DateTimeInterface
|
|||
* Returns the timezone offset in seconds from UTC on success
|
||||
* or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function getOffset() {}
|
||||
#[TentativeType]
|
||||
public function getOffset(): int {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >=5.5.0)<br/>
|
||||
|
@ -371,7 +391,8 @@ class DateTimeImmutable implements DateTimeInterface
|
|||
* @return int
|
||||
* Returns the Unix timestamp representing the date.
|
||||
*/
|
||||
public function getTimestamp() {}
|
||||
#[TentativeType]
|
||||
public function getTimestamp(): int {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >=5.5.0)<br/>
|
||||
|
@ -381,7 +402,8 @@ class DateTimeImmutable implements DateTimeInterface
|
|||
* Returns a {@link https://secure.php.net/manual/en/class.datetimezone.php DateTimeZone} object on success
|
||||
* or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function getTimezone() {}
|
||||
#[TentativeType]
|
||||
public function getTimezone(): DateTimeZone|false {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >=5.5.0)<br/>
|
||||
|
@ -389,14 +411,15 @@ class DateTimeImmutable implements DateTimeInterface
|
|||
* @link https://secure.php.net/manual/en/datetime.wakeup.php
|
||||
* @return void Initializes a DateTime object.
|
||||
*/
|
||||
public function __wakeup() {}
|
||||
#[TentativeType]
|
||||
public function __wakeup(): void {}
|
||||
|
||||
/**
|
||||
* @param DateTimeInterface $object
|
||||
* @return DateTimeImmutable
|
||||
* @since 8.0
|
||||
*/
|
||||
public static function createFromInterface(DateTimeInterface $object) {}
|
||||
public static function createFromInterface(DateTimeInterface $object): DateTimeImmutable {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -507,7 +530,8 @@ class DateTime implements DateTimeInterface
|
|||
* @return void
|
||||
* @link https://php.net/manual/en/datetime.wakeup.php
|
||||
*/
|
||||
public function __wakeup() {}
|
||||
#[TentativeType]
|
||||
public function __wakeup(): void {}
|
||||
|
||||
/**
|
||||
* Returns date formatted according to given format.
|
||||
|
@ -515,7 +539,8 @@ class DateTime implements DateTimeInterface
|
|||
* @return string
|
||||
* @link https://php.net/manual/en/datetime.format.php
|
||||
*/
|
||||
public function format(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $format) {}
|
||||
#[TentativeType]
|
||||
public function format(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $format): string {}
|
||||
|
||||
/**
|
||||
* Alter the timestamp of a DateTime object by incrementing or decrementing
|
||||
|
@ -524,7 +549,8 @@ class DateTime implements DateTimeInterface
|
|||
* @return static|false Returns the DateTime object for method chaining or FALSE on failure.
|
||||
* @link https://php.net/manual/en/datetime.modify.php
|
||||
*/
|
||||
public function modify(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $modifier) {}
|
||||
#[TentativeType]
|
||||
public function modify(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $modifier): DateTime|false {}
|
||||
|
||||
/**
|
||||
* Adds an amount of days, months, years, hours, minutes and seconds to a DateTime object
|
||||
|
@ -532,14 +558,16 @@ class DateTime implements DateTimeInterface
|
|||
* @return static
|
||||
* @link https://php.net/manual/en/datetime.add.php
|
||||
*/
|
||||
public function add(DateInterval $interval) {}
|
||||
#[TentativeType]
|
||||
public function add(DateInterval $interval): DateTime {}
|
||||
|
||||
/**
|
||||
* @param DateTimeImmutable $object
|
||||
* @since 7.3
|
||||
* @return DateTime
|
||||
* @since 7.3
|
||||
*/
|
||||
public static function createFromImmutable(DateTimeImmutable $object) {}
|
||||
#[TentativeType]
|
||||
public static function createFromImmutable(DateTimeImmutable $object): DateTime {}
|
||||
|
||||
/**
|
||||
* Subtracts an amount of days, months, years, hours, minutes and seconds from a DateTime object
|
||||
|
@ -547,14 +575,16 @@ class DateTime implements DateTimeInterface
|
|||
* @return static
|
||||
* @link https://php.net/manual/en/datetime.sub.php
|
||||
*/
|
||||
public function sub(DateInterval $interval) {}
|
||||
#[TentativeType]
|
||||
public function sub(DateInterval $interval): DateTime {}
|
||||
|
||||
/**
|
||||
* Get the TimeZone associated with the DateTime
|
||||
* @return DateTimeZone|false
|
||||
* @link https://php.net/manual/en/datetime.gettimezone.php
|
||||
*/
|
||||
public function getTimezone() {}
|
||||
#[TentativeType]
|
||||
public function getTimezone(): DateTimeZone|false {}
|
||||
|
||||
/**
|
||||
* Set the TimeZone associated with the DateTime
|
||||
|
@ -562,14 +592,16 @@ class DateTime implements DateTimeInterface
|
|||
* @return static
|
||||
* @link https://php.net/manual/en/datetime.settimezone.php
|
||||
*/
|
||||
public function setTimezone(#[LanguageLevelTypeAware(['8.0' => 'DateTimeZone'], default: '')] $timezone) {}
|
||||
#[TentativeType]
|
||||
public function setTimezone(#[LanguageLevelTypeAware(['8.0' => 'DateTimeZone'], default: '')] $timezone): DateTime {}
|
||||
|
||||
/**
|
||||
* Returns the timezone offset
|
||||
* @return int
|
||||
* @link https://php.net/manual/en/datetime.getoffset.php
|
||||
*/
|
||||
public function getOffset() {}
|
||||
#[TentativeType]
|
||||
public function getOffset(): int {}
|
||||
|
||||
/**
|
||||
* Sets the current time of the DateTime object to a different time.
|
||||
|
@ -580,12 +612,13 @@ class DateTime implements DateTimeInterface
|
|||
* @return static
|
||||
* @link https://php.net/manual/en/datetime.settime.php
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function setTime(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $hour,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $minute,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $second = 0,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $microsecond = 0
|
||||
) {}
|
||||
): DateTime {}
|
||||
|
||||
/**
|
||||
* Sets the current date of the DateTime object to a different date.
|
||||
|
@ -595,11 +628,12 @@ class DateTime implements DateTimeInterface
|
|||
* @return static
|
||||
* @link https://php.net/manual/en/datetime.setdate.php
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function setDate(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $year,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $month,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $day
|
||||
) {}
|
||||
): DateTime {}
|
||||
|
||||
/**
|
||||
* Set a date according to the ISO 8601 standard - using weeks and day offsets rather than specific dates.
|
||||
|
@ -609,11 +643,12 @@ class DateTime implements DateTimeInterface
|
|||
* @return static
|
||||
* @link https://php.net/manual/en/datetime.setisodate.php
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function setISODate(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $year,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $week,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $dayOfWeek = 1
|
||||
) {}
|
||||
): DateTime {}
|
||||
|
||||
/**
|
||||
* Sets the date and time based on a Unix timestamp.
|
||||
|
@ -621,14 +656,16 @@ class DateTime implements DateTimeInterface
|
|||
* @return static
|
||||
* @link https://php.net/manual/en/datetime.settimestamp.php
|
||||
*/
|
||||
public function setTimestamp(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $timestamp) {}
|
||||
#[TentativeType]
|
||||
public function setTimestamp(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $timestamp): DateTime {}
|
||||
|
||||
/**
|
||||
* Gets the Unix timestamp.
|
||||
* @return int
|
||||
* @link https://php.net/manual/en/datetime.gettimestamp.php
|
||||
*/
|
||||
public function getTimestamp() {}
|
||||
#[TentativeType]
|
||||
public function getTimestamp(): int {}
|
||||
|
||||
/**
|
||||
* Returns the difference between two DateTime objects represented as a DateInterval.
|
||||
|
@ -637,10 +674,11 @@ class DateTime implements DateTimeInterface
|
|||
* @return DateInterval The DateInterval object representing the difference between the two dates.
|
||||
* @link https://php.net/manual/en/datetime.diff.php
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function diff(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'DateTimeInterface'], default: '')] $targetObject,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $absolute = false
|
||||
) {}
|
||||
): DateInterval {}
|
||||
|
||||
/**
|
||||
* Parse a string into a new DateTime object according to the specified format
|
||||
|
@ -650,11 +688,12 @@ class DateTime implements DateTimeInterface
|
|||
* @return DateTime|false
|
||||
* @link https://php.net/manual/en/datetime.createfromformat.php
|
||||
*/
|
||||
#[TentativeType]
|
||||
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
|
||||
) {}
|
||||
): DateTime|false {}
|
||||
|
||||
/**
|
||||
* Returns an array of warnings and errors found while parsing a date/time string
|
||||
|
@ -662,7 +701,8 @@ class DateTime implements DateTimeInterface
|
|||
* @link https://php.net/manual/en/datetime.getlasterrors.php
|
||||
*/
|
||||
#[ArrayShape(["warning_count" => "int", "warnings" => "string[]", "error_count" => "int", "errors" => "string[]"])]
|
||||
public static function getLastErrors() {}
|
||||
#[TentativeType]
|
||||
public static function getLastErrors(): array|false {}
|
||||
|
||||
/**
|
||||
* The __set_state handler
|
||||
|
@ -677,7 +717,7 @@ class DateTime implements DateTimeInterface
|
|||
* @return DateTime
|
||||
* @since 8.0
|
||||
*/
|
||||
public static function createFromInterface(DateTimeInterface $object) {}
|
||||
public static function createFromInterface(DateTimeInterface $object): DateTime {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -712,14 +752,16 @@ class DateTimeZone
|
|||
* @return string
|
||||
* @link https://php.net/manual/en/datetimezone.getname.php
|
||||
*/
|
||||
public function getName() {}
|
||||
#[TentativeType]
|
||||
public function getName(): string {}
|
||||
|
||||
/**
|
||||
* Returns location information for a timezone
|
||||
* @return array|false
|
||||
* @link https://php.net/manual/en/datetimezone.getlocation.php
|
||||
*/
|
||||
public function getLocation() {}
|
||||
#[TentativeType]
|
||||
public function getLocation(): array|false {}
|
||||
|
||||
/**
|
||||
* Returns the timezone offset from GMT
|
||||
|
@ -727,7 +769,8 @@ class DateTimeZone
|
|||
* @return int
|
||||
* @link https://php.net/manual/en/datetimezone.getoffset.php
|
||||
*/
|
||||
public function getOffset(DateTimeInterface $datetime) {}
|
||||
#[TentativeType]
|
||||
public function getOffset(DateTimeInterface $datetime): int {}
|
||||
|
||||
/**
|
||||
* Returns all transitions for the timezone
|
||||
|
@ -736,17 +779,19 @@ class DateTimeZone
|
|||
* @return array|false
|
||||
* @link https://php.net/manual/en/datetimezone.gettransitions.php
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function getTransitions(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $timestampBegin = null,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $timestampEnd = null
|
||||
) {}
|
||||
): array|false {}
|
||||
|
||||
/**
|
||||
* Returns associative array containing dst, offset and the timezone name
|
||||
* @return array
|
||||
* @link https://php.net/manual/en/datetimezone.listabbreviations.php
|
||||
*/
|
||||
public static function listAbbreviations() {}
|
||||
#[TentativeType]
|
||||
public static function listAbbreviations(): array {}
|
||||
|
||||
/**
|
||||
* Returns a numerically indexed array with all timezone identifiers
|
||||
|
@ -756,15 +801,17 @@ class DateTimeZone
|
|||
* @link https://php.net/manual/en/datetimezone.listidentifiers.php
|
||||
*/
|
||||
#[LanguageLevelTypeAware(["8.0" => "array"], default: "array|false")]
|
||||
#[TentativeType]
|
||||
public static function listIdentifiers(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $timezoneGroup = DateTimeZone::ALL,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $countryCode = null
|
||||
) {}
|
||||
): array {}
|
||||
|
||||
/**
|
||||
* @link https://php.net/manual/en/datetime.wakeup.php
|
||||
*/
|
||||
public function __wakeup() {}
|
||||
#[TentativeType]
|
||||
public function __wakeup(): void {}
|
||||
|
||||
public static function __set_state($an_array) {}
|
||||
}
|
||||
|
@ -834,8 +881,8 @@ class DateInterval
|
|||
|
||||
/**
|
||||
* @param string $duration
|
||||
* @throws Exception when the $duration cannot be parsed as an interval.
|
||||
* @link https://php.net/manual/en/dateinterval.construct.php
|
||||
* @throws \Exception when the $duration cannot be parsed as an interval.
|
||||
*/
|
||||
public function __construct(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $duration) {}
|
||||
|
||||
|
@ -845,7 +892,8 @@ class DateInterval
|
|||
* @return string
|
||||
* @link https://php.net/manual/en/dateinterval.format.php
|
||||
*/
|
||||
public function format(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $format) {}
|
||||
#[TentativeType]
|
||||
public function format(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $format): string {}
|
||||
|
||||
/**
|
||||
* Sets up a DateInterval from the relative parts of the string
|
||||
|
@ -854,9 +902,11 @@ class DateInterval
|
|||
* instance on success, or <b>FALSE</b> on failure.
|
||||
* @link https://php.net/manual/en/dateinterval.createfromdatestring.php
|
||||
*/
|
||||
public static function createFromDateString(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $datetime) {}
|
||||
#[TentativeType]
|
||||
public static function createFromDateString(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $datetime): DateInterval|false {}
|
||||
|
||||
public function __wakeup() {}
|
||||
#[TentativeType]
|
||||
public function __wakeup(): void {}
|
||||
|
||||
public static function __set_state($an_array) {}
|
||||
}
|
||||
|
@ -936,7 +986,8 @@ class DatePeriod implements IteratorAggregate
|
|||
* @link https://php.net/manual/en/dateperiod.getdateinterval.php
|
||||
* @since 5.6.5
|
||||
*/
|
||||
public function getDateInterval() {}
|
||||
#[TentativeType]
|
||||
public function getDateInterval(): DateInterval {}
|
||||
|
||||
/**
|
||||
* Gets the end date
|
||||
|
@ -944,7 +995,8 @@ class DatePeriod implements IteratorAggregate
|
|||
* @link https://php.net/manual/en/dateperiod.getenddate.php
|
||||
* @since 5.6.5
|
||||
*/
|
||||
public function getEndDate() {}
|
||||
#[TentativeType]
|
||||
public function getEndDate(): ?DateTimeInterface {}
|
||||
|
||||
/**
|
||||
* Gets the start date
|
||||
|
@ -952,11 +1004,14 @@ class DatePeriod implements IteratorAggregate
|
|||
* @link https://php.net/manual/en/dateperiod.getstartdate.php
|
||||
* @since 5.6.5
|
||||
*/
|
||||
public function getStartDate() {}
|
||||
#[TentativeType]
|
||||
public function getStartDate(): DateTimeInterface {}
|
||||
|
||||
public static function __set_state(#[PhpStormStubsElementAvailable(from: '7.3')] array $array) {}
|
||||
#[TentativeType]
|
||||
public static function __set_state(#[PhpStormStubsElementAvailable(from: '7.3')] array $array): DatePeriod {}
|
||||
|
||||
public function __wakeup() {}
|
||||
#[TentativeType]
|
||||
public function __wakeup(): void {}
|
||||
|
||||
/**
|
||||
* Get the number of recurrences
|
||||
|
@ -964,11 +1019,12 @@ class DatePeriod implements IteratorAggregate
|
|||
* @link https://php.net/manual/en/dateperiod.getrecurrences.php
|
||||
* @since 7.2.17
|
||||
*/
|
||||
public function getRecurrences() {}
|
||||
#[TentativeType]
|
||||
public function getRecurrences(): ?int {}
|
||||
|
||||
/**
|
||||
* @return DateTimeInterface[]
|
||||
* @return Iterator
|
||||
* @since 8.0
|
||||
*/
|
||||
public function getIterator() {}
|
||||
public function getIterator(): Iterator {}
|
||||
}
|
||||
|
|
296
dom/dom_c.php
296
dom/dom_c.php
|
@ -4,6 +4,7 @@
|
|||
use JetBrains\PhpStorm\Deprecated;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
use JetBrains\PhpStorm\Internal\TentativeType;
|
||||
|
||||
/**
|
||||
* The DOMNode class
|
||||
|
@ -197,7 +198,8 @@ class DOMNode
|
|||
* @link https://php.net/manual/en/domnode.haschildnodes.php
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
public function hasChildNodes() {}
|
||||
#[TentativeType]
|
||||
public function hasChildNodes(): bool {}
|
||||
|
||||
/**
|
||||
* Clones a node
|
||||
|
@ -215,7 +217,8 @@ class DOMNode
|
|||
* @link https://php.net/manual/en/domnode.normalize.php
|
||||
* @return void
|
||||
*/
|
||||
public function normalize() {}
|
||||
#[TentativeType]
|
||||
public function normalize(): void {}
|
||||
|
||||
/**
|
||||
* Checks if feature is supported for specified version
|
||||
|
@ -230,17 +233,19 @@ class DOMNode
|
|||
* </p>
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function isSupported(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $feature,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $version
|
||||
) {}
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* Checks if node has attributes
|
||||
* @link https://php.net/manual/en/domnode.hasattributes.php
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
public function hasAttributes() {}
|
||||
#[TentativeType]
|
||||
public function hasAttributes(): bool {}
|
||||
|
||||
/**
|
||||
* @param DOMNode $other
|
||||
|
@ -255,7 +260,8 @@ class DOMNode
|
|||
* </p>
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
public function isSameNode(DOMNode $otherNode) {}
|
||||
#[TentativeType]
|
||||
public function isSameNode(DOMNode $otherNode): bool {}
|
||||
|
||||
/**
|
||||
* Gets the namespace prefix of the node based on the namespace URI
|
||||
|
@ -265,7 +271,8 @@ class DOMNode
|
|||
* </p>
|
||||
* @return string The prefix of the namespace.
|
||||
*/
|
||||
public function lookupPrefix(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $namespace) {}
|
||||
#[TentativeType]
|
||||
public function lookupPrefix(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $namespace): ?string {}
|
||||
|
||||
/**
|
||||
* Checks if the specified namespaceURI is the default namespace or not
|
||||
|
@ -276,7 +283,8 @@ class DOMNode
|
|||
* @return bool Return true if namespaceURI is the default
|
||||
* namespace, false otherwise.
|
||||
*/
|
||||
public function isDefaultNamespace(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $namespace) {}
|
||||
#[TentativeType]
|
||||
public function isDefaultNamespace(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $namespace): bool {}
|
||||
|
||||
/**
|
||||
* Gets the namespace URI of the node based on the prefix
|
||||
|
@ -287,7 +295,8 @@ class DOMNode
|
|||
* @return string The namespace URI of the node.
|
||||
*/
|
||||
#[PhpStormStubsElementAvailable(from: '8.0')]
|
||||
public function lookupNamespaceURI(?string $prefix) {}
|
||||
#[TentativeType]
|
||||
public function lookupNamespaceURI(?string $prefix): ?string {}
|
||||
|
||||
/**
|
||||
* Gets the namespace URI of the node based on the prefix
|
||||
|
@ -299,6 +308,7 @@ class DOMNode
|
|||
*/
|
||||
#[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')]
|
||||
public function lookupNamespaceUri($prefix) {}
|
||||
|
||||
/**
|
||||
* @param DOMNode $arg
|
||||
* @return bool
|
||||
|
@ -330,14 +340,16 @@ class DOMNode
|
|||
* @return string|null the XPath, or NULL in case of an error.
|
||||
* @link https://secure.php.net/manual/en/domnode.getnodepath.php
|
||||
*/
|
||||
public function getNodePath() {}
|
||||
#[TentativeType]
|
||||
public function getNodePath(): ?string {}
|
||||
|
||||
/**
|
||||
* Get line number for a node
|
||||
* @link https://php.net/manual/en/domnode.getlineno.php
|
||||
* @return int Always returns the line number where the node was defined in.
|
||||
*/
|
||||
public function getLineNo() {}
|
||||
/**
|
||||
* Get line number for a node
|
||||
* @link https://php.net/manual/en/domnode.getlineno.php
|
||||
* @return int Always returns the line number where the node was defined in.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function getLineNo(): int {}
|
||||
|
||||
/**
|
||||
* Canonicalize nodes to a string
|
||||
|
@ -347,12 +359,13 @@ class DOMNode
|
|||
* @param null|array $nsPrefixes [optional] An array of namespace prefixes to filter the nodes by.
|
||||
* @return string|false Canonicalized nodes as a string or FALSE on failure
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function C14N(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $exclusive = false,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $withComments = false,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'array|null'], default: 'array')] $xpath = null,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'array|null'], default: 'array')] $nsPrefixes = null
|
||||
) {}
|
||||
): string|false {}
|
||||
|
||||
/**
|
||||
* Canonicalize nodes to a file.
|
||||
|
@ -364,13 +377,14 @@ class DOMNode
|
|||
* @param null|array $nsPrefixes [optional] An array of namespace prefixes to filter the nodes by.
|
||||
* @return int|false Number of bytes written or FALSE on failure
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function C14NFile(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $uri,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $exclusive = false,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $withComments = false,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'array|null'], default: 'array')] $xpath = null,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'array|null'], default: 'array')] $nsPrefixes = null
|
||||
) {}
|
||||
): int|false {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -389,11 +403,11 @@ class DOMException extends Exception
|
|||
|
||||
class DOMStringList
|
||||
{
|
||||
/**
|
||||
* @param $index
|
||||
* @return mixed
|
||||
*/
|
||||
public function item($index) {}
|
||||
/**
|
||||
* @param $index
|
||||
* @return mixed
|
||||
*/
|
||||
public function item($index) {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -402,17 +416,17 @@ class DOMStringList
|
|||
*/
|
||||
class DOMNameList
|
||||
{
|
||||
/**
|
||||
* @param $index
|
||||
* @return mixed
|
||||
*/
|
||||
public function getName($index) {}
|
||||
/**
|
||||
* @param $index
|
||||
* @return mixed
|
||||
*/
|
||||
public function getName($index) {}
|
||||
|
||||
/**
|
||||
* @param $index
|
||||
* @return mixed
|
||||
*/
|
||||
public function getNamespaceURI($index) {}
|
||||
/**
|
||||
* @param $index
|
||||
* @return mixed
|
||||
*/
|
||||
public function getNamespaceURI($index) {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -420,11 +434,11 @@ class DOMNameList
|
|||
*/
|
||||
class DOMImplementationList
|
||||
{
|
||||
/**
|
||||
* @param $index
|
||||
* @return mixed
|
||||
*/
|
||||
public function item($index) {}
|
||||
/**
|
||||
* @param $index
|
||||
* @return mixed
|
||||
*/
|
||||
public function item($index) {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -432,17 +446,17 @@ class DOMImplementationList
|
|||
*/
|
||||
class DOMImplementationSource
|
||||
{
|
||||
/**
|
||||
* @param $features
|
||||
* @return mixed
|
||||
*/
|
||||
public function getDomimplementation($features) {}
|
||||
/**
|
||||
* @param $features
|
||||
* @return mixed
|
||||
*/
|
||||
public function getDomimplementation($features) {}
|
||||
|
||||
/**
|
||||
* @param $features
|
||||
* @return mixed
|
||||
*/
|
||||
public function getDomimplementations($features) {}
|
||||
/**
|
||||
* @param $features
|
||||
* @return mixed
|
||||
*/
|
||||
public function getDomimplementations($features) {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -458,10 +472,11 @@ class DOMImplementation
|
|||
* @param string $version
|
||||
* @return mixed
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function getFeature(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $feature,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $version
|
||||
) {}
|
||||
): never {}
|
||||
|
||||
/**
|
||||
* Test if the DOM implementation implements a specific feature
|
||||
|
@ -571,17 +586,18 @@ class DOMDocumentFragment extends DOMNode implements DOMParentNode
|
|||
* </p>
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
public function appendXML(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data) {}
|
||||
#[TentativeType]
|
||||
public function appendXML(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data): bool {}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function append(...$nodes) {}
|
||||
public function append(...$nodes): void {}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function prepend(...$nodes) {}
|
||||
public function prepend(...$nodes): void {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -786,7 +802,8 @@ class DOMDocument extends DOMNode implements DOMParentNode
|
|||
* @link https://php.net/manual/en/domdocument.createdocumentfragment.php
|
||||
* @return DOMDocumentFragment|false The new DOMDocumentFragment or false if an error occurred.
|
||||
*/
|
||||
public function createDocumentFragment() {}
|
||||
#[TentativeType]
|
||||
public function createDocumentFragment(): DOMDocumentFragment {}
|
||||
|
||||
/**
|
||||
* Create new text node
|
||||
|
@ -796,7 +813,8 @@ class DOMDocument extends DOMNode implements DOMParentNode
|
|||
* </p>
|
||||
* @return DOMText|false The new DOMText or false if an error occurred.
|
||||
*/
|
||||
public function createTextNode(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data) {}
|
||||
#[TentativeType]
|
||||
public function createTextNode(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data): DOMText {}
|
||||
|
||||
/**
|
||||
* Create new comment node
|
||||
|
@ -806,7 +824,8 @@ class DOMDocument extends DOMNode implements DOMParentNode
|
|||
* </p>
|
||||
* @return DOMComment|false The new DOMComment or false if an error occurred.
|
||||
*/
|
||||
public function createComment(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data) {}
|
||||
#[TentativeType]
|
||||
public function createComment(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data): DOMComment {}
|
||||
|
||||
/**
|
||||
* Create new cdata node
|
||||
|
@ -868,7 +887,8 @@ class DOMDocument extends DOMNode implements DOMParentNode
|
|||
* @return DOMNodeList A new DOMNodeList object containing all the matched
|
||||
* elements.
|
||||
*/
|
||||
public function getElementsByTagName(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName) {}
|
||||
#[TentativeType]
|
||||
public function getElementsByTagName(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName): DOMNodeList {}
|
||||
|
||||
/**
|
||||
* Import node into current document
|
||||
|
@ -940,10 +960,11 @@ class DOMDocument extends DOMNode implements DOMParentNode
|
|||
* @return DOMNodeList A new DOMNodeList object containing all the matched
|
||||
* elements.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function getElementsByTagNameNS(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $localName
|
||||
) {}
|
||||
): DOMNodeList {}
|
||||
|
||||
/**
|
||||
* Searches for an element with a certain id
|
||||
|
@ -954,7 +975,8 @@ class DOMDocument extends DOMNode implements DOMParentNode
|
|||
* @return DOMElement|null The DOMElement or null if the element is
|
||||
* not found.
|
||||
*/
|
||||
public function getElementById(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $elementId) {}
|
||||
#[TentativeType]
|
||||
public function getElementById(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $elementId): ?DOMElement {}
|
||||
|
||||
/**
|
||||
* @param DOMNode $node
|
||||
|
@ -964,19 +986,20 @@ class DOMDocument extends DOMNode implements DOMParentNode
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function append(...$nodes) {}
|
||||
public function append(...$nodes): void {}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function prepend(...$nodes) {}
|
||||
public function prepend(...$nodes): void {}
|
||||
|
||||
/**
|
||||
* Normalizes the document
|
||||
* @link https://php.net/manual/en/domdocument.normalizedocument.php
|
||||
* @return void
|
||||
*/
|
||||
public function normalizeDocument() {}
|
||||
#[TentativeType]
|
||||
public function normalizeDocument(): void {}
|
||||
|
||||
/**
|
||||
* @param DOMNode $node
|
||||
|
@ -1048,7 +1071,8 @@ class DOMDocument extends DOMNode implements DOMParentNode
|
|||
* </p>
|
||||
* @return string|false the XML, or false if an error occurred.
|
||||
*/
|
||||
public function saveXML(?DOMNode $node = null, #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = null) {}
|
||||
#[TentativeType]
|
||||
public function saveXML(?DOMNode $node = null, #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = null): string|false {}
|
||||
|
||||
/**
|
||||
* Creates a new DOMDocument object
|
||||
|
@ -1067,7 +1091,8 @@ class DOMDocument extends DOMNode implements DOMParentNode
|
|||
* @return bool true on success or false on failure.
|
||||
* If the document have no DTD attached, this method will return false.
|
||||
*/
|
||||
public function validate() {}
|
||||
#[TentativeType]
|
||||
public function validate(): bool {}
|
||||
|
||||
/**
|
||||
* Substitutes XIncludes in a DOMDocument Object
|
||||
|
@ -1076,9 +1101,10 @@ class DOMDocument extends DOMNode implements DOMParentNode
|
|||
* libxml parameters. Available
|
||||
* since PHP 5.1.0 and Libxml 2.6.7.
|
||||
* </p>
|
||||
* @return int the number of XIncludes in the document.
|
||||
* @return int|false the number of XIncludes in the document.
|
||||
*/
|
||||
public function xinclude(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = null) {}
|
||||
#[TentativeType]
|
||||
public function xinclude(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = null): int|false {}
|
||||
|
||||
/**
|
||||
* Load HTML from a string
|
||||
|
@ -1134,7 +1160,8 @@ class DOMDocument extends DOMNode implements DOMParentNode
|
|||
* </p>
|
||||
* @return int|false the number of bytes written or false if an error occurred.
|
||||
*/
|
||||
public function saveHTMLFile(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename) {}
|
||||
#[TentativeType]
|
||||
public function saveHTMLFile(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename): int|false {}
|
||||
|
||||
/**
|
||||
* Validates a document based on a schema
|
||||
|
@ -1170,7 +1197,8 @@ class DOMDocument extends DOMNode implements DOMParentNode
|
|||
* </p>
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
public function relaxNGValidate(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename) {}
|
||||
#[TentativeType]
|
||||
public function relaxNGValidate(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename): bool {}
|
||||
|
||||
/**
|
||||
* Performs relaxNG validation on the document
|
||||
|
@ -1180,7 +1208,8 @@ class DOMDocument extends DOMNode implements DOMParentNode
|
|||
* </p>
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
public function relaxNGValidateSource(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $source) {}
|
||||
#[TentativeType]
|
||||
public function relaxNGValidateSource(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $source): bool {}
|
||||
|
||||
/**
|
||||
* Register extended class used to create base node type
|
||||
|
@ -1196,10 +1225,11 @@ class DOMDocument extends DOMNode implements DOMParentNode
|
|||
* </p>
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function registerNodeClass(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $baseClass,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $extendedClass
|
||||
) {}
|
||||
): bool {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1232,13 +1262,14 @@ class DOMNodeList implements IteratorAggregate, Countable
|
|||
/**
|
||||
* @since 7.2
|
||||
*/
|
||||
public function count() {}
|
||||
#[TentativeType]
|
||||
public function count(): int {}
|
||||
|
||||
/**
|
||||
* @return Iterator
|
||||
* @since 8.0
|
||||
* @return Traversable
|
||||
*/
|
||||
public function getIterator() {}
|
||||
public function getIterator(): Iterator {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1257,7 +1288,8 @@ class DOMNamedNodeMap implements IteratorAggregate, Countable
|
|||
* @return DOMNode|null A node (of any type) with the specified nodeName, or
|
||||
* null if no node is found.
|
||||
*/
|
||||
public function getNamedItem(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName) {}
|
||||
#[TentativeType]
|
||||
public function getNamedItem(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName): ?DOMNode {}
|
||||
|
||||
/**
|
||||
* @param DOMNode $arg
|
||||
|
@ -1279,7 +1311,8 @@ class DOMNamedNodeMap implements IteratorAggregate, Countable
|
|||
* if that is not a valid index (greater than or equal to the number of nodes
|
||||
* in this map).
|
||||
*/
|
||||
public function item(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $index) {}
|
||||
#[TentativeType]
|
||||
public function item(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $index): ?DOMNode {}
|
||||
|
||||
/**
|
||||
* Retrieves a node specified by local name and namespace URI
|
||||
|
@ -1293,10 +1326,11 @@ class DOMNamedNodeMap implements IteratorAggregate, Countable
|
|||
* @return DOMNode|null A node (of any type) with the specified local name and namespace URI, or
|
||||
* null if no node is found.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function getNamedItemNS(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $localName
|
||||
) {}
|
||||
): ?DOMNode {}
|
||||
|
||||
/**
|
||||
* @param DOMNode $arg [optional]
|
||||
|
@ -1310,16 +1344,17 @@ class DOMNamedNodeMap implements IteratorAggregate, Countable
|
|||
public function removeNamedItemNS($namespace, $localName) {}
|
||||
|
||||
/**
|
||||
* @since 7.2
|
||||
* @return int
|
||||
* @since 7.2
|
||||
*/
|
||||
public function count() {}
|
||||
#[TentativeType]
|
||||
public function count(): int {}
|
||||
|
||||
/**
|
||||
* @since 8.0
|
||||
* @return Traversable
|
||||
* @since 8.0
|
||||
*/
|
||||
public function getIterator() {}
|
||||
public function getIterator(): Iterator {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1377,7 +1412,8 @@ class DOMCharacterData extends DOMNode implements DOMChildNode
|
|||
* </p>
|
||||
* @return void
|
||||
*/
|
||||
public function appendData(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data) {}
|
||||
#[TentativeType]
|
||||
public function appendData(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data): bool {}
|
||||
|
||||
/**
|
||||
* Insert a string at the specified 16-bit unit offset
|
||||
|
@ -1388,12 +1424,13 @@ class DOMCharacterData extends DOMNode implements DOMChildNode
|
|||
* @param string $data <p>
|
||||
* The string to insert.
|
||||
* </p>
|
||||
* @return void
|
||||
* @return bool
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function insertData(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $offset,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data
|
||||
) {}
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* Remove a range of characters from the node
|
||||
|
@ -1408,10 +1445,11 @@ class DOMCharacterData extends DOMNode implements DOMChildNode
|
|||
* </p>
|
||||
* @return void
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function deleteData(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $offset,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $count
|
||||
) {}
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* Replace a substring within the DOMCharacterData node
|
||||
|
@ -1427,33 +1465,34 @@ class DOMCharacterData extends DOMNode implements DOMChildNode
|
|||
* @param string $data <p>
|
||||
* The string with which the range must be replaced.
|
||||
* </p>
|
||||
* @return void
|
||||
* @return bool
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function replaceData(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $offset,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $count,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data
|
||||
) {}
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function remove() {}
|
||||
public function remove(): void {}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function before(...$nodes) {}
|
||||
public function before(...$nodes): void {}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function after(...$nodes) {}
|
||||
public function after(...$nodes): void {}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function replaceWith(...$nodes) {}
|
||||
public function replaceWith(...$nodes): void {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1512,7 +1551,8 @@ class DOMAttr extends DOMNode
|
|||
* @link https://php.net/manual/en/domattr.isid.php
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
public function isId() {}
|
||||
#[TentativeType]
|
||||
public function isId(): bool {}
|
||||
|
||||
/**
|
||||
* Creates a new {@see DOMAttr} object
|
||||
|
@ -1523,8 +1563,7 @@ class DOMAttr extends DOMNode
|
|||
*/
|
||||
public function __construct(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $value
|
||||
= ''
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $value = ''
|
||||
) {}
|
||||
}
|
||||
|
||||
|
@ -1609,7 +1648,8 @@ class DOMElement extends DOMNode implements DOMParentNode, DOMChildNode
|
|||
* @return string The value of the attribute, or an empty string if no attribute with the
|
||||
* given name is found.
|
||||
*/
|
||||
public function getAttribute(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName) {}
|
||||
#[TentativeType]
|
||||
public function getAttribute(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName): string {}
|
||||
|
||||
/**
|
||||
* Adds new attribute
|
||||
|
@ -1635,7 +1675,8 @@ class DOMElement extends DOMNode implements DOMParentNode, DOMChildNode
|
|||
* </p>
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
public function removeAttribute(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName) {}
|
||||
#[TentativeType]
|
||||
public function removeAttribute(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName): bool {}
|
||||
|
||||
/**
|
||||
* Returns attribute node
|
||||
|
@ -1677,7 +1718,8 @@ class DOMElement extends DOMNode implements DOMParentNode, DOMChildNode
|
|||
* @return DOMNodeList This function returns a new instance of the class
|
||||
* DOMNodeList of all matched elements.
|
||||
*/
|
||||
public function getElementsByTagName(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName) {}
|
||||
#[TentativeType]
|
||||
public function getElementsByTagName(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName): DOMNodeList {}
|
||||
|
||||
/**
|
||||
* Returns value of attribute
|
||||
|
@ -1692,10 +1734,11 @@ class DOMElement extends DOMNode implements DOMParentNode, DOMChildNode
|
|||
* given localName and namespaceURI
|
||||
* is found.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function getAttributeNS(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $localName
|
||||
) {}
|
||||
): string {}
|
||||
|
||||
/**
|
||||
* Adds new attribute
|
||||
|
@ -1711,11 +1754,12 @@ class DOMElement extends DOMNode implements DOMParentNode, DOMChildNode
|
|||
* </p>
|
||||
* @return void
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function setAttributeNS(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $value
|
||||
) {}
|
||||
): void {}
|
||||
|
||||
/**
|
||||
* Removes attribute
|
||||
|
@ -1728,10 +1772,11 @@ class DOMElement extends DOMNode implements DOMParentNode, DOMChildNode
|
|||
* </p>
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function removeAttributeNS(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $localName
|
||||
) {}
|
||||
): void {}
|
||||
|
||||
/**
|
||||
* Returns attribute node
|
||||
|
@ -1771,10 +1816,11 @@ class DOMElement extends DOMNode implements DOMParentNode, DOMChildNode
|
|||
* DOMNodeList of all matched elements in the order in
|
||||
* which they are encountered in a preorder traversal of this element tree.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function getElementsByTagNameNS(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $localName
|
||||
) {}
|
||||
): DOMNodeList {}
|
||||
|
||||
/**
|
||||
* Checks to see if attribute exists
|
||||
|
@ -1784,7 +1830,8 @@ class DOMElement extends DOMNode implements DOMParentNode, DOMChildNode
|
|||
* </p>
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
public function hasAttribute(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName) {}
|
||||
#[TentativeType]
|
||||
public function hasAttribute(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName): bool {}
|
||||
|
||||
/**
|
||||
* Checks to see if attribute exists
|
||||
|
@ -1797,10 +1844,11 @@ class DOMElement extends DOMNode implements DOMParentNode, DOMChildNode
|
|||
* </p>
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function hasAttributeNS(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $localName
|
||||
) {}
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* Declares the attribute specified by name to be of type ID
|
||||
|
@ -1814,10 +1862,11 @@ class DOMElement extends DOMNode implements DOMParentNode, DOMChildNode
|
|||
* </p>
|
||||
* @return void
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function setIdAttribute(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $isId
|
||||
) {}
|
||||
): void {}
|
||||
|
||||
/**
|
||||
* Declares the attribute specified by local name and namespace URI to be of type ID
|
||||
|
@ -1834,11 +1883,12 @@ class DOMElement extends DOMNode implements DOMParentNode, DOMChildNode
|
|||
* </p>
|
||||
* @return void
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function setIdAttributeNS(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $namespace,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $isId
|
||||
) {}
|
||||
): void {}
|
||||
|
||||
/**
|
||||
* Declares the attribute specified by node to be of type ID
|
||||
|
@ -1852,37 +1902,38 @@ class DOMElement extends DOMNode implements DOMParentNode, DOMChildNode
|
|||
* </p>
|
||||
* @return void
|
||||
*/
|
||||
public function setIdAttributeNode(DOMAttr $attr, #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $isId) {}
|
||||
#[TentativeType]
|
||||
public function setIdAttributeNode(DOMAttr $attr, #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $isId): void {}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function remove() {}
|
||||
public function remove(): void {}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function before(...$nodes) {}
|
||||
public function before(...$nodes): void {}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function after(...$nodes) {}
|
||||
public function after(...$nodes): void {}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function replaceWith(...$nodes) {}
|
||||
public function replaceWith(...$nodes): void {}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function append(...$nodes) {}
|
||||
public function append(...$nodes): void {}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function prepend(...$nodes) {}
|
||||
public function prepend(...$nodes): void {}
|
||||
|
||||
/**
|
||||
* Creates a new DOMElement object
|
||||
|
@ -1929,9 +1980,11 @@ class DOMText extends DOMCharacterData
|
|||
* @link https://php.net/manual/en/domtext.iswhitespaceinelementcontent.php
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
public function isWhitespaceInElementContent() {}
|
||||
#[TentativeType]
|
||||
public function isWhitespaceInElementContent(): bool {}
|
||||
|
||||
public function isElementContentWhitespace() {}
|
||||
#[TentativeType]
|
||||
public function isElementContentWhitespace(): bool {}
|
||||
|
||||
/**
|
||||
* @param $content
|
||||
|
@ -2262,10 +2315,11 @@ class DOMXPath
|
|||
* </p>
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function registerNamespace(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $prefix,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $namespace
|
||||
) {}
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* Evaluates the given XPath expression
|
||||
|
@ -2285,11 +2339,12 @@ class DOMXPath
|
|||
* will return an empty DOMNodeList. The return is false if the expression
|
||||
* is malformed or the contextnode is invalid.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function query(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $expression,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'DOMNode|null'], default: '')] $contextNode = null,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $registerNodeNS = true
|
||||
) {}
|
||||
): mixed {}
|
||||
|
||||
/**
|
||||
* Evaluates the given XPath expression and returns a typed result if possible.
|
||||
|
@ -2309,11 +2364,12 @@ class DOMXPath
|
|||
* @return mixed a typed result if possible or a DOMNodeList
|
||||
* containing all nodes matching the given XPath expression.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function evaluate(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $expression,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'DOMNode|null'], default: '')] $contextNode = null,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $registerNodeNS = true
|
||||
) {}
|
||||
): mixed {}
|
||||
|
||||
/**
|
||||
* Register PHP functions as XPath functions
|
||||
|
@ -2347,7 +2403,7 @@ interface DOMParentNode
|
|||
* @return void
|
||||
* @since 8.0
|
||||
*/
|
||||
public function append(...$nodes);
|
||||
public function append(...$nodes): void;
|
||||
|
||||
/**
|
||||
* Prepends one or many nodes to the list of children before the first
|
||||
|
@ -2357,7 +2413,7 @@ interface DOMParentNode
|
|||
* @return void
|
||||
* @since 8.0
|
||||
*/
|
||||
public function prepend(...$nodes);
|
||||
public function prepend(...$nodes): void;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2374,7 +2430,7 @@ interface DOMChildNode
|
|||
* @return void
|
||||
* @since 8.0
|
||||
*/
|
||||
public function remove();
|
||||
public function remove(): void;
|
||||
|
||||
/**
|
||||
* Add passed node(s) before the current node
|
||||
|
@ -2383,7 +2439,7 @@ interface DOMChildNode
|
|||
* @return void
|
||||
* @since 8.0
|
||||
*/
|
||||
public function before(...$nodes);
|
||||
public function before(...$nodes): void;
|
||||
|
||||
/**
|
||||
* Add passed node(s) after the current node
|
||||
|
@ -2392,7 +2448,7 @@ interface DOMChildNode
|
|||
* @return void
|
||||
* @since 8.0
|
||||
*/
|
||||
public function after(...$nodes);
|
||||
public function after(...$nodes): void;
|
||||
|
||||
/**
|
||||
* Replace current node with new node(s), a combination
|
||||
|
@ -2402,5 +2458,5 @@ interface DOMChildNode
|
|||
* @return void
|
||||
* @since 8.0
|
||||
*/
|
||||
public function replaceWith(...$nodes);
|
||||
public function replaceWith(...$nodes): void;
|
||||
}
|
||||
|
|
|
@ -2,8 +2,9 @@
|
|||
|
||||
// Start of fileinfo v.1.0.5
|
||||
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
use JetBrains\PhpStorm\Internal\TentativeType;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
class finfo
|
||||
|
@ -54,11 +55,12 @@ class finfo
|
|||
* <i>filename</i> argument, or <b>FALSE</b> if an error occurred.
|
||||
*/
|
||||
#[Pure]
|
||||
#[TentativeType]
|
||||
public function file(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename = null,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = FILEINFO_NONE,
|
||||
$context = null
|
||||
) {}
|
||||
): string|false {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.3.0, PECL fileinfo >= 0.1.0)<br/>
|
||||
|
@ -76,11 +78,12 @@ class finfo
|
|||
* argument, or <b>FALSE</b> if an error occurred.
|
||||
*/
|
||||
#[Pure]
|
||||
#[TentativeType]
|
||||
public function buffer(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $string = null,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = FILEINFO_NONE,
|
||||
$context = null
|
||||
) {}
|
||||
): string|false {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -447,15 +447,18 @@ define('MHASH_XXH3', 40);
|
|||
*/
|
||||
define('MHASH_XXH128', 41);
|
||||
|
||||
/**
|
||||
* @since 7.2
|
||||
*/
|
||||
class HashContext
|
||||
{
|
||||
private function __construct() {}
|
||||
|
||||
public function __serialize() {}
|
||||
public function __serialize(): array {}
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
*/
|
||||
public function __unserialize(#[LanguageLevelTypeAware(['8.0' => 'array'], default: '')] $data) {}
|
||||
public function __unserialize(#[LanguageLevelTypeAware(['8.0' => 'array'], default: '')] $data): void {}
|
||||
}
|
||||
// End of hash v.1.0
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\TentativeType;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
/**
|
||||
|
@ -685,10 +686,11 @@ class IntlChar
|
|||
* @since 7.0
|
||||
*/
|
||||
#[Pure]
|
||||
#[TentativeType]
|
||||
public static function hasBinaryProperty(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $property
|
||||
) {}
|
||||
): ?bool {}
|
||||
|
||||
/**
|
||||
* @link https://php.net/manual/en/intlchar.charage.php
|
||||
|
@ -698,7 +700,8 @@ class IntlChar
|
|||
* Or NULL if <em>codepoint</em> is out of bounds.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function charAge(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function charAge(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?array {}
|
||||
|
||||
/**
|
||||
* @link https://php.net/manual/en/intlchar.chardigitvalue.php
|
||||
|
@ -708,7 +711,8 @@ class IntlChar
|
|||
* Or NULL if <em>codepoint</em> is out of bounds.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function charDigitValue(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function charDigitValue(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?int {}
|
||||
|
||||
/**
|
||||
* Get bidirectional category value for a code point
|
||||
|
@ -745,7 +749,8 @@ class IntlChar
|
|||
* Or NULL if <em>codepoint</em> is out of bounds.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function charDirection(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function charDirection(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?int {}
|
||||
|
||||
/**
|
||||
* @link https://php.net/manual/en/intlchar.charfromname.php
|
||||
|
@ -763,10 +768,11 @@ class IntlChar
|
|||
* @return int|null The Unicode value of the code point with the given name (as an integer), or NULL if there is no such code point.
|
||||
* @since 7.0
|
||||
*/
|
||||
#[TentativeType]
|
||||
public static function charFromName(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type = IntlChar::UNICODE_CHAR_NAME
|
||||
) {}
|
||||
): ?int {}
|
||||
|
||||
/**
|
||||
* @link https://php.net/manual/en/intlchar.charmirror.php
|
||||
|
@ -776,7 +782,8 @@ class IntlChar
|
|||
* The return type will be integer unless the code point was passed as a UTF-8 string, in which case a string will be returned.
|
||||
* Or NULL if <em>codepoint</em> will be out of bound.
|
||||
*/
|
||||
public static function charMirror(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function charMirror(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): string|int|null {}
|
||||
|
||||
/**
|
||||
* Retrieve the name of a Unicode character
|
||||
|
@ -793,10 +800,11 @@ class IntlChar
|
|||
* @return string|null The corresponding name, or an empty string if there is no name for this character, or NULL if <em>codepoint</em> is out of bounds.
|
||||
* @since 7.0
|
||||
*/
|
||||
#[TentativeType]
|
||||
public static function charName(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type = IntlChar::UNICODE_CHAR_NAME
|
||||
) {}
|
||||
): ?string {}
|
||||
|
||||
/**
|
||||
* Get the general category value for a code point
|
||||
|
@ -839,7 +847,8 @@ class IntlChar
|
|||
* <p>Or NULL if <em>codepoint</em> is out of bound.</p
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function charType(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function charType(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?int {}
|
||||
|
||||
/**
|
||||
* Return Unicode character by code point value
|
||||
|
@ -849,7 +858,8 @@ class IntlChar
|
|||
* Or NULL if <em>codepoint</em> is out of bound.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function chr(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function chr(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?string {}
|
||||
|
||||
/**
|
||||
* Get the decimal digit value of a code point for a given radix
|
||||
|
@ -861,10 +871,11 @@ class IntlChar
|
|||
* or <b>NULL</b> if <em>codepoint</em> is out of bound.
|
||||
* @since 7.0
|
||||
*/
|
||||
#[TentativeType]
|
||||
public static function digit(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $base = 10
|
||||
) {}
|
||||
): int|false|null {}
|
||||
|
||||
/**
|
||||
* Enumerate all assigned Unicode characters within a range
|
||||
|
@ -889,12 +900,13 @@ class IntlChar
|
|||
* </ul>
|
||||
* @since 7.0
|
||||
*/
|
||||
#[TentativeType]
|
||||
public static function enumCharNames(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $start,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $end,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type = IntlChar::UNICODE_CHAR_NAME
|
||||
) {}
|
||||
): ?bool {}
|
||||
|
||||
/**
|
||||
* Enumerate all code points with their Unicode general categories
|
||||
|
@ -909,7 +921,8 @@ class IntlChar
|
|||
* </ul>
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function enumCharTypes(#[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback = null) {}
|
||||
#[TentativeType]
|
||||
public static function enumCharTypes(#[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback = null): void {}
|
||||
|
||||
/**
|
||||
* Perform case folding on a code point
|
||||
|
@ -920,10 +933,11 @@ class IntlChar
|
|||
* Returns NULL if <em>codepoint</em> is out of bound.
|
||||
* @since 7.0
|
||||
*/
|
||||
#[TentativeType]
|
||||
public static function foldCase(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = IntlChar::FOLD_CASE_DEFAULT
|
||||
) {}
|
||||
): string|int|null {}
|
||||
|
||||
/**
|
||||
* Get character representation for a given digit and radix
|
||||
|
@ -933,10 +947,11 @@ class IntlChar
|
|||
* @return int The character representation (as a string) of the specified digit in the specified radix.
|
||||
* @since 7.0
|
||||
*/
|
||||
#[TentativeType]
|
||||
public static function forDigit(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $digit,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $base = 10
|
||||
) {}
|
||||
): int {}
|
||||
|
||||
/**
|
||||
* Get the paired bracket character for a code point
|
||||
|
@ -947,7 +962,8 @@ class IntlChar
|
|||
* Or NULL if <em>codepoint</em> is out of bound.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function getBidiPairedBracket(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function getBidiPairedBracket(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): string|int|null {}
|
||||
|
||||
/**
|
||||
* Get the Unicode allocation block containing a code point
|
||||
|
@ -957,7 +973,8 @@ class IntlChar
|
|||
* See the <em>IntlChar::BLOCK_CODE_*</em> constants for possible return values.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function getBlockCode(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function getBlockCode(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?int {}
|
||||
|
||||
/**
|
||||
* Get the combining class of a code point
|
||||
|
@ -967,7 +984,8 @@ class IntlChar
|
|||
* Or NULL if <em>codepoint</em> is out of bound.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function getCombiningClass(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function getCombiningClass(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?int {}
|
||||
|
||||
/**
|
||||
* Get the FC_NFKC_Closure property for a code point
|
||||
|
@ -978,7 +996,8 @@ class IntlChar
|
|||
* or FALSE if there was an error.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function getFC_NFKC_Closure(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function getFC_NFKC_Closure(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): string|false|null {}
|
||||
|
||||
/**
|
||||
* Get the max value for a Unicode property
|
||||
|
@ -987,7 +1006,8 @@ class IntlChar
|
|||
* @return int The maximum value returned by {@see IntlChar::getIntPropertyValue()} for a Unicode property. <=0 if the property selector is out of range.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function getIntPropertyMaxValue(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $property) {}
|
||||
#[TentativeType]
|
||||
public static function getIntPropertyMaxValue(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $property): int {}
|
||||
|
||||
/**
|
||||
* Get the min value for a Unicode property
|
||||
|
@ -996,7 +1016,8 @@ class IntlChar
|
|||
* @return int The minimum value returned by {@see IntlChar::getIntPropertyValue()} for a Unicode property. 0 if the property selector is out of range.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function getIntPropertyMinValue(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $property) {}
|
||||
#[TentativeType]
|
||||
public static function getIntPropertyMinValue(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $property): int {}
|
||||
|
||||
/**
|
||||
* Get the value for a Unicode property for a code point
|
||||
|
@ -1022,10 +1043,11 @@ class IntlChar
|
|||
* </p>
|
||||
* @since 7.0
|
||||
*/
|
||||
#[TentativeType]
|
||||
public static function getIntPropertyValue(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $property
|
||||
) {}
|
||||
): ?int {}
|
||||
|
||||
/**
|
||||
* Get the numeric value for a Unicode code point
|
||||
|
@ -1034,7 +1056,8 @@ class IntlChar
|
|||
* @return float|null Numeric value of codepoint, or float(-123456789) if none is defined, or NULL if <em>codepoint</em> is out of bound.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function getNumericValue(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function getNumericValue(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?float {}
|
||||
|
||||
/**
|
||||
* Get the property constant value for a given property name
|
||||
|
@ -1043,7 +1066,8 @@ class IntlChar
|
|||
* @return int Returns an IntlChar::PROPERTY_ constant value, or <b>IntlChar::PROPERTY_INVALID_CODE</b> if the given name does not match any property.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function getPropertyEnum(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $alias) {}
|
||||
#[TentativeType]
|
||||
public static function getPropertyEnum(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $alias): int {}
|
||||
|
||||
/**
|
||||
* Get the Unicode name for a property
|
||||
|
@ -1064,10 +1088,11 @@ class IntlChar
|
|||
* </p>
|
||||
* @since 7.0
|
||||
*/
|
||||
#[TentativeType]
|
||||
public static function getPropertyName(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $property,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type = IntlChar::LONG_PROPERTY_NAME
|
||||
) {}
|
||||
): string|false {}
|
||||
|
||||
/**
|
||||
* Get the property value for a given value name
|
||||
|
@ -1078,10 +1103,11 @@ class IntlChar
|
|||
* @return int Returns the corresponding value integer, or IntlChar::PROPERTY_INVALID_CODE if the given name does not match any value of the given property, or if the property is invalid.
|
||||
* @since 7.0
|
||||
*/
|
||||
#[TentativeType]
|
||||
public static function getPropertyValueEnum(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $property,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name
|
||||
) {}
|
||||
): int {}
|
||||
|
||||
/**
|
||||
* Get the Unicode name for a property value
|
||||
|
@ -1111,11 +1137,12 @@ class IntlChar
|
|||
* If a given nameChoice returns FALSE, then all larger values of nameChoice will return FALSE, with one exception: if FALSE is returned for IntlChar::SHORT_PROPERTY_NAME, then IntlChar::LONG_PROPERTY_NAME (and higher) may still return a non-FALSE value.
|
||||
* @since 7.0
|
||||
*/
|
||||
#[TentativeType]
|
||||
public static function getPropertyValueName(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $property,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $value,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type = IntlChar::LONG_PROPERTY_NAME
|
||||
) {}
|
||||
): string|false {}
|
||||
|
||||
/**
|
||||
* Get the Unicode version
|
||||
|
@ -1123,7 +1150,8 @@ class IntlChar
|
|||
* @return array An array containing the Unicode version number.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function getUnicodeVersion() {}
|
||||
#[TentativeType]
|
||||
public static function getUnicodeVersion(): array {}
|
||||
|
||||
/**
|
||||
* Check if code point is an alphanumeric character
|
||||
|
@ -1132,7 +1160,8 @@ class IntlChar
|
|||
* @return bool|null Returns TRUE if codepoint is an alphanumeric character, FALSE if not, NULL if <em>codepoint</em> is out of bound.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function isalnum(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function isalnum(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
|
||||
|
||||
/**
|
||||
* Check if code point is a letter character
|
||||
|
@ -1141,7 +1170,9 @@ class IntlChar
|
|||
* @return bool|null Returns TRUE if codepoint is a letter character, FALSE if not, NULL if <em>codepoint</em> is out of bound.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function isalpha(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function isalpha(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
|
||||
|
||||
/**
|
||||
* Check if code point is a base character
|
||||
* @link https://php.net/manual/en/intlchar.isbase.php
|
||||
|
@ -1149,7 +1180,9 @@ class IntlChar
|
|||
* @return bool|null Returns TRUE if codepoint is a base character, FALSE if not, NULL if <em>codepoint</em> is out of bound.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function isbase(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function isbase(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
|
||||
|
||||
/**
|
||||
* Check if code point is a "blank" or "horizontal space" character
|
||||
* @link https://php.net/manual/en/intlchar.isblank.php
|
||||
|
@ -1157,7 +1190,8 @@ class IntlChar
|
|||
* @return bool|null Returns TRUE if codepoint is either a "blank" or "horizontal space" character, FALSE if not, NULL if <em>codepoint</em> is out of bound.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function isblank(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function isblank(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
|
||||
|
||||
/**
|
||||
* Check if code point is a control character
|
||||
|
@ -1166,7 +1200,8 @@ class IntlChar
|
|||
* @return bool|null Returns TRUE if codepoint is a control character, FALSE if not, NULL if <em>codepoint</em> is out of bound.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function iscntrl(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function iscntrl(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
|
||||
|
||||
/**
|
||||
* Check whether the code point is defined
|
||||
|
@ -1175,7 +1210,8 @@ class IntlChar
|
|||
* @return bool|null Returns TRUE if codepoint is a defined character, FALSE if not, NULL if <em>codepoint</em> is out of bound.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function isdefined(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function isdefined(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
|
||||
|
||||
/**
|
||||
* Check if code point is a digit character
|
||||
|
@ -1184,7 +1220,9 @@ class IntlChar
|
|||
* @return bool|null Returns TRUE if codepoint is a digit character, FALSE if not, NULL if <em>codepoint</em> is out of bound.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function isdigit(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function isdigit(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
|
||||
|
||||
/**
|
||||
* Check if code point is a graphic character
|
||||
* @link https://php.net/manual/en/intlchar.isgraph.php
|
||||
|
@ -1192,7 +1230,9 @@ class IntlChar
|
|||
* @return bool|null Returns TRUE if codepoint is a "graphic" character, FALSE if not, NULL if <em>codepoint</em> is out of bound.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function isgraph(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function isgraph(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
|
||||
|
||||
/**
|
||||
* Check if code point is an ignorable character
|
||||
* @link https://php.net/manual/en/intlchar.isidignorable.php
|
||||
|
@ -1200,7 +1240,9 @@ class IntlChar
|
|||
* @return bool|null Returns TRUE if codepoint is ignorable in identifiers, FALSE if not, NULL if <em>codepoint</em> is out of bound.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function isIDIgnorable(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function isIDIgnorable(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
|
||||
|
||||
/**
|
||||
* Check if code point is permissible in an identifier
|
||||
* @link https://php.net/manual/en/intlchar.isidpart.php
|
||||
|
@ -1208,7 +1250,8 @@ class IntlChar
|
|||
* @return bool|null Returns TRUE if codepoint is the code point may occur in an identifier, FALSE if not, NULL if <em>codepoint</em> is out of bound.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function isIDPart(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function isIDPart(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
|
||||
|
||||
/**
|
||||
* Check if code point is permissible as the first character in an identifier
|
||||
|
@ -1217,7 +1260,9 @@ class IntlChar
|
|||
* @return bool|null Returns TRUE if codepoint may start an identifier, FALSE if not, NULL if <em>codepoint</em> is out of bound.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function isIDStart(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function isIDStart(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
|
||||
|
||||
/**
|
||||
* Check if code point is an ISO control code
|
||||
* @link https://php.net/manual/en/intlchar.isisocontrol.php
|
||||
|
@ -1225,7 +1270,9 @@ class IntlChar
|
|||
* @return bool|null Returns TRUE if codepoint is an ISO control code, FALSE if not, NULL if <em>codepoint</em> is out of bound.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function isISOControl(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function isISOControl(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
|
||||
|
||||
/**
|
||||
* Check if code point is permissible in a Java identifier
|
||||
* @link https://php.net/manual/en/intlchar.isjavaidpart.php
|
||||
|
@ -1233,7 +1280,9 @@ class IntlChar
|
|||
* @return bool|null Returns TRUE if codepoint may occur in a Java identifier, FALSE if not, NULL if <em>codepoint</em> is out of bound.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function isJavaIDPart(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function isJavaIDPart(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
|
||||
|
||||
/**
|
||||
* Check if code point is permissible as the first character in a Java identifier
|
||||
* @link https://php.net/manual/en/intlchar.isjavaidstart.php
|
||||
|
@ -1241,7 +1290,9 @@ class IntlChar
|
|||
* @return bool|null Returns TRUE if codepoint may start a Java identifier, FALSE if not, NULL if <em>codepoint</em> is out of bound.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function isJavaIDStart(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function isJavaIDStart(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
|
||||
|
||||
/**
|
||||
* Check if code point is a space character according to Java
|
||||
* @link https://php.net/manual/en/intlchar.isjavaspacechar.php
|
||||
|
@ -1249,7 +1300,8 @@ class IntlChar
|
|||
* @return bool|null Returns TRUE if codepoint is a space character according to Java, FALSE if not, NULL if <em>codepoint</em> is out of bound.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function isJavaSpaceChar(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function isJavaSpaceChar(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
|
||||
|
||||
/**
|
||||
* Check if code point is a lowercase letter
|
||||
|
@ -1259,7 +1311,9 @@ class IntlChar
|
|||
* @return bool|null Returns TRUE if codepoint is an Ll lowercase letter, FALSE if not, NULL if <em>codepoint</em> is out of bound.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function islower(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function islower(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
|
||||
|
||||
/**
|
||||
* Check if code point has the Bidi_Mirrored property
|
||||
* @link https://php.net/manual/en/intlchar.ismirrored.php
|
||||
|
@ -1267,7 +1321,8 @@ class IntlChar
|
|||
* @return bool|null Returns TRUE if codepoint has the Bidi_Mirrored property, FALSE if not, NULL if <em>codepoint</em> is out of bound.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function isMirrored(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function isMirrored(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
|
||||
|
||||
/**
|
||||
* Check if code point is a printable character
|
||||
|
@ -1276,7 +1331,8 @@ class IntlChar
|
|||
* @return bool|null Returns TRUE if codepoint is a printable character, FALSE if not, NULL if <em>codepoint</em> is out of bound.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function isprint(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function isprint(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
|
||||
|
||||
/**
|
||||
* Check if code point is punctuation character
|
||||
|
@ -1286,7 +1342,9 @@ class IntlChar
|
|||
* @return bool|null Returns TRUE if codepoint is a punctuation character, FALSE if not, NULL if <em>codepoint</em> is out of bound.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function ispunct(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function ispunct(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
|
||||
|
||||
/**
|
||||
* Check if code point is a space character
|
||||
* @link https://php.net/manual/en/intlchar.isspace.php
|
||||
|
@ -1294,7 +1352,9 @@ class IntlChar
|
|||
* @return bool|null Returns TRUE if codepoint is a space character, FALSE if not, NULL if <em>codepoint</em> is out of bound.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function isspace(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function isspace(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
|
||||
|
||||
/**
|
||||
* Check if code point is a titlecase letter
|
||||
* @link https://php.net/manual/en/intlchar.istitle.php
|
||||
|
@ -1302,7 +1362,8 @@ class IntlChar
|
|||
* @return bool|null Returns TRUE if codepoint is a titlecase letter, FALSE if not, NULL if <em>codepoint</em> is out of bound.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function istitle(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function istitle(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
|
||||
|
||||
/**
|
||||
* Check if code point has the Alphabetic Unicode property
|
||||
|
@ -1311,7 +1372,9 @@ class IntlChar
|
|||
* @return bool|null Returns TRUE if codepoint has the Alphabetic Unicode property, FALSE if not, NULL if <em>codepoint</em> is out of bound.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function isUAlphabetic(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function isUAlphabetic(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
|
||||
|
||||
/**
|
||||
* Check if code point has the Lowercase Unicode property
|
||||
* @link https://php.net/manual/en/intlchar.isulowercase.php
|
||||
|
@ -1319,7 +1382,9 @@ class IntlChar
|
|||
* @return bool|null Returns TRUE if codepoint has the Lowercase Unicode property, FALSE if not, NULL if <em>codepoint</em> is out of bound.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function isULowercase(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function isULowercase(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
|
||||
|
||||
/**
|
||||
* Check if code point has the general category "Lu" (uppercase letter)
|
||||
* @link https://php.net/manual/en/intlchar.isupper.php
|
||||
|
@ -1328,7 +1393,9 @@ class IntlChar
|
|||
* @return bool|null Returns TRUE if codepoint is an Lu uppercase letter, FALSE if not, NULL if <em>codepoint</em> is out of bound.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function isupper(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function isupper(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
|
||||
|
||||
/**
|
||||
* Check if code point has the Uppercase Unicode property
|
||||
* @link https://php.net/manual/en/intlchar.isuuppercase.php
|
||||
|
@ -1336,7 +1403,9 @@ class IntlChar
|
|||
* @return bool|null Returns TRUE if codepoint has the Uppercase Unicode property, FALSE if not, NULL if <em>codepoint</em> is out of bound.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function isUUppercase(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function isUUppercase(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
|
||||
|
||||
/**
|
||||
* Check if code point has the White_Space Unicode property
|
||||
* @link https://php.net/manual/en/intlchar.isuwhitespace.php
|
||||
|
@ -1344,7 +1413,9 @@ class IntlChar
|
|||
* @return bool|null Returns TRUE if codepoint has the White_Space Unicode property, FALSE if not, NULL if <em>codepoint</em> is out of bound.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function isUWhiteSpace(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function isUWhiteSpace(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
|
||||
|
||||
/**
|
||||
* Check if code point is a whitespace character according to ICU
|
||||
* @link https://php.net/manual/en/intlchar.iswhitespace.php
|
||||
|
@ -1352,7 +1423,8 @@ class IntlChar
|
|||
* @return bool|null Returns TRUE if codepoint is a whitespace character according to ICU, FALSE if not, NULL if <em>codepoint</em> is out of bound.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function isWhitespace(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function isWhitespace(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
|
||||
|
||||
/**
|
||||
* Check if code point is a hexadecimal digit
|
||||
|
@ -1360,7 +1432,8 @@ class IntlChar
|
|||
* @return bool|null Returns TRUE if codepoint is a hexadecimal character, FALSE if not, NULL if <em>codepoint</em> is out of bound.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function isxdigit(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function isxdigit(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
|
||||
|
||||
/**
|
||||
* Return Unicode code point value of character
|
||||
|
@ -1369,7 +1442,8 @@ class IntlChar
|
|||
* @return int|null Returns the Unicode code point value as an integer, NULL if <em>codepoint</em> is out of bound.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function ord(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $character) {}
|
||||
#[TentativeType]
|
||||
public static function ord(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $character): ?int {}
|
||||
|
||||
/**
|
||||
* Make Unicode character lowercase
|
||||
|
@ -1380,7 +1454,9 @@ class IntlChar
|
|||
* Or NULL if <em>codepoint</em> is out of bound.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function tolower(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function tolower(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): string|int|null {}
|
||||
|
||||
/**
|
||||
* Make Unicode character titlecase
|
||||
* @link https://php.net/manual/en/intlchar.totitle.php
|
||||
|
@ -1390,7 +1466,8 @@ class IntlChar
|
|||
* Or NULL if <em>codepoint</em> is out of bound.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function totitle(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function totitle(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): string|int|null {}
|
||||
|
||||
/**
|
||||
* Make Unicode character uppercase
|
||||
|
@ -1401,5 +1478,6 @@ class IntlChar
|
|||
* Or NULL if <em>codepoint</em> is out of bound.
|
||||
* @since 7.0
|
||||
*/
|
||||
public static function toupper(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
|
||||
#[TentativeType]
|
||||
public static function toupper(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): string|int|null {}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ class IntlDatePatternGenerator
|
|||
{
|
||||
public function __construct(?string $locale = null) {}
|
||||
|
||||
public static function create(?string $locale = null) {}
|
||||
public static function create(?string $locale = null): ?IntlDatePatternGenerator {}
|
||||
|
||||
public function getBestPattern(string $skeleton) {}
|
||||
public function getBestPattern(string $skeleton): string|false {}
|
||||
}
|
||||
|
|
7819
intl/intl.php
7819
intl/intl.php
File diff suppressed because it is too large
Load Diff
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
// Start of json v.1.3.1
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\TentativeType;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
/**
|
||||
|
@ -20,8 +20,8 @@ interface JsonSerializable
|
|||
* which is a value of any type other than a resource.
|
||||
* @since 5.4
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'mixed'], default: '')]
|
||||
public function jsonSerialize();
|
||||
#[TentativeType]
|
||||
public function jsonSerialize(): mixed;
|
||||
}
|
||||
|
||||
class JsonIncrementalParser
|
||||
|
@ -457,6 +457,6 @@ define('JSON_THROW_ON_ERROR', 4194304);
|
|||
* @since 7.3
|
||||
* @link https://wiki.php.net/rfc/json_throw_on_error
|
||||
*/
|
||||
class JsonException extends \Exception {}
|
||||
class JsonException extends Exception {}
|
||||
|
||||
// End of json v.1.3.1
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
namespace JetBrains\PhpStorm\Internal;
|
||||
|
||||
use Attribute;
|
||||
|
||||
/**
|
||||
* For PhpStorm internal use only
|
||||
* @since 8.1
|
||||
* @internal
|
||||
*/
|
||||
#[Attribute(Attribute::TARGET_METHOD)]
|
||||
class TentativeType {}
|
|
@ -7,6 +7,7 @@
|
|||
use JetBrains\PhpStorm\Deprecated;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
use JetBrains\PhpStorm\Internal\TentativeType;
|
||||
|
||||
/**
|
||||
* mysqli_sql_exception
|
||||
|
@ -194,7 +195,8 @@ class mysqli
|
|||
* </p>
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
public function autocommit(bool $enable) {}
|
||||
#[TentativeType]
|
||||
public function autocommit(bool $enable): bool {}
|
||||
|
||||
/**
|
||||
* Starts a transaction
|
||||
|
@ -204,10 +206,11 @@ class mysqli
|
|||
* @return bool true on success or false on failure.
|
||||
* @since 5.5
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function begin_transaction(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = 0,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $name = null
|
||||
) {}
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* Changes the user of the specified database connection
|
||||
|
@ -228,14 +231,16 @@ class mysqli
|
|||
* </p>
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
public function change_user(string $username, string $password, ?string $database) {}
|
||||
#[TentativeType]
|
||||
public function change_user(string $username, string $password, ?string $database): bool {}
|
||||
|
||||
/**
|
||||
* Returns the default character set for the database connection
|
||||
* @link https://php.net/manual/en/mysqli.character-set-name.php
|
||||
* @return string The default character set for the current connection
|
||||
*/
|
||||
public function character_set_name() {}
|
||||
#[TentativeType]
|
||||
public function character_set_name(): string {}
|
||||
|
||||
/**
|
||||
* @removed 5.4
|
||||
|
@ -257,7 +262,8 @@ class mysqli
|
|||
* @param string $name If provided then COMMIT $name is executed.
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
public function commit(int $flags = -1, ?string $name = null) {}
|
||||
#[TentativeType]
|
||||
public function commit(int $flags = -1, ?string $name = null): bool {}
|
||||
|
||||
/**
|
||||
* @link https://php.net/manual/en/function.mysqli-connect.php
|
||||
|
@ -268,6 +274,7 @@ class mysqli
|
|||
* @param int $port [optional]
|
||||
* @param string $socket [optional]
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function connect(
|
||||
?string $hostname = null,
|
||||
?string $username = null,
|
||||
|
@ -275,14 +282,15 @@ class mysqli
|
|||
?string $database = null,
|
||||
?int $port = null,
|
||||
?string $socket = null
|
||||
) {}
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* Dump debugging information into the log
|
||||
* @link https://php.net/manual/en/mysqli.dump-debug-info.php
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
public function dump_debug_info() {}
|
||||
#[TentativeType]
|
||||
public function dump_debug_info(): bool {}
|
||||
|
||||
/**
|
||||
* Performs debugging operations
|
||||
|
@ -297,7 +305,7 @@ class mysqli
|
|||
/**
|
||||
* Returns a character set object
|
||||
* @link https://php.net/manual/en/mysqli.get-charset.php
|
||||
* @return object The function returns a character set object with the following properties:
|
||||
* @return object|null The function returns a character set object with the following properties:
|
||||
* <i>charset</i>
|
||||
* <p>Character set name</p>
|
||||
* <i>collation</i>
|
||||
|
@ -313,35 +321,40 @@ class mysqli
|
|||
* <i>state</i>
|
||||
* <p>Character set status (?)</p>
|
||||
*/
|
||||
public function get_charset() {}
|
||||
#[TentativeType]
|
||||
public function get_charset(): ?object {}
|
||||
|
||||
/**
|
||||
* Returns the MySQL client version as a string
|
||||
* @link https://php.net/manual/en/mysqli.get-client-info.php
|
||||
* @return string A string that represents the MySQL client library version
|
||||
*/
|
||||
public function get_client_info() {}
|
||||
#[TentativeType]
|
||||
public function get_client_info(): string {}
|
||||
|
||||
/**
|
||||
* Returns statistics about the client connection
|
||||
* @link https://php.net/manual/en/mysqli.get-connection-stats.php
|
||||
* @return array|false an array with connection stats if success, false otherwise.
|
||||
*/
|
||||
public function get_connection_stats() {}
|
||||
#[TentativeType]
|
||||
public function get_connection_stats(): array {}
|
||||
|
||||
/**
|
||||
* An undocumented function equivalent to the $server_info property
|
||||
* @link https://php.net/manual/en/mysqli.get-server-info.php
|
||||
* @return string A character string representing the server version.
|
||||
*/
|
||||
public function get_server_info() {}
|
||||
#[TentativeType]
|
||||
public function get_server_info(): string {}
|
||||
|
||||
/**
|
||||
* Get result of SHOW WARNINGS
|
||||
* @link https://php.net/manual/en/mysqli.get-warnings.php
|
||||
* @return mysqli_warning
|
||||
* @return mysqli_warning|false
|
||||
*/
|
||||
public function get_warnings() {}
|
||||
#[TentativeType]
|
||||
public function get_warnings(): mysqli_warning|false {}
|
||||
|
||||
/**
|
||||
* Initializes MySQLi and returns a resource for use with mysqli_real_connect()
|
||||
|
@ -357,7 +370,8 @@ class mysqli
|
|||
* @param int $process_id
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
public function kill(int $process_id) {}
|
||||
#[TentativeType]
|
||||
public function kill(int $process_id): bool {}
|
||||
|
||||
/**
|
||||
* Performs a query on the database
|
||||
|
@ -372,7 +386,8 @@ class mysqli
|
|||
* To retrieve subsequent errors from other statements you have to call
|
||||
* <b>mysqli_next_result</b> first.
|
||||
*/
|
||||
public function multi_query(string $query) {}
|
||||
#[TentativeType]
|
||||
public function multi_query(string $query): bool {}
|
||||
|
||||
/**
|
||||
* @link https://php.net/manual/en/mysqli.construct.php
|
||||
|
@ -392,14 +407,16 @@ class mysqli
|
|||
* @link https://php.net/manual/en/mysqli.more-results.php
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
public function more_results() {}
|
||||
#[TentativeType]
|
||||
public function more_results(): bool {}
|
||||
|
||||
/**
|
||||
* Prepare next result from multi_query
|
||||
* @link https://php.net/manual/en/mysqli.next-result.php
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
public function next_result() {}
|
||||
#[TentativeType]
|
||||
public function next_result(): bool {}
|
||||
|
||||
/**
|
||||
* Set options
|
||||
|
@ -450,14 +467,16 @@ class mysqli
|
|||
* </p>
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
public function options(int $option, $value) {}
|
||||
#[TentativeType]
|
||||
public function options(int $option, $value): bool {}
|
||||
|
||||
/**
|
||||
* Pings a server connection, or tries to reconnect if the connection has gone down
|
||||
* @link https://php.net/manual/en/mysqli.ping.php
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
public function ping() {}
|
||||
#[TentativeType]
|
||||
public function ping(): bool {}
|
||||
|
||||
/**
|
||||
* Prepare an SQL statement for execution
|
||||
|
@ -495,7 +514,8 @@ class mysqli
|
|||
* </p>
|
||||
* @return mysqli_stmt|false <b>mysqli_prepare</b> returns a statement object or false if an error occurred.
|
||||
*/
|
||||
public function prepare(string $query) {}
|
||||
#[TentativeType]
|
||||
public function prepare(string $query): mysqli_stmt|false {}
|
||||
|
||||
/**
|
||||
* Performs a query on the database
|
||||
|
@ -527,7 +547,8 @@ class mysqli
|
|||
* a <b>mysqli_result</b> object. For other successful queries <b>mysqli_query</b> will
|
||||
* return true and false on failure.
|
||||
*/
|
||||
public function query(string $query, int $result_mode = MYSQLI_STORE_RESULT) {}
|
||||
#[TentativeType]
|
||||
public function query(string $query, int $result_mode = MYSQLI_STORE_RESULT): mysqli_result|bool {}
|
||||
|
||||
/**
|
||||
* Opens a connection to a mysql server
|
||||
|
@ -605,6 +626,7 @@ class mysqli
|
|||
* </p>
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function real_connect(
|
||||
?string $hostname = null,
|
||||
?string $username = null,
|
||||
|
@ -613,7 +635,7 @@ class mysqli
|
|||
?int $port = null,
|
||||
?string $socket = null,
|
||||
int $flags = null
|
||||
) {}
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* Escapes special characters in a string for use in an SQL statement, taking into account the current charset of the connection
|
||||
|
@ -627,7 +649,8 @@ class mysqli
|
|||
* </p>
|
||||
* @return string an escaped string.
|
||||
*/
|
||||
public function real_escape_string(string $string) {}
|
||||
#[TentativeType]
|
||||
public function real_escape_string(string $string): string {}
|
||||
|
||||
/**
|
||||
* Poll connections
|
||||
|
@ -646,14 +669,16 @@ class mysqli
|
|||
* </p>
|
||||
* @return int|false number of ready connections in success, false otherwise.
|
||||
*/
|
||||
public static function poll(?array &$read, ?array &$error, array &$reject, int $seconds, int $microseconds = 0) {}
|
||||
#[TentativeType]
|
||||
public static function poll(?array &$read, ?array &$error, array &$reject, int $seconds, int $microseconds = 0): int|false {}
|
||||
|
||||
/**
|
||||
* Get result from async query
|
||||
* @link https://php.net/manual/en/mysqli.reap-async-query.php
|
||||
* @return mysqli_result|false mysqli_result in success, false otherwise.
|
||||
*/
|
||||
public function reap_async_query() {}
|
||||
#[TentativeType]
|
||||
public function reap_async_query(): mysqli_result|bool {}
|
||||
|
||||
/**
|
||||
* Escapes special characters in a string for use in an SQL statement, taking into account the current charset of the connection
|
||||
|
@ -662,7 +687,8 @@ class mysqli
|
|||
* @return string
|
||||
* @link https://secure.php.net/manual/en/mysqli.real-escape-string.php
|
||||
*/
|
||||
public function escape_string(string $string) {}
|
||||
#[TentativeType]
|
||||
public function escape_string(string $string): string {}
|
||||
|
||||
/**
|
||||
* Execute an SQL query
|
||||
|
@ -675,7 +701,8 @@ class mysqli
|
|||
* </p>
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
public function real_query(string $query) {}
|
||||
#[TentativeType]
|
||||
public function real_query(string $query): bool {}
|
||||
|
||||
/**
|
||||
* Execute an SQL query
|
||||
|
@ -684,7 +711,8 @@ class mysqli
|
|||
* @return bool Returns TRUE on success or FALSE on failure.
|
||||
* @since 5.5
|
||||
*/
|
||||
public function release_savepoint(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name) {}
|
||||
#[TentativeType]
|
||||
public function release_savepoint(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): bool {}
|
||||
|
||||
/**
|
||||
* Rolls back current transaction
|
||||
|
@ -694,10 +722,11 @@ class mysqli
|
|||
* @return bool true on success or false on failure.
|
||||
* @since 5.5 Added flags and name parameters.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function rollback(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = 0,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $name = null
|
||||
) {}
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* Set a named transaction savepoint
|
||||
|
@ -706,7 +735,8 @@ class mysqli
|
|||
* @return bool Returns TRUE on success or FALSE on failure.
|
||||
* @since 5.5
|
||||
*/
|
||||
public function savepoint(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name) {}
|
||||
#[TentativeType]
|
||||
public function savepoint(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): bool {}
|
||||
|
||||
/**
|
||||
* Selects the default database for database queries
|
||||
|
@ -716,7 +746,8 @@ class mysqli
|
|||
* </p>
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
public function select_db(string $database) {}
|
||||
#[TentativeType]
|
||||
public function select_db(string $database): bool {}
|
||||
|
||||
/**
|
||||
* Sets the default client character set
|
||||
|
@ -726,14 +757,16 @@ class mysqli
|
|||
* </p>
|
||||
* @return bool true on success or false on failure..5
|
||||
*/
|
||||
public function set_charset(string $charset) {}
|
||||
#[TentativeType]
|
||||
public function set_charset(string $charset): bool {}
|
||||
|
||||
/**
|
||||
* @link https://php.net/manual/en/function.mysqli-set-opt
|
||||
* @param int $option
|
||||
* @param int $option
|
||||
* @param mixed $value
|
||||
*/
|
||||
public function set_opt(int $option, $value) {}
|
||||
#[TentativeType]
|
||||
public function set_opt(int $option, $value): bool {}
|
||||
|
||||
/**
|
||||
* Used for establishing secure connections using SSL
|
||||
|
@ -762,14 +795,16 @@ class mysqli
|
|||
* @link https://php.net/manual/en/mysqli.stat.php
|
||||
* @return string|false A string describing the server status. false if an error occurred.
|
||||
*/
|
||||
public function stat() {}
|
||||
#[TentativeType]
|
||||
public function stat(): string|false {}
|
||||
|
||||
/**
|
||||
* Initializes a statement and returns an object for use with mysqli_stmt_prepare
|
||||
* @link https://php.net/manual/en/mysqli.stmt-init.php
|
||||
* @return mysqli_stmt an object.
|
||||
*/
|
||||
public function stmt_init() {}
|
||||
#[TentativeType]
|
||||
public function stmt_init(): mysqli_stmt|false {}
|
||||
|
||||
/**
|
||||
* Transfers a result set from the last query
|
||||
|
@ -791,21 +826,24 @@ class mysqli
|
|||
* <b>mysqli_field_count</b> returns a non-zero value, the
|
||||
* statement should have produced a non-empty result set.
|
||||
*/
|
||||
public function store_result(int $mode = null) {}
|
||||
#[TentativeType]
|
||||
public function store_result(int $mode = null): mysqli_result|false {}
|
||||
|
||||
/**
|
||||
* Returns whether thread safety is given or not
|
||||
* @link https://php.net/manual/en/mysqli.thread-safe.php
|
||||
* @return bool true if the client library is thread-safe, otherwise false.
|
||||
*/
|
||||
public function thread_safe() {}
|
||||
#[TentativeType]
|
||||
public function thread_safe(): bool {}
|
||||
|
||||
/**
|
||||
* Initiate a result set retrieval
|
||||
* @link https://php.net/manual/en/mysqli.use-result.php
|
||||
* @return mysqli_result|false an unbuffered result object or false if an error occurred.
|
||||
*/
|
||||
public function use_result() {}
|
||||
#[TentativeType]
|
||||
public function use_result(): mysqli_result|false {}
|
||||
|
||||
/**
|
||||
* @link https://php.net/manual/en/mysqli.refresh
|
||||
|
@ -813,7 +851,8 @@ class mysqli
|
|||
* @return bool TRUE if the refresh was a success, otherwise FALSE
|
||||
* @since 5.3
|
||||
*/
|
||||
public function refresh(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags) {}
|
||||
#[TentativeType]
|
||||
public function refresh(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags): bool {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -857,7 +896,7 @@ final class mysqli_warning
|
|||
* @link https://php.net/manual/en/mysqli-warning.next.php
|
||||
* @return bool True if it successfully moved to the next warning
|
||||
*/
|
||||
public function next() {}
|
||||
public function next(): bool {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -908,14 +947,16 @@ class mysqli_result implements IteratorAggregate
|
|||
* @return void
|
||||
* @link https://php.net/manual/en/mysqli-result.free.php
|
||||
*/
|
||||
public function close() {}
|
||||
#[TentativeType]
|
||||
public function close(): void {}
|
||||
|
||||
/**
|
||||
* Frees the memory associated with a result
|
||||
* @link https://php.net/manual/en/mysqli-result.free.php
|
||||
* @return void
|
||||
*/
|
||||
public function free() {}
|
||||
#[TentativeType]
|
||||
public function free(): void {}
|
||||
|
||||
/**
|
||||
* Adjusts the result pointer to an arbitrary row in the result
|
||||
|
@ -926,7 +967,8 @@ class mysqli_result implements IteratorAggregate
|
|||
* </p>
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
public function data_seek(int $offset) {}
|
||||
#[TentativeType]
|
||||
public function data_seek(int $offset): bool {}
|
||||
|
||||
/**
|
||||
* Returns the next field in the result set
|
||||
|
@ -995,7 +1037,8 @@ class mysqli_result implements IteratorAggregate
|
|||
* </tr>
|
||||
* </table>
|
||||
*/
|
||||
public function fetch_field() {}
|
||||
#[TentativeType]
|
||||
public function fetch_field(): object|false {}
|
||||
|
||||
/**
|
||||
* Returns an array of objects representing the fields in a result set
|
||||
|
@ -1056,7 +1099,8 @@ class mysqli_result implements IteratorAggregate
|
|||
* </tr>
|
||||
* </table>
|
||||
*/
|
||||
public function fetch_fields() {}
|
||||
#[TentativeType]
|
||||
public function fetch_fields(): array {}
|
||||
|
||||
/**
|
||||
* Fetch meta-data for a single field
|
||||
|
@ -1122,7 +1166,8 @@ class mysqli_result implements IteratorAggregate
|
|||
* </tr>
|
||||
* </table>
|
||||
*/
|
||||
public function fetch_field_direct(int $index) {}
|
||||
#[TentativeType]
|
||||
public function fetch_field_direct(int $index): object|false {}
|
||||
|
||||
/**
|
||||
* Fetches all result rows as an associative array, a numeric array, or both
|
||||
|
@ -1135,7 +1180,8 @@ class mysqli_result implements IteratorAggregate
|
|||
* </p>
|
||||
* @return mixed an array of associative or numeric arrays holding result rows.
|
||||
*/
|
||||
public function fetch_all(int $mode = MYSQLI_NUM) {}
|
||||
#[TentativeType]
|
||||
public function fetch_all(int $mode = MYSQLI_NUM): array {}
|
||||
|
||||
/**
|
||||
* Fetch a result row as an associative, a numeric array, or both
|
||||
|
@ -1157,7 +1203,8 @@ class mysqli_result implements IteratorAggregate
|
|||
* @return mixed an array of strings that corresponds to the fetched row or null if there
|
||||
* are no more rows in resultset.
|
||||
*/
|
||||
public function fetch_array(int $mode = MYSQLI_BOTH) {}
|
||||
#[TentativeType]
|
||||
public function fetch_array(int $mode = MYSQLI_BOTH): array|false|null {}
|
||||
|
||||
/**
|
||||
* Fetch a result row as an associative array
|
||||
|
@ -1172,7 +1219,8 @@ class mysqli_result implements IteratorAggregate
|
|||
* name, you either need to access the result with numeric indices by using
|
||||
* <b>mysqli_fetch_row</b> or add alias names.
|
||||
*/
|
||||
public function fetch_assoc() {}
|
||||
#[TentativeType]
|
||||
public function fetch_assoc(): array|false|null {}
|
||||
|
||||
/**
|
||||
* Returns the current row of a result set as an object
|
||||
|
@ -1188,18 +1236,20 @@ class mysqli_result implements IteratorAggregate
|
|||
* @return stdClass|object an object with string properties that corresponds to the fetched
|
||||
* row or null if there are no more rows in resultset.
|
||||
*/
|
||||
public function fetch_object(string $class = 'stdClass', array $constructor_args = null) {}
|
||||
#[TentativeType]
|
||||
public function fetch_object(string $class = 'stdClass', array $constructor_args = null): object|false|null {}
|
||||
|
||||
/**
|
||||
* Get a result row as an enumerated array
|
||||
* @link https://php.net/manual/en/mysqli-result.fetch-row.php
|
||||
* @return array|null mysqli_fetch_row returns an array of strings that corresponds to the fetched row
|
||||
* @return array|false|null mysqli_fetch_row returns an array of strings that corresponds to the fetched row
|
||||
* or null if there are no more rows in result set.
|
||||
*/
|
||||
public function fetch_row() {}
|
||||
#[TentativeType]
|
||||
public function fetch_row(): array|false|null {}
|
||||
|
||||
#[PhpStormStubsElementAvailable('8.1')]
|
||||
public function fetch_column(int $column = null) {}
|
||||
public function fetch_column(int $column = null): string|int|float|false|null {}
|
||||
|
||||
/**
|
||||
* Set result pointer to a specified field offset
|
||||
|
@ -1210,20 +1260,22 @@ class mysqli_result implements IteratorAggregate
|
|||
* </p>
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
public function field_seek(int $index) {}
|
||||
#[TentativeType]
|
||||
public function field_seek(int $index): bool {}
|
||||
|
||||
/**
|
||||
* Frees the memory associated with a result
|
||||
* @return void
|
||||
* @link https://php.net/manual/en/mysqli-result.free.php
|
||||
*/
|
||||
public function free_result() {}
|
||||
#[TentativeType]
|
||||
public function free_result(): void {}
|
||||
|
||||
/**
|
||||
* @return Iterator
|
||||
* @since 8.0
|
||||
* @return Traversable
|
||||
*/
|
||||
public function getIterator() {}
|
||||
public function getIterator(): Iterator {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1298,7 +1350,8 @@ class mysqli_stmt
|
|||
* </p>
|
||||
* @return int|false false if the attribute is not found, otherwise returns the value of the attribute.
|
||||
*/
|
||||
public function attr_get(int $attribute) {}
|
||||
#[TentativeType]
|
||||
public function attr_get(int $attribute): int {}
|
||||
|
||||
/**
|
||||
* Used to modify the behavior of a prepared statement
|
||||
|
@ -1352,7 +1405,8 @@ class mysqli_stmt
|
|||
* @param int $value <p>The value to assign to the attribute.</p>
|
||||
* @return bool
|
||||
*/
|
||||
public function attr_set(int $attribute, int $value) {}
|
||||
#[TentativeType]
|
||||
public function attr_set(int $attribute, int $value): bool {}
|
||||
|
||||
/**
|
||||
* Binds variables to a prepared statement as parameters
|
||||
|
@ -1418,56 +1472,64 @@ class mysqli_stmt
|
|||
* </p>
|
||||
* @return void
|
||||
*/
|
||||
public function data_seek(int $offset) {}
|
||||
#[TentativeType]
|
||||
public function data_seek(int $offset): void {}
|
||||
|
||||
/**
|
||||
* Executes a prepared Query
|
||||
* @link https://php.net/manual/en/mysqli-stmt.execute.php
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
public function execute(#[PhpStormStubsElementAvailable('8.1')] ?array $params = null) {}
|
||||
#[TentativeType]
|
||||
public function execute(#[PhpStormStubsElementAvailable('8.1')] ?array $params = null): bool {}
|
||||
|
||||
/**
|
||||
* Fetch results from a prepared statement into the bound variables
|
||||
* @link https://php.net/manual/en/mysqli-stmt.fetch.php
|
||||
* @return bool|null
|
||||
*/
|
||||
public function fetch() {}
|
||||
#[TentativeType]
|
||||
public function fetch(): ?bool {}
|
||||
|
||||
/**
|
||||
* Get result of SHOW WARNINGS
|
||||
* @link https://php.net/manual/en/mysqli-stmt.get-warnings.php
|
||||
* @return object
|
||||
* @return object|false
|
||||
*/
|
||||
public function get_warnings() {}
|
||||
#[TentativeType]
|
||||
public function get_warnings(): mysqli_warning|false {}
|
||||
|
||||
/**
|
||||
* Returns result set metadata from a prepared statement
|
||||
* @link https://php.net/manual/en/mysqli-stmt.result-metadata.php
|
||||
* @return mysqli_result|false a result object or false if an error occurred.
|
||||
*/
|
||||
public function result_metadata() {}
|
||||
#[TentativeType]
|
||||
public function result_metadata(): mysqli_result|false {}
|
||||
|
||||
/**
|
||||
* Check if there are more query results from a multiple query
|
||||
* @link https://php.net/manual/en/mysqli-stmt.more-results.php
|
||||
* @return bool
|
||||
*/
|
||||
public function more_results() {}
|
||||
#[TentativeType]
|
||||
public function more_results(): bool {}
|
||||
|
||||
/**
|
||||
* Reads the next result from a multiple query
|
||||
* @link https://php.net/manual/en/mysqli-stmt.next-result.php
|
||||
* @return bool
|
||||
*/
|
||||
public function next_result() {}
|
||||
#[TentativeType]
|
||||
public function next_result(): bool {}
|
||||
|
||||
/**
|
||||
* Return the number of rows in statements result set
|
||||
* @link https://php.net/manual/en/mysqli-stmt.num-rows.php
|
||||
* @return int An integer representing the number of rows in result set.
|
||||
* @return string|int An integer representing the number of rows in result set.
|
||||
*/
|
||||
public function num_rows() {}
|
||||
#[TentativeType]
|
||||
public function num_rows(): string|int {}
|
||||
|
||||
/**
|
||||
* Send data in blocks
|
||||
|
@ -1481,7 +1543,8 @@ class mysqli_stmt
|
|||
* </p>
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
public function send_long_data(int $param_num, string $data) {}
|
||||
#[TentativeType]
|
||||
public function send_long_data(int $param_num, string $data): bool {}
|
||||
|
||||
/**
|
||||
* No documentation available
|
||||
|
@ -1495,14 +1558,16 @@ class mysqli_stmt
|
|||
* @link https://php.net/manual/en/mysqli-stmt.free-result.php
|
||||
* @return void
|
||||
*/
|
||||
public function free_result() {}
|
||||
#[TentativeType]
|
||||
public function free_result(): void {}
|
||||
|
||||
/**
|
||||
* Resets a prepared statement
|
||||
* @link https://php.net/manual/en/mysqli-stmt.reset.php
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
public function reset() {}
|
||||
#[TentativeType]
|
||||
public function reset(): bool {}
|
||||
|
||||
/**
|
||||
* Prepare an SQL statement for execution
|
||||
|
@ -1536,21 +1601,24 @@ class mysqli_stmt
|
|||
* </p>
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
public function prepare(string $query) {}
|
||||
#[TentativeType]
|
||||
public function prepare(string $query): bool {}
|
||||
|
||||
/**
|
||||
* Transfers a result set from a prepared statement
|
||||
* @link https://php.net/manual/en/mysqli-stmt.store-result.php
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
public function store_result() {}
|
||||
#[TentativeType]
|
||||
public function store_result(): bool {}
|
||||
|
||||
/**
|
||||
* Gets a result set from a prepared statement
|
||||
* @link https://php.net/manual/en/mysqli-stmt.get-result.php
|
||||
* @return mysqli_result|false Returns a resultset or FALSE on failure
|
||||
*/
|
||||
public function get_result() {}
|
||||
#[TentativeType]
|
||||
public function get_result(): mysqli_result|false {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\TentativeType;
|
||||
|
||||
/**
|
||||
* <b>SessionHandlerInterface</b> is an interface which defines
|
||||
|
@ -22,7 +23,8 @@ interface SessionHandlerInterface
|
|||
* </p>
|
||||
* @since 5.4
|
||||
*/
|
||||
public function close();
|
||||
#[TentativeType]
|
||||
public function close(): bool;
|
||||
|
||||
/**
|
||||
* Destroy a session
|
||||
|
@ -34,7 +36,8 @@ interface SessionHandlerInterface
|
|||
* </p>
|
||||
* @since 5.4
|
||||
*/
|
||||
public function destroy(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $id);
|
||||
#[TentativeType]
|
||||
public function destroy(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $id): bool;
|
||||
|
||||
/**
|
||||
* Cleanup old sessions
|
||||
|
@ -50,7 +53,8 @@ interface SessionHandlerInterface
|
|||
* @since 5.4
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['7.1' => 'int|false'], default: 'bool')]
|
||||
public function gc(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $max_lifetime);
|
||||
#[TentativeType]
|
||||
public function gc(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $max_lifetime): int|false;
|
||||
|
||||
/**
|
||||
* Initialize session
|
||||
|
@ -63,10 +67,11 @@ interface SessionHandlerInterface
|
|||
* </p>
|
||||
* @since 5.4
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function open(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $path,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name
|
||||
);
|
||||
): bool;
|
||||
|
||||
/**
|
||||
* Read session data
|
||||
|
@ -79,7 +84,8 @@ interface SessionHandlerInterface
|
|||
* </p>
|
||||
* @since 5.4
|
||||
*/
|
||||
public function read(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $id);
|
||||
#[TentativeType]
|
||||
public function read(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $id): string|false;
|
||||
|
||||
/**
|
||||
* Write session data
|
||||
|
@ -98,10 +104,11 @@ interface SessionHandlerInterface
|
|||
* </p>
|
||||
* @since 5.4
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function write(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $id,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data
|
||||
);
|
||||
): bool;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -118,7 +125,8 @@ interface SessionIdInterface
|
|||
* The new session ID. Note that this value is returned internally to PHP for processing.
|
||||
* </p>
|
||||
*/
|
||||
public function create_sid();
|
||||
#[TentativeType]
|
||||
public function create_sid(): string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -138,7 +146,8 @@ interface SessionUpdateTimestampHandlerInterface
|
|||
* Note this value is returned internally to PHP for processing.
|
||||
* </p>
|
||||
*/
|
||||
public function validateId(string $id);
|
||||
#[TentativeType]
|
||||
public function validateId(string $id): bool;
|
||||
|
||||
/**
|
||||
* Update timestamp of a session
|
||||
|
@ -153,7 +162,8 @@ interface SessionUpdateTimestampHandlerInterface
|
|||
* </p>
|
||||
* @return bool
|
||||
*/
|
||||
public function updateTimestamp(string $id, string $data);
|
||||
#[TentativeType]
|
||||
public function updateTimestamp(string $id, string $data): bool;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -182,7 +192,8 @@ class SessionHandler implements SessionHandlerInterface, SessionIdInterface
|
|||
* </p>
|
||||
* @since 5.4
|
||||
*/
|
||||
public function close() {}
|
||||
#[TentativeType]
|
||||
public function close(): bool {}
|
||||
|
||||
/**
|
||||
* Return a new session ID
|
||||
|
@ -190,7 +201,8 @@ class SessionHandler implements SessionHandlerInterface, SessionIdInterface
|
|||
* @return string <p>A session ID valid for the default session handler.</p>
|
||||
* @since 5.5.1
|
||||
*/
|
||||
public function create_sid() {}
|
||||
#[TentativeType]
|
||||
public function create_sid(): string {}
|
||||
|
||||
/**
|
||||
* Destroy a session
|
||||
|
@ -202,7 +214,8 @@ class SessionHandler implements SessionHandlerInterface, SessionIdInterface
|
|||
* </p>
|
||||
* @since 5.4
|
||||
*/
|
||||
public function destroy(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $id) {}
|
||||
#[TentativeType]
|
||||
public function destroy(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $id): bool {}
|
||||
|
||||
/**
|
||||
* Cleanup old sessions
|
||||
|
@ -217,7 +230,8 @@ class SessionHandler implements SessionHandlerInterface, SessionIdInterface
|
|||
* </p>
|
||||
* @since 5.4
|
||||
*/
|
||||
public function gc(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $max_lifetime) {}
|
||||
#[TentativeType]
|
||||
public function gc(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $max_lifetime): int|false {}
|
||||
|
||||
/**
|
||||
* Initialize session
|
||||
|
@ -230,10 +244,11 @@ class SessionHandler implements SessionHandlerInterface, SessionIdInterface
|
|||
* </p>
|
||||
* @since 5.4
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function open(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $path,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name
|
||||
) {}
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* Read session data
|
||||
|
@ -246,7 +261,8 @@ class SessionHandler implements SessionHandlerInterface, SessionIdInterface
|
|||
* </p>
|
||||
* @since 5.4
|
||||
*/
|
||||
public function read(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $id) {}
|
||||
#[TentativeType]
|
||||
public function read(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $id): string|false {}
|
||||
|
||||
/**
|
||||
* Write session data
|
||||
|
@ -265,10 +281,11 @@ class SessionHandler implements SessionHandlerInterface, SessionIdInterface
|
|||
* </p>
|
||||
* @since 5.4
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function write(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $id,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data
|
||||
) {}
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* Validate session id
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
// Start of soap v.
|
||||
use JetBrains\PhpStorm\Deprecated;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\TentativeType;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
/**
|
||||
* The SoapClient class provides a client for SOAP 1.1, SOAP 1.2 servers. It can be used in WSDL
|
||||
|
@ -275,10 +277,11 @@ class SoapClient
|
|||
* @since 5.0.1
|
||||
*/
|
||||
#[Deprecated]
|
||||
#[TentativeType]
|
||||
public function __call(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
|
||||
array $args
|
||||
) {}
|
||||
): mixed {}
|
||||
|
||||
/**
|
||||
* Calls a SOAP function
|
||||
|
@ -321,62 +324,69 @@ class SoapClient
|
|||
* option set to <b>FALSE</b>, a SoapFault object will be returned.
|
||||
* @since 5.0.1
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function __soapCall(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
|
||||
array $args,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'array|null'], default: '')] $options = null,
|
||||
$inputHeaders = null,
|
||||
&$outputHeaders = null
|
||||
) {}
|
||||
): mixed {}
|
||||
|
||||
/**
|
||||
* Returns last SOAP request
|
||||
* @link https://php.net/manual/en/soapclient.getlastrequest.php
|
||||
* @return string The last SOAP request, as an XML string.
|
||||
* @return string|null The last SOAP request, as an XML string.
|
||||
* @since 5.0.1
|
||||
*/
|
||||
public function __getLastRequest() {}
|
||||
#[TentativeType]
|
||||
public function __getLastRequest(): ?string {}
|
||||
|
||||
/**
|
||||
* Returns last SOAP response
|
||||
* @link https://php.net/manual/en/soapclient.getlastresponse.php
|
||||
* @return string The last SOAP response, as an XML string.
|
||||
* @return string|null The last SOAP response, as an XML string.
|
||||
* @since 5.0.1
|
||||
*/
|
||||
public function __getLastResponse() {}
|
||||
#[TentativeType]
|
||||
public function __getLastResponse(): ?string {}
|
||||
|
||||
/**
|
||||
* Returns the SOAP headers from the last request
|
||||
* @link https://php.net/manual/en/soapclient.getlastrequestheaders.php
|
||||
* @return string The last SOAP request headers.
|
||||
* @return string|null The last SOAP request headers.
|
||||
* @since 5.0.1
|
||||
*/
|
||||
public function __getLastRequestHeaders() {}
|
||||
#[TentativeType]
|
||||
public function __getLastRequestHeaders(): ?string {}
|
||||
|
||||
/**
|
||||
* Returns the SOAP headers from the last response
|
||||
* @link https://php.net/manual/en/soapclient.getlastresponseheaders.php
|
||||
* @return string The last SOAP response headers.
|
||||
* @return string|null The last SOAP response headers.
|
||||
* @since 5.0.1
|
||||
*/
|
||||
public function __getLastResponseHeaders() {}
|
||||
#[TentativeType]
|
||||
public function __getLastResponseHeaders(): ?string {}
|
||||
|
||||
/**
|
||||
* Returns list of available SOAP functions
|
||||
* @link https://php.net/manual/en/soapclient.getfunctions.php
|
||||
* @return array The array of SOAP function prototypes, detailing the return type,
|
||||
* @return array|null The array of SOAP function prototypes, detailing the return type,
|
||||
* the function name and type-hinted parameters.
|
||||
* @since 5.0.1
|
||||
*/
|
||||
public function __getFunctions() {}
|
||||
#[TentativeType]
|
||||
public function __getFunctions(): ?array {}
|
||||
|
||||
/**
|
||||
* Returns a list of SOAP types
|
||||
* @link https://php.net/manual/en/soapclient.gettypes.php
|
||||
* @return array The array of SOAP types, detailing all structures and types.
|
||||
* @return array|null The array of SOAP types, detailing all structures and types.
|
||||
* @since 5.0.1
|
||||
*/
|
||||
public function __getTypes() {}
|
||||
#[TentativeType]
|
||||
public function __getTypes(): ?array {}
|
||||
|
||||
/**
|
||||
* Returns a list of all cookies
|
||||
|
@ -384,7 +394,8 @@ class SoapClient
|
|||
* @return array The array of all cookies
|
||||
* @since 5.4.3
|
||||
*/
|
||||
public function __getCookies() {}
|
||||
#[TentativeType]
|
||||
public function __getCookies(): array {}
|
||||
|
||||
/**
|
||||
* Performs a SOAP request
|
||||
|
@ -408,13 +419,14 @@ class SoapClient
|
|||
* @return string|null The XML SOAP response.
|
||||
* @since 5.0.1
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function __doRequest(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $request,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $location,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $action,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $version,
|
||||
#[LanguageLevelTypeAware(["8.0" => 'bool'], default: 'int')] $oneWay = false
|
||||
) {}
|
||||
): ?string {}
|
||||
|
||||
/**
|
||||
* The __setCookie purpose
|
||||
|
@ -428,10 +440,11 @@ class SoapClient
|
|||
* @return void No value is returned.
|
||||
* @since 5.0.4
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function __setCookie(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
|
||||
#[LanguageLevelTypeAware(["8.0" => "string|null"], default: "string")] $value
|
||||
) {}
|
||||
): void {}
|
||||
|
||||
/**
|
||||
* Sets the location of the Web service to use
|
||||
|
@ -442,7 +455,8 @@ class SoapClient
|
|||
* @return string|null The old endpoint URL.
|
||||
* @since 5.0.1
|
||||
*/
|
||||
public function __setLocation(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $location = '') {}
|
||||
#[TentativeType]
|
||||
public function __setLocation(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $location = ''): ?string {}
|
||||
|
||||
/**
|
||||
* Sets SOAP headers for subsequent calls
|
||||
|
@ -455,7 +469,8 @@ class SoapClient
|
|||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
* @since 5.0.5
|
||||
*/
|
||||
public function __setSoapHeaders($headers = null) {}
|
||||
#[TentativeType]
|
||||
public function __setSoapHeaders($headers = null): bool {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -673,7 +688,8 @@ class SoapServer
|
|||
* @return void No value is returned.
|
||||
* @since 5.1.2
|
||||
*/
|
||||
public function setPersistence(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $mode) {}
|
||||
#[TentativeType]
|
||||
public function setPersistence(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $mode): void {}
|
||||
|
||||
/**
|
||||
* Sets the class which handles SOAP requests
|
||||
|
@ -685,10 +701,11 @@ class SoapServer
|
|||
* @return void No value is returned.
|
||||
* @since 5.0.1
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function setClass(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $class,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] ...$args
|
||||
) {}
|
||||
): void {}
|
||||
|
||||
/**
|
||||
* Sets the object which will be used to handle SOAP requests
|
||||
|
@ -698,7 +715,8 @@ class SoapServer
|
|||
* </p>
|
||||
* @return void No value is returned.
|
||||
*/
|
||||
public function setObject(object $object) {}
|
||||
#[TentativeType]
|
||||
public function setObject(object $object): void {}
|
||||
|
||||
/**
|
||||
* Adds one or more functions to handle SOAP requests
|
||||
|
@ -722,7 +740,8 @@ class SoapServer
|
|||
* @return void No value is returned.
|
||||
* @since 5.0.1
|
||||
*/
|
||||
public function addFunction($functions) {}
|
||||
#[TentativeType]
|
||||
public function addFunction($functions): void {}
|
||||
|
||||
/**
|
||||
* Returns list of defined functions
|
||||
|
@ -730,7 +749,8 @@ class SoapServer
|
|||
* @return array An array of the defined functions.
|
||||
* @since 5.0.1
|
||||
*/
|
||||
public function getFunctions() {}
|
||||
#[TentativeType]
|
||||
public function getFunctions(): array {}
|
||||
|
||||
/**
|
||||
* Handles a SOAP request
|
||||
|
@ -742,7 +762,8 @@ class SoapServer
|
|||
* @return void No value is returned.
|
||||
* @since 5.0.1
|
||||
*/
|
||||
public function handle(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $request = null) {}
|
||||
#[TentativeType]
|
||||
public function handle(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $request = null): void {}
|
||||
|
||||
/**
|
||||
* Issue SoapServer fault indicating an error
|
||||
|
@ -765,13 +786,14 @@ class SoapServer
|
|||
* @return void No value is returned.
|
||||
* @since 5.0.1
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function fault(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $code,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $string,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $actor = null,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $details = null,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name = null
|
||||
) {}
|
||||
): void {}
|
||||
|
||||
/**
|
||||
* Add a SOAP header to the response
|
||||
|
@ -782,7 +804,8 @@ class SoapServer
|
|||
* @return void No value is returned.
|
||||
* @since 5.0.1
|
||||
*/
|
||||
public function addSoapHeader(SoapHeader $header) {}
|
||||
#[TentativeType]
|
||||
public function addSoapHeader(SoapHeader $header): void {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -863,7 +886,7 @@ class SoapFault extends Exception
|
|||
* </p>
|
||||
* @since 5.0.1
|
||||
*/
|
||||
#[\JetBrains\PhpStorm\Pure]
|
||||
#[Pure]
|
||||
public function __construct(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'array|string|null'], default: '')] $code,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $string,
|
||||
|
@ -906,6 +929,7 @@ class SoapFault extends Exception
|
|||
* @return string A string describing the SoapFault.
|
||||
* @since 5.0.1
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')]
|
||||
public function __toString() {}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
use JetBrains\PhpStorm\ArrayShape;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
use JetBrains\PhpStorm\Internal\TentativeType;
|
||||
|
||||
/**
|
||||
* A class that interfaces SQLite 3 databases.
|
||||
|
@ -69,11 +70,12 @@ class SQLite3
|
|||
* </p>
|
||||
* @return void No value is returned.
|
||||
*/
|
||||
#[TentativeType]
|
||||
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
|
||||
) {}
|
||||
): void {}
|
||||
|
||||
/**
|
||||
* Closes the database connection
|
||||
|
@ -91,7 +93,8 @@ class SQLite3
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> if the query succeeded, <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function exec(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $query) {}
|
||||
#[TentativeType]
|
||||
public function exec(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $query): bool {}
|
||||
|
||||
/**
|
||||
* Returns the SQLite3 library version as a string constant and as a number
|
||||
|
@ -100,14 +103,16 @@ class SQLite3
|
|||
* "versionNumber".
|
||||
*/
|
||||
#[ArrayShape(["versionString" => "string", "versionNumber" => "int"])]
|
||||
public static function version() {}
|
||||
#[TentativeType]
|
||||
public static function version(): array {}
|
||||
|
||||
/**
|
||||
* Returns the row ID of the most recent INSERT into the database
|
||||
* @link https://php.net/manual/en/sqlite3.lastinsertrowid.php
|
||||
* @return int the row ID of the most recent INSERT into the database
|
||||
*/
|
||||
public function lastInsertRowID() {}
|
||||
#[TentativeType]
|
||||
public function lastInsertRowID(): int {}
|
||||
|
||||
/**
|
||||
* Returns the numeric result code of the most recent failed SQLite request
|
||||
|
@ -115,14 +120,16 @@ class SQLite3
|
|||
* @return int an integer value representing the numeric result code of the most
|
||||
* recent failed SQLite request.
|
||||
*/
|
||||
public function lastErrorCode() {}
|
||||
#[TentativeType]
|
||||
public function lastErrorCode(): int {}
|
||||
|
||||
/**
|
||||
* Returns English text describing the most recent failed SQLite request
|
||||
* @link https://php.net/manual/en/sqlite3.lasterrormsg.php
|
||||
* @return string an English string describing the most recent failed SQLite request.
|
||||
*/
|
||||
public function lastErrorMsg() {}
|
||||
#[TentativeType]
|
||||
public function lastErrorMsg(): string {}
|
||||
|
||||
/**
|
||||
* Sets the busy connection handler
|
||||
|
@ -134,7 +141,8 @@ class SQLite3
|
|||
* @return bool <b>TRUE</b> on success, <b>FALSE</b> on failure.
|
||||
* @since 5.3.3
|
||||
*/
|
||||
public function busyTimeout(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $milliseconds) {}
|
||||
#[TentativeType]
|
||||
public function busyTimeout(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $milliseconds): bool {}
|
||||
|
||||
/**
|
||||
* Attempts to load an SQLite extension library
|
||||
|
@ -145,7 +153,8 @@ class SQLite3
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> if the extension is successfully loaded, <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function loadExtension(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name) {}
|
||||
#[TentativeType]
|
||||
public function loadExtension(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): bool {}
|
||||
|
||||
/**
|
||||
* Returns the number of database rows that were changed (or inserted or
|
||||
|
@ -155,7 +164,8 @@ class SQLite3
|
|||
* database rows changed (or inserted or deleted) by the most recent SQL
|
||||
* statement.
|
||||
*/
|
||||
public function changes() {}
|
||||
#[TentativeType]
|
||||
public function changes(): int {}
|
||||
|
||||
/**
|
||||
* Returns a string that has been properly escaped
|
||||
|
@ -166,7 +176,8 @@ class SQLite3
|
|||
* @return string a properly escaped string that may be used safely in an SQL
|
||||
* statement.
|
||||
*/
|
||||
public static function escapeString(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $string) {}
|
||||
#[TentativeType]
|
||||
public static function escapeString(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $string): string {}
|
||||
|
||||
/**
|
||||
* Prepares an SQL statement for execution
|
||||
|
@ -176,7 +187,8 @@ class SQLite3
|
|||
* </p>
|
||||
* @return SQLite3Stmt|false an <b>SQLite3Stmt</b> object on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function prepare(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $query) {}
|
||||
#[TentativeType]
|
||||
public function prepare(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $query): SQLite3Stmt|false {}
|
||||
|
||||
/**
|
||||
* Executes an SQL query
|
||||
|
@ -186,7 +198,8 @@ class SQLite3
|
|||
* </p>
|
||||
* @return SQLite3Result|false an <b>SQLite3Result</b> object, or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function query(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $query) {}
|
||||
#[TentativeType]
|
||||
public function query(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $query): SQLite3Result|false {}
|
||||
|
||||
/**
|
||||
* Executes a query and returns a single result
|
||||
|
@ -211,10 +224,11 @@ class SQLite3
|
|||
* <p>
|
||||
* Invalid or failing queries will return <b>FALSE</b>.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function querySingle(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $query,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $entireRow = false
|
||||
) {}
|
||||
): mixed {}
|
||||
|
||||
/**
|
||||
* Registers a PHP function for use as an SQL scalar function
|
||||
|
@ -237,12 +251,13 @@ class SQLite3
|
|||
* the same result given the same inputs within a single SQL statement.</p>
|
||||
* @return bool <b>TRUE</b> upon successful creation of the function, <b>FALSE</b> on failure.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function createFunction(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $argCount = -1,
|
||||
int $flags = 0
|
||||
) {}
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* Registers a PHP function for use as an SQL aggregate function
|
||||
|
@ -266,12 +281,13 @@ class SQLite3
|
|||
* @return bool <b>TRUE</b> upon successful creation of the aggregate, <b>FALSE</b> on
|
||||
* failure.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function createAggregate(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $stepCallback,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $finalCallback,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $argCount = -1
|
||||
) {}
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* Registers a PHP function for use as an SQL collating function
|
||||
|
@ -289,7 +305,8 @@ class SQLite3
|
|||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
* @since 5.3.11
|
||||
*/
|
||||
public function createCollation(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name, callable $callback) {}
|
||||
#[TentativeType]
|
||||
public function createCollation(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name, callable $callback): bool {}
|
||||
|
||||
/**
|
||||
* Opens a stream resource to read a BLOB
|
||||
|
@ -316,7 +333,8 @@ class SQLite3
|
|||
* @param bool $enable
|
||||
* @return bool Returns the old value; true if exceptions were enabled, false otherwise.
|
||||
*/
|
||||
public function enableExceptions(#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $enable = false) {}
|
||||
#[TentativeType]
|
||||
public function enableExceptions(#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $enable = false): bool {}
|
||||
|
||||
/**
|
||||
* Instantiates an SQLite3 object and opens an SQLite 3 database
|
||||
|
@ -347,13 +365,15 @@ class SQLite3
|
|||
* @return int
|
||||
* @since 7.4
|
||||
*/
|
||||
public function lastExtendedErrorCode() {}
|
||||
#[TentativeType]
|
||||
public function lastExtendedErrorCode(): int {}
|
||||
|
||||
/**
|
||||
* @param bool $enable
|
||||
* @since 7.4
|
||||
*/
|
||||
public function enableExtendedResultCodes(bool $enable = true) {}
|
||||
#[TentativeType]
|
||||
public function enableExtendedResultCodes(bool $enable = true): bool {}
|
||||
|
||||
/**
|
||||
* @param SQLite3 $destination
|
||||
|
@ -362,14 +382,16 @@ class SQLite3
|
|||
* @return bool
|
||||
* @since 7.4
|
||||
*/
|
||||
public function backup(SQLite3 $destination, string $sourceDatabase = 'main', string $destinationDatabase = 'main') {}
|
||||
#[TentativeType]
|
||||
public function backup(SQLite3 $destination, string $sourceDatabase = 'main', string $destinationDatabase = 'main'): bool {}
|
||||
|
||||
/**
|
||||
* @param null|callable $callback
|
||||
* @return bool
|
||||
* @since 8.0
|
||||
*/
|
||||
public function setAuthorizer(?callable $callback) {}
|
||||
#[TentativeType]
|
||||
public function setAuthorizer(?callable $callback): bool {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -383,21 +405,24 @@ class SQLite3Stmt
|
|||
* @link https://php.net/manual/en/sqlite3stmt.paramcount.php
|
||||
* @return int the number of parameters within the prepared statement.
|
||||
*/
|
||||
public function paramCount() {}
|
||||
#[TentativeType]
|
||||
public function paramCount(): int {}
|
||||
|
||||
/**
|
||||
* Closes the prepared statement
|
||||
* @link https://php.net/manual/en/sqlite3stmt.close.php
|
||||
* @return bool <b>TRUE</b>
|
||||
*/
|
||||
public function close() {}
|
||||
#[TentativeType]
|
||||
public function close(): bool {}
|
||||
|
||||
/**
|
||||
* Resets the prepared statement
|
||||
* @link https://php.net/manual/en/sqlite3stmt.reset.php
|
||||
* @return bool <b>TRUE</b> if the statement is successfully reset, <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function reset() {}
|
||||
#[TentativeType]
|
||||
public function reset(): bool {}
|
||||
|
||||
/**
|
||||
* Clears all current bound parameters
|
||||
|
@ -405,7 +430,8 @@ class SQLite3Stmt
|
|||
* @return bool <b>TRUE</b> on successful clearing of bound parameters, <b>FALSE</b> on
|
||||
* failure.
|
||||
*/
|
||||
public function clear() {}
|
||||
#[TentativeType]
|
||||
public function clear(): bool {}
|
||||
|
||||
/**
|
||||
* Executes a prepared statement and returns a result set object
|
||||
|
@ -413,7 +439,8 @@ class SQLite3Stmt
|
|||
* @return SQLite3Result|false an <b>SQLite3Result</b> object on successful execution of the prepared
|
||||
* statement, <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function execute() {}
|
||||
#[TentativeType]
|
||||
public function execute(): SQLite3Result|false {}
|
||||
|
||||
/**
|
||||
* Binds a parameter to a statement variable
|
||||
|
@ -436,11 +463,12 @@ class SQLite3Stmt
|
|||
* @return bool <b>TRUE</b> if the parameter is bound to the statement variable, <b>FALSE</b>
|
||||
* on failure.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function bindParam(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|int'], default: '')] $param,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] &$var,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type = SQLITE3_TEXT
|
||||
) {}
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* Binds the value of a parameter to a statement variable
|
||||
|
@ -463,13 +491,15 @@ class SQLite3Stmt
|
|||
* @return bool <b>TRUE</b> if the value is bound to the statement variable, <b>FALSE</b>
|
||||
* on failure.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function bindValue(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|int'], default: '')] $param,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type = SQLITE3_TEXT
|
||||
) {}
|
||||
): bool {}
|
||||
|
||||
public function readOnly() {}
|
||||
#[TentativeType]
|
||||
public function readOnly(): bool {}
|
||||
|
||||
/**
|
||||
* @param SQLite3 $sqlite3
|
||||
|
@ -487,7 +517,8 @@ class SQLite3Stmt
|
|||
* @return string|false Returns the SQL of the prepared statement, or FALSE on failure.
|
||||
* @since 7.4
|
||||
*/
|
||||
public function getSQL(bool $expand = false) {}
|
||||
#[TentativeType]
|
||||
public function getSQL(bool $expand = false): string|false {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -501,7 +532,8 @@ class SQLite3Result
|
|||
* @link https://php.net/manual/en/sqlite3result.numcolumns.php
|
||||
* @return int the number of columns in the result set.
|
||||
*/
|
||||
public function numColumns() {}
|
||||
#[TentativeType]
|
||||
public function numColumns(): int {}
|
||||
|
||||
/**
|
||||
* Returns the name of the nth column
|
||||
|
@ -509,10 +541,11 @@ class SQLite3Result
|
|||
* @param int $column <p>
|
||||
* The numeric zero-based index of the column.
|
||||
* </p>
|
||||
* @return string the string name of the column identified by
|
||||
* @return string|false the string name of the column identified by
|
||||
* <i>column_number</i>.
|
||||
*/
|
||||
public function columnName(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $column) {}
|
||||
#[TentativeType]
|
||||
public function columnName(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $column): string|false {}
|
||||
|
||||
/**
|
||||
* Returns the type of the nth column
|
||||
|
@ -520,13 +553,14 @@ class SQLite3Result
|
|||
* @param int $column <p>
|
||||
* The numeric zero-based index of the column.
|
||||
* </p>
|
||||
* @return int the data type index of the column identified by
|
||||
* @return int|false the data type index of the column identified by
|
||||
* <i>column_number</i> (one of
|
||||
* <b>SQLITE3_INTEGER</b>, <b>SQLITE3_FLOAT</b>,
|
||||
* <b>SQLITE3_TEXT</b>, <b>SQLITE3_BLOB</b>, or
|
||||
* <b>SQLITE3_NULL</b>).
|
||||
*/
|
||||
public function columnType(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $column) {}
|
||||
#[TentativeType]
|
||||
public function columnType(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $column): int|false {}
|
||||
|
||||
/**
|
||||
* Fetches a result row as an associative or numerically indexed array or both
|
||||
|
@ -543,7 +577,8 @@ class SQLite3Result
|
|||
* @return array|false a result row as an associatively or numerically indexed array or
|
||||
* both. Alternately will return <b>FALSE</b> if there are no more rows.
|
||||
*/
|
||||
public function fetchArray(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $mode = SQLITE3_BOTH) {}
|
||||
#[TentativeType]
|
||||
public function fetchArray(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $mode = SQLITE3_BOTH): array|false {}
|
||||
|
||||
/**
|
||||
* Resets the result set back to the first row
|
||||
|
@ -551,7 +586,8 @@ class SQLite3Result
|
|||
* @return bool <b>TRUE</b> if the result set is successfully reset
|
||||
* back to the first row, <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function reset() {}
|
||||
#[TentativeType]
|
||||
public function reset(): bool {}
|
||||
|
||||
/**
|
||||
* Closes the result set
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace {
|
|||
* </p>
|
||||
* @return array an array of the parameters. The parameters can be given an index with the => operator.
|
||||
*/
|
||||
function PS_UNRESERVE_PREFIX_array(...$_) {};
|
||||
function PS_UNRESERVE_PREFIX_array(...$_) {}
|
||||
|
||||
/**
|
||||
* Assigns a list of variables in one operation.
|
||||
|
@ -24,7 +24,7 @@ namespace {
|
|||
* @param mixed ...$_ [optional] <p>Another variable ...</p>
|
||||
* @return array the assigned array.
|
||||
*/
|
||||
function PS_UNRESERVE_PREFIX_list($var1, ...$_) {};
|
||||
function PS_UNRESERVE_PREFIX_list($var1, ...$_) {}
|
||||
|
||||
/**
|
||||
* <p>Terminates execution of the script. Shutdown functions and object destructors will always be executed even if exit is called.</p>
|
||||
|
@ -42,7 +42,7 @@ namespace {
|
|||
* </p>
|
||||
* @return void
|
||||
*/
|
||||
function PS_UNRESERVE_PREFIX_die($status = "") {};
|
||||
function PS_UNRESERVE_PREFIX_die($status = "") {}
|
||||
|
||||
/**
|
||||
* <p>Terminates execution of the script. Shutdown functions and object destructors will always be executed even if exit is called.</p>
|
||||
|
@ -60,7 +60,7 @@ namespace {
|
|||
* </p>
|
||||
* @return void
|
||||
*/
|
||||
function PS_UNRESERVE_PREFIX_exit($status = "") {};
|
||||
function PS_UNRESERVE_PREFIX_exit($status = "") {}
|
||||
|
||||
/**
|
||||
* Determine whether a variable is considered to be empty. A variable is considered empty if it does not exist or if its value
|
||||
|
@ -89,7 +89,7 @@ namespace {
|
|||
* </ul>
|
||||
* </p>
|
||||
*/
|
||||
function PS_UNRESERVE_PREFIX_empty($var) {};
|
||||
function PS_UNRESERVE_PREFIX_empty($var) {}
|
||||
|
||||
/**
|
||||
* <p>Determine if a variable is set and is not <b>NULL</b>.</p>
|
||||
|
@ -102,7 +102,7 @@ namespace {
|
|||
* @param mixed ...$_ [optional] <p>Another variable ...</p>
|
||||
* @return bool Returns <b>TRUE</b> if var exists and has value other than <b>NULL</b>, <b>FALSE</b> otherwise.
|
||||
*/
|
||||
function PS_UNRESERVE_PREFIX_isset($var, ...$_) {};
|
||||
function PS_UNRESERVE_PREFIX_isset($var, ...$_) {}
|
||||
|
||||
/**
|
||||
* <p>Destroys the specified variables.</p>
|
||||
|
@ -112,7 +112,7 @@ namespace {
|
|||
* @param mixed ...$_ [optional] <p>Another variable ...</p>
|
||||
* @return void
|
||||
*/
|
||||
function PS_UNRESERVE_PREFIX_unset($var, ...$_) {};
|
||||
function PS_UNRESERVE_PREFIX_unset($var, ...$_) {}
|
||||
|
||||
/**
|
||||
* <p>Evaluates the given code as PHP.</p>
|
||||
|
@ -144,7 +144,7 @@ namespace {
|
|||
* case <b>eval()</b> returned <b>FALSE</b> and execution of the following code continued normally. It is not possible to catch a parse
|
||||
* error in <b>eval()</b> using set_error_handler().
|
||||
*/
|
||||
function PS_UNRESERVE_PREFIX_eval($code) {};
|
||||
function PS_UNRESERVE_PREFIX_eval($code) {}
|
||||
|
||||
/**
|
||||
* Generator objects are returned from generators, cannot be instantiated via new.
|
||||
|
@ -152,55 +152,59 @@ namespace {
|
|||
* @link https://wiki.php.net/rfc/generators
|
||||
*/
|
||||
final class Generator implements Iterator
|
||||
{
|
||||
{
|
||||
/**
|
||||
* Throws an exception if the generator is currently after the first yield.
|
||||
* @return void
|
||||
*/
|
||||
public function rewind() {}
|
||||
public function rewind(): void {}
|
||||
|
||||
/**
|
||||
* Returns false if the generator has been closed, true otherwise.
|
||||
* @return bool
|
||||
*/
|
||||
public function valid() {}
|
||||
public function valid(): bool {}
|
||||
|
||||
/**
|
||||
* Returns whatever was passed to yield or null if nothing was passed or the generator is already closed.
|
||||
* @return mixed
|
||||
*/
|
||||
public function current() {}
|
||||
public function current(): mixed {}
|
||||
|
||||
/**
|
||||
* Returns the yielded key or, if none was specified, an auto-incrementing key or null if the generator is already closed.
|
||||
* @return string|float|int|bool|null
|
||||
* @return mixed
|
||||
*/
|
||||
public function key() {}
|
||||
public function key(): mixed {}
|
||||
|
||||
/**
|
||||
* Resumes the generator (unless the generator is already closed).
|
||||
* @return void
|
||||
*/
|
||||
public function next() {}
|
||||
public function next(): void {}
|
||||
|
||||
/**
|
||||
* Sets the return value of the yield expression and resumes the generator (unless the generator is already closed).
|
||||
* @param mixed $value
|
||||
* @return mixed
|
||||
*/
|
||||
public function send(mixed $value) {}
|
||||
public function send(mixed $value): mixed {}
|
||||
|
||||
/**
|
||||
* Throws an exception at the current suspension point in the generator.
|
||||
* @param Throwable $exception
|
||||
* @return mixed
|
||||
*/
|
||||
public function PS_UNRESERVE_PREFIX_throw(Throwable $exception) {}
|
||||
public function PS_UNRESERVE_PREFIX_throw(Throwable $exception): mixed {}
|
||||
|
||||
/**
|
||||
* Returns whatever was passed to return or null if nothing.
|
||||
* Throws an exception if the generator is still valid.
|
||||
* @link https://wiki.php.net/rfc/generator-return-expressions
|
||||
* @return mixed|null
|
||||
* @return mixed
|
||||
* @since 7.0
|
||||
*/
|
||||
public function getReturn() {}
|
||||
public function getReturn(): mixed {}
|
||||
|
||||
/**
|
||||
* Serialize callback
|
||||
|
@ -215,181 +219,184 @@ namespace {
|
|||
}
|
||||
|
||||
namespace ___PHPSTORM_HELPERS {
|
||||
class PS_UNRESERVE_PREFIX_this {}
|
||||
class PS_UNRESERVE_PREFIX_static {}
|
||||
class object
|
||||
{
|
||||
/**
|
||||
* PHP 5 allows developers to declare constructor methods for classes.
|
||||
* Classes which have a constructor method call this method on each newly-created object,
|
||||
* so it is suitable for any initialization that the object may need before it is used.
|
||||
*
|
||||
* Note: Parent constructors are not called implicitly if the child class defines a constructor.
|
||||
* In order to run a parent constructor, a call to parent::__construct() within the child constructor is required.
|
||||
*
|
||||
* param [ mixed $args [, $... ]]
|
||||
* @link https://php.net/manual/en/language.oop5.decon.php
|
||||
*/
|
||||
public function __construct() {}
|
||||
class PS_UNRESERVE_PREFIX_this {}
|
||||
|
||||
/**
|
||||
* PHP 5 introduces a destructor concept similar to that of other object-oriented languages, such as C++.
|
||||
* The destructor method will be called as soon as all references to a particular object are removed or
|
||||
* when the object is explicitly destroyed or in any order in shutdown sequence.
|
||||
*
|
||||
* Like constructors, parent destructors will not be called implicitly by the engine.
|
||||
* In order to run a parent destructor, one would have to explicitly call parent::__destruct() in the destructor body.
|
||||
*
|
||||
* Note: Destructors called during the script shutdown have HTTP headers already sent.
|
||||
* The working directory in the script shutdown phase can be different with some SAPIs (e.g. Apache).
|
||||
*
|
||||
* Note: Attempting to throw an exception from a destructor (called in the time of script termination) causes a fatal error.
|
||||
*
|
||||
* @return void
|
||||
* @link https://php.net/manual/en/language.oop5.decon.php
|
||||
*/
|
||||
public function __destruct() {}
|
||||
class PS_UNRESERVE_PREFIX_static {}
|
||||
|
||||
/**
|
||||
* is triggered when invoking inaccessible methods in an object context.
|
||||
*
|
||||
* @param string $name
|
||||
* @param array $arguments
|
||||
* @return mixed
|
||||
* @link https://php.net/manual/en/language.oop5.overloading.php#language.oop5.overloading.methods
|
||||
*/
|
||||
public function __call(string $name, array $arguments) {}
|
||||
class object
|
||||
{
|
||||
/**
|
||||
* PHP 5 allows developers to declare constructor methods for classes.
|
||||
* Classes which have a constructor method call this method on each newly-created object,
|
||||
* so it is suitable for any initialization that the object may need before it is used.
|
||||
*
|
||||
* Note: Parent constructors are not called implicitly if the child class defines a constructor.
|
||||
* In order to run a parent constructor, a call to parent::__construct() within the child constructor is required.
|
||||
*
|
||||
* param [ mixed $args [, $... ]]
|
||||
* @link https://php.net/manual/en/language.oop5.decon.php
|
||||
*/
|
||||
public function __construct() {}
|
||||
|
||||
/**
|
||||
* is triggered when invoking inaccessible methods in a static context.
|
||||
*
|
||||
* @param string $name
|
||||
* @param array $arguments
|
||||
* @return mixed
|
||||
* @link https://php.net/manual/en/language.oop5.overloading.php#language.oop5.overloading.methods
|
||||
*/
|
||||
public static function __callStatic(string $name, array $arguments) {}
|
||||
/**
|
||||
* PHP 5 introduces a destructor concept similar to that of other object-oriented languages, such as C++.
|
||||
* The destructor method will be called as soon as all references to a particular object are removed or
|
||||
* when the object is explicitly destroyed or in any order in shutdown sequence.
|
||||
*
|
||||
* Like constructors, parent destructors will not be called implicitly by the engine.
|
||||
* In order to run a parent destructor, one would have to explicitly call parent::__destruct() in the destructor body.
|
||||
*
|
||||
* Note: Destructors called during the script shutdown have HTTP headers already sent.
|
||||
* The working directory in the script shutdown phase can be different with some SAPIs (e.g. Apache).
|
||||
*
|
||||
* Note: Attempting to throw an exception from a destructor (called in the time of script termination) causes a fatal error.
|
||||
*
|
||||
* @return void
|
||||
* @link https://php.net/manual/en/language.oop5.decon.php
|
||||
*/
|
||||
public function __destruct() {}
|
||||
|
||||
/**
|
||||
* is utilized for reading data from inaccessible members.
|
||||
*
|
||||
* @param string $name
|
||||
* @return mixed
|
||||
* @link https://php.net/manual/en/language.oop5.overloading.php#language.oop5.overloading.members
|
||||
*/
|
||||
public function __get(string $name) {}
|
||||
/**
|
||||
* is triggered when invoking inaccessible methods in an object context.
|
||||
*
|
||||
* @param string $name
|
||||
* @param array $arguments
|
||||
* @return mixed
|
||||
* @link https://php.net/manual/en/language.oop5.overloading.php#language.oop5.overloading.methods
|
||||
*/
|
||||
public function __call(string $name, array $arguments) {}
|
||||
|
||||
/**
|
||||
* run when writing data to inaccessible members.
|
||||
*
|
||||
* @param string $name
|
||||
* @param mixed $value
|
||||
* @return void
|
||||
* @link https://php.net/manual/en/language.oop5.overloading.php#language.oop5.overloading.members
|
||||
*/
|
||||
public function __set(string $name, $value): void {}
|
||||
/**
|
||||
* is triggered when invoking inaccessible methods in a static context.
|
||||
*
|
||||
* @param string $name
|
||||
* @param array $arguments
|
||||
* @return mixed
|
||||
* @link https://php.net/manual/en/language.oop5.overloading.php#language.oop5.overloading.methods
|
||||
*/
|
||||
public static function __callStatic(string $name, array $arguments) {}
|
||||
|
||||
/**
|
||||
* is triggered by calling isset() or empty() on inaccessible members.
|
||||
*
|
||||
* @param string $name
|
||||
* @return bool
|
||||
* @link https://php.net/manual/en/language.oop5.overloading.php#language.oop5.overloading.members
|
||||
*/
|
||||
public function __isset(string $name): bool {}
|
||||
/**
|
||||
* is invoked when unset() is used on inaccessible members.
|
||||
*
|
||||
* @param string $name
|
||||
* @return void
|
||||
* @link https://php.net/manual/en/language.oop5.overloading.php#language.oop5.overloading.members
|
||||
*/
|
||||
public function __unset(string $name): void {}
|
||||
/**
|
||||
* is utilized for reading data from inaccessible members.
|
||||
*
|
||||
* @param string $name
|
||||
* @return mixed
|
||||
* @link https://php.net/manual/en/language.oop5.overloading.php#language.oop5.overloading.members
|
||||
*/
|
||||
public function __get(string $name) {}
|
||||
|
||||
/**
|
||||
* serialize() checks if your class has a function with the magic name __sleep.
|
||||
* If so, that function is executed prior to any serialization.
|
||||
* It can clean up the object and is supposed to return an array with the names of all variables of that object that should be serialized.
|
||||
* If the method doesn't return anything then NULL is serialized and E_NOTICE is issued.
|
||||
* The intended use of __sleep is to commit pending data or perform similar cleanup tasks.
|
||||
* Also, the function is useful if you have very large objects which do not need to be saved completely.
|
||||
*
|
||||
* @return string[]
|
||||
* @link https://php.net/manual/en/language.oop5.magic.php#language.oop5.magic.sleep
|
||||
*/
|
||||
public function __sleep(): array {}
|
||||
/**
|
||||
* run when writing data to inaccessible members.
|
||||
*
|
||||
* @param string $name
|
||||
* @param mixed $value
|
||||
* @return void
|
||||
* @link https://php.net/manual/en/language.oop5.overloading.php#language.oop5.overloading.members
|
||||
*/
|
||||
public function __set(string $name, $value): void {}
|
||||
|
||||
/**
|
||||
* unserialize() checks for the presence of a function with the magic name __wakeup.
|
||||
* If present, this function can reconstruct any resources that the object may have.
|
||||
* The intended use of __wakeup is to reestablish any database connections that may have been lost during
|
||||
* serialization and perform other reinitialization tasks.
|
||||
*
|
||||
* @return void
|
||||
* @link https://php.net/manual/en/language.oop5.magic.php#language.oop5.magic.sleep
|
||||
*/
|
||||
public function __wakeup(): void {}
|
||||
/**
|
||||
* is triggered by calling isset() or empty() on inaccessible members.
|
||||
*
|
||||
* @param string $name
|
||||
* @return bool
|
||||
* @link https://php.net/manual/en/language.oop5.overloading.php#language.oop5.overloading.members
|
||||
*/
|
||||
public function __isset(string $name): bool {}
|
||||
|
||||
/**
|
||||
* The __toString method allows a class to decide how it will react when it is converted to a string.
|
||||
*
|
||||
* @return string
|
||||
* @link https://php.net/manual/en/language.oop5.magic.php#language.oop5.magic.tostring
|
||||
*/
|
||||
public function __toString(): string {}
|
||||
/**
|
||||
* is invoked when unset() is used on inaccessible members.
|
||||
*
|
||||
* @param string $name
|
||||
* @return void
|
||||
* @link https://php.net/manual/en/language.oop5.overloading.php#language.oop5.overloading.members
|
||||
*/
|
||||
public function __unset(string $name): void {}
|
||||
|
||||
/**
|
||||
* The __invoke method is called when a script tries to call an object as a function.
|
||||
*
|
||||
* @return mixed
|
||||
* @link https://php.net/manual/en/language.oop5.magic.php#language.oop5.magic.invoke
|
||||
*/
|
||||
public function __invoke() {}
|
||||
/**
|
||||
* serialize() checks if your class has a function with the magic name __sleep.
|
||||
* If so, that function is executed prior to any serialization.
|
||||
* It can clean up the object and is supposed to return an array with the names of all variables of that object that should be serialized.
|
||||
* If the method doesn't return anything then NULL is serialized and E_NOTICE is issued.
|
||||
* The intended use of __sleep is to commit pending data or perform similar cleanup tasks.
|
||||
* Also, the function is useful if you have very large objects which do not need to be saved completely.
|
||||
*
|
||||
* @return string[]
|
||||
* @link https://php.net/manual/en/language.oop5.magic.php#language.oop5.magic.sleep
|
||||
*/
|
||||
public function __sleep(): array {}
|
||||
|
||||
/**
|
||||
* This method is called by var_dump() when dumping an object to get the properties that should be shown.
|
||||
* If the method isn't defined on an object, then all public, protected and private properties will be shown.
|
||||
*
|
||||
* @return array|null
|
||||
* @link https://php.net/manual/en/language.oop5.magic.php#language.oop5.magic.debuginfo
|
||||
*/
|
||||
public function __debugInfo(): ?array {}
|
||||
/**
|
||||
* unserialize() checks for the presence of a function with the magic name __wakeup.
|
||||
* If present, this function can reconstruct any resources that the object may have.
|
||||
* The intended use of __wakeup is to reestablish any database connections that may have been lost during
|
||||
* serialization and perform other reinitialization tasks.
|
||||
*
|
||||
* @return void
|
||||
* @link https://php.net/manual/en/language.oop5.magic.php#language.oop5.magic.sleep
|
||||
*/
|
||||
public function __wakeup(): void {}
|
||||
|
||||
/**
|
||||
* This static method is called for classes exported by var_export() since PHP 5.1.0.
|
||||
* The only parameter of this method is an array containing exported properties in the form array('property' => value, ...).
|
||||
*
|
||||
* @param array $an_array
|
||||
* @return object
|
||||
* @link https://php.net/manual/en/language.oop5.magic.php#language.oop5.magic.set-state
|
||||
*/
|
||||
public static function __set_state(array $an_array): object {}
|
||||
/**
|
||||
* The __toString method allows a class to decide how it will react when it is converted to a string.
|
||||
*
|
||||
* @return string
|
||||
* @link https://php.net/manual/en/language.oop5.magic.php#language.oop5.magic.tostring
|
||||
*/
|
||||
public function __toString(): string {}
|
||||
|
||||
/**
|
||||
* When an object is cloned, PHP 5 will perform a shallow copy of all of the object's properties.
|
||||
* Any properties that are references to other variables, will remain references.
|
||||
* Once the cloning is complete, if a __clone() method is defined,
|
||||
* then the newly created object's __clone() method will be called, to allow any necessary properties that need to be changed.
|
||||
* NOT CALLABLE DIRECTLY.
|
||||
*
|
||||
* @return void
|
||||
* @link https://php.net/manual/en/language.oop5.cloning.php
|
||||
*/
|
||||
public function __clone(): void {}
|
||||
/**
|
||||
* The __invoke method is called when a script tries to call an object as a function.
|
||||
*
|
||||
* @return mixed
|
||||
* @link https://php.net/manual/en/language.oop5.magic.php#language.oop5.magic.invoke
|
||||
*/
|
||||
public function __invoke() {}
|
||||
|
||||
/**
|
||||
* Returns array containing all the necessary state of the object.
|
||||
* @since 7.4
|
||||
* @link https://wiki.php.net/rfc/custom_object_serialization
|
||||
*/
|
||||
public function __serialize(): array {}
|
||||
/**
|
||||
* This method is called by var_dump() when dumping an object to get the properties that should be shown.
|
||||
* If the method isn't defined on an object, then all public, protected and private properties will be shown.
|
||||
*
|
||||
* @return array|null
|
||||
* @link https://php.net/manual/en/language.oop5.magic.php#language.oop5.magic.debuginfo
|
||||
*/
|
||||
public function __debugInfo(): ?array {}
|
||||
|
||||
/**
|
||||
* Restores the object state from the given data array.
|
||||
* @param array $data
|
||||
* @since 7.4
|
||||
* @link https://wiki.php.net/rfc/custom_object_serialization
|
||||
*/
|
||||
public function __unserialize(array $data): void {}
|
||||
}
|
||||
/**
|
||||
* This static method is called for classes exported by var_export() since PHP 5.1.0.
|
||||
* The only parameter of this method is an array containing exported properties in the form array('property' => value, ...).
|
||||
*
|
||||
* @param array $an_array
|
||||
* @return object
|
||||
* @link https://php.net/manual/en/language.oop5.magic.php#language.oop5.magic.set-state
|
||||
*/
|
||||
public static function __set_state(array $an_array): object {}
|
||||
|
||||
/**
|
||||
* When an object is cloned, PHP 5 will perform a shallow copy of all of the object's properties.
|
||||
* Any properties that are references to other variables, will remain references.
|
||||
* Once the cloning is complete, if a __clone() method is defined,
|
||||
* then the newly created object's __clone() method will be called, to allow any necessary properties that need to be changed.
|
||||
* NOT CALLABLE DIRECTLY.
|
||||
*
|
||||
* @return void
|
||||
* @link https://php.net/manual/en/language.oop5.cloning.php
|
||||
*/
|
||||
public function __clone(): void {}
|
||||
|
||||
/**
|
||||
* Returns array containing all the necessary state of the object.
|
||||
* @since 7.4
|
||||
* @link https://wiki.php.net/rfc/custom_object_serialization
|
||||
*/
|
||||
public function __serialize(): array {}
|
||||
|
||||
/**
|
||||
* Restores the object state from the given data array.
|
||||
* @param array $data
|
||||
* @since 7.4
|
||||
* @link https://wiki.php.net/rfc/custom_object_serialization
|
||||
*/
|
||||
public function __unserialize(array $data): void {}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,14 +5,15 @@
|
|||
use JetBrains\PhpStorm\Deprecated;
|
||||
use JetBrains\PhpStorm\ExpectedValues;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\TentativeType;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
class __PHP_Incomplete_Class
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $__PHP_Incomplete_Class_Name;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $__PHP_Incomplete_Class_Name;
|
||||
}
|
||||
|
||||
class php_user_filter
|
||||
|
@ -68,23 +69,26 @@ class php_user_filter
|
|||
* </td>
|
||||
* </tr>
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function filter(
|
||||
$in,
|
||||
$out,
|
||||
&$consumed,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $closing
|
||||
) {}
|
||||
): int {}
|
||||
|
||||
/**
|
||||
* @link https://php.net/manual/en/php-user-filter.oncreate.php
|
||||
* @return bool
|
||||
*/
|
||||
public function onCreate() {}
|
||||
#[TentativeType]
|
||||
public function onCreate(): bool {}
|
||||
|
||||
/**
|
||||
* @link https://php.net/manual/en/php-user-filter.onclose.php
|
||||
*/
|
||||
public function onClose() {}
|
||||
#[TentativeType]
|
||||
public function onClose(): void {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -81,8 +81,6 @@ function header_register_callback(callable $callback): bool {}
|
|||
|
||||
/**
|
||||
* Get the size of an image from a string.
|
||||
* @since 5.4
|
||||
* @link https://secure.php.net/manual/en/function.getimagesizefromstring.php
|
||||
* @param string $string The image data, as a string.
|
||||
* @param array &$image_info [optional] This optional parameter allows you to extract<br>
|
||||
* some extended information from the image file. Currently, this will <br>
|
||||
|
@ -98,6 +96,8 @@ function header_register_callback(callable $callback): bool {}
|
|||
* On failure, FALSE is returned.
|
||||
* @link https://secure.php.net/manual/en/function.getimagesizefromstring.php
|
||||
* @since 5.4
|
||||
* @link https://secure.php.net/manual/en/function.getimagesizefromstring.php
|
||||
* @since 5.4
|
||||
*/
|
||||
function getimagesizefromstring(string $string, &$image_info): array|false {}
|
||||
|
||||
|
@ -650,7 +650,7 @@ function count(Countable|array $value, int $mode = COUNT_NORMAL): int {}
|
|||
* a function returning an array because only actual variables may be
|
||||
* passed by reference.
|
||||
* </p>
|
||||
* @return mixed|false the value of the last element or false for empty array.
|
||||
* @return mixed the value of the last element or false for empty array.
|
||||
* @meta
|
||||
*/
|
||||
function end(object|array &$array): mixed {}
|
||||
|
@ -812,7 +812,7 @@ function array_search(mixed $needle, array $haystack, bool $strict = false): str
|
|||
/**
|
||||
* Import variables into the current symbol table from an array
|
||||
* @link https://php.net/manual/en/function.extract.php
|
||||
* @param array &$array<p>
|
||||
* @param array &$array <p>
|
||||
* Note that prefix is only required if
|
||||
* extract_type is EXTR_PREFIX_SAME,
|
||||
* EXTR_PREFIX_ALL, EXTR_PREFIX_INVALID
|
||||
|
@ -838,14 +838,14 @@ function array_search(mixed $needle, array $haystack, bool $strict = false): str
|
|||
function extract(
|
||||
array &$array,
|
||||
#[ExpectedValues(flags: [
|
||||
EXTR_OVERWRITE,
|
||||
EXTR_SKIP,
|
||||
EXTR_PREFIX_SAME,
|
||||
EXTR_PREFIX_ALL,
|
||||
EXTR_PREFIX_INVALID,
|
||||
EXTR_PREFIX_IF_EXISTS,
|
||||
EXTR_REFS
|
||||
])] int $flags,
|
||||
EXTR_OVERWRITE,
|
||||
EXTR_SKIP,
|
||||
EXTR_PREFIX_SAME,
|
||||
EXTR_PREFIX_ALL,
|
||||
EXTR_PREFIX_INVALID,
|
||||
EXTR_PREFIX_IF_EXISTS,
|
||||
EXTR_REFS
|
||||
])] int $flags,
|
||||
string $prefix
|
||||
): int {}
|
||||
|
||||
|
|
|
@ -978,21 +978,21 @@ function version_compare(
|
|||
string $version1,
|
||||
string $version2,
|
||||
#[ExpectedValues(values: [
|
||||
"<",
|
||||
"lt",
|
||||
"<=",
|
||||
"le",
|
||||
">",
|
||||
"gt",
|
||||
">=",
|
||||
"ge",
|
||||
"==",
|
||||
"=",
|
||||
"eq",
|
||||
"!=",
|
||||
"<>",
|
||||
"ne"
|
||||
])] ?string $operator
|
||||
"<",
|
||||
"lt",
|
||||
"<=",
|
||||
"le",
|
||||
">",
|
||||
"gt",
|
||||
">=",
|
||||
"ge",
|
||||
"==",
|
||||
"=",
|
||||
"eq",
|
||||
"!=",
|
||||
"<>",
|
||||
"ne"
|
||||
])] ?string $operator
|
||||
): int|bool {}
|
||||
|
||||
/**
|
||||
|
|
|
@ -6,7 +6,7 @@ RUN set -eux; \
|
|||
libmcrypt-dev imap-dev php8-imap enchant2 php8-enchant bzip2-dev gettext-dev libxml2-dev php8-dev php8-gd icu-dev \
|
||||
php8-zip php8-tidy php8-intl libffi-dev openssl-dev php8-pear php7-pecl-amqp rabbitmq-c rabbitmq-c-dev librrd \
|
||||
libzip-dev rrdtool-dev gmp-dev yaml yaml-dev fann fann-dev openldap-dev librdkafka librdkafka-dev libcurl curl-dev \
|
||||
gpgme gpgme-dev
|
||||
gpgme gpgme-dev git
|
||||
|
||||
RUN docker-php-ext-install imap gmp sockets intl gd ldap bz2 mysqli bcmath calendar dba exif gettext opcache pcntl \
|
||||
pdo_mysql shmop sysvmsg sysvsem sysvshm xml soap
|
||||
pdo_mysql shmop sysvmsg sysvsem sysvshm xml soap \
|
||||
|
|
|
@ -6,6 +6,7 @@ namespace StubTests\Model;
|
|||
use Exception;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
use JetBrains\PhpStorm\Internal\TentativeType;
|
||||
use phpDocumentor\Reflection\Type;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\AttributeGroup;
|
||||
|
@ -197,6 +198,18 @@ abstract class BasePHPElement
|
|||
return $versionRange;
|
||||
}
|
||||
|
||||
protected static function hasTentativeTypeAttribute(array $attrGroups): bool
|
||||
{
|
||||
foreach ($attrGroups as $attrGroup) {
|
||||
foreach ($attrGroup->attrs as $attr) {
|
||||
if ($attr->name->toString() === TentativeType::class) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function hasMutedProblem(int $stubProblemType): bool
|
||||
{
|
||||
if (array_key_exists($stubProblemType, $this->mutedProblems)) {
|
||||
|
|
|
@ -12,6 +12,7 @@ use PhpParser\Comment\Doc;
|
|||
use PhpParser\Node\FunctionLike;
|
||||
use PhpParser\Node\Stmt\Function_;
|
||||
use ReflectionFunction;
|
||||
use ReflectionFunctionAbstract;
|
||||
use RuntimeException;
|
||||
use stdClass;
|
||||
use StubTests\Parsers\DocFactoryProvider;
|
||||
|
@ -37,7 +38,7 @@ class PHPFunction extends BasePHPElement
|
|||
public $returnTypesFromSignature = [];
|
||||
|
||||
/**
|
||||
* @param ReflectionFunction $reflectionObject
|
||||
* @param ReflectionFunction|ReflectionFunctionAbstract $reflectionObject
|
||||
* @return static
|
||||
*/
|
||||
public function readObjectFromReflection($reflectionObject)
|
||||
|
@ -84,7 +85,7 @@ class PHPFunction extends BasePHPElement
|
|||
});
|
||||
/** @var Param $relatedParamTag */
|
||||
$relatedParamTag = array_pop($relatedParamTags);
|
||||
if ($relatedParamTag !== null){
|
||||
if ($relatedParamTag !== null) {
|
||||
$parameter->isOptional = $parameter->isOptional || str_contains((string)$relatedParamTag->getDescription(), '[optional]');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,20 +30,21 @@ class PHPMethod extends PHPFunction
|
|||
*/
|
||||
public $parentName;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
public $isReturnTypeTentative;
|
||||
|
||||
/**
|
||||
* @param ReflectionMethod $reflectionObject
|
||||
* @return static
|
||||
*/
|
||||
public function readObjectFromReflection($reflectionObject)
|
||||
{
|
||||
$this->name = $reflectionObject->name;
|
||||
parent::readObjectFromReflection($reflectionObject);
|
||||
$this->isStatic = $reflectionObject->isStatic();
|
||||
$this->isFinal = $reflectionObject->isFinal();
|
||||
$this->parentName = $reflectionObject->class;
|
||||
foreach ($reflectionObject->getParameters() as $parameter) {
|
||||
$this->parameters[] = (new PHPParameter())->readObjectFromReflection($parameter);
|
||||
}
|
||||
|
||||
if ($reflectionObject->isProtected()) {
|
||||
$access = 'protected';
|
||||
} elseif ($reflectionObject->isPrivate()) {
|
||||
|
@ -52,6 +53,17 @@ class PHPMethod extends PHPFunction
|
|||
$access = 'public';
|
||||
}
|
||||
$this->access = $access;
|
||||
if (method_exists($reflectionObject, 'hasTentativeReturnType')) {
|
||||
$this->isReturnTypeTentative = $reflectionObject->hasTentativeReturnType();
|
||||
if ($this->isReturnTypeTentative) {
|
||||
$returnTypes = self::getReflectionTypeAsArray($reflectionObject->getTentativeReturnType());
|
||||
if (!empty($returnTypes)) {
|
||||
array_push($this->returnTypesFromSignature, ...$returnTypes);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$this->isReturnTypeTentative = false;
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
@ -65,6 +77,7 @@ class PHPMethod extends PHPFunction
|
|||
$this->parentName = self::getFQN($node->getAttribute('parent'));
|
||||
$this->name = $node->name->name;
|
||||
$typesFromAttribute = self::findTypesFromAttribute($node->attrGroups);
|
||||
$this->isReturnTypeTentative = self::hasTentativeTypeAttribute($node->attrGroups);
|
||||
$this->availableVersionsRangeFromAttribute = self::findAvailableVersionsRangeFromAttribute($node->attrGroups);
|
||||
$this->returnTypesFromAttribute = $typesFromAttribute;
|
||||
array_push($this->returnTypesFromSignature, ...self::convertParsedTypeToArray($node->getReturnType()));
|
||||
|
|
|
@ -6,6 +6,7 @@ namespace StubTests\Model;
|
|||
use ArrayAccess;
|
||||
use ArrayIterator;
|
||||
use IteratorAggregate;
|
||||
use ReturnTypeWillChange;
|
||||
use RuntimeException;
|
||||
|
||||
class PhpVersions implements ArrayAccess, IteratorAggregate
|
||||
|
@ -27,16 +28,19 @@ class PhpVersions implements ArrayAccess, IteratorAggregate
|
|||
return isset(self::$versions[$offset]);
|
||||
}
|
||||
|
||||
#[ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return $this->offsetExists($offset) ? self::$versions[$offset] : null;
|
||||
}
|
||||
|
||||
#[ReturnTypeWillChange]
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
throw new RuntimeException('Unsupported operation');
|
||||
}
|
||||
|
||||
#[ReturnTypeWillChange]
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
throw new RuntimeException('Unsupported operation');
|
||||
|
|
|
@ -4,6 +4,8 @@ namespace StubTests;
|
|||
|
||||
use RuntimeException;
|
||||
use StubTests\Model\PHPClass;
|
||||
use StubTests\Model\PHPInterface;
|
||||
use StubTests\Model\PHPMethod;
|
||||
use StubTests\Model\PHPProperty;
|
||||
use StubTests\TestData\Providers\PhpStormStubsSingleton;
|
||||
|
||||
|
@ -23,4 +25,51 @@ class StubsPhp81Tests extends BaseStubsTest
|
|||
"Property $className::$property->name readonly modifier is incorrect"
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider \StubTests\TestData\Providers\Reflection\ReflectionMethodsProvider::classMethodsWithTentitiveReturnTypeProvider
|
||||
* @throws RuntimeException
|
||||
*/
|
||||
public function testTentativeReturnTypeHints(PHPClass|PHPInterface $class, PHPMethod $method)
|
||||
{
|
||||
$functionName = $method->name;
|
||||
if ($class instanceof PHPClass) {
|
||||
$stubMethod = PhpStormStubsSingleton::getPhpStormStubs()->getClass($class->name)->getMethod($functionName);
|
||||
} else {
|
||||
$stubMethod = PhpStormStubsSingleton::getPhpStormStubs()->getInterface($class->name)->getMethod($functionName);
|
||||
}
|
||||
$unifiedStubsReturnTypes = [];
|
||||
$unifiedStubsAttributesReturnTypes = [];
|
||||
$unifiedReflectionReturnTypes = [];
|
||||
self::convertNullableTypesToUnion($method->returnTypesFromSignature, $unifiedReflectionReturnTypes);
|
||||
if (!empty($stubMethod->returnTypesFromSignature)) {
|
||||
self::convertNullableTypesToUnion($stubMethod->returnTypesFromSignature, $unifiedStubsReturnTypes);
|
||||
} else {
|
||||
foreach ($stubMethod->returnTypesFromAttribute as $languageVersion => $listOfTypes) {
|
||||
$unifiedStubsAttributesReturnTypes[$languageVersion] = [];
|
||||
self::convertNullableTypesToUnion($listOfTypes, $unifiedStubsAttributesReturnTypes[$languageVersion]);
|
||||
}
|
||||
}
|
||||
$conditionToCompareWithSignature = BaseStubsTest::isReflectionTypesMatchSignature(
|
||||
$unifiedReflectionReturnTypes,
|
||||
$unifiedStubsReturnTypes
|
||||
);
|
||||
$typesFromAttribute = [];
|
||||
if (!empty($unifiedStubsAttributesReturnTypes)) {
|
||||
$typesFromAttribute = !empty($unifiedStubsAttributesReturnTypes[getenv('PHP_VERSION')]) ?
|
||||
$unifiedStubsAttributesReturnTypes[getenv('PHP_VERSION')] :
|
||||
$unifiedStubsAttributesReturnTypes['default'];
|
||||
}
|
||||
$conditionToCompareWithAttribute = BaseStubsTest::isReflectionTypesExistInAttributes($unifiedReflectionReturnTypes, $typesFromAttribute);
|
||||
$testCondition = $conditionToCompareWithSignature || $conditionToCompareWithAttribute;
|
||||
self::assertTrue(
|
||||
$testCondition,
|
||||
"Method $class->name::$functionName has invalid return type. Reflection method has return type " .
|
||||
implode('|', $method->returnTypesFromSignature) .
|
||||
' but stubs has return type ' . implode('|', $stubMethod->returnTypesFromSignature) .
|
||||
' in signature and attribute has types ' . implode('|', $typesFromAttribute)
|
||||
);
|
||||
self::assertTrue($stubMethod->isReturnTypeTentative, "Reflection method $class->name::$functionName has " .
|
||||
"tentative return type but stub's method isn't declared as tentative");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ class StubsTypeHintsTest extends BaseStubsTest
|
|||
}
|
||||
|
||||
/**
|
||||
* @dataProvider \StubTests\TestData\Providers\Reflection\ReflectionMethodsProvider::classMethodsWithReturnTypeHintProvider
|
||||
* @dataProvider \StubTests\TestData\Providers\Reflection\ReflectionMethodsProvider::classMethodsWithoutTentitiveReturnTypeProvider
|
||||
* @throws RuntimeException
|
||||
*/
|
||||
public function testMethodsReturnTypeHints(PHPClass|PHPInterface $class, PHPMethod $method)
|
||||
|
@ -115,8 +115,8 @@ class StubsTypeHintsTest extends BaseStubsTest
|
|||
}
|
||||
$conditionToCompareWithAttribute = BaseStubsTest::isReflectionTypesExistInAttributes($unifiedReflectionReturnTypes, $typesFromAttribute);
|
||||
$testCondition = $conditionToCompareWithSignature || $conditionToCompareWithAttribute;
|
||||
self::assertTrue($testCondition, "Function $functionName has invalid return type.
|
||||
Reflection method $class->name::$functionName has return type " . implode('|', $method->returnTypesFromSignature) . ' but stubs has return type ' .
|
||||
self::assertTrue($testCondition, "Method $class->name::$functionName has invalid return type.
|
||||
Reflection method has return type " . implode('|', $method->returnTypesFromSignature) . ' but stubs has return type ' .
|
||||
implode('|', $stubMethod->returnTypesFromSignature) . ' in signature and attribute has types ' .
|
||||
implode('|', $typesFromAttribute));
|
||||
}
|
||||
|
|
|
@ -80,12 +80,6 @@ class EntitiesFilter
|
|||
return $resultArray;
|
||||
}
|
||||
|
||||
public static function getFilterFunctionForLanguageLevel(float $languageVersion): callable
|
||||
{
|
||||
return fn (PHPClass|PHPInterface $class, PHPMethod $method, ?float $firstSinceVersion) => !$method->isFinal &&
|
||||
!$class->isFinal && $firstSinceVersion !== null && $firstSinceVersion < $languageVersion;
|
||||
}
|
||||
|
||||
public static function getFilterFunctionForAllowedTypeHintsInLanguageLevel(float $languageVersion): callable
|
||||
{
|
||||
return function (PHPClass|PHPInterface $stubClass, PHPMethod $stubMethod, ?float $firstSinceVersion) use ($languageVersion) {
|
||||
|
|
|
@ -4,6 +4,7 @@ declare(strict_types=1);
|
|||
namespace StubTests\TestData\Providers\Reflection;
|
||||
|
||||
use Generator;
|
||||
use StubTests\Model\PHPMethod;
|
||||
use StubTests\Model\StubProblemType;
|
||||
use StubTests\TestData\Providers\EntitiesFilter;
|
||||
use StubTests\TestData\Providers\ReflectionStubsSingleton;
|
||||
|
@ -43,6 +44,38 @@ class ReflectionMethodsProvider
|
|||
);
|
||||
}
|
||||
|
||||
public static function classMethodsWithoutTentitiveReturnTypeProvider(): ?Generator
|
||||
{
|
||||
$classesAndInterfaces = ReflectionStubsSingleton::getReflectionStubs()->getClasses() +
|
||||
ReflectionStubsSingleton::getReflectionStubs()->getInterfaces();
|
||||
foreach (EntitiesFilter::getFiltered($classesAndInterfaces) as $class) {
|
||||
foreach (EntitiesFilter::getFiltered(
|
||||
$class->methods,
|
||||
fn (PHPMethod $method) => $method->isReturnTypeTentative,
|
||||
StubProblemType::HAS_DUPLICATION,
|
||||
StubProblemType::FUNCTION_PARAMETER_MISMATCH
|
||||
) as $method) {
|
||||
yield "Method $class->name::$method->name" => [$class, $method];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static function classMethodsWithTentitiveReturnTypeProvider(): ?Generator
|
||||
{
|
||||
$classesAndInterfaces = ReflectionStubsSingleton::getReflectionStubs()->getClasses() +
|
||||
ReflectionStubsSingleton::getReflectionStubs()->getInterfaces();
|
||||
foreach (EntitiesFilter::getFiltered($classesAndInterfaces) as $class) {
|
||||
foreach (EntitiesFilter::getFiltered(
|
||||
$class->methods,
|
||||
fn (PHPMethod $method) => !$method->isReturnTypeTentative,
|
||||
StubProblemType::HAS_DUPLICATION,
|
||||
StubProblemType::FUNCTION_PARAMETER_MISMATCH
|
||||
) as $method) {
|
||||
yield "Method $class->name::$method->name" => [$class, $method];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static function yieldFilteredMethods(int ...$problemTypes): ?Generator
|
||||
{
|
||||
$classesAndInterfaces = ReflectionStubsSingleton::getReflectionStubs()->getClasses() +
|
||||
|
|
|
@ -5,7 +5,9 @@ namespace StubTests\TestData\Providers\Stubs;
|
|||
|
||||
use Generator;
|
||||
use RuntimeException;
|
||||
use StubTests\Model\PHPClass;
|
||||
use StubTests\Model\PHPFunction;
|
||||
use StubTests\Model\PHPInterface;
|
||||
use StubTests\Model\PHPMethod;
|
||||
use StubTests\Model\StubProblemType;
|
||||
use StubTests\Parsers\ParserUtils;
|
||||
|
@ -58,7 +60,7 @@ class StubMethodsProvider
|
|||
*/
|
||||
public static function methodsForReturnTypeHintTestsProvider(): ?Generator
|
||||
{
|
||||
$filterFunction = EntitiesFilter::getFilterFunctionForLanguageLevel(7);
|
||||
$filterFunction = self::getFilterFunctionForLanguageLevel(7);
|
||||
return self::yieldFilteredMethods(
|
||||
$filterFunction,
|
||||
StubProblemType::FUNCTION_HAS_RETURN_TYPEHINT,
|
||||
|
@ -71,7 +73,7 @@ class StubMethodsProvider
|
|||
*/
|
||||
public static function methodsForNullableReturnTypeHintTestsProvider(): ?Generator
|
||||
{
|
||||
$filterFunction = EntitiesFilter::getFilterFunctionForLanguageLevel(7.1);
|
||||
$filterFunction = self::getFilterFunctionForLanguageLevel(7.1);
|
||||
return self::yieldFilteredMethods(
|
||||
$filterFunction,
|
||||
StubProblemType::HAS_NULLABLE_TYPEHINT,
|
||||
|
@ -84,7 +86,7 @@ class StubMethodsProvider
|
|||
*/
|
||||
public static function methodsForUnionReturnTypeHintTestsProvider(): ?Generator
|
||||
{
|
||||
$filterFunction = EntitiesFilter::getFilterFunctionForLanguageLevel(8);
|
||||
$filterFunction = self::getFilterFunctionForLanguageLevel(8);
|
||||
return self::yieldFilteredMethods(
|
||||
$filterFunction,
|
||||
StubProblemType::HAS_UNION_TYPEHINT,
|
||||
|
@ -92,6 +94,12 @@ class StubMethodsProvider
|
|||
);
|
||||
}
|
||||
|
||||
private static function getFilterFunctionForLanguageLevel(float $languageVersion): callable
|
||||
{
|
||||
return fn (PHPClass|PHPInterface $class, PHPMethod $method, ?float $firstSinceVersion) => !$method->isFinal &&
|
||||
!$class->isFinal && $firstSinceVersion !== null && $firstSinceVersion < $languageVersion && !$method->isReturnTypeTentative;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws RuntimeException
|
||||
*/
|
||||
|
|
|
@ -5,6 +5,9 @@ namespace StubTests\TestData\Providers\Stubs;
|
|||
|
||||
use Generator;
|
||||
use RuntimeException;
|
||||
use StubTests\Model\PHPClass;
|
||||
use StubTests\Model\PHPInterface;
|
||||
use StubTests\Model\PHPMethod;
|
||||
use StubTests\Model\StubProblemType;
|
||||
use StubTests\Parsers\ParserUtils;
|
||||
use StubTests\TestData\Providers\EntitiesFilter;
|
||||
|
@ -17,7 +20,7 @@ class StubsParametersProvider
|
|||
*/
|
||||
public static function parametersForScalarTypeHintTestsProvider(): ?Generator
|
||||
{
|
||||
$filterFunction = EntitiesFilter::getFilterFunctionForLanguageLevel(7);
|
||||
$filterFunction = self::getFilterFunctionForLanguageLevel(7);
|
||||
return self::yieldFilteredMethodParameters($filterFunction, StubProblemType::PARAMETER_HAS_SCALAR_TYPEHINT);
|
||||
}
|
||||
|
||||
|
@ -26,7 +29,7 @@ class StubsParametersProvider
|
|||
*/
|
||||
public static function parametersForNullableTypeHintTestsProvider(): ?Generator
|
||||
{
|
||||
$filterFunction = EntitiesFilter::getFilterFunctionForLanguageLevel(7.1);
|
||||
$filterFunction = self::getFilterFunctionForLanguageLevel(7.1);
|
||||
return self::yieldFilteredMethodParameters($filterFunction, StubProblemType::HAS_NULLABLE_TYPEHINT);
|
||||
}
|
||||
|
||||
|
@ -35,7 +38,7 @@ class StubsParametersProvider
|
|||
*/
|
||||
public static function parametersForUnionTypeHintTestsProvider(): ?Generator
|
||||
{
|
||||
$filterFunction = EntitiesFilter::getFilterFunctionForLanguageLevel(8);
|
||||
$filterFunction = self::getFilterFunctionForLanguageLevel(8);
|
||||
return self::yieldFilteredMethodParameters($filterFunction, StubProblemType::HAS_UNION_TYPEHINT);
|
||||
}
|
||||
|
||||
|
@ -88,4 +91,10 @@ class StubsParametersProvider
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static function getFilterFunctionForLanguageLevel(float $languageVersion): callable
|
||||
{
|
||||
return fn (PHPClass|PHPInterface $class, PHPMethod $method, ?float $firstSinceVersion) => !$method->isFinal &&
|
||||
!$class->isFinal && $firstSinceVersion !== null && $firstSinceVersion < $languageVersion;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ class PhpToken implements Stringable
|
|||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getTokenName() {}
|
||||
public function getTokenName(): ?string {}
|
||||
|
||||
/**
|
||||
* Same as {@see token_get_all()}, but returning array of {@see PhpToken}
|
||||
|
@ -52,7 +52,7 @@ class PhpToken implements Stringable
|
|||
* @param int $flags
|
||||
* @return static[]
|
||||
*/
|
||||
public static function tokenize(string $code, int $flags = 0) {}
|
||||
public static function tokenize(string $code, int $flags = 0): array {}
|
||||
|
||||
/**
|
||||
* Whether the token has the given ID, the given text, or has an ID/text
|
||||
|
@ -61,17 +61,17 @@ class PhpToken implements Stringable
|
|||
* @param int|string|array $kind
|
||||
* @return bool
|
||||
*/
|
||||
public function is($kind) {}
|
||||
public function is($kind): bool {}
|
||||
|
||||
/**
|
||||
* Whether this token would be ignored by the PHP parser.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isIgnorable() {}
|
||||
public function isIgnorable(): bool {}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function __toString() {}
|
||||
public function __toString(): string {}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* Show diagnostic information
|
||||
*/
|
||||
function xdebug_info() {}
|
||||
function xdebug_info(string $category = '') {}
|
||||
|
||||
/**
|
||||
* Returns an array of ALL valid ini options with values and is not the same as ini_get_all() which returns only
|
||||
|
@ -27,7 +27,7 @@ function xdebug_get_function_stack(): array {}
|
|||
/**
|
||||
* Displays the current function stack, in a similar way as what Xdebug would display in an error situation.
|
||||
* @param string $message
|
||||
* @param int $options A bit mask of the following constants: XDEBUG_STACK_NO_DESC
|
||||
* @param int $options A bit mask of the following constants: XDEBUG_STACK_NO_DESC
|
||||
* @return void
|
||||
*/
|
||||
function xdebug_print_function_stack(string $message = 'user triggered', int $options = 0) {}
|
||||
|
@ -349,13 +349,17 @@ function xdebug_get_gc_run_count(): int {}
|
|||
function xdebug_get_gc_total_collected_roots(): int {}
|
||||
|
||||
/**
|
||||
* @param int $group
|
||||
* @param int $listType
|
||||
* @param int $group
|
||||
* @param int $listType
|
||||
* @param array $configuration
|
||||
* @return void
|
||||
*/
|
||||
function xdebug_set_filter(int $group, int $listType, array $configuration) {}
|
||||
|
||||
function xdebug_connect_to_client(): bool {}
|
||||
|
||||
function xdebug_notify(mixed $data): bool {}
|
||||
|
||||
define('XDEBUG_STACK_NO_DESC', 1);
|
||||
define('XDEBUG_TRACE_APPEND', 1);
|
||||
define('XDEBUG_TRACE_COMPUTERIZED', 2);
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
// Start of xmlreader v.0.2
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\TentativeType;
|
||||
|
||||
/**
|
||||
* The XMLReader extension is an XML Pull parser. The reader acts as a
|
||||
|
@ -129,11 +130,12 @@ class XMLReader
|
|||
* @param string $name <p>
|
||||
* The name of the attribute.
|
||||
* </p>
|
||||
* @return string The value of the attribute, or <b>NULL</b> if no attribute with the given
|
||||
* @return string|null The value of the attribute, or <b>NULL</b> if no attribute with the given
|
||||
* <i>name</i> is found or not positioned on an element node.
|
||||
* @since 5.1.2
|
||||
*/
|
||||
public function getAttribute(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name) {}
|
||||
#[TentativeType]
|
||||
public function getAttribute(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): ?string {}
|
||||
|
||||
/**
|
||||
* Get the value of an attribute by index
|
||||
|
@ -145,7 +147,8 @@ class XMLReader
|
|||
* at <i>index</i> or not positioned of element.
|
||||
* @since 5.1.2
|
||||
*/
|
||||
public function getAttributeNo(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $index) {}
|
||||
#[TentativeType]
|
||||
public function getAttributeNo(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $index): ?string {}
|
||||
|
||||
/**
|
||||
* Get the value of an attribute by localname and URI
|
||||
|
@ -161,10 +164,11 @@ class XMLReader
|
|||
* <i>namespaceURI</i> is found or not positioned of element.
|
||||
* @since 5.1.2
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function getAttributeNs(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $namespace
|
||||
) {}
|
||||
): ?string {}
|
||||
|
||||
/**
|
||||
* Indicates if specified property has been set
|
||||
|
@ -176,7 +180,8 @@ class XMLReader
|
|||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
* @since 5.1.2
|
||||
*/
|
||||
public function getParserProperty(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $property) {}
|
||||
#[TentativeType]
|
||||
public function getParserProperty(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $property): bool {}
|
||||
|
||||
/**
|
||||
* Indicates if the parsed document is valid
|
||||
|
@ -184,7 +189,8 @@ class XMLReader
|
|||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
* @since 5.1.2
|
||||
*/
|
||||
public function isValid() {}
|
||||
#[TentativeType]
|
||||
public function isValid(): bool {}
|
||||
|
||||
/**
|
||||
* Lookup namespace for a prefix
|
||||
|
@ -192,10 +198,11 @@ class XMLReader
|
|||
* @param string $prefix <p>
|
||||
* String containing the prefix.
|
||||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
* @return string|null <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
* @since 5.1.2
|
||||
*/
|
||||
public function lookupNamespace(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $prefix) {}
|
||||
#[TentativeType]
|
||||
public function lookupNamespace(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $prefix): ?string {}
|
||||
|
||||
/**
|
||||
* Move cursor to an attribute by index
|
||||
|
@ -206,7 +213,8 @@ class XMLReader
|
|||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
* @since 5.1.2
|
||||
*/
|
||||
public function moveToAttributeNo(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $index) {}
|
||||
#[TentativeType]
|
||||
public function moveToAttributeNo(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $index): bool {}
|
||||
|
||||
/**
|
||||
* Move cursor to a named attribute
|
||||
|
@ -217,7 +225,8 @@ class XMLReader
|
|||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
* @since 5.1.2
|
||||
*/
|
||||
public function moveToAttribute(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name) {}
|
||||
#[TentativeType]
|
||||
public function moveToAttribute(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): bool {}
|
||||
|
||||
/**
|
||||
* Move cursor to a named attribute
|
||||
|
@ -231,10 +240,11 @@ class XMLReader
|
|||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
* @since 5.1.2
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function moveToAttributeNs(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $namespace
|
||||
) {}
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* Position cursor on the parent Element of current Attribute
|
||||
|
@ -243,7 +253,8 @@ class XMLReader
|
|||
* Attribute when this method is called.
|
||||
* @since 5.1.2
|
||||
*/
|
||||
public function moveToElement() {}
|
||||
#[TentativeType]
|
||||
public function moveToElement(): bool {}
|
||||
|
||||
/**
|
||||
* Position cursor on the first Attribute
|
||||
|
@ -251,7 +262,8 @@ class XMLReader
|
|||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
* @since 5.1.2
|
||||
*/
|
||||
public function moveToFirstAttribute() {}
|
||||
#[TentativeType]
|
||||
public function moveToFirstAttribute(): bool {}
|
||||
|
||||
/**
|
||||
* Position cursor on the next Attribute
|
||||
|
@ -259,7 +271,8 @@ class XMLReader
|
|||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
* @since 5.1.2
|
||||
*/
|
||||
public function moveToNextAttribute() {}
|
||||
#[TentativeType]
|
||||
public function moveToNextAttribute(): bool {}
|
||||
|
||||
/**
|
||||
* Set the URI containing the XML to parse
|
||||
|
@ -290,7 +303,8 @@ class XMLReader
|
|||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
* @since 5.1.2
|
||||
*/
|
||||
public function read() {}
|
||||
#[TentativeType]
|
||||
public function read(): bool {}
|
||||
|
||||
/**
|
||||
* Move cursor to next node skipping all subtrees
|
||||
|
@ -301,21 +315,24 @@ class XMLReader
|
|||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
* @since 5.1.2
|
||||
*/
|
||||
public function next(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $name = null) {}
|
||||
#[TentativeType]
|
||||
public function next(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $name = null): bool {}
|
||||
|
||||
/**
|
||||
* Retrieve XML from current node
|
||||
* @link https://php.net/manual/en/xmlreader.readinnerxml.php
|
||||
* @return string the contents of the current node as a string. Empty string on failure.
|
||||
*/
|
||||
public function readInnerXml() {}
|
||||
#[TentativeType]
|
||||
public function readInnerXml(): string {}
|
||||
|
||||
/**
|
||||
* Retrieve XML from current node, including it self
|
||||
* @link https://php.net/manual/en/xmlreader.readouterxml.php
|
||||
* @return string the contents of current node, including itself, as a string. Empty string on failure.
|
||||
*/
|
||||
public function readOuterXml() {}
|
||||
#[TentativeType]
|
||||
public function readOuterXml(): string {}
|
||||
|
||||
/**
|
||||
* Reads the contents of the current node as a string
|
||||
|
@ -323,7 +340,8 @@ class XMLReader
|
|||
* @return string the content of the current node as a string. Empty string on
|
||||
* failure.
|
||||
*/
|
||||
public function readString() {}
|
||||
#[TentativeType]
|
||||
public function readString(): string {}
|
||||
|
||||
/**
|
||||
* Validate document against XSD
|
||||
|
@ -333,7 +351,8 @@ class XMLReader
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function setSchema(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $filename) {}
|
||||
#[TentativeType]
|
||||
public function setSchema(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $filename): bool {}
|
||||
|
||||
/**
|
||||
* Set parser options
|
||||
|
@ -349,10 +368,11 @@ class XMLReader
|
|||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
* @since 5.1.2
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function setParserProperty(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $property,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $value
|
||||
) {}
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* Set the filename or URI for a RelaxNG Schema
|
||||
|
@ -362,7 +382,8 @@ class XMLReader
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function setRelaxNGSchema(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $filename) {}
|
||||
#[TentativeType]
|
||||
public function setRelaxNGSchema(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $filename): bool {}
|
||||
|
||||
/**
|
||||
* Set the data containing a RelaxNG Schema
|
||||
|
@ -373,7 +394,8 @@ class XMLReader
|
|||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
* @since 5.1.2
|
||||
*/
|
||||
public function setRelaxNGSchemaSource(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $source) {}
|
||||
#[TentativeType]
|
||||
public function setRelaxNGSchemaSource(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $source): bool {}
|
||||
|
||||
/**
|
||||
* Set the data containing the XML to parse
|
||||
|
@ -405,6 +427,7 @@ class XMLReader
|
|||
* @return DOMNode|false The resulting <b>DOMNode</b> or <b>FALSE</b> on error.
|
||||
* @since 5.1.2
|
||||
*/
|
||||
public function expand(#[LanguageLevelTypeAware(['8.0' => 'DOMNode|null'], default: '')] $baseNode = null) {}
|
||||
#[TentativeType]
|
||||
public function expand(#[LanguageLevelTypeAware(['8.0' => 'DOMNode|null'], default: '')] $baseNode = null): DOMNode|false {}
|
||||
}
|
||||
// End of xmlreader v.0.2
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
use JetBrains\PhpStorm\Internal\TentativeType;
|
||||
|
||||
class XMLWriter
|
||||
{
|
||||
|
@ -20,7 +21,8 @@ class XMLWriter
|
|||
* Procedural style: Returns a new xmlwriter resource for later use with the
|
||||
* xmlwriter functions on success, <b>FALSE</b> on error.
|
||||
*/
|
||||
public function openUri(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $uri) {}
|
||||
#[TentativeType]
|
||||
public function openUri(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $uri): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 0.1.0)<br/>
|
||||
|
@ -32,7 +34,8 @@ class XMLWriter
|
|||
* Procedural style: Returns a new xmlwriter resource for later use with the
|
||||
* xmlwriter functions on success, <b>FALSE</b> on error.
|
||||
*/
|
||||
public function openMemory() {}
|
||||
#[TentativeType]
|
||||
public function openMemory(): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 0.1.0)<br/>
|
||||
|
@ -43,7 +46,8 @@ class XMLWriter
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function setIndent(#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $enable) {}
|
||||
#[TentativeType]
|
||||
public function setIndent(#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $enable): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 0.1.0)<br/>
|
||||
|
@ -54,7 +58,8 @@ class XMLWriter
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function setIndentString(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $indentation) {}
|
||||
#[TentativeType]
|
||||
public function setIndentString(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $indentation): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 1.0.0)<br/>
|
||||
|
@ -62,7 +67,8 @@ class XMLWriter
|
|||
* @link https://php.net/manual/en/function.xmlwriter-startcomment.php
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function startComment() {}
|
||||
#[TentativeType]
|
||||
public function startComment(): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 1.0.0)<br/>
|
||||
|
@ -70,7 +76,8 @@ class XMLWriter
|
|||
* @link https://php.net/manual/en/function.xmlwriter-endcomment.php
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function endComment() {}
|
||||
#[TentativeType]
|
||||
public function endComment(): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 0.1.0)<br/>
|
||||
|
@ -81,7 +88,8 @@ class XMLWriter
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function startAttribute(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name) {}
|
||||
#[TentativeType]
|
||||
public function startAttribute(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 0.1.0)<br/>
|
||||
|
@ -89,7 +97,8 @@ class XMLWriter
|
|||
* @link https://php.net/manual/en/function.xmlwriter-endattribute.php
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function endAttribute() {}
|
||||
#[TentativeType]
|
||||
public function endAttribute(): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 0.1.0)<br/>
|
||||
|
@ -103,10 +112,11 @@ class XMLWriter
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function writeAttribute(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $value
|
||||
) {}
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 0.1.0)<br/>
|
||||
|
@ -123,11 +133,12 @@ class XMLWriter
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function startAttributeNs(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $prefix,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace
|
||||
) {}
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 0.1.0)<br/>
|
||||
|
@ -147,12 +158,13 @@ class XMLWriter
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function writeAttributeNs(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $prefix,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $value
|
||||
) {}
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 0.1.0)<br/>
|
||||
|
@ -163,7 +175,8 @@ class XMLWriter
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function startElement(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name) {}
|
||||
#[TentativeType]
|
||||
public function startElement(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 0.1.0)<br/>
|
||||
|
@ -171,7 +184,8 @@ class XMLWriter
|
|||
* @link https://php.net/manual/en/function.xmlwriter-endelement.php
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function endElement() {}
|
||||
#[TentativeType]
|
||||
public function endElement(): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.2.0, PECL xmlwriter >= 2.0.4)<br/>
|
||||
|
@ -179,7 +193,8 @@ class XMLWriter
|
|||
* @link https://php.net/manual/en/function.xmlwriter-fullendelement.php
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function fullEndElement() {}
|
||||
#[TentativeType]
|
||||
public function fullEndElement(): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 0.1.0)<br/>
|
||||
|
@ -196,11 +211,12 @@ class XMLWriter
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function startElementNs(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $prefix,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace
|
||||
) {}
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 0.1.0)<br/>
|
||||
|
@ -214,10 +230,11 @@ class XMLWriter
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function writeElement(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $content = null
|
||||
) {}
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 0.1.0)<br/>
|
||||
|
@ -237,12 +254,13 @@ class XMLWriter
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function writeElementNs(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $prefix,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $content = null
|
||||
) {}
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 0.1.0)<br/>
|
||||
|
@ -253,7 +271,8 @@ class XMLWriter
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function startPi(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $target) {}
|
||||
#[TentativeType]
|
||||
public function startPi(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $target): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 0.1.0)<br/>
|
||||
|
@ -261,7 +280,8 @@ class XMLWriter
|
|||
* @link https://php.net/manual/en/function.xmlwriter-endpi.php
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function endPi() {}
|
||||
#[TentativeType]
|
||||
public function endPi(): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 0.1.0)<br/>
|
||||
|
@ -275,10 +295,11 @@ class XMLWriter
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function writePi(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $target,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $content
|
||||
) {}
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 0.1.0)<br/>
|
||||
|
@ -286,7 +307,8 @@ class XMLWriter
|
|||
* @link https://php.net/manual/en/function.xmlwriter-startcdata.php
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function startCdata() {}
|
||||
#[TentativeType]
|
||||
public function startCdata(): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 0.1.0)<br/>
|
||||
|
@ -294,7 +316,8 @@ class XMLWriter
|
|||
* @link https://php.net/manual/en/function.xmlwriter-endcdata.php
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function endCdata() {}
|
||||
#[TentativeType]
|
||||
public function endCdata(): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 0.1.0)<br/>
|
||||
|
@ -305,7 +328,8 @@ class XMLWriter
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function writeCdata(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $content) {}
|
||||
#[TentativeType]
|
||||
public function writeCdata(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $content): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 0.1.0)<br/>
|
||||
|
@ -316,7 +340,8 @@ class XMLWriter
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function text(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $content) {}
|
||||
#[TentativeType]
|
||||
public function text(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $content): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.2.0, PECL xmlwriter >= 2.0.4)<br/>
|
||||
|
@ -327,7 +352,8 @@ class XMLWriter
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function writeRaw(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $content) {}
|
||||
#[TentativeType]
|
||||
public function writeRaw(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $content): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 0.1.0)<br/>
|
||||
|
@ -344,11 +370,12 @@ class XMLWriter
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function startDocument(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $version = '1.0',
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $encoding = null,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $standalone = null
|
||||
) {}
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 0.1.0)<br/>
|
||||
|
@ -356,7 +383,8 @@ class XMLWriter
|
|||
* @link https://php.net/manual/en/function.xmlwriter-enddocument.php
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function endDocument() {}
|
||||
#[TentativeType]
|
||||
public function endDocument(): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 0.1.0)<br/>
|
||||
|
@ -367,7 +395,8 @@ class XMLWriter
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function writeComment(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $content) {}
|
||||
#[TentativeType]
|
||||
public function writeComment(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $content): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 0.1.0)<br/>
|
||||
|
@ -384,11 +413,12 @@ class XMLWriter
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function startDtd(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $publicId = null,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $systemId = null
|
||||
) {}
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 0.1.0)<br/>
|
||||
|
@ -396,7 +426,8 @@ class XMLWriter
|
|||
* @link https://php.net/manual/en/function.xmlwriter-enddtd.php
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function endDtd() {}
|
||||
#[TentativeType]
|
||||
public function endDtd(): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 0.1.0)<br/>
|
||||
|
@ -416,12 +447,13 @@ class XMLWriter
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function writeDtd(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $publicId = null,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $systemId = null,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $content = null
|
||||
) {}
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 0.1.0)<br/>
|
||||
|
@ -432,7 +464,8 @@ class XMLWriter
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function startDtdElement(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName) {}
|
||||
#[TentativeType]
|
||||
public function startDtdElement(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 0.1.0)<br/>
|
||||
|
@ -440,7 +473,8 @@ class XMLWriter
|
|||
* @link https://php.net/manual/en/function.xmlwriter-enddtdelement.php
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function endDtdElement() {}
|
||||
#[TentativeType]
|
||||
public function endDtdElement(): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 0.1.0)<br/>
|
||||
|
@ -454,10 +488,11 @@ class XMLWriter
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function writeDtdElement(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $content
|
||||
) {}
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 0.1.0)<br/>
|
||||
|
@ -468,7 +503,8 @@ class XMLWriter
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function startDtdAttlist(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name) {}
|
||||
#[TentativeType]
|
||||
public function startDtdAttlist(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 0.1.0)<br/>
|
||||
|
@ -476,7 +512,8 @@ class XMLWriter
|
|||
* @link https://php.net/manual/en/function.xmlwriter-enddtdattlist.php
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function endDtdAttlist() {}
|
||||
#[TentativeType]
|
||||
public function endDtdAttlist(): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 0.1.0)<br/>
|
||||
|
@ -490,10 +527,11 @@ class XMLWriter
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function writeDtdAttlist(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $content
|
||||
) {}
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 0.1.0)<br/>
|
||||
|
@ -505,10 +543,11 @@ class XMLWriter
|
|||
* @param bool $isParam
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
#[TentativeType]
|
||||
public function startDtdEntity(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $isParam
|
||||
) {}
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 0.1.0)<br/>
|
||||
|
@ -516,7 +555,8 @@ class XMLWriter
|
|||
* @link https://php.net/manual/en/function.xmlwriter-enddtdentity.php
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function endDtdEntity() {}
|
||||
#[TentativeType]
|
||||
public function endDtdEntity(): bool {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 0.1.0)<br/>
|
||||
|
@ -552,7 +592,8 @@ class XMLWriter
|
|||
* </p>
|
||||
* @return string the current buffer as a string.
|
||||
*/
|
||||
public function outputMemory(#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $flush = true) {}
|
||||
#[TentativeType]
|
||||
public function outputMemory(#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $flush = true): string {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 1.0.0)<br/>
|
||||
|
@ -561,11 +602,12 @@ class XMLWriter
|
|||
* @param bool $empty [optional] <p>
|
||||
* Whether to empty the buffer or not. Default is <b>TRUE</b>.
|
||||
* </p>
|
||||
* @return mixed If you opened the writer in memory, this function returns the generated XML buffer,
|
||||
* @return string|int If you opened the writer in memory, this function returns the generated XML buffer,
|
||||
* Else, if using URI, this function will write the buffer and return the number of
|
||||
* written bytes.
|
||||
*/
|
||||
public function flush(#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $empty = true) {}
|
||||
#[TentativeType]
|
||||
public function flush(#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $empty = true): string|int {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
212
zip/zip.php
212
zip/zip.php
|
@ -442,137 +442,137 @@ class ZipArchive implements Countable
|
|||
*/
|
||||
public const ER_CANCELLED = 32;
|
||||
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_DOS = 0;
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_DOS = 0;
|
||||
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_AMIGA = 1;
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_AMIGA = 1;
|
||||
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_OPENVMS = 2;
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_OPENVMS = 2;
|
||||
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_UNIX = 3;
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_UNIX = 3;
|
||||
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_VM_CMS = 4;
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_VM_CMS = 4;
|
||||
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_ATARI_ST = 5;
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_ATARI_ST = 5;
|
||||
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_OS_2 = 6;
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_OS_2 = 6;
|
||||
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_MACINTOSH = 7;
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_MACINTOSH = 7;
|
||||
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_Z_SYSTEM = 8;
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_Z_SYSTEM = 8;
|
||||
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @removed 8.0 Use {@link ZipArchive::ZOPSYS_CPM} instead.
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_Z_CPM = 9;
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @removed 8.0 Use {@link ZipArchive::ZOPSYS_CPM} instead.
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_Z_CPM = 9;
|
||||
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_WINDOWS_NTFS = 10;
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_WINDOWS_NTFS = 10;
|
||||
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_MVS = 11;
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_MVS = 11;
|
||||
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_VSE = 12;
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_VSE = 12;
|
||||
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_ACORN_RISC = 13;
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_ACORN_RISC = 13;
|
||||
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_VFAT = 14;
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_VFAT = 14;
|
||||
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_ALTERNATE_MVS = 15;
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_ALTERNATE_MVS = 15;
|
||||
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_BEOS = 16;
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_BEOS = 16;
|
||||
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_TANDEM = 17;
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_TANDEM = 17;
|
||||
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_OS_400 = 18;
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_OS_400 = 18;
|
||||
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_OS_X = 19;
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_OS_X = 19;
|
||||
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
*/
|
||||
public const OPSYS_CPM = 9;
|
||||
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_DEFAULT = 3;
|
||||
/**
|
||||
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
|
||||
* @since 5.6
|
||||
*/
|
||||
public const OPSYS_DEFAULT = 3;
|
||||
|
||||
/**
|
||||
* Status of the Zip Archive
|
||||
|
|
Loading…
Reference in New Issue