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

OverflowedCollection   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A offsetGet() 0 4 1
A offsetExists() 0 3 1
A offsetSet() 0 3 1
A offsetUnset() 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 OverflowedCollection implements ArrayAccess
12
{
13
    public function offsetExists($offset): bool
14
    {
15
        return false;
16
    }
17
18
    #[ReturnTypeWillChange]
19
    public function offsetGet($offset)
20
    {
21
        return null;
22
    }
23
24
    public function offsetSet($offset, $value): void
25
    {
26
        throw new OverflowException();
27
    }
28
29
    public function offsetUnset($offset): void
30
    {
31
    }
32
}
33