From 7f38b97be8a8d081a20c366913d8328904e03c2b Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Mon, 30 Oct 2023 08:59:28 +0100 Subject: [PATCH] Delete lib/FilterApplication.php --- lib/FilterApplication.php | 85 --------------------------------------- 1 file changed, 85 deletions(-) delete mode 100644 lib/FilterApplication.php diff --git a/lib/FilterApplication.php b/lib/FilterApplication.php deleted file mode 100644 index bf7f88f..0000000 --- a/lib/FilterApplication.php +++ /dev/null @@ -1,85 +0,0 @@ -filter($filterKey); - - $this->printResult($errors); - } - - if ($numBaselines > 0) { - return self::EXIT_SUCCESS; - } - - return self::EXIT_ERROR; - } - - /** - * @api - */ - public function help(): void - { - printf('USAGE: phpstan-baseline-filter '); - } - - /** - * @param list $errors - */ - private function printResult(array $errors): void - { - $ignoreErrors = []; - foreach ($errors as $error) { - $ignoreErrors[] = [ - 'message' => $error->message, - 'count' => $error->count, - 'path' => $error->path, - ]; - - } - - // encode analog PHPStan - $neon = Neon::encode([ - 'parameters' => [ - 'ignoreErrors' => $ignoreErrors, - ], - ], Neon::BLOCK); - - if (substr($neon, -2) !== "\n\n") { - throw new ShouldNotHappenException(); - } - - echo substr($neon, 0, -1); - } -}