Skip to content

Commit cbe5d88

Browse files
committed
[TASK] Remove __toString()
Part of #998.
1 parent a8709e4 commit cbe5d88

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
@@ -42,14 +42,6 @@ public function atRuleArgs(): string
4242
return $this->arguments;
4343
}
4444

45-
/**
46-
* @deprecated in V8.8.0, will be removed in V9.0.0. Use `render` instead.
47-
*/
48-
public function __toString(): string
49-
{
50-
return $this->render(new OutputFormat());
51-
}
52-
5345
public function render(OutputFormat $outputFormat): string
5446
{
5547
$result = $outputFormat->comments($this);

src/CSSList/CSSList.php

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

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

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()
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
$result = "{$outputFormat->comments($this)}{$this->rule}:{$outputFormat->spaceAfterRuleName()}";

0 commit comments

Comments
 (0)