| 1 | <?php |
||
| 19 | final class Authentication |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * The key that makes requests against the |
||
| 23 | * API to receive a higher request quota. |
||
| 24 | * |
||
| 25 | * @var string |
||
| 26 | */ |
||
| 27 | private $key; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * The access token. |
||
| 31 | * |
||
| 32 | * @var string |
||
| 33 | */ |
||
| 34 | private $accessToken; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Constructor. |
||
| 38 | * |
||
| 39 | * @param string $aKey The key |
||
| 40 | * @param string $anAccessToken The access token |
||
| 41 | */ |
||
| 42 | public function __construct($aKey, $anAccessToken) |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Gets the key. |
||
| 50 | * |
||
| 51 | * @return string |
||
| 52 | */ |
||
| 53 | public function key() |
||
| 57 | |||
| 58 | /** |
||
| 59 | * Gets the access token. |
||
| 60 | * |
||
| 61 | * @return string |
||
| 62 | */ |
||
| 63 | public function accessToken() |
||
| 67 | |||
| 68 | /** |
||
| 69 | * Gets the key and access token in array format. |
||
| 70 | * |
||
| 71 | * @return array |
||
|
|
|||
| 72 | */ |
||
| 73 | public function toArray() |
||
| 77 | |||
| 78 | /** |
||
| 79 | * Gets the key and access token in url format. |
||
| 80 | * |
||
| 81 | * @return string |
||
| 82 | */ |
||
| 83 | public function toUrl() |
||
| 87 | } |
||
| 88 |
This check looks for the generic type
arrayas a return type and suggests a more specific type. This type is inferred from the actual code.