Completed
Push — master ( 3f8dfc...6f8a88 )
by Dmitry
04:29
created

CredentialsProvider   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 30
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 11 1
A getClientCredentials() 0 4 1
A getSellerCredentials() 0 4 1
A getAdminCredentials() 0 4 1
1
<?php
2
namespace hipanel\tests\_support\Helper;
3
4
use Codeception\Lib\ModuleContainer;
5
6
/**
7
 * Class CredentialsProvider
8
 *
9
 * @author Dmytro Naumenko <[email protected]>
10
 */
11
class CredentialsProvider extends \Codeception\Module
12
{
13
    public function __construct(ModuleContainer $moduleContainer, $config = null)
14
    {
15
        parent::__construct($moduleContainer, $config);
16
17
        $this->requiredFields = [
18
            // Client
19
            'client.login', 'client.password',
20
            'seller.login', 'seller.password',
21
            'admin.login', 'admin.password',
22
        ];
23
    }
24
25
    public function getClientCredentials(): array
26
    {
27
        return [$this->config['client.login'], $this->config['client.password']];
28
    }
29
30
31
    public function getSellerCredentials(): array
32
    {
33
        return [$this->config['seller.login'], $this->config['seller.password']];
34
    }
35
36
    public function getAdminCredentials(): array
37
    {
38
        return [$this->config['admin.login'], $this->config['admin.password']];
39
    }
40
}
41