1
0
Fork 0

Fixing phpcs errors

pull/682/head
Gabriel Noé González 2018-11-11 00:19:19 +01:00
parent 73ab1520a3
commit fd9d326c7a
1 changed files with 45 additions and 25 deletions

View File

@ -72,18 +72,26 @@ class CompletionWithVisibilityTest extends TestCase
// doesn't contain any of these properties and methods // doesn't contain any of these properties and methods
$this->assertCompletionsListSubsetNotContains(new CompletionList([ $this->assertCompletionsListSubsetNotContains(new CompletionList([
new CompletionItem( new CompletionItem(
'privateProperty', CompletionItemKind::PROPERTY, '\TestClass', 'privateProperty',
CompletionItemKind::PROPERTY,
'\TestClass',
'Reprehenderit magna velit mollit ipsum do.' 'Reprehenderit magna velit mollit ipsum do.'
), ),
new CompletionItem( new CompletionItem(
'privateTestMethod', CompletionItemKind::METHOD, 'mixed' // Return type of the method 'privateTestMethod',
CompletionItemKind::METHOD,
'mixed' // Return type of the method
), ),
new CompletionItem( new CompletionItem(
'protectedProperty', CompletionItemKind::PROPERTY, '\TestClass', 'protectedProperty',
CompletionItemKind::PROPERTY,
'\TestClass',
'Reprehenderit magna velit mollit ipsum do.' 'Reprehenderit magna velit mollit ipsum do.'
), ),
new CompletionItem( new CompletionItem(
'protectedTestMethod', CompletionItemKind::METHOD, 'mixed' // Return type of the method 'protectedTestMethod',
CompletionItemKind::METHOD,
'mixed' // Return type of the method
) )
], true), $items); ], true), $items);
} }
@ -99,11 +107,15 @@ class CompletionWithVisibilityTest extends TestCase
// doesn't contain any of these properties and methods // doesn't contain any of these properties and methods
$this->assertCompletionsListSubsetNotContains(new CompletionList([ $this->assertCompletionsListSubsetNotContains(new CompletionList([
new CompletionItem( new CompletionItem(
'privateProperty', CompletionItemKind::PROPERTY, '\TestClass', 'privateProperty',
CompletionItemKind::PROPERTY,
'\TestClass',
'Reprehenderit magna velit mollit ipsum do.' 'Reprehenderit magna velit mollit ipsum do.'
), ),
new CompletionItem( new CompletionItem(
'privateTestMethod', CompletionItemKind::METHOD, 'mixed' // Return type of the method 'privateTestMethod',
CompletionItemKind::METHOD,
'mixed' // Return type of the method
) )
], true), $items); ], true), $items);
} }
@ -114,18 +126,26 @@ class CompletionWithVisibilityTest extends TestCase
// can see all properties and methods // can see all properties and methods
$this->assertCompletionsListSubset(new CompletionList([ $this->assertCompletionsListSubset(new CompletionList([
new CompletionItem( new CompletionItem(
'privateProperty', CompletionItemKind::PROPERTY, '\TestClass', 'privateProperty',
CompletionItemKind::PROPERTY,
'\TestClass',
'Reprehenderit magna velit mollit ipsum do.' 'Reprehenderit magna velit mollit ipsum do.'
), ),
new CompletionItem( new CompletionItem(
'privateTestMethod', CompletionItemKind::METHOD, 'mixed' // Return type of the method 'privateTestMethod',
CompletionItemKind::METHOD,
'mixed' // Return type of the method
), ),
new CompletionItem( new CompletionItem(
'protectedProperty', CompletionItemKind::PROPERTY, '\TestClass', 'protectedProperty',
CompletionItemKind::PROPERTY,
'\TestClass',
'Reprehenderit magna velit mollit ipsum do.' 'Reprehenderit magna velit mollit ipsum do.'
), ),
new CompletionItem( new CompletionItem(
'protectedTestMethod', CompletionItemKind::METHOD, 'mixed' // Return type of the method 'protectedTestMethod',
CompletionItemKind::METHOD,
'mixed' // Return type of the method
), ),
new CompletionItem( new CompletionItem(
'testProperty', 'testProperty',
@ -140,7 +160,6 @@ class CompletionWithVisibilityTest extends TestCase
'Non culpa nostrud mollit esse sunt laboris in irure ullamco cupidatat amet.' 'Non culpa nostrud mollit esse sunt laboris in irure ullamco cupidatat amet.'
) )
], true), $items); ], true), $items);
} }
/** /**
@ -155,7 +174,8 @@ class CompletionWithVisibilityTest extends TestCase
$completionUri = pathToUri($this->fixturesPath . $fixtureFile); $completionUri = pathToUri($this->fixturesPath . $fixtureFile);
$this->loader->open($completionUri, file_get_contents($completionUri)); $this->loader->open($completionUri, file_get_contents($completionUri));
return $this->textDocument->completion( return $this->textDocument->completion(
new TextDocumentIdentifier($completionUri), new Position($line, $char) new TextDocumentIdentifier($completionUri),
new Position($line, $char)
)->wait(); )->wait();
} }