[ticket/15699] Improve code style

PHPBB3-15699
This commit is contained in:
Ruben Calvo 2024-02-18 10:44:41 +01:00
parent bf467f8ece
commit 155b5168be
No known key found for this signature in database
5 changed files with 23 additions and 27 deletions

View file

@ -16,34 +16,34 @@
</tr>
</thead>
<tbody>
{% for storage in STORAGE_STATS %}
<tr>
<td>{{ storage.name }}</td>
<td>{{ storage.files }}</td>
<td>{{ storage.size }}</td>
<td>{{ storage.free_space }}</td>
</tr>
{% endfor %}
{% for storage in STORAGE_STATS %}
<tr>
<td>{{ storage.name }}</td>
<td>{{ storage.files }}</td>
<td>{{ storage.size }}</td>
<td>{{ storage.free_space }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% if ERROR_MESSAGES is not empty %}
<div class="errorbox">
<h3>{{ lang('WARNING') }}</h3>
{% for ERROR_MESSAGE in ERROR_MESSAGES %}
<p>{{ ERROR_MESSAGE }}</p>
{% endfor %}
</div>
<div class="errorbox">
<h3>{{ lang('WARNING') }}</h3>
{% for ERROR_MESSAGE in ERROR_MESSAGES %}
<p>{{ ERROR_MESSAGE }}</p>
{% endfor %}
</div>
{% endif %}
<form id="acp_storage" method="post" action="{{ U_ACTION }}">
{% for storage in STORAGES %}
<fieldset>
<legend>{{ lang('STORAGE_' ~ storage.get_name | upper ~ '_TITLE') }}</legend>
<legend>{{ lang('STORAGE_' ~ storage.get_name | upper ~ '_TITLE') }}</legend>
<dl>
<dt><label for="{{ storage.get_name }}">{{ lang('STORAGE_SELECT') }}{{ lang('COLON') }}</label><br /><span>{{ lang('STORAGE_SELECT_DESC') }}</span></dt>
<dd>
<select id="{{ storage.get_name }}" name="{{ storage.get_name }}[provider]" data-togglable-settings="true">
<select id="{{ storage.get_name }}" name="{{ storage.get_name }}[provider]" data-togglable-settings="true">
{% for provider in PROVIDERS %}
{% if provider.is_available %}
<option value="{{ get_class(provider) }}"{{ attribute(config, 'storage\\' ~ storage.get_name ~ '\\provider') == get_class(provider) ? ' selected' : '' }} data-toggle-setting="#{{ storage.get_name }}_{{ provider.get_name }}_settings">

View file

@ -33,13 +33,13 @@ if (!defined('IN_PHPBB'))
class acp_storage
{
/** @var driver_interface $db */
/** @var driver_interface */
protected $db;
/** @var language $log */
/** @var language */
protected $lang;
/** @var log_interface $log */
/** @var log_interface */
protected $log;
/** @var request */

View file

@ -299,10 +299,8 @@ class local implements adapter_interface, stream_interface
* @param string $path The file
*
* @return array Properties
* @throws storage_exception When cannot get size
*
* @throws storage_exception When cannot get size
*
*/
public function file_size(string $path): array
{

View file

@ -211,6 +211,4 @@ class state_helper
$this->config_text->set('storage_update_state', json_encode($state, JSON_THROW_ON_ERROR));
}
}

View file

@ -124,7 +124,7 @@ class storage
*
* @return string Returns file contents
*
*@throws storage_exception When the file doesn't exist
* @throws storage_exception When the file doesn't exist
* When cannot read file contents
*
*/
@ -228,7 +228,7 @@ class storage
* @param string $path File to read
*
* @return resource Returns a file pointer
*@throws storage_exception When the file doesn't exist
* @throws storage_exception When the file doesn't exist
* When unable to open file
*
*/
@ -405,7 +405,7 @@ class storage
* @param string $path The file
*
* @return \phpbb\storage\file_info Returns file_info object
*@throws storage_exception When the adapter doesn't implement the method
* @throws storage_exception When the adapter doesn't implement the method
* When the file doesn't exist
*
*/
@ -486,7 +486,7 @@ class storage
* Get space available in bytes
*
* @return float Returns available space
*@throws storage_exception When unable to retrieve available storage space
* @throws storage_exception When unable to retrieve available storage space
*
*/
public function free_space()