CustomArrayObject::getArrayKeys()   A
last analyzed

Complexity

Conditions 3
Paths 3

Size

Total Lines 12
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 12
rs 9.4285
cc 3
eloc 6
nc 3
nop 0
1
<?php
2
3
/*
4
 *  @author Serkin Akexander <[email protected]>
5
 */
6
7
namespace Volan;
8
9
class CustomArrayObject extends \ArrayObject
10
{
11
    /**
12
     * Gets key from current array.
13
     * Excludes _type from final array.
14
     *
15
     * @return array
16
     */
17
    public function getArrayKeys()
18
    {
19
        $returnValue = [];
20
21
        foreach (array_keys($this->getArrayCopy()) as $key) {
22
            if ($key != '_type') {
23
                $returnValue[] = $key;
24
            }
25
        }
26
27
        return $returnValue;
28
    }
29
}
30