Passed
Push — main ( 6c9276...76dcd0 )
by Anatoly
06:53 queued 02:07
created

UnstantiableCollection   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
eloc 5
c 1
b 0
f 0
dl 0
loc 24
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A offsetExists() 0 3 1
A offsetSet() 0 3 1
A offsetGet() 0 4 1
A offsetUnset() 0 2 1
A __construct() 0 2 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Sunrise\Hydrator\Tests\Fixtures;
6
7
use ArrayAccess;
8
use OverflowException;
9
use ReturnTypeWillChange;
10
11
final class UnstantiableCollection implements ArrayAccess
12
{
13
    private function __construct()
14
    {
15
    }
16
17
    public function offsetExists($offset): bool
18
    {
19
        return false;
20
    }
21
22
    #[ReturnTypeWillChange]
23
    public function offsetGet($offset)
24
    {
25
        return null;
26
    }
27
28
    public function offsetSet($offset, $value): void
29
    {
30
        throw new OverflowException();
31
    }
32
33
    public function offsetUnset($offset): void
34
    {
35
    }
36
}
37