Controller   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 10
c 0
b 0
f 0
dl 0
loc 21
ccs 0
cts 9
cp 0
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 14 2
1
<?php
2
3
namespace A17\Twill\Http\Controllers\Front;
4
5
use A17\Twill\Exceptions\Handler as TwillHandler;
6
use A17\Twill\Http\Controllers\Front\Helpers\Seo;
7
use Illuminate\Contracts\Debug\ExceptionHandler;
8
use Illuminate\Routing\Controller as BaseController;
9
use Illuminate\Support\Facades\App;
10
use Illuminate\Support\Facades\Config;
11
use Illuminate\Support\Facades\View;
12
13
class Controller extends BaseController
14
{
15
    /**
16
     * @var Seo
17
     */
18
    public $seo;
19
20
    public function __construct()
21
    {
22
        if (Config::get('twill.bind_exception_handler', true)) {
23
            App::singleton(ExceptionHandler::class, TwillHandler::class);
24
        }
25
26
        $this->seo = new Seo;
27
28
        $this->seo->title = Config::get('twill.seo.site_title');
29
        $this->seo->description = Config::get('twill.seo.site_desc');
30
        $this->seo->width = 900;
31
        $this->seo->height = 470;
32
33
        View::share('seo', $this->seo);
34
    }
35
}
36