From 42613618a503ed25d00d57f9ff8271af0a5c9c7a Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Wed, 10 Jun 2020 10:31:54 +0100 Subject: [PATCH] phpstan: add LevelDB::get() stub to fix return type --- phpstan.neon.dist | 1 + tests/phpstan/stubs/leveldb.stub | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 tests/phpstan/stubs/leveldb.stub diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 27c44f900..0dde04ced 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -32,6 +32,7 @@ parameters: stubFiles: - tests/phpstan/stubs/pthreads.stub - tests/phpstan/stubs/chunkutils.stub + - tests/phpstan/stubs/leveldb.stub reportUnmatchedIgnoredErrors: false #no other way to silence platform-specific non-warnings staticReflectionClassNamePatterns: - "#^COM$#" diff --git a/tests/phpstan/stubs/leveldb.stub b/tests/phpstan/stubs/leveldb.stub new file mode 100644 index 000000000..0b8a4f7cc --- /dev/null +++ b/tests/phpstan/stubs/leveldb.stub @@ -0,0 +1,11 @@ + $read_options + * + * @return string|false + */ + public function get($key, array $read_options = []){} +} \ No newline at end of file