mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[ticket/12683] Small code style improvements
PHPBB3-12683
This commit is contained in:
parent
f9f55eb012
commit
6de699d318
9 changed files with 14 additions and 23 deletions
|
@ -49,10 +49,8 @@ class list_all extends \phpbb\console\command\command
|
|||
*/
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setName('reparser:list')
|
||||
->setDescription($this->user->lang('CLI_DESCRIPTION_REPARSER_LIST'))
|
||||
;
|
||||
$this->setName('reparser:list')
|
||||
->setDescription($this->user->lang('CLI_DESCRIPTION_REPARSER_LIST'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -74,15 +74,13 @@ class create extends command
|
|||
*/
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setName('searchindex:create')
|
||||
$this->setName('searchindex:create')
|
||||
->setDescription($this->language->lang('CLI_DESCRIPTION_SEARCHINDEX_CREATE'))
|
||||
->addArgument(
|
||||
'search-backend',
|
||||
InputArgument::REQUIRED,
|
||||
$this->language->lang('CLI_SEARCHINDEX_SEARCH_BACKEND_NAME')
|
||||
)
|
||||
;
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -74,15 +74,13 @@ class delete extends command
|
|||
*/
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setName('searchindex:delete')
|
||||
$this->setName('searchindex:delete')
|
||||
->setDescription($this->language->lang('CLI_DESCRIPTION_SEARCHINDEX_DELETE'))
|
||||
->addArgument(
|
||||
'search-backend',
|
||||
InputArgument::REQUIRED,
|
||||
$this->language->lang('CLI_SEARCHINDEX_SEARCH_BACKEND_NAME')
|
||||
)
|
||||
;
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -58,10 +58,8 @@ class list_all extends command
|
|||
*/
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setName('searchindex:list')
|
||||
->setDescription($this->language->lang('CLI_DESCRIPTION_SEARCHINDEX_LIST'))
|
||||
;
|
||||
$this->setName('searchindex:list')
|
||||
->setDescription($this->language->lang('CLI_DESCRIPTION_SEARCHINDEX_LIST'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -74,7 +72,7 @@ class list_all extends command
|
|||
*
|
||||
* @return int 0 if all is well, 1 if any errors occurred
|
||||
*/
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
protected function execute(InputInterface $input, OutputInterface $output): int
|
||||
{
|
||||
$io = new SymfonyStyle($input, $output);
|
||||
|
||||
|
|
|
@ -17,5 +17,4 @@ use phpbb\exception\runtime_exception;
|
|||
|
||||
class di_exception extends runtime_exception
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -15,5 +15,4 @@ namespace phpbb\di\exception;
|
|||
|
||||
class multiple_service_definitions_exception extends di_exception
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -15,5 +15,4 @@ namespace phpbb\di\exception;
|
|||
|
||||
class service_not_found_exception extends di_exception
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -116,7 +116,9 @@ class fulltext_native extends base implements search_backend_interface
|
|||
* @param string $phpbb_root_path phpBB root path
|
||||
* @param string $phpEx PHP file extension
|
||||
*/
|
||||
public function __construct(config $config, driver_interface $db, dispatcher_interface $phpbb_dispatcher, language $language, user $user, string $search_results_table, string $search_wordlist_table, string $search_wordmatch_table, string $phpbb_root_path, string $phpEx)
|
||||
public function __construct(config $config, driver_interface $db, dispatcher_interface $phpbb_dispatcher,
|
||||
language $language, user $user, string $search_results_table, string $search_wordlist_table,
|
||||
string $search_wordmatch_table, string $phpbb_root_path, string $phpEx)
|
||||
{
|
||||
global $cache;
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@ class state_helper
|
|||
*/
|
||||
public function clear_state(): void
|
||||
{
|
||||
$this->save_state([]);
|
||||
$this->save_state();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -176,6 +176,6 @@ class state_helper
|
|||
{
|
||||
ksort($state);
|
||||
|
||||
$this->config->set('search_indexing_state', implode(',', $state), true);
|
||||
$this->config->set('search_indexing_state', implode(',', $state));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue