Code Duplication    Length = 10-10 lines in 2 locations

src/Notifications/Metrics/ModelChanged.php 2 locations

@@ 110-119 (lines=10) @@
107
                    }
108
                );
109
            break;
110
        case 'created':
111
            return (new SlackMessage)
112
                ->success()
113
                ->attachment(
114
                    function ($attachment) use ($modelInfo) {
115
                        $attachment->title($modelInfo['model'] . ' #' . $modelInfo['original']['id'], route('rica.larametrics::models.show', $modelInfo['id']))
116
                            ->content('A model on ' . url('/') . ' has been created.');
117
                    }
118
                );
119
            break;
120
        case 'deleted':
121
            return (new SlackMessage)
122
                ->error()
@@ 120-129 (lines=10) @@
117
                    }
118
                );
119
            break;
120
        case 'deleted':
121
            return (new SlackMessage)
122
                ->error()
123
                ->attachment(
124
                    function ($attachment) use ($modelInfo) {
125
                        $attachment->title($modelInfo['model'] . ' #' . $modelInfo['original']['id'], route('rica.larametrics::models.show', $modelInfo['id']))
126
                            ->content('A model on ' . url('/') . ' has been deleted.');
127
                    }
128
                );
129
            break;
130
        }
131
    }
132