SongController   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getSongAction() 0 6 1
1
<?php
2
3
namespace PHPDish\DailySongPlugin\Controller;
4
5
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
6
use Symfony\Component\HttpFoundation\Response;
7
8
class SongController extends Controller
9
{
10
    /**
11
     * 获取最近的一首歌.
12
     *
13
     * @return Response
14
     */
15
    public function getSongAction()
16
    {
17
        $manager = $this->get('phpdish.manager.song');
18
19
        return $this->render('PHPDishDailySongPlugin::_daily_song.html.twig', [
20
            'song' => $manager->getLatestSong(),
21
        ]);
22
    }
23
}
24