Skip to content

Commit

Permalink
fix: Fix bad imports in the diff command
Browse files Browse the repository at this point in the history
  • Loading branch information
theofidry committed Oct 8, 2023
1 parent e845387 commit a5f05b4
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
20 changes: 10 additions & 10 deletions src/Console/Command/Diff.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,19 +150,19 @@ private function compareArchives(PharDiff $diff, IO $io): int
{
$io->comment('<info>Comparing the two archives... (do not check the signatures)</info>');

$pharInfoA = $diff->getPharA();
$pharInfoB = $diff->getPharB();
$pharInfoA = $diff->getPharInfoA();
$pharInfoB = $diff->getPharInfoB();

self::renderArchive(
$diff->getPharA()->getFileName(),
$diff->getPharInfoA()->getFileName(),
$pharInfoA,
$io,
);

$io->newLine();

self::renderArchive(
$diff->getPharB()->getFileName(),
$diff->getPharInfoB()->getFileName(),
$pharInfoB,
$io,
);
Expand Down Expand Up @@ -203,19 +203,19 @@ private function compareContents(PharDiff $diff, IO $io): int

$io->writeln(sprintf(
'--- Files present in "%s" but not in "%s"',
$diff->getPharA()->getFileName(),
$diff->getPharB()->getFileName(),
$diff->getPharInfoA()->getFileName(),
$diff->getPharInfoB()->getFileName(),
));
$io->writeln(sprintf(
'+++ Files present in "%s" but not in "%s"',
$diff->getPharB()->getFileName(),
$diff->getPharA()->getFileName(),
$diff->getPharInfoB()->getFileName(),
$diff->getPharInfoA()->getFileName(),
));

$io->newLine();

self::renderPaths('-', $diff->getPharA(), $diffResult[0], $io);
self::renderPaths('+', $diff->getPharB(), $diffResult[1], $io);
self::renderPaths('-', $diff->getPharInfoA(), $diffResult[0], $io);
self::renderPaths('+', $diff->getPharInfoB(), $diffResult[1], $io);

$io->error(sprintf(
'%d file(s) difference',
Expand Down
3 changes: 1 addition & 2 deletions src/Phar/PharDiff.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@
* with this source code in the file LICENSE.
*/

namespace KevinGH\Box\PharInfo;
namespace KevinGH\Box\Phar;

use KevinGH\Box\Phar\PharInfo;
use KevinGH\Box\Pharaoh\PharDiff as ParagoniePharDiff;
use SplFileInfo;
use Symfony\Component\Finder\Finder;
Expand Down
2 changes: 1 addition & 1 deletion src/Pharaoh/PharDiff.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@

namespace KevinGH\Box\Pharaoh;

use KevinGH\Box\Phar\IncompariblePhars;
use KevinGH\Box\Phar\PharInfo;
use KevinGH\Box\PharInfo\IncompariblePhars;
use ParagonIE\ConstantTime\Hex;
use ParagonIE_Sodium_File;
use RecursiveDirectoryIterator;
Expand Down
2 changes: 1 addition & 1 deletion tests/Console/Command/DiffTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
use Fidry\Console\DisplayNormalizer;
use Fidry\Console\ExitCode;
use InvalidArgumentException;
use KevinGH\Box\Phar\IncompariblePhars;
use KevinGH\Box\Phar\InvalidPhar;
use KevinGH\Box\PharInfo\IncompariblePhars;
use KevinGH\Box\Test\CommandTestCase;
use KevinGH\Box\Test\RequiresPharReadonlyOff;
use Symfony\Component\Console\Output\OutputInterface;
Expand Down

0 comments on commit a5f05b4

Please sign in to comment.