| Conditions | 5 |
| Paths | 4 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 5 |
| Changes | 0 | ||
| 1 | <?php |
||
| 39 | 1 | public function findOne(string $space, $params = []) |
|
| 40 | { |
||
| 41 | 1 | if (array_key_exists($space, $this->data)) { |
|
| 42 | 1 | foreach ($this->data[$space] as $candidate) { |
|
| 43 | 1 | if (!count($params) || array_intersect_assoc($params, get_object_vars($candidate)) == $params) { |
|
| 44 | 1 | return $candidate; |
|
| 45 | } |
||
| 46 | } |
||
| 47 | } |
||
| 48 | 1 | } |
|
| 49 | |||
| 59 |