Completed
Push — master ( c69dc2...614661 )
by Dmitry
10:19 queued 07:23
created

Manager   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 3
c 0
b 0
f 0
lcom 1
cbo 2
dl 0
loc 22
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A login() 0 14 2
A initCredentials() 0 4 1
1
<?php
2
3
namespace hipanel\tests\_support\Step\Acceptance;
4
5
use hipanel\tests\_support\Page\Login;
6
7
/**
8
 * Class Manager
9
 *
10
 * @author Pavlo Kolomiyets <[email protected]>
11
 */
12
class Manager extends Client
13
{
14
    public function login()
15
    {
16
        if ($this->retrieveSession('login-manager')) {
17
            return $this;
18
        }
19
20
        $this->restartBrowser();
21
        $hiam = new Login($this);
22
        $hiam->login($this->username, $this->password);
23
24
        $this->storeSession('login-manager');
25
26
        return $this;
27
    }
28
29
    protected function initCredentials()
30
    {
31
        [$this->id, $this->username, $this->password] = $this->getManagerCredentials();
32
    }
33
}
34