Skip to content

Commit ce85321

Browse files
committed
remove named constructors
1 parent d69b833 commit ce85321

17 files changed

Lines changed: 49 additions & 209 deletions

src/Common/Entity/Cell/BooleanCell.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@ public function getValue(): bool
2626
return $this->value;
2727
}
2828

29-
public static function create(bool $value): self
30-
{
31-
return new self($value);
32-
}
33-
3429
public function withValue(bool $value): self
3530
{
3631
return new self($value, $this->style, $this->comment);

src/Common/Entity/Cell/DateIntervalCell.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@ public function getValue(): DateInterval
3333
return $this->value;
3434
}
3535

36-
public static function create(DateInterval $value): self
37-
{
38-
return new self($value);
39-
}
40-
4136
public function withValue(DateInterval $value): self
4237
{
4338
return new self($value, $this->style, $this->comment);

src/Common/Entity/Cell/DateTimeCell.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@ public function getValue(): DateTimeInterface
2727
return $this->value;
2828
}
2929

30-
public static function create(DateTimeInterface $value): self
31-
{
32-
return new self($value);
33-
}
34-
3530
public function withValue(DateTimeInterface $value): self
3631
{
3732
return new self($value, $this->style, $this->comment);

src/Common/Entity/Cell/EmptyCell.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@ public function getValue(): ?string
2626
return $this->value;
2727
}
2828

29-
public static function create(): self
30-
{
31-
return new self(null);
32-
}
33-
3429
public function withValue(?string $value): self
3530
{
3631
return new self($value, $this->style, $this->comment);

src/Common/Entity/Cell/ErrorCell.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@ public function getRawValue(): string
3131
return $this->value;
3232
}
3333

34-
public static function create(string $value): self
35-
{
36-
return new self($value);
37-
}
38-
3934
public function withRawValue(string $value): self
4035
{
4136
return new self($value, $this->style, $this->comment);

src/Common/Entity/Cell/FormulaCell.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@ public function getComputedValue(): bool|DateInterval|DateTimeImmutable|float|in
3131
return $this->computedValue;
3232
}
3333

34-
public static function create(string $value): self
35-
{
36-
return new self($value);
37-
}
38-
3934
public function withValue(string $value): self
4035
{
4136
return new self($value, $this->computedValue, $this->style, $this->comment);

src/Common/Entity/Cell/NumericCell.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@ public function getValue(): float|int
2626
return $this->value;
2727
}
2828

29-
public static function create(float|int $value): self
30-
{
31-
return new self($value);
32-
}
33-
3429
public function withValue(float|int $value): self
3530
{
3631
return new self($value, $this->style, $this->comment);

src/Common/Entity/Cell/StringCell.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,6 @@ public function getValue(): string
3737
return $this->value;
3838
}
3939

40-
public static function create(string $value): self
41-
{
42-
return new self($value);
43-
}
44-
4540
public function withValue(string $value): self
4641
{
4742
return new self($value, $this->style, $this->comment);

src/Common/Entity/Comment/Comment.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,6 @@ public function __construct(
4141
}
4242
}
4343

44-
public static function create(): self
45-
{
46-
return new self();
47-
}
48-
4944
public function withHeight(string $height): self
5045
{
5146
return new self(

src/Common/Entity/Comment/TextRun.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@ public function __construct(
2222
public bool $italic = false,
2323
) {}
2424

25-
public static function create(string $text): self
26-
{
27-
return new self($text);
28-
}
29-
3025
public function withText(string $text): self
3126
{
3227
return new self($text, $this->fontSize, $this->fontColor, $this->fontName, $this->bold, $this->italic);

0 commit comments

Comments
 (0)