Skip to content

Commit

Permalink
Merge pull request #147 from TheBigBrainsCompany/doctrine-mapping-errors
Browse files Browse the repository at this point in the history
Use the Doctrine native column types (int)
  • Loading branch information
johanwilfer authored Nov 27, 2023
2 parents 7e7c72f + 84ad71d commit fa2bce3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
13 changes: 6 additions & 7 deletions src/Entity/DoctrineStorageRatio.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,17 @@

namespace Tbbc\MoneyBundle\Entity;

/**
* Class DoctrineStorageRatio.
*/
class DoctrineStorageRatio
{
private mixed $id = null;
private ?int $id = null;

public function __construct(private ?string $currencyCode = null, private ?float $ratio = null)
{
public function __construct(
private ?string $currencyCode = null,
private ?float $ratio = null,
) {
}

public function getId(): mixed
public function getId(): int
{
return $this->id;
}
Expand Down
9 changes: 3 additions & 6 deletions src/Entity/RatioHistory.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@
use DateTime;
use DateTimeInterface;

/**
* Class RatioHistory.
*/
class RatioHistory
{
protected mixed $id = null;
protected ?int $id = null;
protected string $referenceCurrencyCode = '';
protected string $currencyCode = '';
protected float $ratio = 0;
Expand All @@ -23,14 +20,14 @@ public function __construct()
$this->savedAt = new DateTime();
}

public function setId(mixed $id): self
public function setId(int $id): self
{
$this->id = $id;

return $this;
}

public function getId(): mixed
public function getId(): int
{
return $this->id;
}
Expand Down

0 comments on commit fa2bce3

Please sign in to comment.