Total Complexity | 5 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
14 | class ScrobbleController extends Controller |
||
15 | { |
||
16 | private $lastfmService; |
||
17 | |||
18 | 1 | public function __construct(LastfmService $lastfmService) |
|
19 | { |
||
20 | 1 | $this->lastfmService = $lastfmService; |
|
21 | 1 | } |
|
22 | |||
23 | /** |
||
24 | * Scrobble a song. |
||
25 | * |
||
26 | * Create a [Last.fm scrobble entry](https://www.last.fm/api/scrobbling) for a song. |
||
27 | * |
||
28 | * @param string $timestamp The UNIX timestamp when the song started playing. |
||
29 | * |
||
30 | * @return JsonResponse |
||
31 | */ |
||
32 | 1 | public function store(Request $request, Song $song, string $timestamp) |
|
45 | } |
||
46 | } |
||
47 |