Issues (38)

libraries/RefactorArray.php (7 issues)

1
<?php
2
defined('BASEPATH') OR exit('No direct script access allowed');
3
4
class RefactorArray implements ArrayAccess, Countable
5
{
6
  /**
7
   * [private description]
8
   * @var [type]
0 ignored issues
show
Documentation Bug introduced by
The doc comment [type] at position 0 could not be parsed: Unknown type name '[' at position 0 in [type].
Loading history...
9
   */
10
  private $data = array();
11
  /**
12
   * [offsetSet description]
13
   * @date  2019-11-02
14
   * @param [type]     $offset [description]
0 ignored issues
show
Documentation Bug introduced by
The doc comment [type] at position 0 could not be parsed: Unknown type name '[' at position 0 in [type].
Loading history...
15
   * @param [type]     $value  [description]
16
   */
17
  public function offsetSet($offset, $value)
18
  {
19
    $this->data[$offset] = $value;
20
  }
21
  /**
22
   * [offsetExists description]
23
   * @date  2019-11-02
24
   * @param [type]     $offset [description]
0 ignored issues
show
Documentation Bug introduced by
The doc comment [type] at position 0 could not be parsed: Unknown type name '[' at position 0 in [type].
Loading history...
25
   */
26
  public function offsetExists($offset)
27
  {
28
    return isset($this->data[$offset]);
29
  }
30
  /**
31
   * [offsetUnset description]
32
   * @date  2019-11-02
33
   * @param [type]     $offset [description]
0 ignored issues
show
Documentation Bug introduced by
The doc comment [type] at position 0 could not be parsed: Unknown type name '[' at position 0 in [type].
Loading history...
34
   */
35
  public function offsetUnset($offset)
36
  {
37
    unset($this->data[$offset]);
38
  }
39
  /**
40
   * [offsetGet description]
41
   * @date  2019-11-02
42
   * @param [type]     $offset [description]
0 ignored issues
show
Documentation Bug introduced by
The doc comment [type] at position 0 could not be parsed: Unknown type name '[' at position 0 in [type].
Loading history...
43
   */
44
  public function offsetGet($offset)
45
  {
46
    return ($this->offsetExists($offset)) ? $this->data[$offset] : null;
47
  }
48
  /**
49
   * [count description]
50
   * @date   2019-11-02
51
   * @return [type]     [description]
0 ignored issues
show
Documentation Bug introduced by
The doc comment [type] at position 0 could not be parsed: Unknown type name '[' at position 0 in [type].
Loading history...
52
   */
53
  public function count()
54
  {
55
    return count($this->_data);
0 ignored issues
show
The property _data does not exist on RefactorArray. Did you mean data?
Loading history...
56
  }
57
}
58