1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/16639] Add types and small changes in tests

PHPBB3-16639
This commit is contained in:
rubencm
2021-03-24 15:23:07 +01:00
parent ee5e5a9d30
commit a87f534268
6 changed files with 281 additions and 144 deletions

View File

@@ -13,27 +13,29 @@
namespace phpbb\storage;
use phpbb\storage\exception\exception;
interface stream_interface
{
/**
* Reads a file as a stream
*
* @param string $path File to read
* @param string $path File to read
*
* @throws \phpbb\storage\exception\exception When unable to open file
*
* @return resource Returns a file pointer
* @return resource Returns a file pointer
* @throws exception\exception When unable to open file
*/
public function read_stream($path);
public function read_stream(string $path);
/**
* Writes a new file using a stream
*
* @param string $path The target file
* @param resource $resource The resource
* @param string $path The target file
* @param resource $resource The resource
*
* @throws \phpbb\storage\exception\exception When target file exists
* When target file cannot be created
* @return void
* @throws exception When target file exists
* When target file cannot be created
*/
public function write_stream($path, $resource);
public function write_stream(string $path, $resource): void;
}