Skip to content

Commit a9e113d

Browse files
authored
Merge pull request #22 from GromNaN/php84-explicit-nullable
fix: PHP 8.4 implicit nullable deprecations
2 parents ae4c490 + c3c505a commit a9e113d

File tree

95 files changed

+223
-223
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+223
-223
lines changed

src/ChangeAnnotation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class ChangeAnnotation
2929
*/
3030
public $description;
3131

32-
public function __construct(string $label = null, bool $needsConfirmation = null, string $description = null)
32+
public function __construct(?string $label = null, ?bool $needsConfirmation = null, ?string $description = null)
3333
{
3434
/** @psalm-suppress PossiblyNullPropertyAssignmentValue */
3535
$this->label = $label;

src/ClientCapabilities.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@ class ClientCapabilities
7676
* @param bool|null $xcacheProvider
7777
*/
7878
public function __construct(
79-
ClientCapabilitiesWorkspace $workspace = null,
80-
TextDocumentClientCapabilities $textDocument = null,
81-
ClientCapabilitiesWindow $window = null,
82-
ClientCapabilitiesGeneral $general = null,
79+
?\LanguageServerProtocol\ClientCapabilitiesWorkspace $workspace = null,
80+
?\LanguageServerProtocol\TextDocumentClientCapabilities $textDocument = null,
81+
?\LanguageServerProtocol\ClientCapabilitiesWindow $window = null,
82+
?\LanguageServerProtocol\ClientCapabilitiesGeneral $general = null,
8383
$experimental = null,
84-
bool $xfilesProvider = null,
85-
bool $xcontentProvider = null,
86-
bool $xcacheProvider = null
84+
?bool $xfilesProvider = null,
85+
?bool $xcontentProvider = null,
86+
?bool $xcacheProvider = null
8787
) {
8888
$this->workspace = $workspace;
8989
$this->textDocument = $textDocument;

src/ClientCapabilitiesGeneral.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ class ClientCapabilitiesGeneral
2424

2525

2626
public function __construct(
27-
RegularExpressionsClientCapabilities $regularExpressions = null,
28-
MarkdownClientCapabilities $markdown = null
27+
?\LanguageServerProtocol\RegularExpressionsClientCapabilities $regularExpressions = null,
28+
?\LanguageServerProtocol\MarkdownClientCapabilities $markdown = null
2929
) {
3030
$this->regularExpressions = $regularExpressions;
3131
$this->markdown = $markdown;

src/ClientCapabilitiesWindow.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ class ClientCapabilitiesWindow
3636

3737

3838
public function __construct(
39-
bool $workDoneProgress = null,
40-
ShowMessageRequestClientCapabilities $showMessage = null,
41-
ShowDocumentClientCapabilities $showDocument = null
39+
?bool $workDoneProgress = null,
40+
?\LanguageServerProtocol\ShowMessageRequestClientCapabilities $showMessage = null,
41+
?\LanguageServerProtocol\ShowDocumentClientCapabilities $showDocument = null
4242
) {
4343
$this->workDoneProgress = $workDoneProgress;
4444
$this->showMessage = $showMessage;

src/ClientCapabilitiesWorkspaceFileOperations.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ class ClientCapabilitiesWorkspaceFileOperations
5656
public $willDelete;
5757

5858
public function __construct(
59-
bool $dynamicRegistration = null,
60-
bool $didCreate = null,
61-
bool $willCreate = null,
62-
bool $didRename = null,
63-
bool $willRename = null,
64-
bool $didDelete = null,
65-
bool $willDelete = null
59+
?bool $dynamicRegistration = null,
60+
?bool $didCreate = null,
61+
?bool $willCreate = null,
62+
?bool $didRename = null,
63+
?bool $willRename = null,
64+
?bool $didDelete = null,
65+
?bool $willDelete = null
6666
) {
6767
$this->dynamicRegistration = $dynamicRegistration;
6868
$this->didCreate = $didCreate;

src/ClientInfo.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ class ClientInfo
1919
public $version;
2020

2121
public function __construct(
22-
string $name = null,
23-
string $version = null
22+
?string $name = null,
23+
?string $version = null
2424
) {
2525
/** @psalm-suppress PossiblyNullPropertyAssignmentValue */
2626
$this->name = $name;

src/CodeAction.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,13 @@ class CodeAction implements JsonSerializable
112112
* @param mixed $data
113113
*/
114114
public function __construct(
115-
string $title = null,
116-
string $kind = null,
117-
array $diagnostics = null,
118-
bool $isPreferred = null,
119-
CodeActionDisabled $disabled = null,
120-
WorkspaceEdit $edit = null,
121-
Command $command = null,
115+
?string $title = null,
116+
?string $kind = null,
117+
?array $diagnostics = null,
118+
?bool $isPreferred = null,
119+
?\LanguageServerProtocol\CodeActionDisabled $disabled = null,
120+
?\LanguageServerProtocol\WorkspaceEdit $edit = null,
121+
?\LanguageServerProtocol\Command $command = null,
122122
$data = null
123123
) {
124124
/** @psalm-suppress PossiblyNullPropertyAssignmentValue */

src/CodeActionClientCapabilities.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ class CodeActionClientCapabilities
7676
public $honorsChangeAnnotations;
7777

7878
public function __construct(
79-
bool $dynamicRegistration = null,
80-
CodeActionClientCapabilitiesCodeActionLiteralSupport $codeActionLiteralSupport = null,
81-
bool $isPreferredSupport = null,
82-
bool $disabledSupport = null,
83-
bool $dataSupport = null,
84-
CodeActionClientCapabilitiesResolveSupport $resolveSupport = null,
85-
bool $honorsChangeAnnotations = null
79+
?bool $dynamicRegistration = null,
80+
?\LanguageServerProtocol\CodeActionClientCapabilitiesCodeActionLiteralSupport $codeActionLiteralSupport = null,
81+
?bool $isPreferredSupport = null,
82+
?bool $disabledSupport = null,
83+
?bool $dataSupport = null,
84+
?\LanguageServerProtocol\CodeActionClientCapabilitiesResolveSupport $resolveSupport = null,
85+
?bool $honorsChangeAnnotations = null
8686
) {
8787
$this->dynamicRegistration = $dynamicRegistration;
8888
$this->codeActionLiteralSupport = $codeActionLiteralSupport;

src/CodeLens.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class CodeLens
3636
/**
3737
* @param mixed $data
3838
*/
39-
public function __construct(Range $range = null, Command $command = null, $data = null)
39+
public function __construct(?\LanguageServerProtocol\Range $range = null, ?\LanguageServerProtocol\Command $command = null, $data = null)
4040
{
4141
/** @psalm-suppress PossiblyNullPropertyAssignmentValue */
4242
$this->range = $range;

src/CodeLensClientCapabilities.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class CodeLensClientCapabilities
1313
public $dynamicRegistration;
1414

1515
public function __construct(
16-
bool $dynamicRegistration = null
16+
?bool $dynamicRegistration = null
1717
) {
1818
$this->dynamicRegistration = $dynamicRegistration;
1919
}

src/CodeLensOptions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class CodeLensOptions
1414
*/
1515
public $resolveProvider;
1616

17-
public function __construct(bool $resolveProvider = null)
17+
public function __construct(?bool $resolveProvider = null)
1818
{
1919
$this->resolveProvider = $resolveProvider;
2020
}

src/CodeLensWorkspaceClientCapabilities.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class CodeLensWorkspaceClientCapabilities
1818
public $refreshSupport;
1919

2020
public function __construct(
21-
bool $refreshSupport = null
21+
?bool $refreshSupport = null
2222
) {
2323
$this->refreshSupport = $refreshSupport;
2424
}

src/Command.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class Command
3333
/**
3434
* @param mixed[]|null $arguments
3535
*/
36-
public function __construct(string $title = null, string $command = null, array $arguments = null)
36+
public function __construct(?string $title = null, ?string $command = null, ?array $arguments = null)
3737
{
3838
$this->title = $title;
3939
$this->command = $command;

src/CompletionClientCapabilities.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ class CompletionClientCapabilities
5050
public $completionList;
5151

5252
public function __construct(
53-
bool $dynamicRegistration = null,
54-
CompletionClientCapabilitiesCompletionItem $completionItem = null,
55-
bool $contextSupport = null,
56-
int $insertTextMode = null,
57-
CompletionClientCapabilitiesCompletionList $completionList = null
53+
?bool $dynamicRegistration = null,
54+
?\LanguageServerProtocol\CompletionClientCapabilitiesCompletionItem $completionItem = null,
55+
?bool $contextSupport = null,
56+
?int $insertTextMode = null,
57+
?\LanguageServerProtocol\CompletionClientCapabilitiesCompletionList $completionList = null
5858
) {
5959
$this->dynamicRegistration = $dynamicRegistration;
6060
$this->completionItem = $completionItem;

src/CompletionClientCapabilitiesCompletionItem.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -115,16 +115,16 @@ class CompletionClientCapabilitiesCompletionItem
115115
* @param boolean|null $labelDetailsSupport
116116
*/
117117
public function __construct(
118-
bool $snippetSupport = null,
119-
bool $commitCharactersSupport = null,
120-
array $documentationFormat = null,
121-
bool $deprecatedSupport = null,
122-
bool $preselectSupport = null,
123-
CompletionClientCapabilitiesCompletionItemTagSupport $tagSupport = null,
124-
bool $insertReplaceSupport = null,
125-
CompletionClientCapabilitiesCompletionItemResolveSupport $resolveSupport = null,
126-
CompletionClientCapabilitiesCompletionItemInsertTextModeSupport $insertTextModeSupport = null,
127-
bool $labelDetailsSupport = null
118+
?bool $snippetSupport = null,
119+
?bool $commitCharactersSupport = null,
120+
?array $documentationFormat = null,
121+
?bool $deprecatedSupport = null,
122+
?bool $preselectSupport = null,
123+
?\LanguageServerProtocol\CompletionClientCapabilitiesCompletionItemTagSupport $tagSupport = null,
124+
?bool $insertReplaceSupport = null,
125+
?\LanguageServerProtocol\CompletionClientCapabilitiesCompletionItemResolveSupport $resolveSupport = null,
126+
?\LanguageServerProtocol\CompletionClientCapabilitiesCompletionItemInsertTextModeSupport $insertTextModeSupport = null,
127+
?bool $labelDetailsSupport = null
128128
) {
129129
$this->snippetSupport = $snippetSupport;
130130
$this->commitCharactersSupport = $commitCharactersSupport;

src/CompletionClientCapabilitiesCompletionItemInsertTextModeSupport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class CompletionClientCapabilitiesCompletionItemInsertTextModeSupport
1616
* @param int[] $valueSet InsertTextMode
1717
*/
1818
public function __construct(
19-
array $valueSet = null
19+
?array $valueSet = null
2020
) {
2121
/** @psalm-suppress PossiblyNullPropertyAssignmentValue */
2222
$this->valueSet = $valueSet;

src/CompletionClientCapabilitiesCompletionItemResolveSupport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class CompletionClientCapabilitiesCompletionItemResolveSupport
1616
* @param string[] $properties
1717
*/
1818
public function __construct(
19-
array $properties = null
19+
?array $properties = null
2020
) {
2121
/** @psalm-suppress PossiblyNullPropertyAssignmentValue */
2222
$this->properties = $properties;

src/CompletionClientCapabilitiesCompletionItemTagSupport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class CompletionClientCapabilitiesCompletionItemTagSupport
1616
* @param int[]|null $valueSet CompletionItemTag
1717
*/
1818
public function __construct(
19-
array $valueSet = null
19+
?array $valueSet = null
2020
) {
2121
/** @psalm-suppress PossiblyNullPropertyAssignmentValue */
2222
$this->valueSet = $valueSet;

src/CompletionClientCapabilitiesCompletionList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class CompletionClientCapabilitiesCompletionList
2323
* @param string[]|null $itemDefaults
2424
*/
2525
public function __construct(
26-
array $itemDefaults = null
26+
?array $itemDefaults = null
2727
) {
2828
$this->itemDefaults = $itemDefaults;
2929
}

src/CompletionContext.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class CompletionContext
2222
*/
2323
public $triggerCharacter;
2424

25-
public function __construct(int $triggerKind = null, string $triggerCharacter = null)
25+
public function __construct(?int $triggerKind = null, ?string $triggerCharacter = null)
2626
{
2727
/** @psalm-suppress PossiblyNullPropertyAssignmentValue */
2828
$this->triggerKind = $triggerKind;

src/CompletionItem.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -218,18 +218,18 @@ class CompletionItem
218218
* @param int|null $insertTextFormat
219219
*/
220220
public function __construct(
221-
string $label = null,
222-
int $kind = null,
223-
string $detail = null,
224-
string $documentation = null,
225-
string $sortText = null,
226-
string $filterText = null,
227-
string $insertText = null,
228-
TextEdit $textEdit = null,
229-
array $additionalTextEdits = null,
230-
Command $command = null,
221+
?string $label = null,
222+
?int $kind = null,
223+
?string $detail = null,
224+
?string $documentation = null,
225+
?string $sortText = null,
226+
?string $filterText = null,
227+
?string $insertText = null,
228+
?\LanguageServerProtocol\TextEdit $textEdit = null,
229+
?array $additionalTextEdits = null,
230+
?\LanguageServerProtocol\Command $command = null,
231231
$data = null,
232-
int $insertTextFormat = null
232+
?int $insertTextFormat = null
233233
) {
234234
/** @psalm-suppress PossiblyNullPropertyAssignmentValue */
235235
$this->label = $label;

src/CompletionItemLabelDetails.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class CompletionItemLabelDetails
2727
*/
2828
public $description;
2929

30-
public function __construct(string $detail = null, string $description = null)
30+
public function __construct(?string $detail = null, ?string $description = null)
3131
{
3232
$this->detail = $detail;
3333
$this->description = $description;

src/CompletionOptions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class CompletionOptions
2525
/**
2626
* @param string[]|null $triggerCharacters
2727
*/
28-
public function __construct(bool $resolveProvider = null, array $triggerCharacters = null)
28+
public function __construct(?bool $resolveProvider = null, ?array $triggerCharacters = null)
2929
{
3030
$this->resolveProvider = $resolveProvider;
3131
$this->triggerCharacters = $triggerCharacters;

src/ContentChangeEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class ContentChangeEvent
2929
*/
3030
public $text;
3131

32-
public function __construct(Range $range = null, int $rangeLength = null, string $text = null)
32+
public function __construct(?\LanguageServerProtocol\Range $range = null, ?int $rangeLength = null, ?string $text = null)
3333
{
3434
$this->range = $range;
3535
$this->rangeLength = $rangeLength;

src/DeclarationClientCapabilities.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ class DeclarationClientCapabilities
2222
public $linkSupport;
2323

2424
public function __construct(
25-
bool $dynamicRegistration = null,
26-
bool $linkSupport = null
25+
?bool $dynamicRegistration = null,
26+
?bool $linkSupport = null
2727
) {
2828
$this->dynamicRegistration = $dynamicRegistration;
2929
$this->linkSupport = $linkSupport;

src/DefinitionClientCapabilities.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class DefinitionClientCapabilities
2121
*/
2222
public $linkSupport;
2323

24-
public function __construct(bool $dynamicRegistration = null, bool $linkSupport = null)
24+
public function __construct(?bool $dynamicRegistration = null, ?bool $linkSupport = null)
2525
{
2626
$this->dynamicRegistration = $dynamicRegistration;
2727
$this->linkSupport = $linkSupport;

src/Diagnostic.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,14 @@ class Diagnostic
9696
* notification and `textDocument/codeAction` request
9797
*/
9898
public function __construct(
99-
string $message = null,
100-
Range $range = null,
101-
int $code = null,
102-
int $severity = null,
103-
string $source = null,
104-
CodeDescription $codeDescription = null,
105-
array $tags = null,
106-
array $relatedInformation = null,
99+
?string $message = null,
100+
?\LanguageServerProtocol\Range $range = null,
101+
?int $code = null,
102+
?int $severity = null,
103+
?string $source = null,
104+
?\LanguageServerProtocol\CodeDescription $codeDescription = null,
105+
?array $tags = null,
106+
?array $relatedInformation = null,
107107
$data = null
108108
) {
109109
/** @psalm-suppress PossiblyNullPropertyAssignmentValue */

src/DidChangeConfigurationClientCapabilities.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class DidChangeConfigurationClientCapabilities
1313
public $dynamicRegistration;
1414

1515
public function __construct(
16-
bool $dynamicRegistration = null
16+
?bool $dynamicRegistration = null
1717
) {
1818
$this->dynamicRegistration = $dynamicRegistration;
1919
}

src/DidChangeWatchedFilesClientCapabilities.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class DidChangeWatchedFilesClientCapabilities
1414
public $dynamicRegistration;
1515

1616
public function __construct(
17-
bool $dynamicRegistration = null
17+
?bool $dynamicRegistration = null
1818
) {
1919
$this->dynamicRegistration = $dynamicRegistration;
2020
}

src/DocumentColorClientCapabilities.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class DocumentColorClientCapabilities
1313
public $dynamicRegistration;
1414

1515
public function __construct(
16-
bool $dynamicRegistration = null
16+
?bool $dynamicRegistration = null
1717
) {
1818
$this->dynamicRegistration = $dynamicRegistration;
1919
}

src/DocumentFormattingClientCapabilities.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class DocumentFormattingClientCapabilities
1313
public $dynamicRegistration;
1414

1515
public function __construct(
16-
bool $dynamicRegistration = null
16+
?bool $dynamicRegistration = null
1717
) {
1818
$this->dynamicRegistration = $dynamicRegistration;
1919
}

0 commit comments

Comments
 (0)