Skip to content

Commit 38148ff

Browse files
authored
Merge pull request #599 from ergebnis/fix/rename
Fix: Rename parameter and field
2 parents b93d1e6 + c46216e commit 38148ff

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

src/Format/NewLine.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,23 @@
1818

1919
final class NewLine
2020
{
21-
private string $string;
21+
private string $value;
2222

23-
private function __construct(string $string)
23+
private function __construct(string $value)
2424
{
25-
$this->string = $string;
25+
$this->value = $value;
2626
}
2727

2828
/**
2929
* @throws Exception\InvalidNewLineStringException
3030
*/
31-
public static function fromString(string $string): self
31+
public static function fromString(string $value): self
3232
{
33-
if (1 !== \preg_match('/^(?>\r\n|\n|\r)$/', $string)) {
34-
throw Exception\InvalidNewLineStringException::fromString($string);
33+
if (1 !== \preg_match('/^(?>\r\n|\n|\r)$/', $value)) {
34+
throw Exception\InvalidNewLineStringException::fromString($value);
3535
}
3636

37-
return new self($string);
37+
return new self($value);
3838
}
3939

4040
public static function fromJson(Json $json): self
@@ -48,6 +48,6 @@ public static function fromJson(Json $json): self
4848

4949
public function toString(): string
5050
{
51-
return $this->string;
51+
return $this->value;
5252
}
5353
}

0 commit comments

Comments
 (0)