Skip to content
Closed
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 @@ -694,7 +693,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 @@ -773,7 +772,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 @@ -676,7 +675,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 @@ -755,7 +754,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
Binary file modified updater.phar
Binary file not shown.

This file was deleted.

80 changes: 0 additions & 80 deletions vendor/bamarni/composer-bin-plugin/.github/workflows/tests.yaml

This file was deleted.

61 changes: 0 additions & 61 deletions vendor/bamarni/composer-bin-plugin/.makefile/touch.sh

This file was deleted.

6 changes: 0 additions & 6 deletions vendor/bamarni/composer-bin-plugin/.phive/phars.xml

This file was deleted.

2 changes: 1 addition & 1 deletion vendor/bamarni/composer-bin-plugin/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^1.8",
"phpstan/phpstan-phpunit": "^1.1",
"phpunit/phpunit": "^8.5 || ^9.5",
"phpunit/phpunit": "^8.5 || ^9.6 || ^10.0",
"symfony/console": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0",
"symfony/finder": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0",
"symfony/process": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Throwable;

use function count;
use function in_array;
use function sprintf;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Throwable;

use function chdir;
use function count;
use function file_exists;
Expand All @@ -30,6 +31,7 @@
use function mkdir;
use function putenv;
use function sprintf;

use const GLOB_ONLYDIR;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace Bamarni\Composer\Bin\Command;

use RuntimeException;

use function sprintf;

final class CouldNotCreateNamespaceDir extends RuntimeException
Expand Down
1 change: 1 addition & 0 deletions vendor/bamarni/composer-bin-plugin/src/Config/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace Bamarni\Composer\Bin\Config;

use Composer\Composer;

use function array_key_exists;
use function array_merge;
use function function_exists;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\StringInput;

use function array_filter;
use function array_map;
use function implode;
Expand Down Expand Up @@ -61,7 +62,7 @@ public static function createInput(
public static function createNamespaceInput(InputInterface $previousInput): InputInterface
{
$matchResult = preg_match(
'/^(.+?\s?)(--(?: .+)?)?$/',
'/^([^\s]+)(.*?\s?)(--(?: .+)?)?$/',
$previousInput->__toString(),
$matches
);
Expand All @@ -77,6 +78,7 @@ public static function createNamespaceInput(InputInterface $previousInput): Inpu
$matches[1],
'--working-dir=.',
$matches[2] ?? '',
$matches[3] ?? '',
]
)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use RuntimeException;
use Symfony\Component\Console\Input\InputInterface;

use function sprintf;

final class InvalidBinInput extends RuntimeException
Expand Down
Loading
Loading