mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeEditor
synced 2024-11-27 08:30:26 +00:00
Use PHP type hints
* Add PHP type hints where possible. * Remove @var, @param and @return if redundant to type declaration. Change-Id: Ief9f12370b094188b95fe48d3b1d68988da1e9b8
This commit is contained in:
parent
0ef42f8c1c
commit
d3ba6712ab
|
@ -23,16 +23,9 @@ class Hooks implements
|
|||
EditPage__showEditForm_initialHook,
|
||||
EditPage__showReadOnlyForm_initialHook
|
||||
{
|
||||
/** @var UserOptionsLookup */
|
||||
private $userOptionsLookup;
|
||||
private UserOptionsLookup $userOptionsLookup;
|
||||
private HookRunner $hookRunner;
|
||||
|
||||
/** @var HookRunner */
|
||||
private $hookRunner;
|
||||
|
||||
/**
|
||||
* @param UserOptionsLookup $userOptionsLookup
|
||||
* @param HookContainer $hookContainer
|
||||
*/
|
||||
public function __construct(
|
||||
UserOptionsLookup $userOptionsLookup,
|
||||
HookContainer $hookContainer
|
||||
|
@ -41,13 +34,7 @@ class Hooks implements
|
|||
$this->hookRunner = new HookRunner( $hookContainer );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Title $title
|
||||
* @param string $model
|
||||
* @param string $format
|
||||
* @return null|string
|
||||
*/
|
||||
private function getPageLanguage( Title $title, $model, $format ) {
|
||||
private function getPageLanguage( Title $title, string $model, string $format ): ?string {
|
||||
if ( $model === CONTENT_MODEL_JAVASCRIPT ) {
|
||||
return 'javascript';
|
||||
} elseif ( $model === CONTENT_MODEL_CSS ) {
|
||||
|
|
Loading…
Reference in a new issue