Skip to content

Commit

Permalink
Render error identifier when ran verbose (#15)
Browse files Browse the repository at this point in the history
* Render error identifier when ran verbose

* Add test

* fix phpstan

* run fix-cs

* use parent identifier getAnalysisResult

* Apply review feedback
  • Loading branch information
SanderMuller authored Jan 7, 2025
1 parent d07946f commit 0ebe8c3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/vendor
composer.lock
.idea

# phpunit 10+
/.phpunit.cache
2 changes: 1 addition & 1 deletion src/Console/Terminal.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ private static function readFromProcess(string $command): ?string

private static function getAnsiconWidth(): ?int
{
if (!is_string(\getenv('ANSICON'))) {
if (! is_string(\getenv('ANSICON'))) {
return null;
}

Expand Down
4 changes: 4 additions & 0 deletions src/ErrorFormatter/SymplifyErrorFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ private function printSingleError(Error $error, OutputStyle $outputStyle): void
$itemMessage = sprintf(" - '%s'", $regexMessage);
$this->writeln($itemMessage);

if ($error->getIdentifier() !== null && $error->canBeIgnored()) {
$this->writeln(' 🪪 ' . $error->getIdentifier());
}

$this->separator();
$outputStyle->newLine();
}
Expand Down
1 change: 0 additions & 1 deletion src/TypeResolver/ClassConstFetchReturnTypeResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use PhpParser\Node\Identifier;
use PhpParser\Node\Name;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\MixedType;
use PHPStan\Type\ObjectType;
use PHPStan\Type\Type;
Expand Down

0 comments on commit 0ebe8c3

Please sign in to comment.