| Total Complexity | 5 |
| Total Lines | 53 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class IdConverter implements Resource |
||
| 9 | { |
||
| 10 | protected $url = 'https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi'; |
||
| 11 | |||
| 12 | protected $queryStringParameters = [ |
||
| 13 | 'query' => [ |
||
| 14 | 'format' => 'json', |
||
| 15 | 'tool' => 'pubpeer', |
||
| 16 | 'email' => '[email protected]', |
||
| 17 | 'version' => 'no', |
||
| 18 | 'ids' => '' |
||
| 19 | ], |
||
| 20 | ]; |
||
| 21 | |||
| 22 | protected $input; |
||
| 23 | |||
| 24 | protected $identifier; |
||
| 25 | |||
| 26 | public function __construct(Identifier $identifier) |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @return string |
||
| 33 | */ |
||
| 34 | public function getApiUrl(): string |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @return array |
||
| 41 | */ |
||
| 42 | public function getRequestOptions(): array |
||
| 43 | { |
||
| 44 | return $this->queryStringParameters; |
||
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @param string $document |
||
| 49 | * |
||
| 50 | * @return array |
||
| 51 | */ |
||
| 52 | public function getDataFrom(string $document): array |
||
| 61 | } |
||
| 62 | } |
||
| 64 |