DefaultController   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 6
dl 0
loc 18
rs 10
c 2
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A downloadAction() 0 13 1
1
<?php
2
3
namespace Afsy\Bundle\TutorialBundle\Controller;
4
5
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
6
use Symfony\Component\HttpFoundation\Response;
7
8
class DefaultController extends Controller
9
{
10
    /**
11
     *  Download action.
12
     */
13
    public function downloadAction()
14
    {
15
        // Initialize
16
        $pageHoover = $this->container->get('afsy.pagehoover');
17
18
        // Download page
19
        $page = 'http://afsy.fr/';
20
        $pageHoover->downloadPage($page);
21
22
        // Return status
23
        $response = new Response();
24
25
        return $response->setContent('Page "'.$page.'" is downloaded !')->send();
26
    }
27
}
28