Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
♻️ Refactor objects constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
siguici committed Sep 27, 2024
1 parent 7ad3d62 commit b8a572a
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 28 deletions.
5 changes: 1 addition & 4 deletions src/BoolValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ class BoolValue implements BoolType
{
use AsBool;

public function __construct(protected bool $value)
{
$this->value = $value;
}
public function __construct(protected bool $value) {}

public function get(): bool
{
Expand Down
5 changes: 1 addition & 4 deletions src/FloatValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ class FloatValue implements FloatType
{
use AsFloat;

public function __construct(protected float $value)
{
$this->value = $value;
}
public function __construct(protected float $value) {}

public function get(): float
{
Expand Down
5 changes: 1 addition & 4 deletions src/IntValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ class IntValue implements IntType
{
use AsInt;

public function __construct(protected int $value)
{
$this->value = $value;
}
public function __construct(protected int $value) {}

public function get(): int
{
Expand Down
5 changes: 1 addition & 4 deletions src/NumberValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ class NumberValue implements NumberType
{
use AsNumber;

public function __construct(protected int|float $value)
{
$this->value = $value;
}
public function __construct(protected int|float $value) {}

public function get(): int|float
{
Expand Down
5 changes: 1 addition & 4 deletions src/NumericValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ class NumericValue implements NumericType
{
use AsNumeric;

public function __construct(protected int|float|string $value)
{
$this->value = $value;
}
public function __construct(protected int|float|string $value) {}

public function get(): int|float|string
{
Expand Down
5 changes: 1 addition & 4 deletions src/ScalarValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ class ScalarValue implements ScalarType
{
use AsScalar;

public function __construct(protected bool|int|float|string $value)
{
$this->value = $value;
}
public function __construct(protected bool|int|float|string $value) {}

public function get(): bool|int|float|string
{
Expand Down
5 changes: 1 addition & 4 deletions src/StringValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ class StringValue implements StringType
{
use AsString;

public function __construct(protected string $value)
{
$this->value = $value;
}
public function __construct(protected string $value) {}

public function get(): string
{
Expand Down

0 comments on commit b8a572a

Please sign in to comment.