ArrayAccessTrait   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A offsetUnset() 0 3 1
A offsetExists() 0 3 1
A offsetSet() 0 3 1
1
<?php
2
3
/**
4
 * ArrayAccessTrait
5
 *
6
 * @package php-deferred-callchain
7
 * @author  Jean Claveau
8
 */
9
namespace JClaveau\Async;
10
11
use BadMethodCallException;
12
/**
13
 * Trait gathering unused array access required methods
14
 */
15
trait ArrayAccessTrait
16
{
17
    /**
18
     * Unused part of the ArrayAccess interface
19
     *
20
     * @param  $offset
21
     * @param  $value
22
     * @throws \BadMethodCallException
23
     */
24
    public function offsetSet($offset, $value)
0 ignored issues
show
Unused Code introduced by
The parameter $value is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

24
    public function offsetSet($offset, /** @scrutinizer ignore-unused */ $value)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $offset is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

24
    public function offsetSet(/** @scrutinizer ignore-unused */ $offset, $value)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
25
    {
26
        throw new BadMethodCallException("not implemented");
27
    }
28
    /**
29
     * Unused part of the ArrayAccess interface
30
     *
31
     * @param  $offset
32
     * @throws \BadMethodCallException
33
     */
34
    public function offsetExists($offset)
0 ignored issues
show
Unused Code introduced by
The parameter $offset is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

34
    public function offsetExists(/** @scrutinizer ignore-unused */ $offset)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
35
    {
36
        throw new BadMethodCallException("not implemented");
37
    }
38
    /**
39
     * Unused part of the ArrayAccess interface
40
     *
41
     * @param  $offset
42
     * @throws \BadMethodCallException
43
     */
44
    public function offsetUnset($offset)
0 ignored issues
show
Unused Code introduced by
The parameter $offset is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

44
    public function offsetUnset(/** @scrutinizer ignore-unused */ $offset)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
45
    {
46
        throw new BadMethodCallException("not implemented");
47
    }
48
}