@@ -41,7 +41,8 @@ |
||
41 | 41 | |
42 | 42 | $class = $path . implode(DIRECTORY_SEPARATOR, $nm) . ".php"; |
43 | 43 | |
44 | - if (file_exists($class)) |
|
45 | - include $class; |
|
44 | + if (file_exists($class)) { |
|
45 | + include $class; |
|
46 | + } |
|
46 | 47 | } |
47 | 48 | } |
48 | 49 | \ No newline at end of file |
@@ -68,12 +68,10 @@ discard block |
||
68 | 68 | |
69 | 69 | try { |
70 | 70 | $router->match(); |
71 | - } |
|
72 | - catch (\Exception $e) |
|
71 | + } catch (\Exception $e) |
|
73 | 72 | { |
74 | 73 | $errorObject = ($e instanceof RouteNotFoundException); |
75 | - } |
|
76 | - finally |
|
74 | + } finally |
|
77 | 75 | { |
78 | 76 | $this->assertTrue($errorObject, $e->getMessage()); |
79 | 77 | } |
@@ -181,12 +179,10 @@ discard block |
||
181 | 179 | |
182 | 180 | try { |
183 | 181 | $router->run(); |
184 | - } |
|
185 | - catch (\Exception $e) |
|
182 | + } catch (\Exception $e) |
|
186 | 183 | { |
187 | 184 | $errorObject = ($e instanceof MethodExecutionNotAllowedException); |
188 | - } |
|
189 | - finally |
|
185 | + } finally |
|
190 | 186 | { |
191 | 187 | $this->assertTrue($errorObject, $e->getMessage()); |
192 | 188 | } |