Conditions | 4 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
32 | 1 | public function store(Request $request, Song $song, string $timestamp) |
|
33 | { |
||
34 | 1 | if (!$song->artist->is_unknown && $request->user()->connectedToLastfm()) { |
|
35 | 1 | $this->lastfmService->scrobble( |
|
36 | 1 | $song->artist->name, |
|
37 | 1 | $song->title, |
|
38 | 1 | (int) $timestamp, |
|
39 | 1 | $song->album->name === Album::UNKNOWN_NAME ? '' : $song->album->name, |
|
40 | 1 | $request->user()->lastfm_session_key |
|
41 | ); |
||
42 | } |
||
43 | |||
44 | 1 | return response()->json(); |
|
45 | } |
||
47 |