GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 9014c2...c6747a )
by TJ
02:34
created

Repository   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 77
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 11
dl 0
loc 77
rs 10
c 0
b 0
f 0
wmc 8

8 Methods

Rating   Name   Duplication   Size   Complexity  
A offsetExists() 0 3 1
A __set() 0 3 1
A offsetGet() 0 3 1
A offsetSet() 0 3 1
A set() 0 5 1
A __construct() 0 3 1
A offsetUnset() 0 3 1
A all() 0 3 1
1
<?php
2
3
namespace Honeybadger\Support;
4
5
class Repository implements \ArrayAccess
6
{
7
    /**
8
     * @var array
9
     */
10
    protected $items = [];
11
12
    public function __construct(array $items = [])
13
    {
14
        $this->items = $items;
15
    }
16
17
    /**
18
     * @param  string  $key
19
     * @param  mixed  $value
20
     * @return array
21
     */
22
    public function set(string $key, $value) : array
23
    {
24
        $this->items[$key] = $value;
25
26
        return $this->items;
27
    }
28
29
    /**
30
     * @param  string   $key
31
     * @param  mixed  $value
32
     * @return array
33
     */
34
    public function __set(string $key, $value) : array
35
    {
36
        return $this->set($key, $value);
37
    }
38
39
    /**
40
     * @return array
41
     */
42
    public function all() : array
43
    {
44
        return $this->items;
45
    }
46
47
    /**
48
     * @param  string|int $offset
49
     * @return bool
50
     */
51
    public function offsetExists($offset) : bool
52
    {
53
        return isset($this->items[$offset]);
54
    }
55
56
    /**
57
     * @param  int|string  $offset
58
     * @return mixed
59
     */
60
    public function offsetGet($offset)
61
    {
62
        return $this->items[$offset];
63
    }
64
65
    /**
66
     * @param  int|string  $offset
67
     * @param  mixed  $value
68
     * @return void
69
     */
70
    public function offsetSet($offset, $value) : void
71
    {
72
        $this->items[$offset] = $value;
73
    }
74
75
    /**
76
     * @param  int|string  $offset
77
     * @return void
78
     */
79
    public function offsetUnset($offset) : void
80
    {
81
        unset($this->items[$offset]);
82
    }
83
}
84