Skip to content

Commit

Permalink
fix: Fix undefined functions usage (#1022)
Browse files Browse the repository at this point in the history
  • Loading branch information
theofidry authored Oct 6, 2023
1 parent 6fb25dd commit 8ca406a
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Annotation/DocblockAnnotationParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
use phpDocumentor\Reflection\DocBlock\Tags\Formatter;
use phpDocumentor\Reflection\DocBlockFactoryInterface;
use function array_filter;
use function array_flip;
use function array_key_exists;
use function array_map;
use function array_values;
use function Safe\array_flip;

/**
* @private
Expand Down
2 changes: 1 addition & 1 deletion src/Console/Command/Extract.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public function execute(IO $io): int

if ($canDelete) {
remove($outputDir);
// Continue
// Continue
} else {
// Do nothing
return ExitCode::FAILURE;
Expand Down
4 changes: 2 additions & 2 deletions src/FileSystem/FileSystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ public function remove($files): void
// MODIFIED CODE
if (defined('PHP_WINDOWS_VERSION_BUILD') && is_dir($file)) {
exec(sprintf('rd /s /q %s', escapeshellarg($file)));
// - MODIFIED CODE
// - MODIFIED CODE
} elseif (is_link($file)) {
// See https://bugs.php.net/52176
if (!@(unlink($file) || '\\' !== DIRECTORY_SEPARATOR || rmdir($file)) && file_exists($file)) {
Expand All @@ -562,7 +562,7 @@ public function remove($files): void
$error = error_get_last();

throw new IOException(sprintf('Failed to remove file "%s": %s.', $file, $error['message']));
// MODIFIED CODE
// MODIFIED CODE
} elseif (file_exists($file)) {
throw new IOException(sprintf('Failed to remove file "%s".', $file));
// - MODIFIED CODE
Expand Down
2 changes: 1 addition & 1 deletion tests/PhpScoper/DummyPatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
namespace KevinGH\Box\PhpScoper;

use Humbug\PhpScoper\Patcher\Patcher;
use function Safe\sprintf;
use function sprintf;

final class DummyPatcher implements Patcher
{
Expand Down
2 changes: 1 addition & 1 deletion tests/PhpScoper/SerializablePatcherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
namespace KevinGH\Box\PhpScoper;

use PHPUnit\Framework\TestCase;
use function Safe\sprintf;
use function serialize;
use function sprintf;
use function unserialize;

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/UnsupportedMethodCall.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
namespace KevinGH\Box;

use DomainException;
use function Safe\sprintf;
use function sprintf;

final class UnsupportedMethodCall extends DomainException
{
Expand Down

0 comments on commit 8ca406a

Please sign in to comment.