[ticket/12683] phpdoc and spaces

PHPBB3-12683
This commit is contained in:
rubencm 2021-04-14 22:17:34 +02:00 committed by Ruben Calvo
parent 9a6d42770e
commit d55f1e04eb
No known key found for this signature in database
15 changed files with 76 additions and 70 deletions

View file

@ -23,7 +23,7 @@ imports:
- { resource: services_notification.yml } - { resource: services_notification.yml }
- { resource: services_password.yml } - { resource: services_password.yml }
- { resource: services_php.yml } - { resource: services_php.yml }
- { resource: services_post.yml } - { resource: services_posting.yml }
- { resource: services_profilefield.yml } - { resource: services_profilefield.yml }
- { resource: services_report.yml } - { resource: services_report.yml }
- { resource: services_routing.yml } - { resource: services_routing.yml }

View file

@ -152,8 +152,8 @@ $lang = array_merge($lang, array(
'CLI_SEARCHINDEX_CREATE_FAILURE' => 'Error creating search index', 'CLI_SEARCHINDEX_CREATE_FAILURE' => 'Error creating search index',
'CLI_SEARCHINDEX_DELETE_SUCCESS' => 'Search index deleted successfully', 'CLI_SEARCHINDEX_DELETE_SUCCESS' => 'Search index deleted successfully',
'CLI_SEARCHINDEX_DELETE_FAILURE' => 'Error deleting search index', 'CLI_SEARCHINDEX_DELETE_FAILURE' => 'Error deleting search index',
'CLI_SEARCHINDEX_ACTION_IN_PROGRESS' => 'There is an action currently in progress. CLI doesn\'t support incomplete index/delete actions, please solve it from the ACP', 'CLI_SEARCHINDEX_ACTION_IN_PROGRESS' => 'There is an action currently in progress. CLI doesnt support incomplete index/delete actions, please solve it from the ACP',
'CLI_SEARCHINDEX_ACTIVE_NOT_INDEXED' => 'Active search backend isn\'t indexed', 'CLI_SEARCHINDEX_ACTIVE_NOT_INDEXED' => 'Active search backend isnt indexed',
// In all the case %1$s is the logical name of the file and %2$s the real name on the filesystem // In all the case %1$s is the logical name of the file and %2$s the real name on the filesystem
// eg: big_image.png (2_a51529ae7932008cf8454a95af84cacd) generated. // eg: big_image.png (2_a51529ae7932008cf8454a95af84cacd) generated.

View file

@ -15,5 +15,4 @@ namespace phpbb\search\exception;
class action_in_progress_exception extends search_exception class action_in_progress_exception extends search_exception
{ {
} }

View file

@ -15,5 +15,4 @@ namespace phpbb\search\exception;
class no_action_in_progress_exception extends search_exception class no_action_in_progress_exception extends search_exception
{ {
} }

View file

@ -15,5 +15,4 @@ namespace phpbb\search\exception;
class no_search_backend_found_exception extends search_exception class no_search_backend_found_exception extends search_exception
{ {
} }

View file

@ -17,5 +17,4 @@ use phpbb\exception\runtime_exception;
class search_exception extends runtime_exception class search_exception extends runtime_exception
{ {
} }

View file

@ -16,6 +16,7 @@ namespace phpbb\search;
use phpbb\config\config; use phpbb\config\config;
use phpbb\search\exception\action_in_progress_exception; use phpbb\search\exception\action_in_progress_exception;
use phpbb\search\exception\no_action_in_progress_exception; use phpbb\search\exception\no_action_in_progress_exception;
use phpbb\search\exception\no_search_backend_found_exception;
use phpbb\search\exception\search_exception; use phpbb\search\exception\search_exception;
class state_helper class state_helper
@ -53,7 +54,7 @@ class state_helper
} }
/** /**
* @return string * @return string The class name of the search backend
* *
* @throws no_action_in_progress_exception If there is no action in progress * @throws no_action_in_progress_exception If there is no action in progress
*/ */
@ -65,7 +66,7 @@ class state_helper
} }
/** /**
* @return string * @return string The action that is being executed, can be 'create' or 'delete'
* *
* @throws no_action_in_progress_exception If there is no action in progress * @throws no_action_in_progress_exception If there is no action in progress
*/ */
@ -77,7 +78,7 @@ class state_helper
} }
/** /**
* @return int * @return int The post counter
* *
* @throws no_action_in_progress_exception If there is no action in progress * @throws no_action_in_progress_exception If there is no action in progress
*/ */
@ -89,11 +90,14 @@ class state_helper
} }
/** /**
* Start a indexing or delete process.
*
* @param string $search_type * @param string $search_type
* @param string $action * @param string $action
* *
* @throws action_in_progress_exception If there is an action in progress * @throws action_in_progress_exception If there is an action in progress
* @throws no_search_backend_found_exception If search backend don't exist * @throws no_search_backend_found_exception If search backend don't exist
* @throws search_exception If action isn't valid
*/ */
public function init(string $search_type, string $action): void public function init(string $search_type, string $action): void
{ {
@ -103,7 +107,7 @@ class state_helper
throw new action_in_progress_exception(); throw new action_in_progress_exception();
} }
// Make sure the search type exist (if not, the next line launch an exception) // Make sure the search type exists (if not, throw an exception)
$this->search_backend_factory->get($search_type); $this->search_backend_factory->get($search_type);
// Make sure the action is correct (just in case) // Make sure the action is correct (just in case)
@ -122,6 +126,8 @@ class state_helper
} }
/** /**
* Set the post counter
*
* @param int $counter * @param int $counter
* *
* @throws no_action_in_progress_exception If there is no action in progress * @throws no_action_in_progress_exception If there is no action in progress
@ -144,6 +150,8 @@ class state_helper
} }
/** /**
* Load the state from the database
*
* @return array * @return array
* *
* @throws no_action_in_progress_exception If there is no action in progress * @throws no_action_in_progress_exception If there is no action in progress
@ -160,6 +168,8 @@ class state_helper
} }
/** /**
* Save the specified state in the database
*
* @param array $state * @param array $state
*/ */
private function save_state(array $state = []): void private function save_state(array $state = []): void