Skip to content

Commit

Permalink
Fix psalm issues
Browse files Browse the repository at this point in the history
  • Loading branch information
roxblnfk committed Jan 23, 2024
1 parent 55bebf9 commit e5a6f1a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Client/TrapHandle/Dumper.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ final class Dumper

public static function dump(mixed $var, string|int|null $label = null, int $depth = 0): mixed
{
/** @psalm-suppress RiskyTruthyFalsyComparison */
return (self::$handler ??= self::registerHandler())($var, empty($label) ? null : (string)$label, $depth);
}

Expand Down Expand Up @@ -72,6 +73,7 @@ public static function setDumper(?DataDumperInterface $dumper = null): Closure
* @return Closure(mixed, string|null, int): mixed
*
* @author Nicolas Grekas <p@tchwork.com>
* @psalm-suppress RiskyTruthyFalsyComparison
*/
private static function registerHandler(): Closure
{
Expand Down
3 changes: 3 additions & 0 deletions src/Sender/Console/Renderer/Sentry/Exceptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ public static function render(OutputInterface $output, mixed $exceptions): void

/**
* Renders the trace of the exception.
*
* @psalm-suppress RiskyTruthyFalsyComparison
*/
private static function renderTrace(OutputInterface $output, array $frames, bool $verbose = false): void
{
Expand All @@ -82,6 +84,7 @@ private static function renderTrace(OutputInterface $output, array $frames, bool
$file = $getValue($frame, 'filename');
$line = $getValue($frame, 'lineno', null);
$class = $getValue($frame, 'class');
/** @psalm-suppress RiskyTruthyFalsyComparison */
$class = empty($class) ? '' : $class . '::';
$function = $getValue($frame, 'function');

Expand Down
3 changes: 3 additions & 0 deletions src/Sender/Console/Renderer/VarDumper.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ public function __construct(
) {
}

/**
* @psalm-suppress RiskyTruthyFalsyComparison
*/
public function describe(OutputInterface $output, Data $data, array $context, int $clientId): void
{
Common::renderHeader1($output, 'DUMP');
Expand Down
1 change: 1 addition & 0 deletions src/Socket/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ public function process(): void
while (!$this->cancelled and false !== ($socket = \socket_accept($this->socket))) {
$client = null;
try {
/** @psalm-suppress MixedArgument */
$client = Client::init($socket, $this->payloadSize);
$key = (int)\array_key_last($this->clients) + 1;
$this->clients[$key] = $client;
Expand Down

0 comments on commit e5a6f1a

Please sign in to comment.