ArrayHandle   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 80%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
c 1
b 0
f 0
lcom 1
cbo 0
dl 0
loc 24
ccs 8
cts 10
cp 0.8
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A push() 0 4 1
A setElement() 0 4 1
A count() 0 4 1
A toArray() 0 4 1
1
<?php
2
namespace SEOstats\Helper;
3
4
/**
5
 * Array - Handle
6
 *
7
 * @package    SEOstats
8
 * @author     Stephan Schmitz <[email protected]>
9
 * @copyright  Copyright (c) 2010 - present Stephan Schmitz
10
 * @license    http://eyecatchup.mit-license.org/  MIT License
11
 * @updated    2013/02/03
12
 */
13
14
class ArrayHandle
15
{
16
    protected $array;
17
18 3
    public function push($element)
19
    {
20 3
        $this->array[] = $element;
21 3
    }
22
23 3
    public function setElement($key, $element)
24
    {
25 3
        $this->array[$key] = $element;
26 3
    }
27
28
    public function count()
29
    {
30
        return count($this->array);
31
    }
32
33 12
    public function toArray()
34
    {
35 12
        return $this->array;
36
    }
37
}
38