SystemController::edit()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
rs 9.4285
cc 2
eloc 4
nc 2
nop 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