mirror of
https://github.com/opdavies/build-configs.git
synced 2025-01-23 02:27:33 +00:00
feat: only create PHPStan file if it's set
Only create a `phpstan.neon.dist` file if the `php.phpstan` object is set within the project's `build.yaml` file.
This commit is contained in:
parent
27ce1dc100
commit
5ee6810c95
|
@ -171,13 +171,16 @@ function getFiles(array $configurationData): Collection
|
|||
if (isPhp(Arr::get($configurationData, 'language'))) {
|
||||
$filesToGenerate[] = new TemplateFile(data: 'php/Dockerfile', name: 'Dockerfile');
|
||||
$filesToGenerate[] = new TemplateFile(data: 'php/phpcs.xml', name: 'phpcs.xml.dist');
|
||||
$filesToGenerate[] = new TemplateFile(data: 'php/phpstan.neon', name: 'phpstan.neon.dist');
|
||||
$filesToGenerate[] = new TemplateFile(data: 'php/phpunit.xml', name: 'phpunit.xml.dist');
|
||||
$filesToGenerate[] = new TemplateFile(
|
||||
data: 'php/docker-entrypoint-php',
|
||||
name: 'docker-entrypoint-php',
|
||||
path: 'tools/docker/images/php/root/usr/local/bin',
|
||||
);
|
||||
|
||||
if (Arr::has(array: $configurationData, keys: 'php.phpstan')) {
|
||||
$filesToGenerate[] = new TemplateFile(data: 'php/phpstan.neon', name: 'phpstan.neon.dist');
|
||||
}
|
||||
}
|
||||
|
||||
if (isNode(Arr::get($configurationData, 'language'))) {
|
||||
|
|
Loading…
Reference in a new issue