| Conditions | 5 | 
| Paths | 9 | 
| Total Lines | 15 | 
| Code Lines | 9 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 12 | 
| CRAP Score | 5 | 
| Changes | 0 | ||
| 1 | <?php | ||
| 29 | 2 | public function resolve($schema, $currentPointer, $currentScope) | |
| 30 |     { | ||
| 31 | 2 | $current = $schema; | |
| 32 | 2 |         foreach (explode('/', $currentPointer) as $segment) { | |
| 33 | 2 |             if (isset($current->$segment)) { | |
| 34 | 2 | $current = $current->$segment; | |
| 35 | 1 | } | |
| 36 | 2 |             $id = isset($current->{$this->keyword}) ? $current->{$this->keyword} : null; | |
| 37 | 2 |             if (is_string($id)) { | |
| 38 | 2 | $currentScope = resolve_uri($id, $currentScope); | |
| 39 | 1 | } | |
| 40 | 1 | } | |
| 41 | |||
| 42 | 2 | return $currentScope; | |
| 43 | } | ||
| 44 | } | ||
| 45 |