mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/16639] Improve phpdoc
PHPBB3-16639
This commit is contained in:
parent
3a5a19bd99
commit
2b54e4c93e
2 changed files with 21 additions and 10 deletions
|
@ -13,6 +13,8 @@
|
||||||
|
|
||||||
namespace phpbb\storage\adapter;
|
namespace phpbb\storage\adapter;
|
||||||
|
|
||||||
|
use phpbb\storage\exception\exception;
|
||||||
|
|
||||||
interface adapter_interface
|
interface adapter_interface
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -28,7 +30,7 @@ interface adapter_interface
|
||||||
* @param string path The file to be written to.
|
* @param string path The file to be written to.
|
||||||
* @param string content The data to write into the file.
|
* @param string content The data to write into the file.
|
||||||
*
|
*
|
||||||
* @throws \phpbb\storage\exception\exception When the file cannot be written
|
* @throws exception When the file cannot be written
|
||||||
*/
|
*/
|
||||||
public function put_contents($path, $content);
|
public function put_contents($path, $content);
|
||||||
|
|
||||||
|
@ -37,7 +39,7 @@ interface adapter_interface
|
||||||
*
|
*
|
||||||
* @param string $path The file to read
|
* @param string $path The file to read
|
||||||
*
|
*
|
||||||
* @throws \phpbb\storage\exception\exception When cannot read file contents
|
* @throws exception When cannot read file contents
|
||||||
*
|
*
|
||||||
* @return string Returns file contents
|
* @return string Returns file contents
|
||||||
*
|
*
|
||||||
|
@ -58,7 +60,7 @@ interface adapter_interface
|
||||||
*
|
*
|
||||||
* @param string $path file/directory to remove
|
* @param string $path file/directory to remove
|
||||||
*
|
*
|
||||||
* @throws \phpbb\storage\exception\exception When removal fails.
|
* @throws exception When removal fails.
|
||||||
*/
|
*/
|
||||||
public function delete($path);
|
public function delete($path);
|
||||||
|
|
||||||
|
@ -68,7 +70,7 @@ interface adapter_interface
|
||||||
* @param string $path_orig The original file/direcotry
|
* @param string $path_orig The original file/direcotry
|
||||||
* @param string $path_dest The target file/directory
|
* @param string $path_dest The target file/directory
|
||||||
*
|
*
|
||||||
* @throws \phpbb\storage\exception\exception When file/directory cannot be renamed
|
* @throws exception When file/directory cannot be renamed
|
||||||
*/
|
*/
|
||||||
public function rename($path_orig, $path_dest);
|
public function rename($path_orig, $path_dest);
|
||||||
|
|
||||||
|
@ -78,7 +80,7 @@ interface adapter_interface
|
||||||
* @param string $path_orig The original filename
|
* @param string $path_orig The original filename
|
||||||
* @param string $path_dest The target filename
|
* @param string $path_dest The target filename
|
||||||
*
|
*
|
||||||
* @throws \phpbb\storage\exception\exception When the file cannot be copied
|
* @throws exception When the file cannot be copied
|
||||||
*/
|
*/
|
||||||
public function copy($path_orig, $path_dest);
|
public function copy($path_orig, $path_dest);
|
||||||
|
|
||||||
|
@ -92,10 +94,10 @@ interface adapter_interface
|
||||||
*/
|
*/
|
||||||
public function get_link($path);
|
public function get_link($path);
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Get space available in bytes
|
* Get space available in bytes
|
||||||
*
|
*
|
||||||
* @throws \phpbb\storage\exception\exception When unable to retrieve available storage space
|
* @throws exception When unable to retrieve available storage space
|
||||||
*
|
*
|
||||||
* @return float Returns available space
|
* @return float Returns available space
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -87,8 +87,13 @@ class local implements adapter_interface, stream_interface
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param filesystem $filesystem
|
||||||
|
* @param FastImageSize $imagesize
|
||||||
|
* @param guesser $mimetype_guesser
|
||||||
|
* @param string $phpbb_root_path
|
||||||
*/
|
*/
|
||||||
public function __construct(filesystem $filesystem, FastImageSize $imagesize, guesser $mimetype_guesser, $phpbb_root_path)
|
public function __construct(filesystem $filesystem, FastImageSize $imagesize, guesser $mimetype_guesser, string $phpbb_root_path)
|
||||||
{
|
{
|
||||||
$this->filesystem = $filesystem;
|
$this->filesystem = $filesystem;
|
||||||
$this->imagesize = $imagesize;
|
$this->imagesize = $imagesize;
|
||||||
|
@ -268,6 +273,7 @@ class local implements adapter_interface, stream_interface
|
||||||
* if $dir_depth > 0.
|
* if $dir_depth > 0.
|
||||||
*
|
*
|
||||||
* @param string $path The file path
|
* @param string $path The file path
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
protected function get_path($path)
|
protected function get_path($path)
|
||||||
{
|
{
|
||||||
|
@ -294,6 +300,7 @@ class local implements adapter_interface, stream_interface
|
||||||
* To be used in other PR
|
* To be used in other PR
|
||||||
*
|
*
|
||||||
* @param string $path The file path
|
* @param string $path The file path
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
protected function get_filename($path)
|
protected function get_filename($path)
|
||||||
{
|
{
|
||||||
|
@ -346,6 +353,8 @@ class local implements adapter_interface, stream_interface
|
||||||
* @throws exception When cannot get size
|
* @throws exception When cannot get size
|
||||||
*
|
*
|
||||||
* @return array Properties
|
* @return array Properties
|
||||||
|
* @throws exception When cannot get size
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
public function file_size($path)
|
public function file_size($path)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue