| 1 | <?php |
||
| 14 | class Request |
||
| 15 | { |
||
| 16 | private $api_key; |
||
|
|
|||
| 17 | |||
| 18 | /** |
||
| 19 | * Request constructor. |
||
| 20 | */ |
||
| 21 | public function __construct() |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @inheritdoc |
||
| 29 | * |
||
| 30 | * @param string $api_key |
||
| 31 | */ |
||
| 32 | public function setApiKey(string $api_key) |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Authenticate the request |
||
| 39 | * |
||
| 40 | * @return bool |
||
| 41 | */ |
||
| 42 | public function authenticate() |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Is OPTIONS request |
||
| 50 | * |
||
| 51 | * @return bool |
||
| 52 | */ |
||
| 53 | public function isOptionRequest() |
||
| 57 | |||
| 58 | /** |
||
| 59 | * Is recieved API KEY valid |
||
| 60 | * |
||
| 61 | * @return bool |
||
| 62 | */ |
||
| 63 | private function apikeyIsValid() |
||
| 68 | } |
||
| 69 |
This check marks private properties in classes that are never used. Those properties can be removed.