feat: improves DX on auto-complete

This commit is contained in:
Nuno Maduro
2023-02-17 21:02:07 +00:00
parent efca71f1e7
commit 49619ff2b5
5 changed files with 7 additions and 10 deletions

View File

@ -40,8 +40,8 @@ use function array_diff;
use function array_values;
use function basename;
use function class_exists;
use function get_declared_classes;
use Exception;
use function get_declared_classes;
use Pest\Contracts\HasPrintableTestCaseName;
use Pest\TestCases\IgnorableTestCase;
use Pest\TestSuite;
@ -108,7 +108,6 @@ final class TestSuiteLoader
if (
is_subclass_of($loadedClass, HasPrintableTestCaseName::class)
|| is_subclass_of($loadedClass, TestCase::class)) {
try {
$class = new ReflectionClass($loadedClass);
// @codeCoverageIgnoreStart

View File

@ -14,6 +14,7 @@ parameters:
ignoreErrors:
- "#Language construct isset\\(\\) should not be used.#"
- "#is not allowed to extend#"
- "#is concrete, but does not have a Test suffix#"
- "#with a nullable type declaration#"
- "#type mixed is not subtype of native#"
- "# with null as default value#"

View File

@ -88,7 +88,7 @@ if (! function_exists('test')) {
* is the test description; the second argument is
* a closure that contains the test expectations.
*
* @return HigherOrderTapProxy<TestCall|TestCase>|TestCall|mixed
* @return TestCall|TestCase|mixed
*/
function test(string $description = null, Closure $closure = null): HigherOrderTapProxy|TestCall
{
@ -108,7 +108,7 @@ if (! function_exists('it')) {
* is the test description; the second argument is
* a closure that contains the test expectations.
*
* @return HigherOrderTapProxy<TestCall|TestCase>|TestCall|mixed
* @return TestCall|TestCase|mixed
*/
function it(string $description, Closure $closure = null): TestCall
{
@ -127,7 +127,7 @@ if (! function_exists('todo')) {
* is marked as incomplete. Yet, Collision, Pest's
* printer, will display it as a "todo" test.
*
* @return HigherOrderTapProxy<TestCall|TestCase>|TestCall|mixed
* @return TestCall|TestCase|mixed
*/
function todo(string $description): TestCall
{

View File

@ -15,11 +15,12 @@ use Pest\Support\Exporter;
use Pest\Support\HigherOrderCallables;
use Pest\Support\NullClosure;
use Pest\TestSuite;
use PHPUnit\Framework\TestCase;
/**
* @internal
*
* @mixin HigherOrderCallables
* @mixin HigherOrderCallables|TestCase
*/
final class TestCall
{

View File

@ -10,10 +10,6 @@ use Throwable;
/**
* @internal
*
* @template TProxy
*
* @mixin TProxy
*/
final class HigherOrderTapProxy
{