From ce09209f6c60cc21b17be0558f50cd002e28f74e Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Sun, 19 Nov 2023 17:10:20 +0400 Subject: [PATCH] Add psalm baseline --- psalm-baseline.xml | 589 ++++++++++++++++++++++ psalm.xml | 1 + src/Sender/Console/Renderer/VarDumper.php | 1 + 3 files changed, 591 insertions(+) create mode 100644 psalm-baseline.xml diff --git a/psalm-baseline.xml b/psalm-baseline.xml new file mode 100644 index 00000000..7f3ec765 --- /dev/null +++ b/psalm-baseline.xml @@ -0,0 +1,589 @@ + + + + + $data + + + + + $port + + + + + $output::OUTPUT_RAW + $output::OUTPUT_RAW + + + $logger + + + \is_resource($fp) + + + + $buf === null + + + + + $time + + + $response + + + $time + + + $response + + + + + $time + $time + + + $time + + + + + $payload + getAttribute('begin_at', null)]]> + getAttribute('begin_at', null)]]> + + + $payload + + + + + $offset - $currentPos + + + $headers + $itemHeader + + + + + + + $headers + $itemHeader + $type + + + + + TReturn + + + method]]> + + + {$this->method}(...$arguments)]]> + + + + + $values + $values + $values + $values + + + + + stream->getSize()]]> + + + int + + + + + request->getBody()->getSize() + \array_reduce( + $this->request->getUploadedFiles(), + static fn(int $carry, array $file): int => $carry + $file['size'], + 0 + )]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + $payload + + + int + + + + + + + + + request->getUploadedFiles()]]> + array + + + int + + + request->getBody()->getSize()]]> + + + + + \json_decode($payload, true, JSON_THROW_ON_ERROR) + + + + + SentryEnvelope::fromArray($data, $time), + $data['type'] === SentryStore::SENTRY_FRAME_TYPE => SentryStore::fromArray($data, $time), + default => throw new \InvalidArgumentException('Unknown Sentry frame type.'), + }]]> + + + $data + $data + + + + + + + $data + + + static + + + + + + $item + $item + + + $item + + + + + public function __construct( + + + + + $payload + + + $payload + + + + + $payload + + + + + + + + Files::normalizeSize($size) + + + + + $frame + + + getCookieParams()]]> + getQueryParams()]]> + + + + + + + + + + + $file + $file + $function + + + $output->writeln(]]> + + + + + + + $row + $stacktrace + + + + + + $file + $file + $function + + + + + renderMessageHeader + + + + + + $message + $meta + $tags + + + + + + + + + + + + + payload]]> + $type + + + payload['exceptions']]]> + + + $type + + + $type + + + + + getHeaders()]]> + getHeaders()]]> + + + getClientFilename()]]> + getClientMediaType()]]> + + + + + render + + + + + + + + + + + $context + $controller + $data + $fileLink + + + + + + + $meta + + + $context + + $data + + + $controller + $describer + $fileLink + + + + + $payload + [$data, $context] + + + describe + + + dumper->dump($controller, true)]]> + dumper->dump($data, true)]]> + + + + + $item + + + + \array_keys($data) + + + $item + + + + + $size + + + + + + + + $key + + + $value + + + + + Termwind::renderUsing($output) + new HtmlRenderer() + + + Termwind::renderUsing($output) + + + + + new SplQueue() + + + + + payloadSize]]> + + + \Closure::bind($callable(...), $this) + \Closure::bind($callable(...), $this) + + + + + socket]]> + socket]]> + + + + + new \SplQueue() + + + + + getClass()]]> + $value + $value + + + getName()]]]> + getName()]]]> + + + $value + getName()]]]> + + + getDescriptorByClassName + + + + + + + + + + $value + $values + + + headers[$header]]]> + + + headers[$header]]]> + headers[$new->headerNames[$normalized]]]]> + headers[$header]]]> + headers[$header]]]> + headers[$header]]]> + + + headers[$header]]]> + + + $header + $header + $header + + + string[] + + + + + FieldDataArray + $this->value, + ]]]> + + + + + FileDataArray + $this->fileName, + 'size' => $this->getSize(), + ]]]> + + + + + new File($headers, $name, $fileName), + false => new Field($headers, $name), + }]]> + + + $headers + $headers + $headers + + + static + + + + + $addrs + protocol['BCC'] ?? []]]> + + + protocol]]> + + + $attach + + + $message + + + $attach + $message + + + >]]> + + + $attachments + $messages + + + + + $boundary + $headersBlock + read($blockEnd - $pos + 2)]]> + + + $parts + $result + + + >]]> + array{0: non-empty-string, 1: non-empty-string, 2: non-empty-string} + + + getSize()]]> + + + $value + $value + + + + + $boundary + $headerBlock + + + + + AbstractCloner::$defaultCasters[EnumValue::class] + AbstractCloner::$defaultCasters[MapField::class] + AbstractCloner::$defaultCasters[Message::class] + AbstractCloner::$defaultCasters[RepeatedField::class] + + + AbstractCloner::$defaultCasters[EnumValue::class] + AbstractCloner::$defaultCasters[MapField::class] + AbstractCloner::$defaultCasters[Message::class] + AbstractCloner::$defaultCasters[RepeatedField::class] + + + $value + AbstractCloner::$defaultCasters[EnumValue::class] + AbstractCloner::$defaultCasters[MapField::class] + AbstractCloner::$defaultCasters[Message::class] + AbstractCloner::$defaultCasters[RepeatedField::class] + + + diff --git a/psalm.xml b/psalm.xml index 99fbec79..120f6059 100644 --- a/psalm.xml +++ b/psalm.xml @@ -6,6 +6,7 @@ resolveFromConfigFile="true" findUnusedBaselineEntry="false" findUnusedCode="false" + errorBaseline="psalm-baseline.xml" > diff --git a/src/Sender/Console/Renderer/VarDumper.php b/src/Sender/Console/Renderer/VarDumper.php index 6dcfb948..93b86766 100644 --- a/src/Sender/Console/Renderer/VarDumper.php +++ b/src/Sender/Console/Renderer/VarDumper.php @@ -101,6 +101,7 @@ public function describe(OutputInterface $output, Data $data, array $context, in // Do nothing. } + /** @psalm-suppress InternalMethod, InternalClass */ Common::renderMetadata($output, $meta); $output->writeln('');