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 ( 8c3ee0...d7f4ea )
by Hong
04:46
created

ArrayAccessTrait   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 4
c 1
b 0
f 1
lcom 0
cbo 1
dl 0
loc 41
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A offsetExists() 0 4 1
A offsetGet() 0 4 1
A offsetSet() 0 4 1
A offsetUnset() 0 4 1
has() 0 1 ?
get() 0 1 ?
1
<?php
2
/**
3
 * Phossa Project
4
 *
5
 * PHP version 5.4
6
 *
7
 * @category  Library
8
 * @package   Phossa2\Di
9
 * @copyright Copyright (c) 2016 phossa.com
10
 * @license   http://mit-license.org/ MIT License
11
 * @link      http://www.phossa.com/
12
 */
13
/*# declare(strict_types=1); */
14
15
namespace Phossa2\Di\Traits;
16
17
use Phossa2\Config\Traits\WritableTrait;
18
19
/**
20
 * ArrayAccessTrait
21
 *
22
 * Array access for container
23
 *
24
 * @package Phossa2\Di
25
 * @author  Hong Zhang <[email protected]>
26
 * @see     \ArrayAccess
27
 * @version 2.0.0
28
 * @since   2.0.0 added
29
 */
30
trait ArrayAccessTrait
31
{
32
    use WritableTrait;
33
34
    public function offsetExists($offset)/*# : bool */
35
    {
36
        return $this->has($offset);
37
    }
38
39
    public function offsetGet($offset)
40
    {
41
        return $this->get($offset);
42
    }
43
44
    public function offsetSet($offset, $value)
45
    {
46
        $this->set($offset, $value);
47
    }
48
49
    public function offsetUnset($offset)
50
    {
51
        $this->offsetSet($offset, null);
52
    }
53
54
    // from ContainerInterface
55
56
    /**
57
     * @return bool
58
     */
59
    abstract public function has(/*# string */ $id)/*# : bool */;
60
    /**
61
     * @return mixed|null
62
     */
63
    abstract public function get(/*# string */ $id);
64
65
    // from Phossa2\Config\Interfaces\WritableInterface
66
    /**
67
     * @return $this
68
     */
69
    abstract public function set(/*# string */ $id, $value);
70
}
71