diff options
author | Umherirrender <umherirrender_de.wp@web.de> | 2024-09-01 11:47:57 +0200 |
---|---|---|
committer | Umherirrender <umherirrender_de.wp@web.de> | 2024-09-01 11:47:57 +0200 |
commit | 0005b14e65d6c85735f291181980aba742ff9d1b (patch) | |
tree | dfb881e4efdb3eec74c2f3c9688adabdea7a1773 | |
parent | 684496b6211784197042c3f8e30dc8c7b060c2ae (diff) | |
download | mediawikicore-0005b14e65d6c85735f291181980aba742ff9d1b.tar.gz mediawikicore-0005b14e65d6c85735f291181980aba742ff9d1b.zip |
collation: Add type declaration for RemoteIcuCollation class properties
Also use type declaration on the remaining argument for the constructor
Change-Id: I39ce744ee4f4a9356b0788b6e38ece9635a5ca49
-rw-r--r-- | includes/collation/RemoteIcuCollation.php | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/includes/collation/RemoteIcuCollation.php b/includes/collation/RemoteIcuCollation.php index f1acbdad551f..24c5173b328c 100644 --- a/includes/collation/RemoteIcuCollation.php +++ b/includes/collation/RemoteIcuCollation.php @@ -1,6 +1,7 @@ <?php use MediaWiki\Shell\ShellboxClientFactory; +use Shellbox\RPC\RpcClient; /** * An ICU collation that uses a remote server to compute sort keys. This can be @@ -8,14 +9,10 @@ use MediaWiki\Shell\ShellboxClientFactory; * version of ICU. */ class RemoteIcuCollation extends Collation { - private $rpcClient; - private $locale; + private RpcClient $rpcClient; + private string $locale; - /** - * @param ShellboxClientFactory $shellboxClientFactory - * @param string $locale - */ - public function __construct( ShellboxClientFactory $shellboxClientFactory, $locale ) { + public function __construct( ShellboxClientFactory $shellboxClientFactory, string $locale ) { $this->rpcClient = $shellboxClientFactory->getRpcClient( [ 'service' => 'icu-collation' ] ); $this->locale = $locale; |