Skip to content

Commit

Permalink
Correct types in getters/setters as well and small cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
johanwilfer committed Nov 22, 2023
1 parent 10e12ec commit 84ad71d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
11 changes: 5 additions & 6 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 ?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
7 changes: 2 additions & 5 deletions src/Entity/RatioHistory.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
use DateTime;
use DateTimeInterface;

/**
* Class RatioHistory.
*/
class RatioHistory
{
protected ?int $id = null;
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 84ad71d

Please sign in to comment.