Skip to content

Commit 620f5fc

Browse files
committed
fixup! [FEATURE] Support for inserting an item in a CSSList
1 parent 64cea2b commit 620f5fc

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/CSSList/CSSList.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,7 @@ public function splice($iOffset, $iLength = null, $mReplacement = null)
301301
*
302302
* @param RuleSet|CSSList|Import|Charset $oItem The item.
303303
* @param RuleSet|CSSList|Import|Charset $oSibling The sibling.
304-
* @param string $sPosition The position.
305-
*
306-
* @return void
304+
* @param $sPosition The position.
307305
*/
308306
public function insert($oItem, $oSibling, string $sPosition = 'before'): void
309307
{

tests/CSSList/DocumentTest.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace Sabberworm\CSS\Tests\CSSList;
44

5-
use Generator;
65
use PHPUnit\Framework\TestCase;
76
use Sabberworm\CSS\Comment\Commentable;
87
use Sabberworm\CSS\CSSList\Document;
@@ -90,7 +89,7 @@ public function setContentsReplacesContentsSetInPreviousCall(): void
9089
/**
9190
* @return Generator
9291
*/
93-
public static function insertDataProvider(): Generator
92+
public static function insertDataProvider(): \Generator
9493
{
9594

9695
$bogusOne = new DeclarationBlock();
@@ -133,7 +132,11 @@ public static function insertDataProvider(): Generator
133132
/**
134133
* @test
135134
*
136-
* @param array $contents
135+
* @param $initialContent
136+
* @param $oItem
137+
* @param $oSibling
138+
* @param $sPosition
139+
* @param $expectedContent
137140
*
138141
* @dataProvider insertDataProvider
139142
*/

0 commit comments

Comments
 (0)