Skip to content

Commit ae1517c

Browse files
committed
Update stubs
1 parent 73ee8a9 commit ae1517c

File tree

142 files changed

+4098
-939
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+4098
-939
lines changed

stubs/Zend/ArrayAccess.php

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,25 @@
22

33
interface ArrayAccess
44
{
5-
/** @tentative-return-type */
5+
/**
6+
* @tentative-return-type
7+
* @return bool
8+
*/
69
public function offsetExists(mixed $offset);
710
/**
811
* Actually this should be return by ref but atm cannot be.
912
* @tentative-return-type
13+
* @return mixed
1014
*/
1115
public function offsetGet(mixed $offset);
12-
/** @tentative-return-type */
16+
/**
17+
* @tentative-return-type
18+
* @return void
19+
*/
1320
public function offsetSet(mixed $offset, mixed $value);
14-
/** @tentative-return-type */
21+
/**
22+
* @tentative-return-type
23+
* @return void
24+
*/
1525
public function offsetUnset(mixed $offset);
1626
}

stubs/Zend/Countable.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
interface Countable
44
{
5-
/** @tentative-return-type */
5+
/**
6+
* @tentative-return-type
7+
* @return int
8+
*/
69
public function count();
710
}

stubs/Zend/Error.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public function __construct(string $message = "", int $code = 0, ?Throwable $pre
1919
/**
2020
* @tentative-return-type
2121
* @implementation-alias Exception::__wakeup
22+
* @return void
2223
*/
2324
public function __wakeup()
2425
{

stubs/Zend/Exception.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ private function __clone() : void
1313
public function __construct(string $message = "", int $code = 0, ?Throwable $previous = null)
1414
{
1515
}
16-
/** @tentative-return-type */
16+
/**
17+
* @tentative-return-type
18+
* @return void
19+
*/
1720
public function __wakeup()
1821
{
1922
}

stubs/Zend/Iterator.php

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,29 @@
22

33
interface Iterator extends \Traversable
44
{
5-
/** @tentative-return-type */
5+
/**
6+
* @tentative-return-type
7+
* @return mixed
8+
*/
69
public function current();
7-
/** @tentative-return-type */
10+
/**
11+
* @tentative-return-type
12+
* @return void
13+
*/
814
public function next();
9-
/** @tentative-return-type */
15+
/**
16+
* @tentative-return-type
17+
* @return mixed
18+
*/
1019
public function key();
11-
/** @tentative-return-type */
20+
/**
21+
* @tentative-return-type
22+
* @return bool
23+
*/
1224
public function valid();
13-
/** @tentative-return-type */
25+
/**
26+
* @tentative-return-type
27+
* @return void
28+
*/
1429
public function rewind();
1530
}

stubs/Zend/IteratorAggregate.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
interface IteratorAggregate extends \Traversable
44
{
5-
/** @tentative-return-type */
5+
/**
6+
* @tentative-return-type
7+
* @return Traversable
8+
*/
69
public function getIterator();
710
}

stubs/ext/curl/CURLFile.php

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,38 @@ class CURLFile
77
public function __construct(string $filename, ?string $mime_type = null, ?string $posted_filename = null)
88
{
99
}
10-
/** @tentative-return-type */
10+
/**
11+
* @tentative-return-type
12+
* @return string
13+
*/
1114
public function getFilename()
1215
{
1316
}
14-
/** @tentative-return-type */
17+
/**
18+
* @tentative-return-type
19+
* @return string
20+
*/
1521
public function getMimeType()
1622
{
1723
}
18-
/** @tentative-return-type */
24+
/**
25+
* @tentative-return-type
26+
* @return string
27+
*/
1928
public function getPostFilename()
2029
{
2130
}
22-
/** @tentative-return-type */
31+
/**
32+
* @tentative-return-type
33+
* @return void
34+
*/
2335
public function setMimeType(string $mime_type)
2436
{
2537
}
26-
/** @tentative-return-type */
38+
/**
39+
* @tentative-return-type
40+
* @return void
41+
*/
2742
public function setPostFilename(string $posted_filename)
2843
{
2944
}

stubs/ext/date/DateInterval.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,30 @@ public function __construct(string $duration)
88
/**
99
* @tentative-return-type
1010
* @alias date_interval_create_from_date_string
11+
* @return (DateInterval | false)
1112
*/
1213
public static function createFromDateString(string $datetime)
1314
{
1415
}
1516
/**
1617
* @tentative-return-type
1718
* @alias date_interval_format
19+
* @return string
1820
*/
1921
public function format(string $format)
2022
{
2123
}
22-
/** @tentative-return-type */
24+
/**
25+
* @tentative-return-type
26+
* @return void
27+
*/
2328
public function __wakeup()
2429
{
2530
}
26-
/** @tentative-return-type */
31+
/**
32+
* @tentative-return-type
33+
* @return DateInterval
34+
*/
2735
public static function __set_state(array $array)
2836
{
2937
}

stubs/ext/date/DatePeriod.php

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,45 @@ class DatePeriod implements \IteratorAggregate
1111
public function __construct($start, $interval = UNKNOWN, $end = UNKNOWN, $options = UNKNOWN)
1212
{
1313
}
14-
/** @tentative-return-type */
14+
/**
15+
* @tentative-return-type
16+
* @return DateTimeInterface
17+
*/
1518
public function getStartDate()
1619
{
1720
}
18-
/** @tentative-return-type */
21+
/**
22+
* @tentative-return-type
23+
* @return (DateTimeInterface | null)
24+
*/
1925
public function getEndDate()
2026
{
2127
}
22-
/** @tentative-return-type */
28+
/**
29+
* @tentative-return-type
30+
* @return DateInterval
31+
*/
2332
public function getDateInterval()
2433
{
2534
}
26-
/** @tentative-return-type */
35+
/**
36+
* @tentative-return-type
37+
* @return (int | null)
38+
*/
2739
public function getRecurrences()
2840
{
2941
}
30-
/** @tentative-return-type */
42+
/**
43+
* @tentative-return-type
44+
* @return void
45+
*/
3146
public function __wakeup()
3247
{
3348
}
34-
/** @tentative-return-type */
49+
/**
50+
* @tentative-return-type
51+
* @return DatePeriod
52+
*/
3553
public static function __set_state(array $array)
3654
{
3755
}

stubs/ext/date/DateTime.php

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,24 @@ class DateTime implements \DateTimeInterface
55
public function __construct(string $datetime = "now", ?DateTimeZone $timezone = null)
66
{
77
}
8-
/** @tentative-return-type */
8+
/**
9+
* @tentative-return-type
10+
* @return void
11+
*/
912
public function __wakeup()
1013
{
1114
}
12-
/** @tentative-return-type */
15+
/**
16+
* @tentative-return-type
17+
* @return DateTime
18+
*/
1319
public static function __set_state(array $array)
1420
{
1521
}
16-
/** @tentative-return-type */
22+
/**
23+
* @tentative-return-type
24+
* @return DateTime
25+
*/
1726
public static function createFromImmutable(DateTimeImmutable $object)
1827
{
1928
}
@@ -23,6 +32,7 @@ public static function createFromInterface(DateTimeInterface $object) : DateTime
2332
/**
2433
* @tentative-return-type
2534
* @alias date_create_from_format
35+
* @return (DateTime | false)
2636
*/
2737
public static function createFromFormat(string $format, string $datetime, ?DateTimeZone $timezone = null)
2838
{
@@ -38,90 +48,103 @@ public static function getLastErrors()
3848
/**
3949
* @tentative-return-type
4050
* @alias date_format
51+
* @return string
4152
*/
4253
public function format(string $format)
4354
{
4455
}
4556
/**
4657
* @tentative-return-type
4758
* @alias date_modify
59+
* @return (DateTime | false)
4860
*/
4961
public function modify(string $modifier)
5062
{
5163
}
5264
/**
5365
* @tentative-return-type
5466
* @alias date_add
67+
* @return DateTime
5568
*/
5669
public function add(DateInterval $interval)
5770
{
5871
}
5972
/**
6073
* @tentative-return-type
6174
* @alias date_sub
75+
* @return DateTime
6276
*/
6377
public function sub(DateInterval $interval)
6478
{
6579
}
6680
/**
6781
* @tentative-return-type
6882
* @alias date_timezone_get
83+
* @return (DateTimeZone | false)
6984
*/
7085
public function getTimezone()
7186
{
7287
}
7388
/**
7489
* @tentative-return-type
7590
* @alias date_timezone_set
91+
* @return DateTime
7692
*/
7793
public function setTimezone(DateTimeZone $timezone)
7894
{
7995
}
8096
/**
8197
* @tentative-return-type
8298
* @alias date_offset_get
99+
* @return int
83100
*/
84101
public function getOffset()
85102
{
86103
}
87104
/**
88105
* @tentative-return-type
89106
* @alias date_time_set
107+
* @return DateTime
90108
*/
91109
public function setTime(int $hour, int $minute, int $second = 0, int $microsecond = 0)
92110
{
93111
}
94112
/**
95113
* @tentative-return-type
96114
* @alias date_date_set
115+
* @return DateTime
97116
*/
98117
public function setDate(int $year, int $month, int $day)
99118
{
100119
}
101120
/**
102121
* @tentative-return-type
103122
* @alias date_isodate_set
123+
* @return DateTime
104124
*/
105125
public function setISODate(int $year, int $week, int $dayOfWeek = 1)
106126
{
107127
}
108128
/**
109129
* @tentative-return-type
110130
* @alias date_timestamp_set
131+
* @return DateTime
111132
*/
112133
public function setTimestamp(int $timestamp)
113134
{
114135
}
115136
/**
116137
* @tentative-return-type
117138
* @alias date_timestamp_get
139+
* @return int
118140
*/
119141
public function getTimestamp()
120142
{
121143
}
122144
/**
123145
* @tentative-return-type
124146
* @alias date_diff
147+
* @return DateInterval
125148
*/
126149
public function diff(DateTimeInterface $targetObject, bool $absolute = false)
127150
{

0 commit comments

Comments
 (0)