Skip to content
This repository was archived by the owner on Mar 1, 2023. It is now read-only.

Commit 34df7d3

Browse files
authored
added missing configurators after reset (#86)
| Q | A | --------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Related tickets | - | License | MIT | Doc PR | -
1 parent a5d2496 commit 34df7d3

2 files changed

Lines changed: 15 additions & 5 deletions

File tree

src/Automatic/Configurator.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,13 @@ final class Configurator extends AbstractConfigurator
3636
*/
3737
public function reset(): void
3838
{
39-
$this->configurators = [];
39+
$this->configurators = [
40+
'composer-auto-scripts' => ComposerAutoScriptsConfigurator::class,
41+
'composer-scripts' => ComposerScriptsConfigurator::class,
42+
'copy' => CopyFromPackageConfigurator::class,
43+
'env' => EnvConfigurator::class,
44+
'gitignore' => GitIgnoreConfigurator::class,
45+
];
4046
$this->cache = [];
4147
}
4248

src/Security/Command/AuditCommand.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,20 @@ protected function execute(InputInterface $input, OutputInterface $output): int
5858
$downloader = new ComposerDownloader();
5959
}
6060

61-
if (($timeout = $input->getOption('timeout')) !== null) {
61+
/** @var null|string $timeout */
62+
$timeout = $input->getOption('timeout');
63+
64+
if ($timeout !== null) {
6265
$downloader->setTimeout((int) $timeout);
6366
}
6467

6568
$config = Factory::createConfig(new NullIO());
6669
$audit = new Audit(\rtrim($config->get('vendor-dir'), '/'), $downloader);
6770

68-
if ($input->getOption('composer-lock') !== null) {
69-
$composerFile = $input->getOption('composer-lock');
70-
} else {
71+
/** @var null|string $composerFile */
72+
$composerFile = $input->getOption('composer-lock');
73+
74+
if ($composerFile === null) {
7175
$composerFile = Util::getComposerLockFile();
7276
}
7377

0 commit comments

Comments
 (0)