| Conditions | 3 | 
| Paths | 3 | 
| Total Lines | 16 | 
| Code Lines | 9 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 29 | public function loadLocation(ContentInfo $contentInfo)  | 
            ||
| 30 |     { | 
            ||
| 31 |         if (is_null($contentInfo->mainLocationId)) { | 
            ||
| 32 |             throw new NotFoundException('main location of content', $contentInfo->id); | 
            ||
| 33 | }  | 
            ||
| 34 | |||
| 35 |         try { | 
            ||
| 36 | return $this->repository->sudo(  | 
            ||
| 37 |                 function (Repository $repository) use ($contentInfo) { | 
            ||
| 38 | return $repository->getLocationService()->loadLocation($contentInfo->mainLocationId);  | 
            ||
| 39 | }  | 
            ||
| 40 | );  | 
            ||
| 41 |         } catch (Exception $e) { | 
            ||
| 42 |             throw new NotFoundException('main location of content', $contentInfo->id); | 
            ||
| 43 | }  | 
            ||
| 44 | }  | 
            ||
| 45 | }  | 
            ||
| 46 |