Skip to content

Commit

Permalink
Style fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tux-rampage committed Sep 4, 2018
1 parent 3d1ec81 commit fb2468c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/CodeGenerator/AutoloadGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function __construct(string $namespace)
$this->namespace = $namespace;
}

private function writeFile(string $filename, string $code): void
private function writeFile(string $filename, string $code) : void
{
try {
$file = new SplFileObject($filename, 'w');
Expand All @@ -45,7 +45,7 @@ private function writeFile(string $filename, string $code): void
}
}

private function buildFromTemplate(string $templateFile, string $outputFile, array $replacements): void
private function buildFromTemplate(string $templateFile, string $outputFile, array $replacements) : void
{
$template = file_get_contents($templateFile);
$code = strtr($template, $replacements);
Expand All @@ -54,7 +54,7 @@ private function buildFromTemplate(string $templateFile, string $outputFile, arr
$this->writeFile($outputFile, $code);
}

private function generateClassmapCode(array &$classmap): string
private function generateClassmapCode(array &$classmap) : string
{
$lines = array_map(
function (string $class, string $file): string {
Expand All @@ -68,7 +68,7 @@ function (string $class, string $file): string {
return implode("\n$indent", $lines);
}

private function generateAutoloaderClass(array &$classmap): void
private function generateAutoloaderClass(array &$classmap) : void
{
$replacements = [
'%namespace%' => $this->namespace ? "namespace {$this->namespace};\n" : '',
Expand All @@ -78,7 +78,7 @@ private function generateAutoloaderClass(array &$classmap): void
$this->buildFromTemplate(self::CLASS_TEMPLATE, 'Autoloader.php', $replacements);
}

private function generateAutoloadFile(): void
private function generateAutoloadFile() : void
{
$replacements = [
'%namespace%' => $this->namespace ? "namespace {$this->namespace};\n" : '',
Expand All @@ -90,7 +90,7 @@ private function generateAutoloadFile(): void
/**
* @param string[] $classmap
*/
public function generate(array $classmap)
public function generate(array $classmap) : void
{
$this->ensureOutputDirectory();
$this->generateAutoloaderClass($classmap);
Expand Down

0 comments on commit fb2468c

Please sign in to comment.