@@ -79,164 +79,162 @@ class ZipArchive implements Countable
79
79
/** @readonly */
80
80
public string $ comment ;
81
81
82
- /** @return bool|int */
83
- public function open (string $ filename , int $ flags = 0 ) {}
82
+ /** @tentative- return-type */
83
+ public function open (string $ filename , int $ flags = 0 ): bool | int {}
84
84
85
- /** @return bool */
86
- public function setPassword (string $ password ) {}
85
+ /** @tentative- return-type */
86
+ public function setPassword (string $ password ): bool {}
87
87
88
- /** @return bool */
89
- public function close () {}
88
+ /** @tentative- return-type */
89
+ public function close (): bool {}
90
90
91
- /** @return int */
92
- public function count () {}
91
+ /** @tentative- return-type */
92
+ public function count (): int {}
93
93
94
- /** @return string */
95
- public function getStatusString () {}
94
+ /** @tentative- return-type */
95
+ public function getStatusString (): string {}
96
96
97
- /** @return bool */
98
- public function addEmptyDir (string $ dirname , int $ flags = 0 ) {}
97
+ /** @tentative- return-type */
98
+ public function addEmptyDir (string $ dirname , int $ flags = 0 ): bool {}
99
99
100
- /** @return bool */
101
- public function addFromString (string $ name , string $ content , int $ flags = ZipArchive::FL_OVERWRITE ) {}
100
+ /** @tentative- return-type */
101
+ public function addFromString (string $ name , string $ content , int $ flags = ZipArchive::FL_OVERWRITE ): bool {}
102
102
103
- /** @return bool */
104
- public function addFile (string $ filepath , string $ entryname = "" , int $ start = 0 , int $ length = 0 , int $ flags = ZipArchive::FL_OVERWRITE ) {}
103
+ /** @tentative- return-type */
104
+ public function addFile (string $ filepath , string $ entryname = "" , int $ start = 0 , int $ length = 0 , int $ flags = ZipArchive::FL_OVERWRITE ): bool {}
105
105
106
- /** @return bool */
107
- public function replaceFile (string $ filepath , string $ index , int $ start = 0 , int $ length = 0 , int $ flags = 0 ) {}
106
+ /** @tentative- return-type */
107
+ public function replaceFile (string $ filepath , string $ index , int $ start = 0 , int $ length = 0 , int $ flags = 0 ): bool {}
108
108
109
- /** @return array|false */
110
- public function addGlob (string $ pattern , int $ flags = 0 , array $ options = []) {}
109
+ /** @tentative- return-type */
110
+ public function addGlob (string $ pattern , int $ flags = 0 , array $ options = []): array | false {}
111
111
112
- /** @return array|false */
113
- public function addPattern (string $ pattern , string $ path = ". " , array $ options = []) {}
112
+ /** @tentative- return-type */
113
+ public function addPattern (string $ pattern , string $ path = ". " , array $ options = []): array | false {}
114
114
115
- /** @return bool */
116
- public function renameIndex (int $ index , string $ new_name ) {}
115
+ /** @tentative- return-type */
116
+ public function renameIndex (int $ index , string $ new_name ): bool {}
117
117
118
- /** @return bool */
119
- public function renameName (string $ name , string $ new_name ) {}
118
+ /** @tentative- return-type */
119
+ public function renameName (string $ name , string $ new_name ): bool {}
120
120
121
- /** @return bool */
122
- public function setArchiveComment (string $ comment ) {}
121
+ /** @tentative- return-type */
122
+ public function setArchiveComment (string $ comment ): bool {}
123
123
124
- /** @return string|false */
125
- public function getArchiveComment (int $ flags = 0 ) {}
124
+ /** @tentative- return-type */
125
+ public function getArchiveComment (int $ flags = 0 ): string | false {}
126
126
127
- /** @return bool */
128
- public function setCommentIndex (int $ index , string $ comment ) {}
127
+ /** @tentative- return-type */
128
+ public function setCommentIndex (int $ index , string $ comment ): bool {}
129
129
130
- /** @return bool */
131
- public function setCommentName (string $ name , string $ comment ) {}
130
+ /** @tentative- return-type */
131
+ public function setCommentName (string $ name , string $ comment ): bool {}
132
132
133
133
#ifdef HAVE_SET_MTIME
134
- /** @return bool */
135
- public function setMtimeIndex (int $ index , int $ timestamp , int $ flags = 0 ) {}
134
+ /** @tentative- return-type */
135
+ public function setMtimeIndex (int $ index , int $ timestamp , int $ flags = 0 ): bool {}
136
136
137
- /** @return bool */
138
- public function setMtimeName (string $ name , int $ timestamp , int $ flags = 0 ) {}
137
+ /** @tentative- return-type */
138
+ public function setMtimeName (string $ name , int $ timestamp , int $ flags = 0 ): bool {}
139
139
#endif
140
140
141
- /** @return string|false */
142
- public function getCommentIndex (int $ index , int $ flags = 0 ) {}
141
+ /** @tentative- return-type */
142
+ public function getCommentIndex (int $ index , int $ flags = 0 ): string | false {}
143
143
144
- /** @return string|false */
145
- public function getCommentName (string $ name , int $ flags = 0 ) {}
144
+ /** @tentative- return-type */
145
+ public function getCommentName (string $ name , int $ flags = 0 ): string | false {}
146
146
147
- /** @return bool */
148
- public function deleteIndex (int $ index ) {}
147
+ /** @tentative- return-type */
148
+ public function deleteIndex (int $ index ): bool {}
149
149
150
- /** @return bool */
151
- public function deleteName (string $ name ) {}
150
+ /** @tentative- return-type */
151
+ public function deleteName (string $ name ): bool {}
152
152
153
- /** @return array|false */
154
- public function statName (string $ name , int $ flags = 0 ) {}
153
+ /** @tentative- return-type */
154
+ public function statName (string $ name , int $ flags = 0 ): array | false {}
155
155
156
- /** @return array|false */
157
- public function statIndex (int $ index , int $ flags = 0 ) {}
156
+ /** @tentative- return-type */
157
+ public function statIndex (int $ index , int $ flags = 0 ): array | false {}
158
158
159
- /** @return int|false */
160
- public function locateName (string $ name , int $ flags = 0 ) {}
159
+ /** @tentative- return-type */
160
+ public function locateName (string $ name , int $ flags = 0 ): int | false {}
161
161
162
- /** @return string|false */
163
- public function getNameIndex (int $ index , int $ flags = 0 ) {}
162
+ /** @tentative- return-type */
163
+ public function getNameIndex (int $ index , int $ flags = 0 ): string | false {}
164
164
165
- /** @return bool */
166
- public function unchangeArchive () {}
165
+ /** @tentative- return-type */
166
+ public function unchangeArchive (): bool {}
167
167
168
- /** @return bool */
169
- public function unchangeAll () {}
168
+ /** @tentative- return-type */
169
+ public function unchangeAll (): bool {}
170
170
171
- /** @return bool */
172
- public function unchangeIndex (int $ index ) {}
171
+ /** @tentative- return-type */
172
+ public function unchangeIndex (int $ index ): bool {}
173
173
174
- /** @return bool */
175
- public function unchangeName (string $ name ) {}
174
+ /** @tentative- return-type */
175
+ public function unchangeName (string $ name ): bool {}
176
176
177
- /** @return bool */
178
- public function extractTo (string $ pathto , array |string |null $ files = null ) {}
177
+ /** @tentative- return-type */
178
+ public function extractTo (string $ pathto , array |string |null $ files = null ): bool {}
179
179
180
- /** @return string|false */
181
- public function getFromName (string $ name , int $ len = 0 , int $ flags = 0 ) {}
180
+ /** @tentative- return-type */
181
+ public function getFromName (string $ name , int $ len = 0 , int $ flags = 0 ): string | false {}
182
182
183
- /** @return string|false */
184
- public function getFromIndex (int $ index , int $ len = 0 , int $ flags = 0 ) {}
183
+ /** @tentative- return-type */
184
+ public function getFromIndex (int $ index , int $ len = 0 , int $ flags = 0 ): string | false {}
185
185
186
186
/** @return resource|false */
187
187
public function getStream (string $ name ) {}
188
188
189
189
#ifdef ZIP_OPSYS_DEFAULT
190
- /** @return bool */
191
- public function setExternalAttributesName (string $ name , int $ opsys , int $ attr , int $ flags = 0 ) {}
190
+ /** @tentative- return-type */
191
+ public function setExternalAttributesName (string $ name , int $ opsys , int $ attr , int $ flags = 0 ): bool {}
192
192
193
- /** @return bool */
194
- public function setExternalAttributesIndex (int $ index , int $ opsys , int $ attr , int $ flags = 0 ) {}
193
+ /** @tentative- return-type */
194
+ public function setExternalAttributesIndex (int $ index , int $ opsys , int $ attr , int $ flags = 0 ): bool {}
195
195
196
196
/**
197
197
* @param int $opsys
198
198
* @param int $attr
199
- * @return bool
199
+ * @tentative- return-type
200
200
*/
201
- public function getExternalAttributesName (string $ name , &$ opsys , &$ attr , int $ flags = 0 ) {}
201
+ public function getExternalAttributesName (string $ name , &$ opsys , &$ attr , int $ flags = 0 ): bool {}
202
202
203
203
/**
204
204
* @param int $opsys
205
205
* @param int $attr
206
- * @return bool
206
+ * @tentative- return-type
207
207
*/
208
- public function getExternalAttributesIndex (int $ index , &$ opsys , &$ attr , int $ flags = 0 ) {}
208
+ public function getExternalAttributesIndex (int $ index , &$ opsys , &$ attr , int $ flags = 0 ): bool {}
209
209
#endif
210
210
211
- /** @return bool */
212
- public function setCompressionName (string $ name , int $ method , int $ compflags = 0 ) {}
211
+ /** @tentative- return-type */
212
+ public function setCompressionName (string $ name , int $ method , int $ compflags = 0 ): bool {}
213
213
214
- /** @return bool */
215
- public function setCompressionIndex (int $ index , int $ method , int $ compflags = 0 ) {}
214
+ /** @tentative- return-type */
215
+ public function setCompressionIndex (int $ index , int $ method , int $ compflags = 0 ): bool {}
216
216
217
217
#ifdef HAVE_ENCRYPTION
218
- /** @return bool */
219
- public function setEncryptionName (string $ name , int $ method , ?string $ password = null ) {}
218
+ /** @tentative- return-type */
219
+ public function setEncryptionName (string $ name , int $ method , ?string $ password = null ): bool {}
220
220
221
- /** @return bool */
222
- public function setEncryptionIndex (int $ index , int $ method , ?string $ password = null ) {}
221
+ /** @tentative- return-type */
222
+ public function setEncryptionIndex (int $ index , int $ method , ?string $ password = null ): bool {}
223
223
#endif
224
224
225
225
#ifdef HAVE_PROGRESS_CALLBACK
226
- /** @return bool */
227
- public function registerProgressCallback (float $ rate , callable $ callback ) {}
226
+ /** @tentative- return-type */
227
+ public function registerProgressCallback (float $ rate , callable $ callback ): bool {}
228
228
#endif
229
229
230
230
#ifdef HAVE_CANCEL_CALLBACK
231
- /** @return bool */
232
- public function registerCancelCallback (callable $ callback ) {}
231
+ /** @tentative- return-type */
232
+ public function registerCancelCallback (callable $ callback ): bool {}
233
233
#endif
234
234
235
235
#ifdef HAVE_METHOD_SUPPORTED
236
- /** @return bool */
237
236
public static function isCompressionMethodSupported (int $ method , bool $ enc = true ): bool {}
238
237
239
- /** @return bool */
240
238
public static function isEncryptionMethodSupported (int $ method , bool $ enc = true ): bool {}
241
239
#endif
242
240
}
0 commit comments