| Total Complexity | 5 |
| Total Lines | 59 |
| Duplicated Lines | 0 % |
| Coverage | 91.67% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class ResponseList |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var \Ocsp\Response[] |
||
| 12 | */ |
||
| 13 | private $responses = []; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Create a new instance. |
||
| 17 | * |
||
| 18 | * @param \Ocsp\Response[] $responses |
||
| 19 | * |
||
| 20 | * @return static |
||
| 21 | */ |
||
| 22 | 2 | public static function create(array $responses = []) |
|
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Add a new response to this list. |
||
| 31 | * |
||
| 32 | * @param \Ocsp\Response $response |
||
| 33 | * |
||
| 34 | * @return $this |
||
| 35 | */ |
||
| 36 | 2 | public function addResponse(Response $response) |
|
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Add new responses to this list. |
||
| 45 | * |
||
| 46 | * @param \Ocsp\Response[] $responses |
||
| 47 | * |
||
| 48 | * @return $this |
||
| 49 | */ |
||
| 50 | 2 | public function addResponses(array $responses) |
|
| 51 | { |
||
| 52 | 2 | foreach ($responses as $response) { |
|
| 53 | $this->addResponse($response); |
||
| 54 | } |
||
| 55 | |||
| 56 | 2 | return $this; |
|
| 57 | } |
||
| 58 | |||
| 59 | /** |
||
| 60 | * Get the response list. |
||
| 61 | * |
||
| 62 | * @return \Ocsp\Response[] |
||
| 63 | */ |
||
| 64 | 2 | public function getResponses() |
|
| 67 | } |
||
| 68 | } |
||
| 69 |