Skip to content

Commit

Permalink
Fixed typo when checking if the field diffFile is empty. (#99)
Browse files Browse the repository at this point in the history
After moving the option to `CliOptions` in commit d7eb116, the field `diff` was renamed to `diffFile`, which caused a bug in the handler for the `--diff` argument.
  • Loading branch information
dmitr1y authored May 23, 2024
1 parent acc9467 commit 3811a96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PhpcsChanged/CliOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ public function validate(): void {
throw new InvalidOptionException('You must use either automatic or manual mode.');
}
if ($this->mode === Modes::MANUAL) {
if (empty($this->diff) || empty($this->phpcsUnmodified) || empty($this->phpcsModified)) {
if (empty($this->diffFile) || empty($this->phpcsUnmodified) || empty($this->phpcsModified)) {
throw new InvalidOptionException('Manual mode requires a diff, the unmodified file phpcs output, and the modified file phpcs output.');
}
}
Expand Down

0 comments on commit 3811a96

Please sign in to comment.