Assert the project language and type are valid

This commit is contained in:
Oliver Davies 2024-02-28 10:35:41 +00:00
parent d541f064a5
commit e499d42fa5
6 changed files with 54 additions and 0 deletions

View file

@ -39,6 +39,11 @@ final class PackageInstallCommand extends AbstractCommand
workingDir: $workingDir,
))->getLanguage();
assert(
assertion: ProjectLanguage::isValid($language),
description: sprintf('%s is not a supported language.', $language),
);
switch ($language) {
case ProjectLanguage::PHP->value:
$process = Process::create(