Completed
Push — master ( 0c2f78...613e31 )
by Kazi Mainuddin
02:31
created

Config::getKey()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
namespace Tzsk\Payu\Helpers;
3
4
class Config
5
{
6
    /**
7
     * @var string
8
     */
9
    protected $env;
10
11
    /**
12
     * @var string
13
     */
14
    protected $key;
15
16
    /**
17
     * @var string
18
     */
19
    protected $salt;
20
21
    /**
22
     * @var string
23
     */
24
    protected $driver;
25
26
    /**
27
     * @var string
28
     */
29
    protected $endpoint;
30
31
    /**
32
     * @var array
33
     */
34
    protected $required_fields;
35
36
    /**
37
     * @var array
38
     */
39
    protected $optional_fields;
40
41
    /**
42
     * @var array
43
     */
44
    protected $additional_fields;
45
46
    /**
47
     * @var array
48
     */
49
    protected $redirect;
50
51
    /**
52
     * Config constructor.
53
     */
54
    public function __construct()
55
    {
56
        foreach (config('payu') as $key => $value) {
57
            if (property_exists($this, $key)) {
58
                $this->{$key} = $value;
59
            }
60
        }
61
    }
62
63
    /**
64
     * @return string
65
     */
66
    public function getDriver()
67
    {
68
        return $this->driver;
69
    }
70
71
    /**
72
     * @return string
73
     */
74
    public function getEnv()
75
    {
76
        return $this->env;
77
    }
78
79
    /**
80
     * @return string
81
     */
82
    public function getEndpoint()
83
    {
84
        return $this->endpoint;
85
    }
86
87
    /**
88
     * @return array
89
     */
90
    public function getRequiredFields()
91
    {
92
        return $this->required_fields;
93
    }
94
95
    /**
96
     * @return array
97
     */
98
    public function getOptionalFields()
99
    {
100
        return $this->optional_fields;
101
    }
102
103
    /**
104
     * @return string
105
     */
106
    public function getKey()
107
    {
108
        return $this->key;
109
    }
110
111
    /**
112
     * @return string
113
     */
114
    public function getSalt()
115
    {
116
        return $this->salt;
117
    }
118
119
    /**
120
     * @return array
121
     */
122
    public function getAdditionalFields()
123
    {
124
        return $this->additional_fields;
125
    }
126
127
    /**
128
     * @return array
129
     */
130
    public function getRedirect()
131
    {
132
        return $this->redirect;
133
    }
134
}