update typehints for SPL + code style
This commit is contained in:
parent
4214fd6494
commit
611b5e1e0f
32
Ev/Ev.php
32
Ev/Ev.php
|
@ -745,11 +745,11 @@ final class EvIo extends EvWatcher
|
|||
* @param int $priority
|
||||
*/
|
||||
public function __construct(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'mixed'],default: '')] $fd,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'],default: '')] $events,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'mixed'],default: '')] $callback,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'mixed'],default: '')] $data = null,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'],default: '')] $priority = 0
|
||||
#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $fd,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $events,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $callback,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $data = null,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $priority = 0
|
||||
) {}
|
||||
|
||||
/**
|
||||
|
@ -759,8 +759,8 @@ final class EvIo extends EvWatcher
|
|||
* @param int $events Ev::READ and/or Ev::WRITE. See the bit masks.
|
||||
*/
|
||||
public function set(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'mixed'],default: '')] $fd,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'],default: '')] $events
|
||||
#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $fd,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $events
|
||||
) {}
|
||||
|
||||
/**
|
||||
|
@ -832,12 +832,12 @@ final class EvPeriodic extends EvWatcher
|
|||
* @param int $priority
|
||||
*/
|
||||
public function __construct(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'float'],default: '')] $offset,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'float'],default: '')] $interval,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'mixed'],default: '')] $reschedule_cb,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'mixed'],default: '')] $callback,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'mixed'],default: '')] $data = null,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'],default: '')] $priority = 0
|
||||
#[LanguageLevelTypeAware(['8.0' => 'float'], default: '')] $offset,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'float'], default: '')] $interval,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $reschedule_cb,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $callback,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $data = null,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $priority = 0
|
||||
) {}
|
||||
|
||||
/**
|
||||
|
@ -889,9 +889,9 @@ final class EvPeriodic extends EvWatcher
|
|||
* @return void
|
||||
*/
|
||||
public function set(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'float'],default: '')] $offset,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'float'],default: '')] $interval,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'mixed'],default: '')] $reschedule_cb = null
|
||||
#[LanguageLevelTypeAware(['8.0' => 'float'], default: '')] $offset,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'float'], default: '')] $interval,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $reschedule_cb = null
|
||||
) {}
|
||||
}
|
||||
|
||||
|
|
|
@ -1218,7 +1218,7 @@ class PDO
|
|||
* this way.
|
||||
*/
|
||||
public function quote(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $string,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $string,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type = PDO::PARAM_STR
|
||||
) {}
|
||||
|
||||
|
|
|
@ -958,10 +958,11 @@ class PharData extends Phar
|
|||
* </p>
|
||||
*/
|
||||
public function __construct(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'],default: '')] $filename,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'],default: '')] $flags = FilesystemIterator::KEY_AS_PATHNAME|FilesystemIterator::CURRENT_AS_FILEINFO,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'],default: '')] $alias = null,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'],default: '')] $format = Phar::TAR) {}
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = FilesystemIterator::KEY_AS_PATHNAME|FilesystemIterator::CURRENT_AS_FILEINFO,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $alias = null,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $format = Phar::TAR
|
||||
) {}
|
||||
|
||||
/**
|
||||
* @param string $localName
|
||||
|
|
|
@ -73,7 +73,10 @@ class ReflectionMethod extends ReflectionFunctionAbstract
|
|||
* classname or an object.
|
||||
* @throws \ReflectionException if the class or method does not exist.
|
||||
*/
|
||||
public function __construct(#[LanguageLevelTypeAware(['8.0' => 'object|string'], default: '')] $objectOrMethod, $method = null) {}
|
||||
public function __construct(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'object|string'], default: '')] $objectOrMethod,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $method = null
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Export a reflection method.
|
||||
|
|
|
@ -64,8 +64,8 @@ class ReflectionProperty implements Reflector
|
|||
* @throws \ReflectionException if the class or property does not exist.
|
||||
*/
|
||||
public function __construct(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'object|string'] ,default: '')] $class,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'] ,default: '')] $property
|
||||
#[LanguageLevelTypeAware(['8.0' => 'object|string'], default: '')] $class,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $property
|
||||
) {}
|
||||
|
||||
/**
|
||||
|
|
|
@ -28,7 +28,7 @@ class ReflectionReference
|
|||
*/
|
||||
public static function fromArrayElement(
|
||||
array $array,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|int'],default: '')] $key
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|int'], default: '')] $key
|
||||
) {}
|
||||
|
||||
/**
|
||||
|
|
91
SPL/SPL.php
91
SPL/SPL.php
|
@ -723,7 +723,7 @@ class CachingIterator extends IteratorIterator implements ArrayAccess, Countable
|
|||
* @param Iterator $iterator The iterator to cache.
|
||||
* @param int $flags [optional] A bitmask of flags. See CachingIterator class constants for details.
|
||||
*/
|
||||
public function __construct(Iterator $iterator, $flags = self::CALL_TOSTRING) {}
|
||||
public function __construct(Iterator $iterator, #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = self::CALL_TOSTRING) {}
|
||||
|
||||
/**
|
||||
* Rewind the iterator
|
||||
|
@ -794,7 +794,7 @@ class CachingIterator extends IteratorIterator implements ArrayAccess, Countable
|
|||
* @param int $flags Bitmask of the flags to set.
|
||||
* @return void
|
||||
*/
|
||||
public function setFlags($flags) {}
|
||||
public function setFlags(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags) {}
|
||||
|
||||
/**
|
||||
* Internal cache array index to retrieve.
|
||||
|
@ -813,7 +813,7 @@ class CachingIterator extends IteratorIterator implements ArrayAccess, Countable
|
|||
* @return void
|
||||
* @throws BadMethodCallException when the {@see CachingIterator::FULL_CACHE} flag is not being used.
|
||||
*/
|
||||
public function offsetSet($key, $value) {}
|
||||
public function offsetSet($key, #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value) {}
|
||||
|
||||
/**
|
||||
* Remove an element from the internal cache array.
|
||||
|
@ -863,7 +863,7 @@ class RecursiveCachingIterator extends CachingIterator implements RecursiveItera
|
|||
* @param Iterator $iterator The iterator to cache.
|
||||
* @param int $flags [optional] A bitmask of flags. See CachingIterator class constants for details.
|
||||
*/
|
||||
public function __construct(Iterator $iterator, $flags = self::CALL_TOSTRING) {}
|
||||
public function __construct(Iterator $iterator, #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = self::CALL_TOSTRING) {}
|
||||
|
||||
/**
|
||||
* Check whether the current element of the inner iterator has children
|
||||
|
@ -1088,7 +1088,13 @@ class RegexIterator extends FilterIterator
|
|||
* @param int $flags [optional] Special flags, see RegexIterator::setFlags() for a list of available flags.
|
||||
* @param int $pregFlags [optional] The regular expression flags. These flags depend on the operation mode parameter
|
||||
*/
|
||||
public function __construct(Iterator $iterator, $pattern, $mode = self::MATCH, $flags = 0, $pregFlags = 0) {}
|
||||
public function __construct(
|
||||
Iterator $iterator,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $pattern,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $mode = self::MATCH,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = 0,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $pregFlags = 0
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Get accept status
|
||||
|
@ -1154,7 +1160,7 @@ class RegexIterator extends FilterIterator
|
|||
* </p>
|
||||
* @return void
|
||||
*/
|
||||
public function setMode($mode) {}
|
||||
public function setMode(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $mode) {}
|
||||
|
||||
/**
|
||||
* Get flags
|
||||
|
@ -1189,7 +1195,7 @@ class RegexIterator extends FilterIterator
|
|||
* </p>
|
||||
* @return void
|
||||
*/
|
||||
public function setFlags($flags) {}
|
||||
public function setFlags(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags) {}
|
||||
|
||||
/**
|
||||
* Returns current regular expression
|
||||
|
@ -1215,7 +1221,7 @@ class RegexIterator extends FilterIterator
|
|||
* </p>
|
||||
* @return void
|
||||
*/
|
||||
public function setPregFlags($pregFlags) {}
|
||||
public function setPregFlags(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $pregFlags) {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1233,7 +1239,13 @@ class RecursiveRegexIterator extends RegexIterator implements RecursiveIterator
|
|||
* @param int $flags [optional] Special flags, see RegexIterator::setFlags() for a list of available flags.
|
||||
* @param int $pregFlags [optional] The regular expression flags. These flags depend on the operation mode parameter
|
||||
*/
|
||||
public function __construct(RecursiveIterator $iterator, $pattern, $mode = self::MATCH, $flags = 0, $pregFlags = 0) {}
|
||||
public function __construct(
|
||||
RecursiveIterator $iterator,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $pattern,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $mode = self::MATCH,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = 0,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $pregFlags = 0
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Returns whether an iterator can be obtained for the current entry.
|
||||
|
@ -1276,9 +1288,9 @@ class RecursiveTreeIterator extends RecursiveIteratorIterator
|
|||
*/
|
||||
public function __construct(
|
||||
$iterator,
|
||||
$flags = self::BYPASS_KEY,
|
||||
$cachingIteratorFlags = CachingIterator::CATCH_GET_CHILD,
|
||||
$mode = self::SELF_FIRST
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = self::BYPASS_KEY,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $cachingIteratorFlags = CachingIterator::CATCH_GET_CHILD,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $mode = self::SELF_FIRST
|
||||
) {}
|
||||
|
||||
/**
|
||||
|
@ -1375,7 +1387,7 @@ class RecursiveTreeIterator extends RecursiveIteratorIterator
|
|||
/**
|
||||
* @param string $postfix
|
||||
*/
|
||||
public function setPostfix(#[PhpStormStubsElementAvailable(from: '7.3')] $postfix) {}
|
||||
public function setPostfix(#[PhpStormStubsElementAvailable(from: '7.3')] string $postfix) {}
|
||||
|
||||
/**
|
||||
* Set a part of the prefix
|
||||
|
@ -1388,7 +1400,10 @@ class RecursiveTreeIterator extends RecursiveIteratorIterator
|
|||
* </p>
|
||||
* @return void
|
||||
*/
|
||||
public function setPrefixPart($part, $value) {}
|
||||
public function setPrefixPart(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $part,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $value
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Get current entry
|
||||
|
@ -1428,7 +1443,11 @@ class ArrayObject implements IteratorAggregate, ArrayAccess, Serializable, Count
|
|||
* @param int $flags Flags to control the behaviour of the ArrayObject object.
|
||||
* @param string $iteratorClass Specify the class that will be used for iteration of the ArrayObject object. ArrayIterator is the default class used.
|
||||
*/
|
||||
public function __construct($array = [], $flags = 0, $iteratorClass = "ArrayIterator") {}
|
||||
public function __construct(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'object|array'], default: '')] $array = [],
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = 0,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $iteratorClass = "ArrayIterator"
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Returns whether the requested index exists
|
||||
|
@ -1461,7 +1480,7 @@ class ArrayObject implements IteratorAggregate, ArrayAccess, Serializable, Count
|
|||
* </p>
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($key, $value) {}
|
||||
public function offsetSet($key, #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value) {}
|
||||
|
||||
/**
|
||||
* Unsets the value at the specified index
|
||||
|
@ -1481,7 +1500,7 @@ class ArrayObject implements IteratorAggregate, ArrayAccess, Serializable, Count
|
|||
* </p>
|
||||
* @return void
|
||||
*/
|
||||
public function append($value) {}
|
||||
public function append(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value) {}
|
||||
|
||||
/**
|
||||
* Creates a copy of the ArrayObject.
|
||||
|
@ -1541,7 +1560,7 @@ class ArrayObject implements IteratorAggregate, ArrayAccess, Serializable, Count
|
|||
* </p>
|
||||
* @return void
|
||||
*/
|
||||
public function setFlags($flags) {}
|
||||
public function setFlags(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags) {}
|
||||
|
||||
/**
|
||||
* Sort the entries by value
|
||||
|
@ -1549,7 +1568,7 @@ class ArrayObject implements IteratorAggregate, ArrayAccess, Serializable, Count
|
|||
* @param int $flags [optional]
|
||||
* @return void
|
||||
*/
|
||||
public function asort(#[PhpStormStubsElementAvailable(from: '8.0')] $flags = SORT_REGULAR) {}
|
||||
public function asort(#[PhpStormStubsElementAvailable(from: '8.0')] int $flags = SORT_REGULAR) {}
|
||||
|
||||
/**
|
||||
* Sort the entries by key
|
||||
|
@ -1557,7 +1576,7 @@ class ArrayObject implements IteratorAggregate, ArrayAccess, Serializable, Count
|
|||
* @param int $flags [optional]
|
||||
* @return void
|
||||
*/
|
||||
public function ksort(#[PhpStormStubsElementAvailable(from: '8.0')] $flags = SORT_REGULAR) {}
|
||||
public function ksort(#[PhpStormStubsElementAvailable(from: '8.0')] int $flags = SORT_REGULAR) {}
|
||||
|
||||
/**
|
||||
* Sort the entries with a user-defined comparison function and maintain key association
|
||||
|
@ -1572,7 +1591,7 @@ class ArrayObject implements IteratorAggregate, ArrayAccess, Serializable, Count
|
|||
* </p>
|
||||
* @return void
|
||||
*/
|
||||
public function uasort($callback) {}
|
||||
public function uasort(#[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback) {}
|
||||
|
||||
/**
|
||||
* Sort the entries by keys using a user-defined comparison function
|
||||
|
@ -1590,7 +1609,7 @@ class ArrayObject implements IteratorAggregate, ArrayAccess, Serializable, Count
|
|||
* </p>
|
||||
* @return void
|
||||
*/
|
||||
public function uksort($callback) {}
|
||||
public function uksort(#[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback) {}
|
||||
|
||||
/**
|
||||
* Sort entries using a "natural order" algorithm
|
||||
|
@ -1614,7 +1633,7 @@ class ArrayObject implements IteratorAggregate, ArrayAccess, Serializable, Count
|
|||
* </p>
|
||||
* @return void The unserialized <b>ArrayObject</b>.
|
||||
*/
|
||||
public function unserialize($data) {}
|
||||
public function unserialize(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data) {}
|
||||
|
||||
/**
|
||||
* Serialize an ArrayObject
|
||||
|
@ -1656,7 +1675,7 @@ class ArrayObject implements IteratorAggregate, ArrayAccess, Serializable, Count
|
|||
* </p>
|
||||
* @return array the old array.
|
||||
*/
|
||||
public function exchangeArray($array) {}
|
||||
public function exchangeArray(#[LanguageLevelTypeAware(['8.0' => 'object|array'], default: '')] $array) {}
|
||||
|
||||
/**
|
||||
* Sets the iterator classname for the ArrayObject.
|
||||
|
@ -1666,7 +1685,7 @@ class ArrayObject implements IteratorAggregate, ArrayAccess, Serializable, Count
|
|||
* </p>
|
||||
* @return void
|
||||
*/
|
||||
public function setIteratorClass($iteratorClass) {}
|
||||
public function setIteratorClass(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $iteratorClass) {}
|
||||
|
||||
/**
|
||||
* Gets the iterator classname for the ArrayObject.
|
||||
|
@ -1694,8 +1713,8 @@ class ArrayIterator implements SeekableIterator, ArrayAccess, Serializable, Coun
|
|||
* @see ArrayObject::setFlags()
|
||||
*/
|
||||
public function __construct(
|
||||
$array = [],
|
||||
$flags = 0,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'object|array'], default: '')] $array = [],
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = 0,
|
||||
#[PhpStormStubsElementAvailable(from: '5.3', to: '7.1')] $iterator_class = null
|
||||
) {}
|
||||
|
||||
|
@ -1730,7 +1749,7 @@ class ArrayIterator implements SeekableIterator, ArrayAccess, Serializable, Coun
|
|||
* </p>
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($key, $value) {}
|
||||
public function offsetSet($key, #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value) {}
|
||||
|
||||
/**
|
||||
* Unset value for an offset
|
||||
|
@ -1750,7 +1769,7 @@ class ArrayIterator implements SeekableIterator, ArrayAccess, Serializable, Coun
|
|||
* </p>
|
||||
* @return void
|
||||
*/
|
||||
public function append($value) {}
|
||||
public function append(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value) {}
|
||||
|
||||
/**
|
||||
* Get array copy
|
||||
|
@ -1786,7 +1805,7 @@ class ArrayIterator implements SeekableIterator, ArrayAccess, Serializable, Coun
|
|||
* </p>
|
||||
* @return void
|
||||
*/
|
||||
public function setFlags($flags) {}
|
||||
public function setFlags(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags) {}
|
||||
|
||||
/**
|
||||
* Sort array by values
|
||||
|
@ -1794,7 +1813,7 @@ class ArrayIterator implements SeekableIterator, ArrayAccess, Serializable, Coun
|
|||
* @param int $flags [optional]
|
||||
* @return void
|
||||
*/
|
||||
public function asort(#[PhpStormStubsElementAvailable(from: '8.0')] $flags = SORT_REGULAR) {}
|
||||
public function asort(#[PhpStormStubsElementAvailable(from: '8.0')] int $flags = SORT_REGULAR) {}
|
||||
|
||||
/**
|
||||
* Sort array by keys
|
||||
|
@ -1802,7 +1821,7 @@ class ArrayIterator implements SeekableIterator, ArrayAccess, Serializable, Coun
|
|||
* @param int $flags [optional]
|
||||
* @return void
|
||||
*/
|
||||
public function ksort(#[PhpStormStubsElementAvailable(from: '8.0')] $flags = SORT_REGULAR) {}
|
||||
public function ksort(#[PhpStormStubsElementAvailable(from: '8.0')] int $flags = SORT_REGULAR) {}
|
||||
|
||||
/**
|
||||
* User defined sort
|
||||
|
@ -1812,7 +1831,7 @@ class ArrayIterator implements SeekableIterator, ArrayAccess, Serializable, Coun
|
|||
* </p>
|
||||
* @return void
|
||||
*/
|
||||
public function uasort($callback) {}
|
||||
public function uasort(#[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback) {}
|
||||
|
||||
/**
|
||||
* User defined sort
|
||||
|
@ -1822,7 +1841,7 @@ class ArrayIterator implements SeekableIterator, ArrayAccess, Serializable, Coun
|
|||
* </p>
|
||||
* @return void
|
||||
*/
|
||||
public function uksort($callback) {}
|
||||
public function uksort(#[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback) {}
|
||||
|
||||
/**
|
||||
* Sort an array naturally
|
||||
|
@ -1846,7 +1865,7 @@ class ArrayIterator implements SeekableIterator, ArrayAccess, Serializable, Coun
|
|||
* </p>
|
||||
* @return string The <b>ArrayIterator</b>.
|
||||
*/
|
||||
public function unserialize($data) {}
|
||||
public function unserialize(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data) {}
|
||||
|
||||
/**
|
||||
* Serialize
|
||||
|
@ -1898,7 +1917,7 @@ class ArrayIterator implements SeekableIterator, ArrayAccess, Serializable, Coun
|
|||
* </p>
|
||||
* @return void
|
||||
*/
|
||||
public function seek($offset) {}
|
||||
public function seek(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $offset) {}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
|
|
3140
SPL/SPL_c1.php
3140
SPL/SPL_c1.php
File diff suppressed because it is too large
Load Diff
57
ftp/ftp.php
57
ftp/ftp.php
|
@ -15,14 +15,14 @@ use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
|||
* @since 7.2
|
||||
*/
|
||||
function ftp_append(
|
||||
#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')]$ftp,
|
||||
#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp,
|
||||
string $remote_filename,
|
||||
string $local_filename,
|
||||
#[EV([FTP_ASCII, FTP_BINARY])]
|
||||
#[PhpStormStubsElementAvailable(from:'5.3', to:'7.2')]
|
||||
#[PhpStormStubsElementAvailable(from: '5.3', to: '7.2')]
|
||||
int $mode,
|
||||
#[EV([FTP_ASCII, FTP_BINARY])]
|
||||
#[PhpStormStubsElementAvailable(from:'7.3')]
|
||||
#[PhpStormStubsElementAvailable(from: '7.3')]
|
||||
int $mode = FTP_BINARY
|
||||
): bool {}
|
||||
|
||||
|
@ -302,14 +302,14 @@ function ftp_pasv(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default:
|
|||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function ftp_get(
|
||||
#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')]$ftp,
|
||||
#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp,
|
||||
string $local_filename,
|
||||
string $remote_filename,
|
||||
#[EV([FTP_ASCII, FTP_BINARY])]
|
||||
#[PhpStormStubsElementAvailable(from:'5.3', to:'7.2')]
|
||||
#[PhpStormStubsElementAvailable(from: '5.3', to: '7.2')]
|
||||
int $mode,
|
||||
#[EV([FTP_ASCII, FTP_BINARY])]
|
||||
#[PhpStormStubsElementAvailable(from:'7.3')]
|
||||
#[PhpStormStubsElementAvailable(from: '7.3')]
|
||||
int $mode = FTP_BINARY,
|
||||
int $offset = 0
|
||||
): bool {}
|
||||
|
@ -335,14 +335,14 @@ function ftp_get(
|
|||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function ftp_fget(
|
||||
#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')]$ftp,
|
||||
#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp,
|
||||
$stream,
|
||||
string $remote_filename,
|
||||
#[EV([FTP_ASCII, FTP_BINARY])]
|
||||
#[PhpStormStubsElementAvailable(from:'5.3', to:'7.2')]
|
||||
#[PhpStormStubsElementAvailable(from: '5.3', to: '7.2')]
|
||||
int $mode,
|
||||
#[EV([FTP_ASCII, FTP_BINARY])]
|
||||
#[PhpStormStubsElementAvailable(from:'7.3')]
|
||||
#[PhpStormStubsElementAvailable(from: '7.3')]
|
||||
int $mode = FTP_BINARY,
|
||||
int $offset = 0
|
||||
): bool {}
|
||||
|
@ -366,14 +366,14 @@ function ftp_fget(
|
|||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function ftp_put(
|
||||
#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')]$ftp,
|
||||
#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp,
|
||||
string $remote_filename,
|
||||
string $local_filename,
|
||||
#[EV([FTP_ASCII, FTP_BINARY])]
|
||||
#[PhpStormStubsElementAvailable(from:'5.3', to:'7.2')]
|
||||
#[PhpStormStubsElementAvailable(from: '5.3', to: '7.2')]
|
||||
int $mode,
|
||||
#[EV([FTP_ASCII, FTP_BINARY])]
|
||||
#[PhpStormStubsElementAvailable(from:'7.3')]
|
||||
#[PhpStormStubsElementAvailable(from: '7.3')]
|
||||
int $mode = FTP_BINARY,
|
||||
int $offset = 0
|
||||
): bool {}
|
||||
|
@ -397,14 +397,14 @@ function ftp_put(
|
|||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function ftp_fput(
|
||||
#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')]$ftp,
|
||||
#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp,
|
||||
string $remote_filename,
|
||||
$stream,
|
||||
#[EV([FTP_ASCII, FTP_BINARY])]
|
||||
#[PhpStormStubsElementAvailable(from:'5.3', to:'7.2')]
|
||||
#[PhpStormStubsElementAvailable(from: '5.3', to: '7.2')]
|
||||
int $mode,
|
||||
#[EV([FTP_ASCII, FTP_BINARY])]
|
||||
#[PhpStormStubsElementAvailable(from:'7.3')]
|
||||
#[PhpStormStubsElementAvailable(from: '7.3')]
|
||||
int $mode = FTP_BINARY,
|
||||
int $offset = 0
|
||||
): bool {}
|
||||
|
@ -580,14 +580,14 @@ function ftp_get_option(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], de
|
|||
*/
|
||||
#[EV([FTP_FAILED, FTP_FINISHED, FTP_MOREDATA])]
|
||||
function ftp_nb_fget(
|
||||
#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')]$ftp,
|
||||
#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp,
|
||||
$stream,
|
||||
string $remote_filename,
|
||||
#[EV([FTP_ASCII, FTP_BINARY])]
|
||||
#[PhpStormStubsElementAvailable(from:'5.3', to:'7.2')]
|
||||
#[PhpStormStubsElementAvailable(from: '5.3', to: '7.2')]
|
||||
int $mode,
|
||||
#[EV([FTP_ASCII, FTP_BINARY])]
|
||||
#[PhpStormStubsElementAvailable(from:'7.3')]
|
||||
#[PhpStormStubsElementAvailable(from: '7.3')]
|
||||
int $mode = FTP_BINARY,
|
||||
int $offset = 0
|
||||
): int {}
|
||||
|
@ -613,14 +613,14 @@ function ftp_nb_fget(
|
|||
*/
|
||||
#[EV([FTP_FAILED, FTP_FINISHED, FTP_MOREDATA])]
|
||||
function ftp_nb_get(
|
||||
#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')]$ftp,
|
||||
#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp,
|
||||
string $local_filename,
|
||||
string $remote_filename,
|
||||
#[EV([FTP_ASCII, FTP_BINARY])]
|
||||
#[PhpStormStubsElementAvailable(from:'5.3', to:'7.2')]
|
||||
#[PhpStormStubsElementAvailable(from: '5.3', to: '7.2')]
|
||||
int $mode,
|
||||
#[EV([FTP_ASCII, FTP_BINARY])]
|
||||
#[PhpStormStubsElementAvailable(from:'7.3')]
|
||||
#[PhpStormStubsElementAvailable(from: '7.3')]
|
||||
int $mode = FTP_BINARY,
|
||||
int $offset = 0
|
||||
): int {}
|
||||
|
@ -658,14 +658,14 @@ function ftp_nb_continue(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], d
|
|||
*/
|
||||
#[EV([FTP_FAILED, FTP_FINISHED, FTP_MOREDATA])]
|
||||
function ftp_nb_put(
|
||||
#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')]$ftp,
|
||||
#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp,
|
||||
string $remote_filename,
|
||||
string $local_filename,
|
||||
#[EV([FTP_ASCII, FTP_BINARY])]
|
||||
#[PhpStormStubsElementAvailable(from:'5.3', to:'7.2')]
|
||||
#[PhpStormStubsElementAvailable(from: '5.3', to: '7.2')]
|
||||
int $mode,
|
||||
#[EV([FTP_ASCII, FTP_BINARY])]
|
||||
#[PhpStormStubsElementAvailable(from:'7.3')]
|
||||
#[PhpStormStubsElementAvailable(from: '7.3')]
|
||||
int $mode = FTP_BINARY,
|
||||
int $offset = 0
|
||||
): int|false {}
|
||||
|
@ -691,16 +691,17 @@ function ftp_nb_put(
|
|||
*/
|
||||
#[EV([FTP_FAILED, FTP_FINISHED, FTP_MOREDATA])]
|
||||
function ftp_nb_fput(
|
||||
#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')]$ftp,
|
||||
#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp,
|
||||
string $remote_filename,
|
||||
$stream,
|
||||
#[EV([FTP_ASCII, FTP_BINARY])]
|
||||
#[PhpStormStubsElementAvailable(from:'5.3', to:'7.2')]
|
||||
#[PhpStormStubsElementAvailable(from: '5.3', to: '7.2')]
|
||||
int $mode,
|
||||
#[EV([FTP_ASCII, FTP_BINARY])]
|
||||
#[PhpStormStubsElementAvailable(from:'7.3')]
|
||||
#[PhpStormStubsElementAvailable(from: '7.3')]
|
||||
int $mode = FTP_BINARY,
|
||||
int $offset = 0): int {}
|
||||
int $offset = 0
|
||||
): int {}
|
||||
|
||||
/**
|
||||
* Alias of <b>ftp_close</b>
|
||||
|
|
|
@ -166,7 +166,7 @@ class mysqli
|
|||
public $error_list;
|
||||
|
||||
public $stat;
|
||||
|
||||
|
||||
/**
|
||||
* Open a new connection to the MySQL server
|
||||
* @link https://php.net/manual/en/mysqli.construct.php
|
||||
|
|
|
@ -49,7 +49,7 @@ interface SessionHandlerInterface
|
|||
* </p>
|
||||
* @since 5.4
|
||||
*/
|
||||
public function gc(#[LanguageLevelTypeAware(['8.0' => 'int'], default:'')] $max_lifetime);
|
||||
public function gc(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $max_lifetime);
|
||||
|
||||
/**
|
||||
* Initialize session
|
||||
|
@ -241,7 +241,7 @@ class SessionHandler implements SessionHandlerInterface, SessionIdInterface
|
|||
* </p>
|
||||
* @since 5.4
|
||||
*/
|
||||
public function read($id) {}
|
||||
public function read(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $id) {}
|
||||
|
||||
/**
|
||||
* Write session data
|
||||
|
|
|
@ -1137,7 +1137,6 @@ function sodium_crypto_secretstream_xchacha20poly1305_init_push(string $key): ar
|
|||
*/
|
||||
function sodium_crypto_secretstream_xchacha20poly1305_init_pull(string $header, string $key): string {}
|
||||
|
||||
|
||||
/**
|
||||
* @param string &$state
|
||||
* @throws SodiumException
|
||||
|
|
|
@ -565,7 +565,8 @@ function array_udiff(
|
|||
#[Pure]
|
||||
function array_diff_assoc(
|
||||
array $array,
|
||||
array ...$arrays): array {}
|
||||
array ...$arrays
|
||||
): array {}
|
||||
|
||||
/**
|
||||
* Computes the difference of arrays with additional index check, compares data by a callback function
|
||||
|
@ -750,8 +751,9 @@ function array_filter(array $array, ?callable $callback, int $mode = 0): array {
|
|||
*/
|
||||
function array_map(
|
||||
?callable $callback,
|
||||
#[PhpStormStubsElementAvailable(from:'8.0')] array $array,
|
||||
array ...$arrays): array {}
|
||||
#[PhpStormStubsElementAvailable(from: '8.0')] array $array,
|
||||
array ...$arrays
|
||||
): array {}
|
||||
|
||||
/**
|
||||
* Split an array into chunks
|
||||
|
|
|
@ -6,7 +6,6 @@ namespace StubTests\Model;
|
|||
use Exception;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
use phpDocumentor\Reflection\Type;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\AttributeGroup;
|
||||
|
|
|
@ -233,7 +233,8 @@ class XMLReader
|
|||
*/
|
||||
public function moveToAttributeNs(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $namespace) {}
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $namespace
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Position cursor on the parent Element of current Attribute
|
||||
|
@ -350,7 +351,8 @@ class XMLReader
|
|||
*/
|
||||
public function setParserProperty(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $property,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $value) {}
|
||||
#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $value
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Set the filename or URI for a RelaxNG Schema
|
||||
|
|
|
@ -81,7 +81,7 @@ 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) {}
|
||||
public function startAttribute(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name) {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 0.1.0)<br/>
|
||||
|
@ -241,7 +241,8 @@ class XMLWriter
|
|||
#[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) {}
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $content = null
|
||||
) {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 0.1.0)<br/>
|
||||
|
@ -535,7 +536,12 @@ class XMLWriter
|
|||
*/
|
||||
public function writeDtdEntity(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $content, $pe, $pubid, $sysid, $ndataid) {}
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $content,
|
||||
$pe,
|
||||
$pubid,
|
||||
$sysid,
|
||||
$ndataid
|
||||
) {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 0.1.0)<br/>
|
||||
|
|
|
@ -826,7 +826,8 @@ class ZipArchive implements Countable
|
|||
public function addPattern(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $pattern,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $path = '.',
|
||||
array $options = []) {}
|
||||
array $options = []
|
||||
) {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.2.0, PECL zip >= 1.5.0)<br/>
|
||||
|
@ -1293,7 +1294,8 @@ class ZipArchive implements Countable
|
|||
|
||||
public static function isCompressionMethodSupported(
|
||||
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $method,
|
||||
#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $enc = true) {}
|
||||
#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $enc = true
|
||||
) {}
|
||||
|
||||
public function registerCancelCallback(#[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback) {}
|
||||
|
||||
|
|
Loading…
Reference in New Issue