SystemController   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A edit() 0 8 2
1
<?php namespace Anomaly\PreferencesModule\Http\Controller\Admin;
2
3
use Anomaly\PreferencesModule\Preference\Form\PreferenceFormBuilder;
4
use Anomaly\Streams\Platform\Http\Controller\AdminController;
5
use Anomaly\Streams\Platform\Support\Authorizer;
6
7
/**
8
 * Class SystemController
9
 *
10
 * @link          http://pyrocms.com/
11
 * @author        PyroCMS, Inc. <[email protected]>
12
 * @author        Ryan Thompson <[email protected]>
13
 */
14
class SystemController extends AdminController
15
{
16
17
    /**
18
     * Return the form for editing preferences.
19
     *
20
     * @param  PreferenceFormBuilder                      $form
21
     * @param  Authorizer                                 $authorizer
22
     * @return \Symfony\Component\HttpFoundation\Response
23
     */
24
    public function edit(PreferenceFormBuilder $form, Authorizer $authorizer)
25
    {
26
        if (!$authorizer->authorize('anomaly.module.preferences::preferences.write')) {
27
            abort(403);
28
        }
29
30
        return $form->render('streams');
31
    }
32
}
33