Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
timvandijck committed Jan 15, 2024
1 parent 53bbaf5 commit 5e99b59
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/Size.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ public function resizeWidth(
?int $desiredWidth = null,
array $constraints = []
): self {
ray('Size->resizeWidth', $constraints);
$originalWidth = $this->width;
$originalHeight = $this->height;

Expand All @@ -81,21 +80,16 @@ public function resizeWidth(
if (in_array(Constraint::PreserveAspectRatio, $constraints)) {
$calculatedHeight = max(1, (int) (round($this->width / (new Size($originalWidth, $originalHeight))->aspectRatio())));

ray('$calculatedHeight', $calculatedHeight);

if (in_array(Constraint::DoNotUpsize, $constraints)) {
$this->height = $calculatedHeight > $maximumHeight
? $maximumHeight
: $calculatedHeight;

ray('$this->height', $this->height);
} else {
$this->height = $calculatedHeight;
}
}

ray('???', $this->height);

return $this;
}

Expand Down

0 comments on commit 5e99b59

Please sign in to comment.