Skip to content

Commit

Permalink
Correctly get manually set height/width
Browse files Browse the repository at this point in the history
  • Loading branch information
AngryMoustache authored Aug 5, 2024
1 parent 2d3b7ec commit c8e9986
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Formats/Format.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,16 @@ public function argument(string $argument): mixed

public function width(): ?string
{
return $this->argument('fit')[1] ?? $this->argument('width');
return $this->argument('fit')[1]
?? $this->argument('width')[0]
?? null;
}

public function height(): ?string
{
return $this->argument('fit')[2] ?? $this->argument('height');
return $this->argument('fit')[2]
?? $this->argument('height')[0]
?? null;
}

public function aspectRatio(): float
Expand Down

0 comments on commit c8e9986

Please sign in to comment.