| Total Complexity | 4 |
| Total Lines | 50 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class IdentifierResolver |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * List of available Identifiers. |
||
| 11 | * |
||
| 12 | * @var array |
||
| 13 | */ |
||
| 14 | protected $identifiers = [ |
||
| 15 | Identifiers\BioRxiv::class, |
||
| 16 | Identifiers\Figshare::class, |
||
| 17 | Identifiers\Doi::class, |
||
| 18 | Identifiers\Arxiv::class, |
||
| 19 | Identifiers\Pubmed::class, |
||
| 20 | ]; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * The query string. |
||
| 24 | * |
||
| 25 | * @var string |
||
| 26 | */ |
||
| 27 | private $queryString; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Identifier constructor. |
||
| 31 | * |
||
| 32 | * @param string $queryString |
||
| 33 | */ |
||
| 34 | public function __construct(string $queryString) |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Resolves the Identifier;. |
||
| 41 | * |
||
| 42 | * @return Identifiers\Identifier |
||
| 43 | * |
||
| 44 | * @throws UnknownIdentifierException |
||
| 45 | */ |
||
| 46 | public function handle() |
||
| 59 |