1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 19:23:22 +02:00
Files
archived-php-src/ext/fileinfo/fileinfo.stub.php
T
Máté Kocsis 657cb45b84 Declare tentative return types for ext/fileinfo
Relates to GH-6985
2021-05-26 12:30:31 +02:00

51 lines
1.4 KiB
PHP

<?php
/** @generate-class-entries */
class finfo
{
/** @alias finfo_open */
public function __construct(int $flags = FILEINFO_NONE, ?string $magic_database = null) {}
/**
* @param resource|null $context
* @tentative-return-type
* @alias finfo_file
*/
public function file(string $filename, int $flags = FILEINFO_NONE, $context = null): string|false {}
/**
* @param resource|null $context
* @tentative-return-type
* @alias finfo_buffer
*/
public function buffer(string $string, int $flags = FILEINFO_NONE, $context = null): string|false {}
/**
* @return bool
* @alias finfo_set_flags
*/
public function set_flags(int $flags) {} // TODO make return type void
}
function finfo_open(int $flags = FILEINFO_NONE, ?string $magic_database = null): finfo|false {}
function finfo_close(finfo $finfo): bool {}
function finfo_set_flags(finfo $finfo, int $flags): bool {} // TODO make return type void
/**
* @param resource|null $context
*/
function finfo_file(finfo $finfo, string $filename, int $flags = FILEINFO_NONE, $context = null): string|false {}
/**
* @param resource|null $context
*/
function finfo_buffer(finfo $finfo, string $string, int $flags = FILEINFO_NONE, $context = null): string|false {}
/**
* @param resource|string $filename
*/
function mime_content_type($filename): string|false {}