| Total Complexity | 6 |
| Total Lines | 55 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | class RemotePlusResponse { |
||
| 12 | |||
| 13 | /** |
||
| 14 | * @var array An array of SecurityResponse objects. |
||
| 15 | */ |
||
| 16 | protected $responses = []; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * RemotePlusResponse constructor. |
||
| 20 | */ |
||
| 21 | public function __construct() { |
||
| 22 | } |
||
| 23 | |||
| 24 | /** |
||
| 25 | * "Setter" method to add a SecurityResponse object to our array of objects. |
||
| 26 | * @param SecurityResponse $response |
||
| 27 | */ |
||
| 28 | public function addResponse( SecurityResponse $response ){ |
||
| 29 | $this->responses[$response->identifier] = $response; |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Simple getter method to get an array of all the SecurityResponse objects. |
||
| 34 | * @return array |
||
| 35 | */ |
||
| 36 | public function getResponses(){ |
||
| 37 | return $this->responses; |
||
| 38 | } |
||
| 39 | |||
| 40 | |||
| 41 | /** |
||
| 42 | * Pass an item code into this method, and it will return an array of identifier => itemValue. A convenience method. |
||
| 43 | * @param string $item |
||
| 44 | * @return array |
||
| 45 | */ |
||
| 46 | public function getAllValuesForItem(string $item): array{ |
||
| 57 | } |
||
| 58 | |||
| 59 | /** |
||
| 60 | * Getter method to return the SecurityResponse object for a given security's data set. |
||
| 61 | * @param string $identifier |
||
| 62 | * @return SecurityResponse |
||
| 63 | */ |
||
| 64 | public function getByIdentifier(string $identifier): SecurityResponse{ |
||
| 68 | } |