Skip to content

Commit

Permalink
no need to double add hack constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
scobb committed Dec 18, 2023
1 parent cd54e99 commit 0010d7c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Codegen/Constraints/StringBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,7 @@ protected function getCheckMethod(): CodegenMethod {
->addAssignment('$typed', '$sanitize_string($typed)', HackBuilderValues::literal())
->ensureEmptyLine();
}
if ($this->typed_schema['generateHackEnum'] ?? false) {
$this->addHackEnumConstraintCheck($hb);
} else {
if (!($this->typed_schema['generateHackEnum'] ?? false)) {
$this->addEnumConstraintCheck($hb);
}

Expand Down

0 comments on commit 0010d7c

Please sign in to comment.