File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818
1919final 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}
You can’t perform that action at this time.
0 commit comments