Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feature/scaffolder-instructions'…
Browse files Browse the repository at this point in the history
… into feature/scaffolder-instructions
  • Loading branch information
butschster committed May 29, 2023
2 parents a442ccf + 6d69f0d commit d00b177
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/Scaffolder/src/Declaration/ConfigDeclaration.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,20 @@ public function declare(): void
);
}

public function getInstructions(): array
{
$configFile = $this->makeConfigFilename(
$this->class->getConstant('CONFIG')->getValue()
);

$configFile = \str_replace($this->dirs->get('root'), '', $configFile);

return [
\sprintf('You can now add your config values to the \'<comment>%s</comment>\' file.', $configFile),
'Read more about Config Objects in the documentation: https://spiral.dev/docs/framework-config',
];
}

private function makeConfigFilename(string $filename): string
{
return \sprintf('%s%s.php', $this->directory, $filename);
Expand Down Expand Up @@ -212,18 +226,4 @@ private function singularize(string $name): string
->build()
->singularize($name);
}

public function getInstructions(): array
{
$configFile = $this->makeConfigFilename(
$this->class->getConstant('CONFIG')->getValue()
);

$configFile = \str_replace($this->dirs->get('root'), '', $configFile);

return [
\sprintf('You can now add your config values to the \'<comment>%s</comment>\' file.', $configFile),
'Read more about Config Objects in the documentation: https://spiral.dev/docs/framework-config',
];
}
}

0 comments on commit d00b177

Please sign in to comment.