Completed
Pull Request — development (#565)
by Thomas
24:00
created

ChangelogController::indexAction()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 6
rs 9.4285
1
<?php
2
3
namespace AppBundle\Controller;
4
5
use League\CommonMark\CommonMarkConverter;
6
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
7
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
8
9
class ChangelogController extends Controller
10
{
11
    /**
12
     * @Route("/changelog")
13
     * @return \Symfony\Component\HttpFoundation\Response
14
     */
15
    public function indexAction()
16
    {   $converter = new CommonMarkConverter();
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
17
        $changelog = $converter->convertToHtml(file_get_contents(__DIR__ . '/../../../../ChangeLog-3.1.md'));
18
19
        return $this->render('AppBundle:ChangelogController:index.html.twig', ['changelog' => $changelog]);
20
    }
21
}
22