Skip to content

Commit 3ead2c1

Browse files
committed
Improve internal codebase
1 parent e3e50dc commit 3ead2c1

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

src/InnerList.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ public function parameters(): Parameters
5757
return clone $this->parameters;
5858
}
5959

60-
public function prependParameter(string $key, Value|Token|ByteSequence|DateTimeInterface|Stringable|string|int|float|bool $member): static
60+
public function prependParameter(string $key, StructuredField|Token|ByteSequence|DateTimeInterface|Stringable|string|int|float|bool $member): static
6161
{
6262
return $this->withParameters($this->parameters()->prepend($key, $member));
6363
}
6464

65-
public function appendParameter(string $key, Value|Token|ByteSequence|DateTimeInterface|Stringable|string|int|float|bool $member): static
65+
public function appendParameter(string $key, StructuredField|Token|ByteSequence|DateTimeInterface|Stringable|string|int|float|bool $member): static
6666
{
6767
return $this->withParameters($this->parameters()->append($key, $member));
6868
}

src/Item.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ public function withValue(mixed $value): static
197197
$value instanceof ByteSequence && $this->value instanceof ByteSequence && $value->encoded() === $this->value->encoded(),
198198
$value instanceof Token && $this->value instanceof Token && $value->value === $this->value->value,
199199
$value instanceof DateTimeInterface && $this->value instanceof DateTimeInterface && $value == $this->value,
200-
$value instanceof Stringable && $this->type === Type::String && $value->__toString() === $this->value,
200+
$value instanceof Stringable && $value->__toString() === $this->value,
201201
$value === $this->value => $this,
202202
default => self::from($value, $this->parameters),
203203
};
@@ -208,12 +208,12 @@ public function parameters(): Parameters
208208
return clone $this->parameters;
209209
}
210210

211-
public function prependParameter(string $key, Value|Token|ByteSequence|DateTimeInterface|Stringable|string|int|float|bool $member): static
211+
public function prependParameter(string $key, StructuredField|Token|ByteSequence|DateTimeInterface|Stringable|string|int|float|bool $member): static
212212
{
213213
return $this->withParameters($this->parameters()->prepend($key, $member));
214214
}
215215

216-
public function appendParameter(string $key, Value|Token|ByteSequence|DateTimeInterface|Stringable|string|int|float|bool $member): static
216+
public function appendParameter(string $key, StructuredField|Token|ByteSequence|DateTimeInterface|Stringable|string|int|float|bool $member): static
217217
{
218218
return $this->withParameters($this->parameters()->append($key, $member));
219219
}

src/Type.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Bakame\Http\StructuredFields;
46

57
use DateTimeInterface;

0 commit comments

Comments
 (0)