Completed
Push — master ( 395774...b3be9a )
by
unknown
16s queued 12s
created

DealerFrontController   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 15
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A show() 0 12 2
1
<?php
2
3
namespace Dealer\Controller;
4
5
use Dealer\Model\DealerMetaSeoQuery;
6
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
7
use Thelia\Controller\Front\BaseFrontController;
8
9
10
class DealerFrontController extends BaseFrontController
11
{
12
    public function show($slug)
13
    {
14
        $dealerMetaSeo = DealerMetaSeoQuery::create()
15
            ->filterBySlug($slug)
16
            ->findOne();
17
18
        if(null === $dealerMetaSeo){
19
            throw new NotFoundHttpException();
20
        }
21
22
        return $this->render('dealer-front', ['dealer_id'=>$dealerMetaSeo->getDealerId()]);
23
    }
24
}
25