Skip to content

Commit a6d9fee

Browse files
committed
[TASK] Remove __toString()
Part of #998.
1 parent 898d5cd commit a6d9fee

File tree

25 files changed

+16
-215
lines changed

25 files changed

+16
-215
lines changed

src/CSSList/AtRuleBlockList.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,6 @@ public function atRuleArgs(): string
4646
return $this->arguments;
4747
}
4848

49-
/**
50-
* @deprecated in V8.8.0, will be removed in V9.0.0. Use `render` instead.
51-
*/
52-
public function __toString(): string
53-
{
54-
return $this->render(new OutputFormat());
55-
}
56-
5749
public function render(OutputFormat $outputFormat): string
5850
{
5951
$formatter = $outputFormat->getFormatter();

src/CSSList/CSSList.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -400,14 +400,6 @@ public function removeDeclarationBlockBySelector($selectors, $removeAll = false)
400400
}
401401
}
402402

403-
/**
404-
* @deprecated in V8.8.0, will be removed in V9.0.0. Use `render` instead.
405-
*/
406-
public function __toString(): string
407-
{
408-
return $this->render(new OutputFormat());
409-
}
410-
411403
/**
412404
* @return string
413405
*/

src/CSSList/KeyFrame.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,6 @@ public function getAnimationName(): string
5151
return $this->animationName;
5252
}
5353

54-
/**
55-
* @deprecated in V8.8.0, will be removed in V9.0.0. Use `render` instead.
56-
*/
57-
public function __toString(): string
58-
{
59-
return $this->render(new OutputFormat());
60-
}
61-
6254
public function render(OutputFormat $outputFormat): string
6355
{
6456
$result = $outputFormat->comments($this);

src/Comment/Comment.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,6 @@ public function setComment(string $commentText): void
5050
$this->commentText = $commentText;
5151
}
5252

53-
/**
54-
* @deprecated in V8.8.0, will be removed in V9.0.0. Use `render` instead.
55-
*/
56-
public function __toString(): string
57-
{
58-
return $this->render(new OutputFormat());
59-
}
60-
6153
public function render(OutputFormat $outputFormat): string
6254
{
6355
return '/*' . $this->commentText . '*/';

src/Property/CSSNamespace.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,6 @@ public function getLineNo(): int
5454
return $this->lineNumber;
5555
}
5656

57-
/**
58-
* @deprecated in V8.8.0, will be removed in V9.0.0. Use `render` instead.
59-
*/
60-
public function __toString(): string
61-
{
62-
return $this->render(new OutputFormat());
63-
}
64-
6557
public function render(OutputFormat $outputFormat): string
6658
{
6759
return '@namespace ' . ($this->prefix === null ? '' : $this->prefix . ' ')

src/Property/Charset.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,6 @@ public function getCharset()
7171
return $this->charset->getString();
7272
}
7373

74-
/**
75-
* @deprecated in V8.8.0, will be removed in V9.0.0. Use `render` instead.
76-
*/
77-
public function __toString(): string
78-
{
79-
return $this->render(new OutputFormat());
80-
}
81-
8274
public function render(OutputFormat $outputFormat): string
8375
{
8476
return "{$outputFormat->comments($this)}@charset {$this->charset->render($outputFormat)};";

src/Property/Import.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,6 @@ public function getLocation()
7272
return $this->location;
7373
}
7474

75-
/**
76-
* @deprecated in V8.8.0, will be removed in V9.0.0. Use `render` instead.
77-
*/
78-
public function __toString(): string
79-
{
80-
return $this->render(new OutputFormat());
81-
}
82-
8375
public function render(OutputFormat $outputFormat): string
8476
{
8577
return $outputFormat->comments($this) . '@import ' . $this->location->render($outputFormat)

src/Property/Selector.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,6 @@ public function setSelector(string $selector): void
6161
$this->selector = \trim($selector);
6262
}
6363

64-
/**
65-
* @deprecated in V8.8.0, will be removed in V9.0.0. Use `render` instead.
66-
*/
67-
public function __toString(): string
68-
{
69-
return $this->getSelector();
70-
}
71-
7264
/**
7365
* @return int<0, max>
7466
*/

src/Renderable.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,5 @@
66

77
interface Renderable
88
{
9-
/**
10-
* @deprecated in V8.8.0, will be removed in V9.0.0. Use `render` instead.
11-
*/
12-
public function __toString(): string;
13-
149
public function render(OutputFormat $outputFormat): string;
1510
}

src/Rule/Rule.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -224,14 +224,6 @@ public function getIsImportant()
224224
return $this->isImportant;
225225
}
226226

227-
/**
228-
* @deprecated in V8.8.0, will be removed in V9.0.0. Use `render` instead.
229-
*/
230-
public function __toString(): string
231-
{
232-
return $this->render(new OutputFormat());
233-
}
234-
235227
public function render(OutputFormat $outputFormat): string
236228
{
237229
$formatter = $outputFormat->getFormatter();

0 commit comments

Comments
 (0)