Controller::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 2
eloc 3
nc 2
nop 0
1
<?php
2
/**
3
 * GitScrum v0.1.
4
 *
5
 * @author  Renato Marinho <[email protected]>
6
 * @license http://opensource.org/licenses/GPL-3.0 GPLv3
7
 */
8
9
namespace GitScrum\Http\Controllers;
10
11
use Illuminate\Foundation\Bus\DispatchesJobs;
12
use Illuminate\Routing\Controller as BaseController;
13
use Illuminate\Foundation\Validation\ValidatesRequests;
14
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
15
use File;
16
17
class Controller extends BaseController
18
{
19
    use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
20
21
    public function __construct()
22
    {
23
        if (File::exists(base_path().DIRECTORY_SEPARATOR.'.env')) {
24
            return view('wizard.install');
0 ignored issues
show
Bug introduced by
Constructors do not have meaningful return values, anything that is returned from here is discarded. Are you sure this is correct?
Loading history...
25
        }
26
    }
27
28
    protected function formatValidationErrors(Validator $validator)
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
29
    {
30
        return $validator->errors()->all();
31
    }
32
}
33