Just methods where adding "static" to the declaration was enough, I
didn't do anything with providers that used $this.
Initially by search and replace. There were many mistakes which I
found mostly by running the PHPStorm inspection which searches for
$this usage in a static method. Later I used the PHPStorm "make static"
action which avoids the more obvious mistakes.
Bug: T332865
Change-Id: I47ed6692945607dfa5c139d42edbd934fa4f3a36
This is an efficient and safe downcast if the parameter is already
a Language object (since Language implements the Bcp47Code interface);
otherwise it does the appropriate conversion to a MediaWiki-internal
code and creates the appropriate language object. Note that there
are some ambiguities in the internal codes, such that:
LanguageFactory::getLanguage( 'egl' )->getCode() # returns 'egl'
while:
Bcp47Code $bcp = new Bcp47CodeValue( 'egl' );
LanguageFactory::getLanguage( $bcp )->getCode() # returns 'eml'
Change-Id: Iea158fc849964ba71a27363f9522b1b3bbb82aee