Passed
Push — master ( ad0e9b...345304 )
by IRFA
03:47
created

Variable::setPath()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
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;
10
	    protected $dir;
11
	    protected $path;
12
	    protected $attemps;
13
	    protected $permission_code;
14
15
	    /**
16
		 * Initializing variable.
17
		 *
18
		 * @return void
19
		 */
20
		protected function initVar(){
21
	        $this->ip = Request::ip();
22
	        $this->input = Request::input(config('irfa.lockout.input_name'));
23
	        $this->dir = config('irfa.lockout.lockout_file_path');
24
	        $this->attemps = config('irfa.lockout.login_attemps');
25
	        $this->path = $this->dir.md5($this->input);
26
    	}
27
28
    	protected function setPath($username){
29
    		$this->path = $this->dir.md5($username);
30
    		$this->input = $username;
31
    	}
32
	
33
	}