Conditions | 4 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
51 | public function createDisplay($object) |
||
52 | { |
||
53 | if (!is_object($object)) { |
||
54 | throw new RuntimeException("createDisplay method accepts only objects."); |
||
55 | } |
||
56 | |||
57 | $display = $this->initDisplay($object); |
||
58 | if (!is_object($display) || !$display instanceof Display) { |
||
59 | throw new RuntimeException('initDisplay should return instanceof FSi\\Bundle\\AdminBundle\\Display\\Display'); |
||
60 | } |
||
61 | |||
62 | return $display; |
||
63 | } |
||
64 | |||
71 |