Skip to content

Commit 05159dc

Browse files
authored
Remove Parameter::setAttribute(), ::setValue() (#83) (#84)
1 parent f63d9b9 commit 05159dc

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

src/Parameter/Parameter.php

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ class Parameter implements ParameterInterface, \Stringable
1818

1919
public function __construct(string $attribute, ?string $value = null)
2020
{
21-
$this->setAttribute($attribute);
22-
$this->setValue($value);
21+
$this->attribute = trim(strtolower($attribute));
22+
$this->value = $value;
2323
}
2424

2525
public function __toString(): string
@@ -35,21 +35,11 @@ public function __toString(): string
3535
return $this->attribute . self::ATTRIBUTE_VALUE_SEPARATOR . $this->value;
3636
}
3737

38-
public function setAttribute(string $attribute): void
39-
{
40-
$this->attribute = trim(strtolower($attribute));
41-
}
42-
4338
public function getAttribute(): string
4439
{
4540
return $this->attribute;
4641
}
4742

48-
public function setValue(?string $value): void
49-
{
50-
$this->value = $value;
51-
}
52-
5343
public function getValue(): ?string
5444
{
5545
return $this->value;

0 commit comments

Comments
 (0)