Skip to content

Commit

Permalink
Merge pull request #22 from binafy/fix-return-type-of-getprice-method
Browse files Browse the repository at this point in the history
[1.x] Change return type of `getPrice`
  • Loading branch information
milwad-dev authored Aug 15, 2024
2 parents a2b4e7c + fff9842 commit b9e83a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Cartable.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@

interface Cartable
{
public function getPrice(): int;
public function getPrice(): float;
}
4 changes: 2 additions & 2 deletions tests/SetUp/Models/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ class Product extends Model implements Cartable
/**
* Get the correct price.
*/
public function getPrice(): int
public function getPrice(): float
{
return $this->price;
return (float) $this->price;
}
}

0 comments on commit b9e83a8

Please sign in to comment.