@@ -46,8 +46,9 @@ discard block |
||
46 | 46 | if( !in_array($type, self::$registered_components) ) |
47 | 47 | { |
48 | 48 | self::$registered_components[$type] = $class_name; |
49 | + } else { |
|
50 | + throw new \RuntimeException("A component of type '$type' has already been registered."); |
|
49 | 51 | } |
50 | - else throw new \RuntimeException("A component of type '$type' has already been registered."); |
|
51 | 52 | } |
52 | 53 | |
53 | 54 | /** |
@@ -67,8 +68,7 @@ discard block |
||
67 | 68 | if( file_exists( $file_name ) ) |
68 | 69 | { |
69 | 70 | require_once $file_name; |
70 | - } |
|
71 | - else |
|
71 | + } else |
|
72 | 72 | { |
73 | 73 | throw new \RuntimeException("A component of type '$type' does not exist."); |
74 | 74 | } |