From dfe296e181d212f20e9ee5412a175bc6ef1f8f15 Mon Sep 17 00:00:00 2001 From: "s.poniecki" Date: Wed, 11 Oct 2017 14:16:39 +0200 Subject: [PATCH] Allow return type resource --- .../Sniffs/Docblock/ReturnTypeSniff.php | 1 + tests/rules/doc/allowed/ReturnTypeResource.php | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 tests/rules/doc/allowed/ReturnTypeResource.php diff --git a/custom-standards/Flyeralarm/Sniffs/Docblock/ReturnTypeSniff.php b/custom-standards/Flyeralarm/Sniffs/Docblock/ReturnTypeSniff.php index 5f4a94e..3d92aea 100644 --- a/custom-standards/Flyeralarm/Sniffs/Docblock/ReturnTypeSniff.php +++ b/custom-standards/Flyeralarm/Sniffs/Docblock/ReturnTypeSniff.php @@ -15,6 +15,7 @@ class ReturnTypeSniff implements Sniff 'int', 'string', 'float', + 'resource', 'array', 'bool[]', 'int[]', diff --git a/tests/rules/doc/allowed/ReturnTypeResource.php b/tests/rules/doc/allowed/ReturnTypeResource.php new file mode 100644 index 0000000..215ee49 --- /dev/null +++ b/tests/rules/doc/allowed/ReturnTypeResource.php @@ -0,0 +1,16 @@ +