ArrayHandle::count()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
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