mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-23 14:06:52 +00:00
Use explicit nullable type on parameter arguments (for PHP 8.4)
Implicitly marking parameter $... as nullable is deprecated in PHP 8.4. The explicit nullable type must be used instead. Bug: T376276 Change-Id: I6b296c77f8a2f6f1a146972271b1fcb3360d0cc2
This commit is contained in:
parent
d088ccdab0
commit
90aa7fd9cf
|
@ -110,7 +110,7 @@ trait ApiParsoidTrait {
|
|||
* @throws ApiUsageException
|
||||
*/
|
||||
protected function transformHTML(
|
||||
Title $title, string $html, int $oldid = null, string $etag = null
|
||||
Title $title, string $html, ?int $oldid = null, ?string $etag = null
|
||||
): array {
|
||||
$lang = self::getPageLanguage( $title );
|
||||
|
||||
|
@ -138,7 +138,7 @@ trait ApiParsoidTrait {
|
|||
* @throws ApiUsageException
|
||||
*/
|
||||
protected function transformWikitext(
|
||||
Title $title, string $wikitext, bool $bodyOnly, int $oldid = null, bool $stash = false
|
||||
Title $title, string $wikitext, bool $bodyOnly, ?int $oldid = null, bool $stash = false
|
||||
): array {
|
||||
$lang = self::getPageLanguage( $title );
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ class DirectParsoidClient implements ParsoidClient {
|
|||
private function getHtmlOutputRendererHelper(
|
||||
PageIdentity $page,
|
||||
?RevisionRecord $revision = null,
|
||||
Bcp47Code $pageLanguage = null,
|
||||
?Bcp47Code $pageLanguage = null,
|
||||
bool $stash = false,
|
||||
string $flavor = self::FLAVOR_DEFAULT
|
||||
): HtmlOutputRendererHelper {
|
||||
|
@ -83,9 +83,9 @@ class DirectParsoidClient implements ParsoidClient {
|
|||
private function getHtmlInputTransformHelper(
|
||||
PageIdentity $page,
|
||||
string $html,
|
||||
int $oldid = null,
|
||||
string $etag = null,
|
||||
Bcp47Code $pageLanguage = null
|
||||
?int $oldid = null,
|
||||
?string $etag = null,
|
||||
?Bcp47Code $pageLanguage = null
|
||||
): HtmlInputTransformHelper {
|
||||
// Fake REST body
|
||||
$body = [
|
||||
|
|
|
@ -117,7 +117,7 @@ class VisualEditorDataModule extends ResourceLoaderModule {
|
|||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getDependencies( ResourceLoaderContext $context = null ) {
|
||||
public function getDependencies( ?ResourceLoaderContext $context = null ) {
|
||||
return [
|
||||
'ext.visualEditor.base',
|
||||
'ext.visualEditor.mediawiki',
|
||||
|
|
Loading…
Reference in a new issue