AccountInfo   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 60
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 8
c 0
b 0
f 0
dl 0
loc 60
rs 10
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A key() 0 2 1
A rewind() 0 2 1
A valid() 0 2 1
A next() 0 2 1
A current() 0 2 1
A __construct() 0 2 1
1
<?php
2
3
/**
4
 *      Class iterator for a set of parameters with account information
5
 *
6
 *      @package php_EasyPay
7
 *      @version 1.1
8
 *      @author Dmitry Shovchko <[email protected]>
9
 *
10
 */
11
12
namespace EasyPay\Provider31;
13
14
class AccountInfo implements \Iterator
15
{
16
        /**
17
         *      @var array $_accountinfo {
18
         *              @var string $parameter Name of parameter
19
         *              @var string $value     Value of parameter
20
         *      }
21
         *
22
         */
23
        private $_accountinfo;
24
        
25
        /**
26
         *      AccountInfo constructor
27
         *
28
         *      @param array $accountinfo
29
         *
30
         */
31
        public function __construct($accountinfo) {
32
                $this->_accountinfo = $accountinfo;
33
        }
34
        
35
        public function rewind() {
36
                reset($this->_accountinfo);
37
        }
38
        
39
        /**
40
         *      @return mixed $_accountinfo {
41
         *              @var string $parameter Name of parameter
42
         *              @var string $value     Value of parameter
43
         *      }
44
         *
45
         */
46
        public function current() {
47
                return current($this->_accountinfo);
48
        }
49
        
50
        /**
51
         *      @return mixed
52
         *
53
         */
54
        public function key() {
55
                return key($this->_accountinfo);
56
        }
57
        
58
        /**
59
         *      @return mixed $_accountinfo {
60
         *              @var string $parameter Name of parameter
61
         *              @var string $value     Value of parameter
62
         *      }
63
         *
64
         */
65
        public function next() {
66
                next($this->_accountinfo);
67
        }
68
        
69
        /**
70
         *      @return boolean
71
         */
72
        public function valid() {
73
                return key($this->_accountinfo) !== null;
74
        }
75
}