From 273aa208e7a9eb97c1cd0552851f4d7c7ce68d2b Mon Sep 17 00:00:00 2001 From: Matias Navarro Carter Date: Thu, 29 Apr 2021 15:10:50 +0100 Subject: [PATCH] Moved test reader to source --- src/ResourceHelper.php | 1 + {tests => src}/TestReader.php | 3 +++ tests/.gitignore | 0 3 files changed, 4 insertions(+) rename {tests => src}/TestReader.php (90%) create mode 100644 tests/.gitignore diff --git a/src/ResourceHelper.php b/src/ResourceHelper.php index 2891213..dbe188c 100644 --- a/src/ResourceHelper.php +++ b/src/ResourceHelper.php @@ -28,6 +28,7 @@ trait ResourceHelper { /** * @var resource + * @psalm-var resource|closed-resource */ private $resource; diff --git a/tests/TestReader.php b/src/TestReader.php similarity index 90% rename from tests/TestReader.php rename to src/TestReader.php index d52eaea..a355889 100644 --- a/tests/TestReader.php +++ b/src/TestReader.php @@ -17,6 +17,9 @@ /** * Class TestReader. + * + * This reader is designed to be used in tests, as it is somewhat complex to + * mock methods that take arguments passed by reference. */ final class TestReader implements ReadSeeker { diff --git a/tests/.gitignore b/tests/.gitignore new file mode 100644 index 0000000..e69de29