Total Complexity | 5 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | class NativeWeakrefObjectStorageTest extends TestCase |
||
8 | { |
||
9 | public function testObjectStorage(): void |
||
10 | { |
||
11 | if (!\class_exists(\WeakReference::class)) { |
||
|
|||
12 | $this->markTestSkipped('PHP 7.4+ only'); |
||
13 | return; |
||
14 | } |
||
15 | $objectStorage = new NativeWeakrefObjectStorage(); |
||
16 | $this->assertNull($objectStorage->get('foo', 42)); |
||
17 | $dbRow = $this->createMock(DbRow::class); |
||
18 | $objectStorage->set('foo', 42, $dbRow); |
||
19 | $this->assertSame($dbRow, $objectStorage->get('foo', 42)); |
||
20 | $objectStorage->remove('foo', 42); |
||
21 | $this->assertNull($objectStorage->get('foo', 42)); |
||
22 | } |
||
23 | |||
24 | public function testDanglingPointers(): void |
||
37 | } |
||
38 | } |
||
39 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths