diff --git a/inc/bootstrap.php b/inc/bootstrap.php index 3a1bf4d..6429f20 100644 --- a/inc/bootstrap.php +++ b/inc/bootstrap.php @@ -1,12 +1,9 @@ accessToken = $data['access_token'] ?? null; + $this->accessToken = $data['access_token'] ?? null; $this->refreshToken = $data['access_token'] ?? null; return $this; } @@ -43,8 +45,12 @@ class YandexIoT * @return array * @throws JsonException */ - public static function sendRequest(string $url, array $headers = [], ?array $data = null, ?string $method = null): array - { + public static function sendRequest( + string $url, + array $headers = [], + ?array $data = null, + ?string $method = null + ): array { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); diff --git a/prometheus.php b/prometheus.php index 7eaf0cd..aa72022 100644 --- a/prometheus.php +++ b/prometheus.php @@ -1,5 +1,11 @@