File tree Expand file tree Collapse file tree 2 files changed +9
-44
lines changed Expand file tree Collapse file tree 2 files changed +9
-44
lines changed Original file line number Diff line number Diff line change @@ -35,28 +35,12 @@ public function withVersion(string|float|int $version): self
35
35
return $ this ;
36
36
}
37
37
38
- /**
39
- * @deprecated 1.4 Use `withVersion` instead.
40
- */
41
- public function setVersion (string |float |int $ version ): self
42
- {
43
- return $ this ->withVersion ($ version );
44
- }
45
-
46
38
public function withEncoding (string $ encoding ): self
47
39
{
48
40
$ this ->encoding = $ encoding ;
49
41
return $ this ;
50
42
}
51
43
52
- /**
53
- * @deprecated 1.4 Use `withEncoding` instead.
54
- */
55
- public function setEncoding (string $ encoding ): self
56
- {
57
- return $ this ->withEncoding ($ encoding );
58
- }
59
-
60
44
public function removeEncoding (): self
61
45
{
62
46
$ this ->encoding = '' ;
@@ -69,14 +53,6 @@ public function withStandalone(bool $standalone): self
69
53
return $ this ;
70
54
}
71
55
72
- /**
73
- * @deprecated 1.4 Use `withStandalone` instead.
74
- */
75
- public function setStandalone (bool $ standalone = true ): self
76
- {
77
- return $ this ->withStandalone ($ standalone );
78
- }
79
-
80
56
public function removeStandalone (): self
81
57
{
82
58
$ this ->standalone = '' ;
Original file line number Diff line number Diff line change @@ -35,38 +35,27 @@ public function document_can_modify_declaration_properties(): void
35
35
'<?xml version="1.1" encoding="UTF-16" standalone="no" ?> ' . "\n" .
36
36
'<root></root> ' ,
37
37
(string ) Document::create ('root ' )
38
- ->setVersion (1.1 )
39
- ->setEncoding ('UTF-16 ' )
40
- ->setStandalone (false )
38
+ ->withVersion (1.1 )
39
+ ->withEncoding ('UTF-16 ' )
40
+ ->withStandalone (false )
41
41
);
42
42
43
43
$ this ->assertSame (
44
44
'<?xml version="1.1" encoding="UTF-16" standalone="no" ?> ' . "\n" .
45
45
'<root></root> ' ,
46
46
(string ) Document::create ('root ' )
47
- ->setVersion ('1.1 ' )
48
- ->setEncoding ('UTF-16 ' )
49
- ->setStandalone (false )
47
+ ->withVersion ('1.1 ' )
48
+ ->withEncoding ('UTF-16 ' )
49
+ ->withStandalone (false )
50
50
);
51
51
52
52
$ this ->assertSame (
53
53
'<?xml version="1.0" encoding="UTF-16" standalone="no" ?> ' . "\n" .
54
54
'<root></root> ' ,
55
55
(string ) Document::create ('root ' )
56
- ->setVersion (1 )
57
- ->setEncoding ('UTF-16 ' )
58
- ->setStandalone (false )
59
- );
60
- }
61
-
62
- /**
63
- *@test
64
- */
65
- public function document_is_stringable (): void
66
- {
67
- $ this ->assertSame (
68
- '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> ' ."\n" .'<root id="6" property="hello"></root> ' ,
69
- (string ) Document::create ('root ' )->props ('id 6 ' , 'property hello ' )
56
+ ->withVersion (1 )
57
+ ->withEncoding ('UTF-16 ' )
58
+ ->withStandalone (false )
70
59
);
71
60
}
72
61
You can’t perform that action at this time.
0 commit comments