1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 11:05:55 +00:00

Initial go at PHPStan rule level 6.

This commit is contained in:
wn_
2021-11-10 21:38:25 +00:00
parent 87a30d88d3
commit 4cc3374f9f
12 changed files with 93 additions and 48 deletions

View File

@@ -7,7 +7,11 @@ class Errors {
const E_SCHEMA_MISMATCH = "E_SCHEMA_MISMATCH";
const E_URL_SCHEME_MISMATCH = "E_URL_SCHEME_MISMATCH";
static function to_json(string $code, array $params = []) {
/**
* @param Errors::E_* $code
* @param array<string, string> $params
*/
static function to_json(string $code, array $params = []): string {
return json_encode(["error" => ["code" => $code, "params" => $params]]);
}
}