Completed
Push — master ( 9d0a0b...952be3 )
by Raphaël
11:37 queued 09:42
created

CollectionKeyAccessorTrait::keys()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
namespace TRex\Collection;
3
4
trait CollectionKeyAccessorTrait
5
{
6
7
    /**
8
     * @param mixed $value
9
     * @param bool $isStrict
10
     * @return array
0 ignored issues
show
Documentation introduced by
Consider making the return type a bit more specific; maybe use array<integer|string>.

This check looks for the generic type array as a return type and suggests a more specific type. This type is inferred from the actual code.

Loading history...
11
     */
12
    public function search($value, $isStrict = true)
13
    {
14
        return array_keys((array)$this, $value, $isStrict);
15
    }
16
17
    /**
18
     * @return array
0 ignored issues
show
Documentation introduced by
Consider making the return type a bit more specific; maybe use array<integer|string>.

This check looks for the generic type array as a return type and suggests a more specific type. This type is inferred from the actual code.

Loading history...
19
     */
20
    public function keys()
21
    {
22
        return array_keys((array)$this);
23
    }
24
}