Skip to content

Commit 7564f35

Browse files
authored
Merge pull request #23 from colinodell/fix-test-failures
Fix test errors
2 parents a3ec1b5 + e66b8e8 commit 7564f35

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Data.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
use RuntimeException;
1515
use ArrayAccess;
1616

17+
/**
18+
* @implements ArrayAccess<string, mixed>
19+
*/
1720
class Data implements DataInterface, ArrayAccess
1821
{
1922
/**
@@ -247,6 +250,8 @@ public function offsetGet($key)
247250

248251
/**
249252
* {@inheritdoc}
253+
*
254+
* @param string $key
250255
*/
251256
public function offsetSet($key, $value)
252257
{
@@ -260,5 +265,4 @@ public function offsetUnset($key)
260265
{
261266
$this->remove($key);
262267
}
263-
264268
}

tests/DataTest.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -240,15 +240,11 @@ public function testOffsetGet()
240240
$this->assertEquals(['c1', 'c2', 'c3'], $data['c']);
241241
$this->assertNull($data['foo'], 'Foo should not exist');
242242
$this->assertNull($data['f.g.h.i']);
243-
244-
$this->expectException(RuntimeException::class);
245-
246-
$data = $wrappedData->getData('wrapped.sampleData.a');
247243
}
248244

249245
public function testOffsetSet()
250246
{
251-
$data = new Data;
247+
$data = new Data();
252248

253249
$this->assertNull($data['a']);
254250
$this->assertNull($data['b.c']);

0 commit comments

Comments
 (0)