Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ class LogException extends \Exception {


use Closure;
use CurlHandle;

class Updater {
/** @var int */
Expand Down Expand Up @@ -692,7 +691,7 @@ private function getDownloadURLs(): array {

}

private function getCurl(string $url): CurlHandle {
private function getCurl(string $url): \CurlHandle {
$ch = curl_init($url);
if ($ch === false) {
throw new \Exception('Fail to open cUrl handler');
Expand Down Expand Up @@ -771,7 +770,7 @@ private function isAbleToDecompress(string $ext): bool {
return $ext === 'zip' && extension_loaded($ext);
}

private function downloadProgressCallback(CurlHandle $resource, int $download_size, int $downloaded): void {
private function downloadProgressCallback(\CurlHandle $resource, int $download_size, int $downloaded): void {
if ($download_size !== 0) {
$progress = (int)round($downloaded * 100 / $download_size);
if ($progress > $this->previousProgress) {
Expand Down
5 changes: 2 additions & 3 deletions lib/Updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
namespace NC\Updater;

use Closure;
use CurlHandle;

class Updater {
/** @var int */
Expand Down Expand Up @@ -674,7 +673,7 @@ private function getDownloadURLs(): array {

}

private function getCurl(string $url): CurlHandle {
private function getCurl(string $url): \CurlHandle {
$ch = curl_init($url);
if ($ch === false) {
throw new \Exception('Fail to open cUrl handler');
Expand Down Expand Up @@ -753,7 +752,7 @@ private function isAbleToDecompress(string $ext): bool {
return $ext === 'zip' && extension_loaded($ext);
}

private function downloadProgressCallback(CurlHandle $resource, int $download_size, int $downloaded): void {
private function downloadProgressCallback(\CurlHandle $resource, int $download_size, int $downloaded): void {
if ($download_size !== 0) {
$progress = (int)round($downloaded * 100 / $download_size);
if ($progress > $this->previousProgress) {
Expand Down
Loading