Skip to content

Commit

Permalink
add more array type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
Nielsvanpach committed Dec 1, 2023
1 parent d1c7a26 commit 151dfb2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Drivers/Concerns/CalculatesCropOffsets.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
/** @mixin \Spatie\Image\Drivers\ImageDriver */
trait CalculatesCropOffsets
{
/** @return array<int> */
protected function calculateCropOffsets(int $width, int $height, CropPosition $position): array
{
[$offsetPercentageX, $offsetPercentageY] = $position->offsetPercentages();
Expand Down
1 change: 1 addition & 0 deletions src/Drivers/Concerns/CalculatesFocalCropCoordinates.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
/** @mixin \Spatie\Image\Drivers\ImageDriver */
trait CalculatesFocalCropCoordinates
{
/** @return array<int> */
protected function calculateFocalCropCoordinates(int $width, int $height, $cropCenterX, $cropCenterY): array
{
$width = min($width, $this->getWidth());
Expand Down
1 change: 1 addition & 0 deletions src/Drivers/Concerns/GetsOrientationFromExif.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

trait GetsOrientationFromExif
{
/** @param array{'Orientation'?: int} $exif */
public function getOrientationFromExif(array $exif): Orientation
{
if (! isset($exif['Orientation'])) {
Expand Down

0 comments on commit 151dfb2

Please sign in to comment.