From 8b6e472d392519684490b2c5761da6ddff0df451 Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Thu, 12 Dec 2024 23:13:28 +0400 Subject: [PATCH] Integrate psalm --- .github/workflows/psalm.yml | 15 + psalm-baseline.xml | 477 ++++++++++++++++++++++++++++ psalm.xml | 22 ++ src/Traits/InteractsWithConsole.php | 1 + 4 files changed, 515 insertions(+) create mode 100644 .github/workflows/psalm.yml create mode 100644 psalm-baseline.xml create mode 100644 psalm.xml diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml new file mode 100644 index 0000000..4c1f9dd --- /dev/null +++ b/.github/workflows/psalm.yml @@ -0,0 +1,15 @@ +on: + pull_request: null + push: + branches: + - master + - '*.*' + +name: static analysis + +jobs: + psalm: + uses: spiral/gh-actions/.github/workflows/psalm.yml@master + with: + os: >- + ['ubuntu-latest'] diff --git a/psalm-baseline.xml b/psalm-baseline.xml new file mode 100644 index 0000000..ba8fe60 --- /dev/null +++ b/psalm-baseline.xml @@ -0,0 +1,477 @@ + + + + + + + + + + + + + + + + + + + + + + eventDispatcher?->dispatch($event)]]> + + + + + + + + + + + + + + + + + + + + scope)($handler, $bindings)]]> + + + + + + + + + + + + binder]]> + + + + + + + + + + container->get(Http::class)]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + response->getBody(), + true, + )]]> + + + cookies]]> + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + jobs]]> + + + + + + + + connections[$name]]]> + + + connections[$name]]]> + + + + + + + + + connections]]> + + + connections[$name] = $this->container->make(FakeQueue::class, $config)]]> + + + + + + + + data[$name] ?? []]]> + + + + id)]]> + + + + + + + + + + + + + + + + + + + + + + + + data[$this->name][$name]]]> + + + + + + get($offset)]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bootloaders !== null + ? $this->bootloaders + : parent::defineBootloaders()]]> + + + + + + + + + + + + + + defineBootloaders()]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + app]]> + + + makeApp($env, $container)]]> + + + + + + + + + + + + + + + + + + + + + + defaultVerbosityLevel]]> + + + + + + + + + + + + + + getRegisteredBootloaders()]]> + getRegisteredBootloaders()]]> + + + ]]> + + + + + + + + + + + + + + ]]> + + + ]]> + + + + + + + + + + + getContainer()->get(KernelInterface::class)->getRegisteredDispatchers()]]> + + + + + + + + + + + + + []]]> + + + + + + + + getContainer()->make( + FakeEventDispatcher::class, + ['eventsToFake' => $eventsToFake], + )]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + >]]> + + + + + + + + + + >]]> + + + diff --git a/psalm.xml b/psalm.xml new file mode 100644 index 0000000..93b44db --- /dev/null +++ b/psalm.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + diff --git a/src/Traits/InteractsWithConsole.php b/src/Traits/InteractsWithConsole.php index bd5cad7..35f3049 100644 --- a/src/Traits/InteractsWithConsole.php +++ b/src/Traits/InteractsWithConsole.php @@ -55,6 +55,7 @@ final public function runCommand( $input = new ArrayInput($args); $input->setInteractive(false); $output = $output ?? new BufferedOutput(); + /** @psalm-suppress ArgumentTypeCoercion */ $output->setVerbosity($verbosityLevel ?? $this->defaultVerbosityLevel); $this->getConsole()->run($command, $input, $output);