Skip to content

Commit 65aac71

Browse files
committed
Add type annotations for Renderable
Also add type annotations to the implementing classes, and also drop type annotations that duplicat the paramter type declarations.
1 parent ddf0daa commit 65aac71

File tree

16 files changed

+37
-31
lines changed

16 files changed

+37
-31
lines changed

src/CSSList/Document.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public function createShorthands()
127127
}
128128

129129
/**
130-
* Override render() to make format argument optional
130+
* Override `render()` to make format argument optional
131131
*
132132
* @param OutputFormat|null $oOutputFormat
133133
*

src/CSSList/KeyFrame.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ public function __toString()
6868
}
6969

7070
/**
71-
* @param OutputFormat $oOutputFormat
72-
*
7371
* @return string
7472
*/
7573
public function render(OutputFormat $oOutputFormat)

src/Property/CSSNamespace.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,15 @@ public function getLineNo()
3333
return $this->iLineNo;
3434
}
3535

36+
/**
37+
* @return string
38+
*/
3639
public function __toString()
3740
{
3841
return $this->render(new OutputFormat());
3942
}
4043

4144
/**
42-
* @param OutputFormat $oOutputFormat
43-
*
4445
* @return string
4546
*/
4647
public function render(OutputFormat $oOutputFormat)

src/Property/Charset.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@ public function __toString()
7676
}
7777

7878
/**
79-
* @param OutputFormat $oOutputFormat
80-
*
8179
* @return string
8280
*/
8381
public function render(OutputFormat $oOutputFormat)

src/Property/Import.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,15 @@ public function getLocation()
6161
return $this->oLocation;
6262
}
6363

64+
/**
65+
* @return string
66+
*/
6467
public function __toString()
6568
{
6669
return $this->render(new OutputFormat());
6770
}
6871

6972
/**
70-
* @param OutputFormat $oOutputFormat
71-
*
7273
* @return string
7374
*/
7475
public function render(OutputFormat $oOutputFormat)

src/Renderable.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ interface Renderable
1010
public function __toString();
1111

1212
/**
13-
* @param OutputFormat $oOutputFormat
14-
*
1513
* @return string
1614
*/
1715
public function render(OutputFormat $oOutputFormat);
1816

17+
/**
18+
* @return int
19+
*/
1920
public function getLineNo();
2021
}

src/RuleSet/AtRuleSet.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,15 @@ public function atRuleArgs()
4848
return $this->sArgs;
4949
}
5050

51+
/**
52+
* @return string
53+
*/
5154
public function __toString()
5255
{
5356
return $this->render(new OutputFormat());
5457
}
5558

5659
/**
57-
* @param OutputFormat $oOutputFormat
58-
*
5960
* @return string
6061
*/
6162
public function render(OutputFormat $oOutputFormat)

src/RuleSet/RuleSet.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,14 +224,15 @@ public function removeRule($mRule)
224224
}
225225
}
226226

227+
/**
228+
* @return string
229+
*/
227230
public function __toString()
228231
{
229232
return $this->render(new OutputFormat());
230233
}
231234

232235
/**
233-
* @param OutputFormat $oOutputFormat
234-
*
235236
* @return string
236237
*/
237238
public function render(OutputFormat $oOutputFormat)

src/Value/CSSFunction.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,15 @@ public function getArguments()
3737
return $this->aComponents;
3838
}
3939

40+
/**
41+
* @return string
42+
*/
4043
public function __toString()
4144
{
4245
return $this->render(new OutputFormat());
4346
}
4447

4548
/**
46-
* @param OutputFormat $oOutputFormat
47-
*
4849
* @return string
4950
*/
5051
public function render(OutputFormat $oOutputFormat)

src/Value/CSSString.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,15 @@ public function getString()
6161
return $this->sString;
6262
}
6363

64+
/**
65+
* @return string
66+
*/
6467
public function __toString()
6568
{
6669
return $this->render(new OutputFormat());
6770
}
6871

6972
/**
70-
* @param OutputFormat $oOutputFormat
71-
*
7273
* @return string
7374
*/
7475
public function render(OutputFormat $oOutputFormat)

0 commit comments

Comments
 (0)