Skip to content

Commit 1bdd1bc

Browse files
dantleechfelixfbecker
authored andcommitted
feat: add missing constructors (#7)
1 parent 471a3b1 commit 1bdd1bc

17 files changed

+109
-0
lines changed

src/ClientCapabilities.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,11 @@ class ClientCapabilities
2424
* @var bool|null
2525
*/
2626
public $xcacheProvider;
27+
28+
public function __construct(bool $xfilesProvider = null, bool $xcontentProvider = null, bool $xcacheProvider = null)
29+
{
30+
$this->xfilesProvider = $xfilesProvider;
31+
$this->xcontentProvider = $xcontentProvider;
32+
$this->xcacheProvider = $xcacheProvider;
33+
}
2734
}

src/CodeActionContext.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,12 @@ class CodeActionContext
1414
* @var Diagnostic[]
1515
*/
1616
public $diagnostics;
17+
18+
/**
19+
* @param Diagnostic[] $diagnostics
20+
*/
21+
public function __construct(array $diagnostics = [])
22+
{
23+
$this->diagnostics = $diagnostics;
24+
}
1725
}

src/CodeLens.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,11 @@ class CodeLens
3232
* @var mixed|null
3333
*/
3434
public $data;
35+
36+
public function __construct(Range $range = null, Command $command = null, $data = null)
37+
{
38+
$this->range = $range;
39+
$this->command = $command;
40+
$this->data = $data;
41+
}
3542
}

src/CodeLensOptions.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,9 @@ class CodeLensOptions
1313
* @var bool|null
1414
*/
1515
public $resolveProvider;
16+
17+
public function __construct(bool $resolveProvider = null)
18+
{
19+
$this->resolveProvider = $resolveProvider;
20+
}
1621
}

src/Command.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,11 @@ class Command
2929
* @var mixed[]|null
3030
*/
3131
public $arguments;
32+
33+
public function __construct(string $title = null, string $command = null, array $arguments = null)
34+
{
35+
$this->title = $title;
36+
$this->command = $command;
37+
$this->arguments = $arguments;
38+
}
3239
}

src/CompletionOptions.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,10 @@ class CompletionOptions
2121
* @var string[]|null
2222
*/
2323
public $triggerCharacters;
24+
25+
public function __construct(bool $resolveProvider = null, array $triggerCharacters = null)
26+
{
27+
$this->resolveProvider = $resolveProvider;
28+
$this->triggerCharacters = $triggerCharacters;
29+
}
2430
}

src/ContentChangeEvent.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,11 @@ class ContentChangeEvent
2828
* @var string
2929
*/
3030
public $text;
31+
32+
public function __construct(Range $range = null, int $rangeLength = null, string $text = null)
33+
{
34+
$this->range = $range;
35+
$this->rangeLength = $rangeLength;
36+
$this->text = $text;
37+
}
3138
}

src/DocumentHighlight.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,10 @@ class DocumentHighlight
2222
* @var int|null
2323
*/
2424
public $kind;
25+
26+
public function __construct(Range $range = null, int $kind = null)
27+
{
28+
$this->range = $range;
29+
$this->kind = $kind;
30+
}
2531
}

src/DocumentOnTypeFormattingOptions.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,10 @@ class DocumentOnTypeFormattingOptions
2020
* @var string[]|null
2121
*/
2222
public $moreTriggerCharacter;
23+
24+
public function __construct(string $firstTriggerCharacter = null, array $moreTriggerCharacter = null)
25+
{
26+
$this->firstTriggerCharacter = $firstTriggerCharacter;
27+
$this->moreTriggerCharacter = $moreTriggerCharacter;
28+
}
2329
}

src/FormattingOptions.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,10 @@ class FormattingOptions
2222
public $insertSpaces;
2323

2424
// Can be extended with further properties.
25+
26+
public function __construct(int $tabSize = null, bool $insertSpaces = null)
27+
{
28+
$this->tabSize = $tabSize;
29+
$this->insertSpaces = $insertSpaces;
30+
}
2531
}

src/MessageActionItem.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,9 @@ class MessageActionItem
1010
* @var string
1111
*/
1212
public $title;
13+
14+
public function __construct(string $title = null)
15+
{
16+
$this->title = $title;
17+
}
1318
}

src/ReferenceContext.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,9 @@ class ReferenceContext
1010
* @var bool
1111
*/
1212
public $includeDeclaration;
13+
14+
public function __construct(bool $includeDeclaration = null)
15+
{
16+
$this->includeDeclaration = $includeDeclaration;
17+
}
1318
}

src/SignatureHelpOptions.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,9 @@ class SignatureHelpOptions
1313
* @var string[]|null
1414
*/
1515
public $triggerCharacters;
16+
17+
public function __construct(array $triggerCharacters = null)
18+
{
19+
$this->triggerCharacters = $triggerCharacters;
20+
}
1621
}

src/TextDocumentContentChangeEvent.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,11 @@ class TextDocumentContentChangeEvent
2828
* @var string
2929
*/
3030
public $text;
31+
32+
public function __construct(Range $range = null, int $rangeLength = null, string $text = null)
33+
{
34+
$this->range = $range;
35+
$this->rangeLength = $rangeLength;
36+
$this->text = $text;
37+
}
3138
}

src/TextDocumentItem.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,12 @@ class TextDocumentItem
3535
* @var string
3636
*/
3737
public $text;
38+
39+
public function __construct(string $uri = null, string $languageId = null, int $version = null, string $text = null)
40+
{
41+
$this->uri = $uri;
42+
$this->languageId = $languageId;
43+
$this->version = $version;
44+
$this->text = $text;
45+
}
3846
}

src/VersionedTextDocumentIdentifier.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,10 @@ class VersionedTextDocumentIdentifier extends TextDocumentIdentifier
1010
* @var int
1111
*/
1212
public $version;
13+
14+
public function __construct(string $uri = null, int $version = null)
15+
{
16+
parent::__construct($uri);
17+
$this->version = $version;
18+
}
1319
}

src/WorkspaceEdit.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,12 @@ class WorkspaceEdit
1313
* @var TextEdit[]
1414
*/
1515
public $changes;
16+
17+
/**
18+
* @param TextEdit[] $changes
19+
*/
20+
public function __construct(array $changes = [])
21+
{
22+
$this->changes = $changes;
23+
}
1624
}

0 commit comments

Comments
 (0)