| Conditions | 2 |
| Paths | 1 |
| Total Lines | 38 |
| Code Lines | 27 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 27 | public function send(\Exception $exception) |
||
| 28 | { |
||
| 29 | $config = config('exception-monitor.slack'); |
||
| 30 | $message = 'Exception has been thrown on `' . config('app.url') . '`'; |
||
| 31 | $attachment = new Attachment([ |
||
| 32 | 'color' => 'danger', |
||
| 33 | 'fields' => [ |
||
| 34 | new AttachmentField([ |
||
| 35 | 'title' => 'Message', |
||
| 36 | 'value' => $exception->getMessage(), |
||
| 37 | 'short' => true |
||
| 38 | ]), |
||
| 39 | new AttachmentField([ |
||
| 40 | 'title' => 'File', |
||
| 41 | 'value' => $exception->getFile() . ':' . $exception->getLine(), |
||
| 42 | 'short' => true |
||
| 43 | ]), |
||
| 44 | |||
| 45 | new AttachmentField([ |
||
| 46 | 'title' => 'Request', |
||
| 47 | 'value' => app('request')->getRequestUri(), |
||
| 48 | 'short' => true |
||
| 49 | ]), |
||
| 50 | new AttachmentField([ |
||
| 51 | 'title' => 'Timestamp', |
||
| 52 | 'value' => Carbon::now()->toDateTimeString(), |
||
| 53 | 'short' => true |
||
| 54 | ]), |
||
| 55 | new AttachmentField([ |
||
| 56 | 'title' => 'User', |
||
| 57 | 'value' => auth()->check() ? auth()->user()->id : 'Not logged in', |
||
| 58 | 'short' => true |
||
| 59 | ]) |
||
| 60 | ] |
||
| 61 | ]); |
||
| 62 | |||
| 63 | $this->slack->to($config['channel'])->from($config['username'])->attach($attachment)->withIcon($config['icon'])->send($message); |
||
| 64 | } |
||
| 65 | } |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.