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

Variable   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setPath() 0 3 1
A initVar() 0 6 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;
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
	}