| Conditions | 4 | 
| Paths | 3 | 
| Total Lines | 14 | 
| Code Lines | 7 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 20 | public function create($service, array $params = array())  | 
            ||
| 21 |     { | 
            ||
| 22 | $request = Injector::inst()->get(HTTPRequest::class);  | 
            ||
| 23 |         $id = $request->param('ID'); | 
            ||
| 24 | |||
| 25 |         if ($id) { | 
            ||
| 26 | $page = SiteTree::get()->byID($id);  | 
            ||
| 27 |             if ($page && $this->isEnabled($page)) { | 
            ||
| 28 | return Injector::inst()->create(CMSPageHistoryViewerController::class);  | 
            ||
| 29 | }  | 
            ||
| 30 | }  | 
            ||
| 31 | |||
| 32 | // Injector is not used to prevent an infinite loop  | 
            ||
| 33 | return new CMSPageHistoryController();  | 
            ||
| 34 | }  | 
            ||
| 56 |