Conditions | 4 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
43 | public function createDisplay($object) |
||
44 | { |
||
45 | if (!is_object($object)) { |
||
46 | throw new RuntimeException("createDisplay method accepts only objects."); |
||
47 | } |
||
48 | |||
49 | $display = $this->initDisplay($object); |
||
50 | if (!is_object($display) || !$display instanceof Display) { |
||
51 | throw new RuntimeException('initDisplay should return instanceof FSi\\Bundle\\AdminBundle\\Display\\Display'); |
||
52 | } |
||
53 | |||
54 | return $display; |
||
55 | } |
||
56 | |||
63 |