Skip to content

Commit 7f429cd

Browse files
authored
Merge pull request #298 from oliverklee/task/types/renderable
Add type annotations for `Renderable`
2 parents 39cfd71 + 65aac71 commit 7f429cd

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
@@ -130,7 +130,7 @@ public function createShorthands()
130130
}
131131

132132
/**
133-
* Override render() to make format argument optional
133+
* Override `render()` to make format argument optional
134134
*
135135
* @param OutputFormat|null $oOutputFormat
136136
*

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
@@ -37,14 +37,15 @@ public function getLineNo()
3737
return $this->iLineNo;
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/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
@@ -62,14 +62,15 @@ public function getLocation()
6262
return $this->oLocation;
6363
}
6464

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

7073
/**
71-
* @param OutputFormat $oOutputFormat
72-
*
7374
* @return string
7475
*/
7576
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
@@ -228,14 +228,15 @@ public function removeRule($mRule)
228228
}
229229
}
230230

231+
/**
232+
* @return string
233+
*/
231234
public function __toString()
232235
{
233236
return $this->render(new OutputFormat());
234237
}
235238

236239
/**
237-
* @param OutputFormat $oOutputFormat
238-
*
239240
* @return string
240241
*/
241242
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)