| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | 3 | public function detail(\Exception $e, Request $request) |
|
|
1 ignored issue
–
show
|
|||
| 25 | { |
||
| 26 | 3 | $eSummery = sprintf( |
|
| 27 | 3 | "[%s]\n%s\nin file %s on line %s\n\n%s", |
|
| 28 | get_class($e), |
||
| 29 | 3 | $e->getMessage(), |
|
| 30 | 3 | $e->getFile(), |
|
| 31 | 3 | $e->getLine(), |
|
| 32 | 3 | $e->getTraceAsString() |
|
| 33 | ); |
||
| 34 | |||
| 35 | 3 | return sprintf("%s\n%s\n\n%s\n%s", date(DATE_RFC2822), $request, $eSummery, $this->getPhpVariables($_SERVER)); |
|
| 36 | } |
||
| 37 | |||
| 52 |
Instead of super-globals, we recommend to explicitly inject the dependencies of your class. This makes your code less dependent on global state and it becomes generally more testable: