Variable   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 18
c 1
b 0
f 0
dl 0
loc 31
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setPath() 0 3 1
A initVar() 0 9 1
1
<?php
2
namespace Irfa\Lockout\Initializing;
3
4
use Illuminate\Support\Facades\Request;
5
6
class Variable {
7
8
		protected $ip;
9
	    protected $input=null;
10
	    protected $dir;
11
	    protected $path;
12
	    protected $attemps;
13
	    protected $except_enabled;
14
	    protected $except_accounts;
15
	    protected $permission_code;
16
17
	    /**
18
		 * Initializing variable.
19
		 *
20
		 * @return void
21
		 */
22
		protected function initVar(){
23
			// if(!empty(config('irfa.lockout'))){
24
		        $this->ip = Request::ip();
25
		        $this->input = Request::input(config('irfa.lockout.input_name'));
26
		        $this->dir = config('irfa.lockout.lockout_file_path');
27
		        $this->attemps = config('irfa.lockout.login_attemps');
28
		        $this->except_enabled = config('irfa.lockout.enable_except_account');
29
		        $this->except_accounts = config('irfa.lockout.except_account');
30
		        $this->path = $this->dir.md5($this->input);
31
		    // }
32
    	}
33
34
    	protected function setPath($username){
35
    		$this->path = $this->dir.md5($username);
36
    		$this->input = $username;
37
    	}
38
	
39
	}