Passed
Push — master ( db039c...4d8c20 )
by Dāvis
04:33
created

AlertController::displayAlertsAction()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 2
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
1
<?php
2
3
namespace Sludio\HelperBundle\Script\Controller;
4
5
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
6
7
class AlertController extends Controller
8
{
9
    public function displayAlertsAction($isAddStyles = true, $isAddJsAlertClose = true)
10
    {
11
        $options = [
12
            'alert_publisher' => $this->get('sludio_helper.alert.publisher'),
13
            'alert_use_styles' => $isAddStyles,
14
            'alert_use_scripts' => $isAddJsAlertClose,
15
        ];
16
17
        return $this->render('SludioHelperBundle:Script:layout.html.twig', $options);
18
    }
19
}
20