[ticket/12683] Small code style improvements

PHPBB3-12683
This commit is contained in:
Ruben Calvo 2022-12-11 16:54:22 +01:00
parent f9f55eb012
commit 6de699d318
No known key found for this signature in database
9 changed files with 14 additions and 23 deletions

View file

@ -49,10 +49,8 @@ class list_all extends \phpbb\console\command\command
*/ */
protected function configure() protected function configure()
{ {
$this $this->setName('reparser:list')
->setName('reparser:list') ->setDescription($this->user->lang('CLI_DESCRIPTION_REPARSER_LIST'));
->setDescription($this->user->lang('CLI_DESCRIPTION_REPARSER_LIST'))
;
} }
/** /**

View file

@ -74,15 +74,13 @@ class create extends command
*/ */
protected function configure() protected function configure()
{ {
$this $this->setName('searchindex:create')
->setName('searchindex:create')
->setDescription($this->language->lang('CLI_DESCRIPTION_SEARCHINDEX_CREATE')) ->setDescription($this->language->lang('CLI_DESCRIPTION_SEARCHINDEX_CREATE'))
->addArgument( ->addArgument(
'search-backend', 'search-backend',
InputArgument::REQUIRED, InputArgument::REQUIRED,
$this->language->lang('CLI_SEARCHINDEX_SEARCH_BACKEND_NAME') $this->language->lang('CLI_SEARCHINDEX_SEARCH_BACKEND_NAME')
) );
;
} }
/** /**

View file

@ -74,15 +74,13 @@ class delete extends command
*/ */
protected function configure() protected function configure()
{ {
$this $this->setName('searchindex:delete')
->setName('searchindex:delete')
->setDescription($this->language->lang('CLI_DESCRIPTION_SEARCHINDEX_DELETE')) ->setDescription($this->language->lang('CLI_DESCRIPTION_SEARCHINDEX_DELETE'))
->addArgument( ->addArgument(
'search-backend', 'search-backend',
InputArgument::REQUIRED, InputArgument::REQUIRED,
$this->language->lang('CLI_SEARCHINDEX_SEARCH_BACKEND_NAME') $this->language->lang('CLI_SEARCHINDEX_SEARCH_BACKEND_NAME')
) );
;
} }
/** /**

View file

@ -58,10 +58,8 @@ class list_all extends command
*/ */
protected function configure() protected function configure()
{ {
$this $this->setName('searchindex:list')
->setName('searchindex:list') ->setDescription($this->language->lang('CLI_DESCRIPTION_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 * @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); $io = new SymfonyStyle($input, $output);

View file

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

View file

@ -15,5 +15,4 @@ namespace phpbb\di\exception;
class multiple_service_definitions_exception extends di_exception class multiple_service_definitions_exception extends di_exception
{ {
} }

View file

@ -15,5 +15,4 @@ namespace phpbb\di\exception;
class service_not_found_exception extends di_exception class service_not_found_exception extends di_exception
{ {
} }

View file

@ -116,7 +116,9 @@ class fulltext_native extends base implements search_backend_interface
* @param string $phpbb_root_path phpBB root path * @param string $phpbb_root_path phpBB root path
* @param string $phpEx PHP file extension * @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; global $cache;

View file

@ -146,7 +146,7 @@ class state_helper
*/ */
public function clear_state(): void public function clear_state(): void
{ {
$this->save_state([]); $this->save_state();
} }
/** /**
@ -176,6 +176,6 @@ class state_helper
{ {
ksort($state); ksort($state);
$this->config->set('search_indexing_state', implode(',', $state), true); $this->config->set('search_indexing_state', implode(',', $state));
} }
} }