Conditions | 5 |
Paths | 4 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 5 |
Changes | 0 |
1 | <?php |
||
37 | 1 | public function findOne(string $space, $params = []) |
|
38 | { |
||
39 | 1 | $key = $this->serviceName.'.'.$space; |
|
40 | 1 | if (array_key_exists($key, $this->test->data)) { |
|
41 | 1 | foreach ($this->test->data[$key] as $candidate) { |
|
42 | 1 | if (!count($params) || array_intersect_assoc($params, $candidate) == $params) { |
|
43 | 1 | return (object) $candidate; |
|
44 | } |
||
45 | } |
||
46 | } |
||
47 | 1 | } |
|
48 | |||
58 |