@@ -170,15 +170,15 @@ public static function getPost($var, $default = null)
170
170
* @param boolean $secure If deleting the file, should we securely delete
171
171
* the file by overwriting it with random data?
172
172
*
173
- * @return string Returns the full path-name to the temporary file.
173
+ * @return string|false Returns the full path-name to the temporary file.
174
174
* Returns false if a temp file could not be created.
175
175
*/
176
176
public static function getTempFile (
177
177
$ prefix = '' ,
178
178
$ delete = true ,
179
179
$ dir = '' ,
180
180
$ secure = false
181
- )
181
+ ): string | false
182
182
{
183
183
$ tempDir = (empty ($ dir ) || !is_dir ($ dir ))
184
184
? sys_get_temp_dir ()
@@ -211,16 +211,16 @@ public static function getTempFile(
211
211
* @param boolean $secure If deleting file, should we securely delete
212
212
* the file by overwriting it with random data?
213
213
*
214
- * @return string Returns the full path-name to the temporary file.
215
- * Returns false if a temporary file could not be created.
214
+ * @return string|false Returns the full path-name to the temporary file.
215
+ * Returns false if a temporary file could not be created.
216
216
*/
217
217
public static function getTempFileWithExtension (
218
218
$ extension = '.tmp ' ,
219
219
$ prefix = '' ,
220
220
$ delete = true ,
221
221
$ dir = '' ,
222
222
$ secure = false
223
- )
223
+ ): string | false
224
224
{
225
225
$ tempDir = (empty ($ dir ) || !is_dir ($ dir ))
226
226
? sys_get_temp_dir ()
@@ -275,10 +275,10 @@ public static function getTempFileWithExtension(
275
275
* @param string $temp_dir Use this temporary directory as the directory
276
276
* where the temporary directory will be created.
277
277
*
278
- * @return string The pathname to the new temporary directory.
278
+ * @return string|false The pathname to the new temporary directory.
279
279
* Returns false if directory not created.
280
280
*/
281
- public static function createTempDir ($ delete = true , $ temp_dir = null )
281
+ public static function createTempDir ($ delete = true , $ temp_dir = null ): string | false
282
282
{
283
283
if (is_null ($ temp_dir )) {
284
284
$ temp_dir = sys_get_temp_dir ();
0 commit comments