CS: no whitespace before return type colon

This commit is contained in:
jrfnl
2021-08-08 19:41:03 +02:00
parent 2a1aba8089
commit a607236134
71 changed files with 522 additions and 522 deletions
+9 -9
View File
@@ -38,7 +38,7 @@ class ExampleFinder
/**
* Attempts to find the example contents for the given descriptor.
*/
public function find(Example $example) : string
public function find(Example $example): string
{
$filename = $example->getFilePath();
@@ -53,7 +53,7 @@ class ExampleFinder
/**
* Registers the project's root directory where an 'examples' folder can be expected.
*/
public function setSourceDirectory(string $directory = '') : void
public function setSourceDirectory(string $directory = ''): void
{
$this->sourceDirectory = $directory;
}
@@ -61,7 +61,7 @@ class ExampleFinder
/**
* Returns the project's root directory where an 'examples' folder can be expected.
*/
public function getSourceDirectory() : string
public function getSourceDirectory(): string
{
return $this->sourceDirectory;
}
@@ -71,7 +71,7 @@ class ExampleFinder
*
* @param string[] $directories
*/
public function setExampleDirectories(array $directories) : void
public function setExampleDirectories(array $directories): void
{
$this->exampleDirectories = $directories;
}
@@ -81,7 +81,7 @@ class ExampleFinder
*
* @return string[]
*/
public function getExampleDirectories() : array
public function getExampleDirectories(): array
{
return $this->exampleDirectories;
}
@@ -99,7 +99,7 @@ class ExampleFinder
*
* @return string[] all lines of the example file
*/
private function getExampleFileContents(string $filename) : ?array
private function getExampleFileContents(string $filename): ?array
{
$normalizedPath = null;
@@ -129,7 +129,7 @@ class ExampleFinder
/**
* Get example filepath based on the example directory inside your project.
*/
private function getExamplePathFromExampleDirectory(string $file) : string
private function getExamplePathFromExampleDirectory(string $file): string
{
return getcwd() . DIRECTORY_SEPARATOR . 'examples' . DIRECTORY_SEPARATOR . $file;
}
@@ -137,7 +137,7 @@ class ExampleFinder
/**
* Returns a path to the example file in the given directory..
*/
private function constructExamplePath(string $directory, string $file) : string
private function constructExamplePath(string $directory, string $file): string
{
return rtrim($directory, '\\/') . DIRECTORY_SEPARATOR . $file;
}
@@ -145,7 +145,7 @@ class ExampleFinder
/**
* Get example filepath based on sourcecode.
*/
private function getExamplePathFromSource(string $file) : string
private function getExamplePathFromSource(string $file): string
{
return sprintf(
'%s%s%s',