SystemController   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 19
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A edit() 0 8 2
1
<?php namespace Anomaly\SettingsModule\Http\Controller\Admin;
2
3
use Anomaly\SettingsModule\Setting\Form\SettingFormBuilder;
4
use Anomaly\Streams\Platform\Http\Controller\AdminController;
5
use Anomaly\Streams\Platform\Support\Authorizer;
6
7
class SystemController extends AdminController
8
{
9
10
    /**
11
     * Return the form for editing settings.
12
     *
13
     * @param  SettingFormBuilder                         $form
14
     * @param  Authorizer                                 $authorizer
15
     * @return \Symfony\Component\HttpFoundation\Response
16
     */
17
    public function edit(SettingFormBuilder $form, Authorizer $authorizer)
18
    {
19
        if (!$authorizer->authorize('anomaly.module.settings::settings.write')) {
20
            abort(403);
21
        }
22
        
23
        return $form->render('streams');
24
    }
25
}
26