mirror of
https://github.com/opdavies/build-configs.git
synced 2025-09-05 19:05:33 +01:00
fix: enum comparisons and check for null values
This commit is contained in:
parent
5ea7d312a6
commit
8cbb834c33
1 changed files with 10 additions and 2 deletions
|
@ -76,11 +76,19 @@ final class BuildConfigurationCommand extends Command
|
|||
|
||||
private static function isNginx(?string $webServer): bool
|
||||
{
|
||||
return strtoupper($webServer) == WebServer::NGINX;
|
||||
if (is_null($webServer)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return strtoupper($webServer) === WebServer::NGINX->name;
|
||||
}
|
||||
|
||||
private static function isPhp(?string $language): bool
|
||||
{
|
||||
return strtoupper($language) == Language::PHP;
|
||||
if (is_null($language)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return strtoupper($language) === Language::PHP->name;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue