From bc783e7cb4cb3440232a5e44584eb2afe2668ce2 Mon Sep 17 00:00:00 2001 From: matticbot Date: Thu, 18 Apr 2024 19:26:43 +0000 Subject: [PATCH 1/2] phan: Update custom stubs --- .phan/stubs/phpunit-stubs.php | 13444 +++++++++---------- .phan/stubs/woocommerce-internal-stubs.php | 2 +- 2 files changed, 6723 insertions(+), 6723 deletions(-) diff --git a/.phan/stubs/phpunit-stubs.php b/.phan/stubs/phpunit-stubs.php index 0708b0301c7bb..4d17f21cb3353 100644 --- a/.phan/stubs/phpunit-stubs.php +++ b/.phan/stubs/phpunit-stubs.php @@ -19,143 +19,150 @@ interface Exception extends \Throwable /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class ActualValueIsNotAnObjectException extends \PHPUnit\Framework\Exception +interface SelfDescribing { - public function __construct() - { - } - public function __toString(): string - { - } + /** + * Returns a string representation of the object. + */ + public function toString(): string; } /** - * @internal This class is not covered by the backward compatibility promise for PHPUnit + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class ComparisonMethodDoesNotDeclareBoolReturnTypeException extends \PHPUnit\Framework\Exception +interface Test extends \Countable { - public function __construct(string $className, string $methodName) - { - } - public function __toString(): string - { - } + /** + * Runs a test and collects its result in a TestResult instance. + */ + public function run(?\PHPUnit\Framework\TestResult $result = null): \PHPUnit\Framework\TestResult; } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class InvalidDataProviderException extends \PHPUnit\Framework\Exception +interface IncompleteTest extends \Throwable { } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class ComparisonMethodDoesNotExistException extends \PHPUnit\Framework\Exception +interface Reorderable { - public function __construct(string $className, string $methodName) - { - } - public function __toString(): string - { - } + public function sortId(): string; + /** + * @return list + */ + public function provides(): array; + /** + * @return list + */ + public function requires(): array; } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class ComparisonMethodDoesNotDeclareExactlyOneParameterException extends \PHPUnit\Framework\Exception +class SyntheticError extends \PHPUnit\Framework\AssertionFailedError { - public function __construct(string $className, string $methodName) + /** + * The synthetic file. + * + * @var string + */ + protected $syntheticFile = ''; + /** + * The synthetic line number. + * + * @var int + */ + protected $syntheticLine = 0; + /** + * The synthetic trace. + * + * @var array + */ + protected $syntheticTrace = []; + public function __construct(string $message, int $code, string $file, int $line, array $trace) { } - public function __toString(): string + public function getSyntheticFile(): string { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class CoveredCodeNotExecutedException extends \PHPUnit\Framework\RiskyTestError -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class SyntheticSkippedError extends \PHPUnit\Framework\SyntheticError implements \PHPUnit\Framework\SkippedTest -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ComparisonMethodDoesNotAcceptParameterTypeException extends \PHPUnit\Framework\Exception -{ - public function __construct(string $className, string $methodName, string $type) + public function getSyntheticLine(): int { } - public function __toString(): string + public function getSyntheticTrace(): array { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class ComparisonMethodDoesNotDeclareParameterTypeException extends \PHPUnit\Framework\Exception +final class InvalidArgumentException extends \PHPUnit\Framework\Exception { - public function __construct(string $className, string $methodName) - { - } - public function __toString(): string + public static function create(int $argument, string $type): self { } } /** - * Exception for expectations which failed their check. + * Base class for all PHPUnit Framework exceptions. * - * The exception contains the error message and optionally a - * SebastianBergmann\Comparator\ComparisonFailure which is used to - * generate diff output of the failed expectations. + * Ensures that exceptions thrown during a test run do not leave stray + * references behind. + * + * Every Exception contains a stack trace. Each stack frame contains the 'args' + * of the called function. The function arguments can contain references to + * instantiated objects. The references prevent the objects from being + * destructed (until test results are eventually printed), so memory cannot be + * freed up. + * + * With enabled process isolation, test results are serialized in the child + * process and unserialized in the parent process. The stack trace of Exceptions + * may contain objects that cannot be serialized or unserialized (e.g., PDO + * connections). Unserializing user-space objects from the child process into + * the parent would break the intended encapsulation of process isolation. + * + * @see http://fabien.potencier.org/article/9/php-serialization-stack-traces-and-exceptions * * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class ExpectationFailedException extends \PHPUnit\Framework\AssertionFailedError +class Exception extends \RuntimeException implements \PHPUnit\Exception { - public function __construct(string $message, ?\SebastianBergmann\Comparator\ComparisonFailure $comparisonFailure = null, ?\Exception $previous = null) + /** + * @var array + */ + protected $serializableTrace; + public function __construct($message = '', $code = 0, ?\Throwable $previous = null) { } - public function getComparisonFailure(): ?\SebastianBergmann\Comparator\ComparisonFailure + public function __toString(): string + { + } + public function __sleep(): array { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -class AssertionFailedError extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\SelfDescribing -{ /** - * Wrapper for getMessage() which is declared as final. + * Returns the serializable trace (without 'args'). */ - public function toString(): string + public function getSerializableTrace(): array { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class SkippedTestSuiteError extends \PHPUnit\Framework\AssertionFailedError implements \PHPUnit\Framework\SkippedTest +final class CoveredCodeNotExecutedException extends \PHPUnit\Framework\RiskyTestError { } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class OutputError extends \PHPUnit\Framework\AssertionFailedError +class CodeCoverageException extends \PHPUnit\Framework\Exception { } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class InvalidArgumentException extends \PHPUnit\Framework\Exception +final class MissingCoversAnnotationException extends \PHPUnit\Framework\RiskyTestError { - public static function create(int $argument, string $type): self - { - } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit @@ -172,14 +179,8 @@ public function toString(): string /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class Error extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\SelfDescribing +final class InvalidDataProviderException extends \PHPUnit\Framework\Exception { - /** - * Wrapper for getMessage() which is declared as final. - */ - public function toString(): string - { - } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit @@ -194,165 +195,199 @@ final class IncompleteTestError extends \PHPUnit\Framework\AssertionFailedError { } /** - * Base class for all PHPUnit Framework exceptions. - * - * Ensures that exceptions thrown during a test run do not leave stray - * references behind. - * - * Every Exception contains a stack trace. Each stack frame contains the 'args' - * of the called function. The function arguments can contain references to - * instantiated objects. The references prevent the objects from being - * destructed (until test results are eventually printed), so memory cannot be - * freed up. - * - * With enabled process isolation, test results are serialized in the child - * process and unserialized in the parent process. The stack trace of Exceptions - * may contain objects that cannot be serialized or unserialized (e.g., PDO - * connections). Unserializing user-space objects from the child process into - * the parent would break the intended encapsulation of process isolation. + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class SyntheticSkippedError extends \PHPUnit\Framework\SyntheticError implements \PHPUnit\Framework\SkippedTest +{ +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class SkippedTestError extends \PHPUnit\Framework\AssertionFailedError implements \PHPUnit\Framework\SkippedTest +{ +} +/** + * Exception for expectations which failed their check. * - * @see http://fabien.potencier.org/article/9/php-serialization-stack-traces-and-exceptions + * The exception contains the error message and optionally a + * SebastianBergmann\Comparator\ComparisonFailure which is used to + * generate diff output of the failed expectations. * * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -class Exception extends \RuntimeException implements \PHPUnit\Exception +final class ExpectationFailedException extends \PHPUnit\Framework\AssertionFailedError { - /** - * @var array - */ - protected $serializableTrace; - public function __construct($message = '', $code = 0, ?\Throwable $previous = null) + public function __construct(string $message, ?\SebastianBergmann\Comparator\ComparisonFailure $comparisonFailure = null, ?\Exception $previous = null) { } - public function __toString(): string + public function getComparisonFailure(): ?\SebastianBergmann\Comparator\ComparisonFailure { } - public function __sleep(): array +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class ActualValueIsNotAnObjectException extends \PHPUnit\Framework\Exception +{ + public function __construct() { } - /** - * Returns the serializable trace (without 'args'). - */ - public function getSerializableTrace(): array + public function __toString(): string { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -class CodeCoverageException extends \PHPUnit\Framework\Exception +class RiskyTestError extends \PHPUnit\Framework\AssertionFailedError { } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class NoChildTestSuiteException extends \PHPUnit\Framework\Exception +final class ComparisonMethodDoesNotDeclareParameterTypeException extends \PHPUnit\Framework\Exception { + public function __construct(string $className, string $methodName) + { + } + public function __toString(): string + { + } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -class RiskyTestError extends \PHPUnit\Framework\AssertionFailedError +final class UnintentionallyCoveredCodeError extends \PHPUnit\Framework\RiskyTestError { } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class UnintentionallyCoveredCodeError extends \PHPUnit\Framework\RiskyTestError +final class OutputError extends \PHPUnit\Framework\AssertionFailedError { } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -class SyntheticError extends \PHPUnit\Framework\AssertionFailedError +final class ComparisonMethodDoesNotExistException extends \PHPUnit\Framework\Exception { - /** - * The synthetic file. - * - * @var string - */ - protected $syntheticFile = ''; - /** - * The synthetic line number. - * - * @var int - */ - protected $syntheticLine = 0; - /** - * The synthetic trace. - * - * @var array - */ - protected $syntheticTrace = []; - public function __construct(string $message, int $code, string $file, int $line, array $trace) - { - } - public function getSyntheticFile(): string + public function __construct(string $className, string $methodName) { } - public function getSyntheticLine(): int - { - } - public function getSyntheticTrace(): array + public function __toString(): string { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class SkippedTestError extends \PHPUnit\Framework\AssertionFailedError implements \PHPUnit\Framework\SkippedTest +final class SkippedTestSuiteError extends \PHPUnit\Framework\AssertionFailedError implements \PHPUnit\Framework\SkippedTest { } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class MissingCoversAnnotationException extends \PHPUnit\Framework\RiskyTestError +final class NoChildTestSuiteException extends \PHPUnit\Framework\Exception { } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class PHPTAssertionFailedError extends \PHPUnit\Framework\SyntheticError +final class ComparisonMethodDoesNotDeclareExactlyOneParameterException extends \PHPUnit\Framework\Exception { - public function __construct(string $message, int $code, string $file, int $line, array $trace, string $diff) + public function __construct(string $className, string $methodName) { } - public function getDiff(): string + public function __toString(): string { } } /** - * @template-implements \RecursiveIterator - * * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class TestSuiteIterator implements \RecursiveIterator +final class ComparisonMethodDoesNotAcceptParameterTypeException extends \PHPUnit\Framework\Exception { - public function __construct(\PHPUnit\Framework\TestSuite $testSuite) + public function __construct(string $className, string $methodName, string $type) { } - public function rewind(): void + public function __toString(): string { } - public function valid(): bool +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class ComparisonMethodDoesNotDeclareBoolReturnTypeException extends \PHPUnit\Framework\Exception +{ + public function __construct(string $className, string $methodName) { } - public function key(): int + public function __toString(): string { } - public function current(): \PHPUnit\Framework\Test +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class Error extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\SelfDescribing +{ + /** + * Wrapper for getMessage() which is declared as final. + */ + public function toString(): string { } - public function next(): void +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +class AssertionFailedError extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\SelfDescribing +{ + /** + * Wrapper for getMessage() which is declared as final. + */ + public function toString(): string + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class PHPTAssertionFailedError extends \PHPUnit\Framework\SyntheticError +{ + public function __construct(string $message, int $code, string $file, int $line, array $trace, string $diff) + { + } + public function getDiff(): string + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class SkippedTestCase extends \PHPUnit\Framework\TestCase +{ + public function __construct(string $className, string $methodName, string $message = '') + { + } + public function getMessage(): string { } /** - * @throws NoChildTestSuiteException + * Returns a string representation of the test case. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ - public function getChildren(): self + public function toString(): string { } - public function hasChildren(): bool +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class TestBuilder +{ + public function build(\ReflectionClass $theClass, string $methodName): \PHPUnit\Framework\Test { } } @@ -391,2982 +426,1944 @@ public function getSize(): int /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -abstract class TestCase extends \PHPUnit\Framework\Assert implements \PHPUnit\Framework\Reorderable, \PHPUnit\Framework\SelfDescribing, \PHPUnit\Framework\Test +abstract class Assert { /** - * @var ?bool - */ - protected $backupGlobals; - /** - * @var string[] - */ - protected $backupGlobalsExcludeList = []; - /** - * @var string[] + * Asserts that an array has a specified key. * - * @deprecated Use $backupGlobalsExcludeList instead - */ - protected $backupGlobalsBlacklist = []; - /** - * @var ?bool - */ - protected $backupStaticAttributes; - /** - * @var array> - */ - protected $backupStaticAttributesExcludeList = []; - /** - * @var array> + * @param int|string $key + * @param array|\ArrayAccess $array * - * @deprecated Use $backupStaticAttributesExcludeList instead - */ - protected $backupStaticAttributesBlacklist = []; - /** - * @var ?bool - */ - protected $runTestInSeparateProcess; - /** - * @var bool - */ - protected $preserveGlobalState = true; - /** - * @var list - */ - protected $providedTests = []; - /** - * Returns a matcher that matches when the method is executed - * zero or more times. + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws Exception + * @throws ExpectationFailedException */ - public static function any(): \PHPUnit\Framework\MockObject\Rule\AnyInvokedCount + public static function assertArrayHasKey($key, $array, string $message = ''): void { } /** - * Returns a matcher that matches when the method is never executed. + * Asserts that an array does not have a specified key. + * + * @param int|string $key + * @param array|\ArrayAccess $array + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws Exception + * @throws ExpectationFailedException */ - public static function never(): \PHPUnit\Framework\MockObject\Rule\InvokedCount + public static function assertArrayNotHasKey($key, $array, string $message = ''): void { } /** - * Returns a matcher that matches when the method is executed - * at least N times. + * Asserts that a haystack contains a needle. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws Exception + * @throws ExpectationFailedException */ - public static function atLeast(int $requiredInvocations): \PHPUnit\Framework\MockObject\Rule\InvokedAtLeastCount + public static function assertContains($needle, iterable $haystack, string $message = ''): void + { + } + public static function assertContainsEquals($needle, iterable $haystack, string $message = ''): void { } /** - * Returns a matcher that matches when the method is executed at least once. + * Asserts that a haystack does not contain a needle. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws Exception + * @throws ExpectationFailedException */ - public static function atLeastOnce(): \PHPUnit\Framework\MockObject\Rule\InvokedAtLeastOnce + public static function assertNotContains($needle, iterable $haystack, string $message = ''): void + { + } + public static function assertNotContainsEquals($needle, iterable $haystack, string $message = ''): void { } /** - * Returns a matcher that matches when the method is executed exactly once. + * Asserts that a haystack contains only values of a given type. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public static function once(): \PHPUnit\Framework\MockObject\Rule\InvokedCount + public static function assertContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = null, string $message = ''): void { } /** - * Returns a matcher that matches when the method is executed - * exactly $count times. + * Asserts that a haystack contains only instances of a given class name. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public static function exactly(int $count): \PHPUnit\Framework\MockObject\Rule\InvokedCount + public static function assertContainsOnlyInstancesOf(string $className, iterable $haystack, string $message = ''): void { } /** - * Returns a matcher that matches when the method is executed - * at most N times. + * Asserts that a haystack does not contain only values of a given type. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public static function atMost(int $allowedInvocations): \PHPUnit\Framework\MockObject\Rule\InvokedAtMostCount + public static function assertNotContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = null, string $message = ''): void { } /** - * Returns a matcher that matches when the method is executed - * at the given index. + * Asserts the number of elements of an array, Countable or Traversable. * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4297 + * @param \Countable|iterable $haystack * - * @codeCoverageIgnore + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws Exception + * @throws ExpectationFailedException */ - public static function at(int $index): \PHPUnit\Framework\MockObject\Rule\InvokedAtIndex - { - } - public static function returnValue($value): \PHPUnit\Framework\MockObject\Stub\ReturnStub - { - } - public static function returnValueMap(array $valueMap): \PHPUnit\Framework\MockObject\Stub\ReturnValueMap - { - } - public static function returnArgument(int $argumentIndex): \PHPUnit\Framework\MockObject\Stub\ReturnArgument - { - } - public static function returnCallback($callback): \PHPUnit\Framework\MockObject\Stub\ReturnCallback + public static function assertCount(int $expectedCount, $haystack, string $message = ''): void { } /** - * Returns the current object. + * Asserts the number of elements of an array, Countable or Traversable. * - * This method is useful when mocking a fluent interface. + * @param \Countable|iterable $haystack + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws Exception + * @throws ExpectationFailedException */ - public static function returnSelf(): \PHPUnit\Framework\MockObject\Stub\ReturnSelf - { - } - public static function throwException(\Throwable $exception): \PHPUnit\Framework\MockObject\Stub\Exception + public static function assertNotCount(int $expectedCount, $haystack, string $message = ''): void { } - public static function onConsecutiveCalls(...$args): \PHPUnit\Framework\MockObject\Stub\ConsecutiveCalls + /** + * Asserts that two variables are equal. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + */ + public static function assertEquals($expected, $actual, string $message = ''): void { } /** - * @param int|string $dataName + * Asserts that two variables are equal (canonicalizing). * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function __construct(?string $name = null, array $data = [], $dataName = '') + public static function assertEqualsCanonicalizing($expected, $actual, string $message = ''): void { } /** - * This method is called before the first test of this test class is run. + * Asserts that two variables are equal (ignoring case). + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public static function setUpBeforeClass(): void + public static function assertEqualsIgnoringCase($expected, $actual, string $message = ''): void { } /** - * This method is called after the last test of this test class is run. - */ - public static function tearDownAfterClass(): void - { - } - /** - * This method is called before each test. + * Asserts that two variables are equal (with delta). + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - protected function setUp(): void + public static function assertEqualsWithDelta($expected, $actual, float $delta, string $message = ''): void { } /** - * Performs assertions shared by all tests of a test case. + * Asserts that two variables are not equal. * - * This method is called between setUp() and test. + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - protected function assertPreConditions(): void + public static function assertNotEquals($expected, $actual, string $message = ''): void { } /** - * Performs assertions shared by all tests of a test case. + * Asserts that two variables are not equal (canonicalizing). * - * This method is called between test and tearDown(). + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - protected function assertPostConditions(): void + public static function assertNotEqualsCanonicalizing($expected, $actual, string $message = ''): void { } /** - * This method is called after each test. + * Asserts that two variables are not equal (ignoring case). + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - protected function tearDown(): void + public static function assertNotEqualsIgnoringCase($expected, $actual, string $message = ''): void { } /** - * Returns a string representation of the test case. + * Asserts that two variables are not equal (with delta). * - * @throws Exception * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function toString(): string - { - } - public function count(): int - { - } - public function getActualOutputForAssertion(): string - { - } - public function expectOutputRegex(string $expectedRegex): void - { - } - public function expectOutputString(string $expectedString): void + public static function assertNotEqualsWithDelta($expected, $actual, float $delta, string $message = ''): void { } /** - * @phan-param class-string<\Throwable> $exception + * @throws ExpectationFailedException */ - public function expectException(string $exception): void + public static function assertObjectEquals(object $expected, object $actual, string $method = 'equals', string $message = ''): void { } /** - * @param int|string $code + * Asserts that a variable is empty. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert empty $actual */ - public function expectExceptionCode($code): void - { - } - public function expectExceptionMessage(string $message): void - { - } - public function expectExceptionMessageMatches(string $regularExpression): void + public static function assertEmpty($actual, string $message = ''): void { } /** - * Sets up an expectation for an exception to be raised by the code under test. - * Information for expected exception class, expected exception message, and - * expected exception code are retrieved from a given Exception object. + * Asserts that a variable is not empty. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert !empty $actual */ - public function expectExceptionObject(\Exception $exception): void - { - } - public function expectNotToPerformAssertions(): void + public static function assertNotEmpty($actual, string $message = ''): void { } /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + * Asserts that a value is greater than another value. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function expectDeprecation(): void + public static function assertGreaterThan($expected, $actual, string $message = ''): void { } /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + * Asserts that a value is greater than or equal to another value. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function expectDeprecationMessage(string $message): void + public static function assertGreaterThanOrEqual($expected, $actual, string $message = ''): void { } /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + * Asserts that a value is smaller than another value. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function expectDeprecationMessageMatches(string $regularExpression): void + public static function assertLessThan($expected, $actual, string $message = ''): void { } /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + * Asserts that a value is smaller than or equal to another value. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function expectNotice(): void + public static function assertLessThanOrEqual($expected, $actual, string $message = ''): void { } /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + * Asserts that the contents of one file is equal to the contents of another + * file. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function expectNoticeMessage(string $message): void + public static function assertFileEquals(string $expected, string $actual, string $message = ''): void { } /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + * Asserts that the contents of one file is equal to the contents of another + * file (canonicalizing). + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function expectNoticeMessageMatches(string $regularExpression): void + public static function assertFileEqualsCanonicalizing(string $expected, string $actual, string $message = ''): void { } /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + * Asserts that the contents of one file is equal to the contents of another + * file (ignoring case). + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function expectWarning(): void + public static function assertFileEqualsIgnoringCase(string $expected, string $actual, string $message = ''): void { } /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + * Asserts that the contents of one file is not equal to the contents of + * another file. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function expectWarningMessage(string $message): void + public static function assertFileNotEquals(string $expected, string $actual, string $message = ''): void { } /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + * Asserts that the contents of one file is not equal to the contents of another + * file (canonicalizing). + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function expectWarningMessageMatches(string $regularExpression): void + public static function assertFileNotEqualsCanonicalizing(string $expected, string $actual, string $message = ''): void { } /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + * Asserts that the contents of one file is not equal to the contents of another + * file (ignoring case). + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function expectError(): void + public static function assertFileNotEqualsIgnoringCase(string $expected, string $actual, string $message = ''): void { } /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + * Asserts that the contents of a string is equal + * to the contents of a file. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function expectErrorMessage(string $message): void + public static function assertStringEqualsFile(string $expectedFile, string $actualString, string $message = ''): void { } /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + * Asserts that the contents of a string is equal + * to the contents of a file (canonicalizing). + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function expectErrorMessageMatches(string $regularExpression): void - { - } - public function getStatus(): int - { - } - public function markAsRisky(): void - { - } - public function getStatusMessage(): string - { - } - public function hasFailed(): bool + public static function assertStringEqualsFileCanonicalizing(string $expectedFile, string $actualString, string $message = ''): void { } /** - * Runs the test case and collects the results in a TestResult object. - * If no TestResult object is passed a new one will be created. + * Asserts that the contents of a string is equal + * to the contents of a file (ignoring case). * - * @throws \SebastianBergmann\CodeCoverage\InvalidArgumentException - * @throws CodeCoverageException * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws \SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException - * @throws \PHPUnit\Util\Exception + * @throws ExpectationFailedException */ - public function run(?\PHPUnit\Framework\TestResult $result = null): \PHPUnit\Framework\TestResult + public static function assertStringEqualsFileIgnoringCase(string $expectedFile, string $actualString, string $message = ''): void { } /** - * Returns a builder object to create mock objects using a fluent interface. - * - * @phan-template RealInstanceType of object - * - * @phan-param class-string $className + * Asserts that the contents of a string is not equal + * to the contents of a file. * - * @phan-return MockObject\MockBuilder + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function getMockBuilder(string $className): \PHPUnit\Framework\MockObject\MockBuilder - { - } - public function registerComparator(\SebastianBergmann\Comparator\Comparator $comparator): void + public static function assertStringNotEqualsFile(string $expectedFile, string $actualString, string $message = ''): void { } /** - * @return string[] + * Asserts that the contents of a string is not equal + * to the contents of a file (canonicalizing). * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function doubledTypes(): array + public static function assertStringNotEqualsFileCanonicalizing(string $expectedFile, string $actualString, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that the contents of a string is not equal + * to the contents of a file (ignoring case). + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function getGroups(): array + public static function assertStringNotEqualsFileIgnoringCase(string $expectedFile, string $actualString, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a file/dir is readable. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function setGroups(array $groups): void + public static function assertIsReadable(string $filename, string $message = ''): void { } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * Asserts that a file/dir exists and is not readable. * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function getName(bool $withDataSet = true): string + public static function assertIsNotReadable(string $filename, string $message = ''): void { } /** - * Returns the size of the test. + * Asserts that a file/dir exists and is not readable. * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @codeCoverageIgnore + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4062 */ - public function getSize(): int + public static function assertNotIsReadable(string $filename, string $message = ''): void { } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * Asserts that a file/dir exists and is writable. * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function hasSize(): bool + public static function assertIsWritable(string $filename, string $message = ''): void { } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * Asserts that a file/dir exists and is not writable. * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function isSmall(): bool + public static function assertIsNotWritable(string $filename, string $message = ''): void { } /** + * Asserts that a file/dir exists and is not writable. + * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @codeCoverageIgnore + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4065 */ - public function isMedium(): bool + public static function assertNotIsWritable(string $filename, string $message = ''): void { } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * Asserts that a directory exists. * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function isLarge(): bool + public static function assertDirectoryExists(string $directory, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a directory does not exist. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function getActualOutput(): string + public static function assertDirectoryDoesNotExist(string $directory, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a directory does not exist. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @codeCoverageIgnore + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4068 */ - public function hasOutput(): bool + public static function assertDirectoryNotExists(string $directory, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a directory exists and is readable. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function doesNotPerformAssertions(): bool + public static function assertDirectoryIsReadable(string $directory, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a directory exists and is not readable. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function hasExpectationOnOutput(): bool + public static function assertDirectoryIsNotReadable(string $directory, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a directory exists and is not readable. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @codeCoverageIgnore + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4071 */ - public function getExpectedException(): ?string + public static function assertDirectoryNotIsReadable(string $directory, string $message = ''): void { } /** - * @return null|int|string + * Asserts that a directory exists and is writable. * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function getExpectedExceptionCode() + public static function assertDirectoryIsWritable(string $directory, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a directory exists and is not writable. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function getExpectedExceptionMessage(): ?string + public static function assertDirectoryIsNotWritable(string $directory, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a directory exists and is not writable. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @codeCoverageIgnore + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4074 */ - public function getExpectedExceptionMessageRegExp(): ?string + public static function assertDirectoryNotIsWritable(string $directory, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a file exists. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function setRegisterMockObjectsFromTestArgumentsRecursively(bool $flag): void + public static function assertFileExists(string $filename, string $message = ''): void { } /** - * @throws \Throwable + * Asserts that a file does not exist. * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function runBare(): void + public static function assertFileDoesNotExist(string $filename, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a file does not exist. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @codeCoverageIgnore + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4077 */ - public function setName(string $name): void + public static function assertFileNotExists(string $filename, string $message = ''): void { } /** - * @param list $dependencies + * Asserts that a file exists and is readable. * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function setDependencies(array $dependencies): void + public static function assertFileIsReadable(string $file, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a file exists and is not readable. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function setDependencyInput(array $dependencyInput): void + public static function assertFileIsNotReadable(string $file, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a file exists and is not readable. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @codeCoverageIgnore + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4080 */ - public function setBeStrictAboutChangesToGlobalState(?bool $beStrictAboutChangesToGlobalState): void + public static function assertFileNotIsReadable(string $file, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a file exists and is writable. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function setBackupGlobals(?bool $backupGlobals): void + public static function assertFileIsWritable(string $file, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a file exists and is not writable. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function setBackupStaticAttributes(?bool $backupStaticAttributes): void + public static function assertFileIsNotWritable(string $file, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a file exists and is not writable. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @codeCoverageIgnore + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4083 */ - public function setRunTestInSeparateProcess(bool $runTestInSeparateProcess): void + public static function assertFileNotIsWritable(string $file, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a condition is true. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert true $condition */ - public function setRunClassInSeparateProcess(bool $runClassInSeparateProcess): void + public static function assertTrue($condition, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a condition is not true. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert !true $condition */ - public function setPreserveGlobalState(bool $preserveGlobalState): void + public static function assertNotTrue($condition, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a condition is false. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert false $condition */ - public function setInIsolation(bool $inIsolation): void + public static function assertFalse($condition, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a condition is not false. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert !false $condition */ - public function isInIsolation(): bool + public static function assertNotFalse($condition, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a variable is null. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert null $actual */ - public function getResult() + public static function assertNull($actual, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a variable is not null. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert !null $actual */ - public function setResult($result): void + public static function assertNotNull($actual, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a variable is finite. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function setOutputCallback(callable $callback): void + public static function assertFinite($actual, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a variable is infinite. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function getTestResultObject(): ?\PHPUnit\Framework\TestResult + public static function assertInfinite($actual, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a variable is nan. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function setTestResultObject(\PHPUnit\Framework\TestResult $result): void + public static function assertNan($actual, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a class has a specified attribute. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws Exception + * @throws ExpectationFailedException + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 */ - public function registerMockObject(\PHPUnit\Framework\MockObject\MockObject $mockObject): void + public static function assertClassHasAttribute(string $attributeName, string $className, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function addToAssertionCount(int $count): void - { - } - /** - * Returns the number of assertions performed by this test. + * Asserts that a class does not have a specified attribute. * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws Exception + * @throws ExpectationFailedException + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 */ - public function getNumAssertions(): int + public static function assertClassNotHasAttribute(string $attributeName, string $className, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that a class has a specified static attribute. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws Exception + * @throws ExpectationFailedException + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 */ - public function usesDataProvider(): bool + public static function assertClassHasStaticAttribute(string $attributeName, string $className, string $message = ''): void { } /** - * @return int|string + * Asserts that a class does not have a specified static attribute. * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws Exception + * @throws ExpectationFailedException + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 */ - public function dataName() + public static function assertClassNotHasStaticAttribute(string $attributeName, string $className, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that an object has a specified attribute. + * + * @param object $object + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws Exception + * @throws ExpectationFailedException + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 */ - public function getDataSetAsString(bool $includeData = true): string + public static function assertObjectHasAttribute(string $attributeName, $object, string $message = ''): void { } /** - * Gets the data set of a TestCase. + * Asserts that an object does not have a specified attribute. * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @param object $object + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws Exception + * @throws ExpectationFailedException + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 */ - public function getProvidedData(): array + public static function assertObjectNotHasAttribute(string $attributeName, $object, string $message = ''): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Asserts that an object has a specified property. + * + * @throws ExpectationFailedException */ - public function addWarning(string $warning): void - { - } - public function sortId(): string + final public static function assertObjectHasProperty(string $propertyName, object $object, string $message = ''): void { } /** - * Returns the normalized test name as class::method. + * Asserts that an object does not have a specified property. * - * @return list + * @throws ExpectationFailedException */ - public function provides(): array + final public static function assertObjectNotHasProperty(string $propertyName, object $object, string $message = ''): void { } /** - * Returns a list of normalized dependency names, class::method. + * Asserts that two variables have the same type and value. + * Used on objects, it asserts that two variables reference + * the same object. * - * This list can differ from the raw dependencies as the resolver has - * no need for the [!][shallow]clone prefix that is filtered out - * during normalization. + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException * - * @return list + * @phan-template ExpectedType + * + * @phan-param ExpectedType $expected + * + * @phan-assert =ExpectedType $actual */ - public function requires(): array + public static function assertSame($expected, $actual, string $message = ''): void { } /** - * Override to run the test and assert its state. + * Asserts that two variables do not have the same type and value. + * Used on objects, it asserts that two variables do not reference + * the same object. * - * @throws \SebastianBergmann\ObjectEnumerator\InvalidArgumentException - * @throws AssertionFailedError - * @throws Exception + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException - * @throws \Throwable */ - protected function runTest() + public static function assertNotSame($expected, $actual, string $message = ''): void { } /** - * This method is a wrapper for the ini_set() function that automatically - * resets the modified php.ini setting to its original value after the - * test is run. + * Asserts that a variable is of a given type. * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws Exception + * @throws ExpectationFailedException + * + * @phan-template ExpectedType of object + * + * @phan-param class-string $expected + * + * @phan-assert =ExpectedType $actual */ - protected function iniSet(string $varName, string $newValue): void + public static function assertInstanceOf(string $expected, $actual, string $message = ''): void { } /** - * This method is a wrapper for the setlocale() function that automatically - * resets the locale to its original value after the test is run. + * Asserts that a variable is not of a given type. * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws Exception - */ - protected function setLocale(...$args): void - { - } - /** - * Makes configurable stub for the specified class. + * @throws ExpectationFailedException * - * @phan-template RealInstanceType of object + * @phan-template ExpectedType of object * - * @phan-param class-string $originalClassName + * @phan-param class-string $expected * - * @phan-return MockObject\Stub&RealInstanceType + * @phan-assert !ExpectedType $actual */ - protected function createStub(string $originalClassName): \PHPUnit\Framework\MockObject\Stub + public static function assertNotInstanceOf(string $expected, $actual, string $message = ''): void { } /** - * Returns a mock object for the specified class. - * - * @phan-template RealInstanceType of object + * Asserts that a variable is of type array. * - * @phan-param class-string $originalClassName + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException * - * @phan-return MockObject\MockObject&RealInstanceType + * @phan-assert array $actual */ - protected function createMock(string $originalClassName): \PHPUnit\Framework\MockObject\MockObject + public static function assertIsArray($actual, string $message = ''): void { } /** - * Returns a configured mock object for the specified class. - * - * @phan-template RealInstanceType of object + * Asserts that a variable is of type bool. * - * @phan-param class-string $originalClassName + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException * - * @phan-return MockObject\MockObject&RealInstanceType + * @phan-assert bool $actual */ - protected function createConfiguredMock(string $originalClassName, array $configuration): \PHPUnit\Framework\MockObject\MockObject + public static function assertIsBool($actual, string $message = ''): void { } /** - * Returns a partial mock object for the specified class. - * - * @param string[] $methods - * - * @phan-template RealInstanceType of object + * Asserts that a variable is of type float. * - * @phan-param class-string $originalClassName + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException * - * @phan-return MockObject\MockObject&RealInstanceType + * @phan-assert float $actual */ - protected function createPartialMock(string $originalClassName, array $methods): \PHPUnit\Framework\MockObject\MockObject + public static function assertIsFloat($actual, string $message = ''): void { } /** - * Returns a test proxy for the specified class. - * - * @phan-template RealInstanceType of object + * Asserts that a variable is of type int. * - * @phan-param class-string $originalClassName + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException * - * @phan-return MockObject\MockObject&RealInstanceType + * @phan-assert int $actual */ - protected function createTestProxy(string $originalClassName, array $constructorArguments = []): \PHPUnit\Framework\MockObject\MockObject + public static function assertIsInt($actual, string $message = ''): void { } /** - * Mocks the specified class and returns the name of the mocked class. - * - * @param null|array $methods $methods - * - * @phan-template RealInstanceType of object - * - * @phan-param class-string|string $originalClassName + * Asserts that a variable is of type numeric. * - * @phan-return class-string + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException * - * @deprecated + * @phan-assert numeric $actual */ - protected function getMockClass(string $originalClassName, $methods = [], array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = false, bool $callOriginalClone = true, bool $callAutoload = true, bool $cloneArguments = false): string + public static function assertIsNumeric($actual, string $message = ''): void { } /** - * Returns a mock object for the specified abstract class with all abstract - * methods of the class mocked. Concrete methods are not mocked by default. - * To mock concrete methods, use the 7th parameter ($mockedMethods). - * - * @phan-template RealInstanceType of object + * Asserts that a variable is of type object. * - * @phan-param class-string $originalClassName + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException * - * @phan-return MockObject\MockObject&RealInstanceType + * @phan-assert object $actual */ - protected function getMockForAbstractClass(string $originalClassName, array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, array $mockedMethods = [], bool $cloneArguments = false): \PHPUnit\Framework\MockObject\MockObject + public static function assertIsObject($actual, string $message = ''): void { } /** - * Returns a mock object based on the given WSDL file. - * - * @phan-template RealInstanceType of object + * Asserts that a variable is of type resource. * - * @phan-param class-string|string $originalClassName + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException * - * @phan-return MockObject\MockObject&RealInstanceType + * @phan-assert resource $actual */ - protected function getMockFromWsdl(string $wsdlFile, string $originalClassName = '', string $mockClassName = '', array $methods = [], bool $callOriginalConstructor = true, array $options = []): \PHPUnit\Framework\MockObject\MockObject + public static function assertIsResource($actual, string $message = ''): void { } /** - * Returns a mock object for the specified trait with all abstract methods - * of the trait mocked. Concrete methods to mock can be specified with the - * `$mockedMethods` parameter. + * Asserts that a variable is of type resource and is closed. * - * @phan-param trait-string $traitName + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert resource $actual */ - protected function getMockForTrait(string $traitName, array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, array $mockedMethods = [], bool $cloneArguments = false): \PHPUnit\Framework\MockObject\MockObject + public static function assertIsClosedResource($actual, string $message = ''): void { } /** - * Returns an object for the specified trait. + * Asserts that a variable is of type string. * - * @phan-param trait-string $traitName + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert string $actual */ - protected function getObjectForTrait(string $traitName, array $arguments = [], string $traitClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true): object + public static function assertIsString($actual, string $message = ''): void { } /** - * @throws \Prophecy\Exception\Doubler\ClassNotFoundException - * @throws \Prophecy\Exception\Doubler\DoubleException - * @throws \Prophecy\Exception\Doubler\InterfaceNotFoundException + * Asserts that a variable is of type scalar. * - * @phan-param class-string|null $classOrInterface + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4141 + * @phan-assert scalar $actual */ - protected function prophesize(?string $classOrInterface = null): \Prophecy\Prophecy\ObjectProphecy + public static function assertIsScalar($actual, string $message = ''): void { } /** - * Creates a default TestResult object. + * Asserts that a variable is of type callable. * - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - protected function createResult(): \PHPUnit\Framework\TestResult - { - } - /** - * This method is called when a test method did not execute successfully. + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException * - * @throws \Throwable + * @phan-assert callable $actual */ - protected function onNotSuccessfulTest(\Throwable $t): void - { - } - protected function recordDoubledType(string $originalClassName): void + public static function assertIsCallable($actual, string $message = ''): void { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class TestFailure -{ /** - * Returns a description for an exception. + * Asserts that a variable is of type iterable. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert iterable $actual */ - public static function exceptionToString(\Throwable $e): string + public static function assertIsIterable($actual, string $message = ''): void { } /** - * Constructs a TestFailure with the given test and exception. + * Asserts that a variable is not of type array. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert !array $actual */ - public function __construct(\PHPUnit\Framework\Test $failedTest, \Throwable $t) + public static function assertIsNotArray($actual, string $message = ''): void { } /** - * Returns a short description of the failure. + * Asserts that a variable is not of type bool. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert !bool $actual */ - public function toString(): string + public static function assertIsNotBool($actual, string $message = ''): void { } /** - * Returns a description for the thrown exception. + * Asserts that a variable is not of type float. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert !float $actual */ - public function getExceptionAsString(): string + public static function assertIsNotFloat($actual, string $message = ''): void { } /** - * Returns the name of the failing test (including data set, if any). + * Asserts that a variable is not of type int. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert !int $actual */ - public function getTestName(): string + public static function assertIsNotInt($actual, string $message = ''): void { } /** - * Returns the failing test. + * Asserts that a variable is not of type numeric. * - * Note: The test object is not set when the test is executed in process - * isolation. + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException * - * @see Exception + * @phan-assert !numeric $actual */ - public function failedTest(): ?\PHPUnit\Framework\Test + public static function assertIsNotNumeric($actual, string $message = ''): void { } /** - * Gets the thrown exception. + * Asserts that a variable is not of type object. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert !object $actual */ - public function thrownException(): \Throwable + public static function assertIsNotObject($actual, string $message = ''): void { } /** - * Returns the exception's message. + * Asserts that a variable is not of type resource. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert !resource $actual */ - public function exceptionMessage(): string + public static function assertIsNotResource($actual, string $message = ''): void { } /** - * Returns true if the thrown exception - * is of type AssertionFailedError. + * Asserts that a variable is not of type resource. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert !resource $actual */ - public function isFailure(): bool + public static function assertIsNotClosedResource($actual, string $message = ''): void { } -} -/** - * This interface, as well as the associated mechanism for extending PHPUnit, - * will be removed in PHPUnit 10. There is no alternative available in this - * version of PHPUnit. - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @deprecated - * @see https://github.com/sebastianbergmann/phpunit/issues/4676 - */ -interface TestListener -{ - public function addError(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void; - public function addWarning(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\Warning $e, float $time): void; - public function addFailure(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\AssertionFailedError $e, float $time): void; - public function addIncompleteTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void; - public function addRiskyTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void; - public function addSkippedTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void; - public function startTestSuite(\PHPUnit\Framework\TestSuite $suite): void; - public function endTestSuite(\PHPUnit\Framework\TestSuite $suite): void; - public function startTest(\PHPUnit\Framework\Test $test): void; - public function endTest(\PHPUnit\Framework\Test $test, float $time): void; -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface SelfDescribing -{ - /** - * Returns a string representation of the object. - */ - public function toString(): string; -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface IncompleteTest extends \Throwable -{ -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface Test extends \Countable -{ /** - * Runs a test and collects its result in a TestResult instance. + * Asserts that a variable is not of type string. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert !string $actual */ - public function run(?\PHPUnit\Framework\TestResult $result = null): \PHPUnit\Framework\TestResult; -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ExecutionOrderDependency -{ - public static function createFromDependsAnnotation(string $className, string $annotation): self + public static function assertIsNotString($actual, string $message = ''): void { } /** - * @phan-param list $dependencies + * Asserts that a variable is not of type scalar. * - * @phan-return list + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert !scalar $actual */ - public static function filterInvalid(array $dependencies): array + public static function assertIsNotScalar($actual, string $message = ''): void { } /** - * @phan-param list $existing - * @phan-param list $additional + * Asserts that a variable is not of type callable. * - * @phan-return list + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert !callable $actual */ - public static function mergeUnique(array $existing, array $additional): array + public static function assertIsNotCallable($actual, string $message = ''): void { } /** - * @phan-param list $left - * @phan-param list $right + * Asserts that a variable is not of type iterable. * - * @phan-return list + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert !iterable $actual */ - public static function diff(array $left, array $right): array - { - } - public function __construct(string $classOrCallableName, ?string $methodName = null, ?string $option = null) - { - } - public function __toString(): string - { - } - public function isValid(): bool - { - } - public function useShallowClone(): bool - { - } - public function useDeepClone(): bool - { - } - public function targetIsClass(): bool - { - } - public function getTarget(): string - { - } - public function getTargetClassName(): string - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class TestBuilder -{ - public function build(\ReflectionClass $theClass, string $methodName): \PHPUnit\Framework\Test + public static function assertIsNotIterable($actual, string $message = ''): void { } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -abstract class Assert -{ /** - * Asserts that an array has a specified key. - * - * @param int|string $key - * @param array|\ArrayAccess $array + * Asserts that a string matches a given regular expression. * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception * @throws ExpectationFailedException */ - public static function assertArrayHasKey($key, $array, string $message = ''): void + public static function assertMatchesRegularExpression(string $pattern, string $string, string $message = ''): void { } /** - * Asserts that an array does not have a specified key. - * - * @param int|string $key - * @param array|\ArrayAccess $array + * Asserts that a string matches a given regular expression. * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception * @throws ExpectationFailedException + * + * @codeCoverageIgnore + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4086 */ - public static function assertArrayNotHasKey($key, $array, string $message = ''): void + public static function assertRegExp(string $pattern, string $string, string $message = ''): void { } /** - * Asserts that a haystack contains a needle. + * Asserts that a string does not match a given regular expression. * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception * @throws ExpectationFailedException */ - public static function assertContains($needle, iterable $haystack, string $message = ''): void - { - } - public static function assertContainsEquals($needle, iterable $haystack, string $message = ''): void - { - } - /** - * Asserts that a haystack does not contain a needle. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * @throws ExpectationFailedException - */ - public static function assertNotContains($needle, iterable $haystack, string $message = ''): void - { - } - public static function assertNotContainsEquals($needle, iterable $haystack, string $message = ''): void + public static function assertDoesNotMatchRegularExpression(string $pattern, string $string, string $message = ''): void { } /** - * Asserts that a haystack contains only values of a given type. + * Asserts that a string does not match a given regular expression. * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException - */ - public static function assertContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = null, string $message = ''): void - { - } - /** - * Asserts that a haystack contains only instances of a given class name. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertContainsOnlyInstancesOf(string $className, iterable $haystack, string $message = ''): void - { - } - /** - * Asserts that a haystack does not contain only values of a given type. + * @codeCoverageIgnore * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4089 */ - public static function assertNotContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = null, string $message = ''): void + public static function assertNotRegExp(string $pattern, string $string, string $message = ''): void { } /** - * Asserts the number of elements of an array, Countable or Traversable. + * Assert that the size of two arrays (or `Countable` or `Traversable` objects) + * is the same. * - * @param \Countable|iterable $haystack + * @param \Countable|iterable $expected + * @param \Countable|iterable $actual * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws Exception * @throws ExpectationFailedException */ - public static function assertCount(int $expectedCount, $haystack, string $message = ''): void + public static function assertSameSize($expected, $actual, string $message = ''): void { } /** - * Asserts the number of elements of an array, Countable or Traversable. + * Assert that the size of two arrays (or `Countable` or `Traversable` objects) + * is not the same. * - * @param \Countable|iterable $haystack + * @param \Countable|iterable $expected + * @param \Countable|iterable $actual * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws Exception * @throws ExpectationFailedException */ - public static function assertNotCount(int $expectedCount, $haystack, string $message = ''): void + public static function assertNotSameSize($expected, $actual, string $message = ''): void { } /** - * Asserts that two variables are equal. + * Asserts that a string matches a given format string. * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException */ - public static function assertEquals($expected, $actual, string $message = ''): void + public static function assertStringMatchesFormat(string $format, string $string, string $message = ''): void { } /** - * Asserts that two variables are equal (canonicalizing). + * Asserts that a string does not match a given format string. * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException */ - public static function assertEqualsCanonicalizing($expected, $actual, string $message = ''): void + public static function assertStringNotMatchesFormat(string $format, string $string, string $message = ''): void { } /** - * Asserts that two variables are equal (ignoring case). + * Asserts that a string matches a given format file. * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException */ - public static function assertEqualsIgnoringCase($expected, $actual, string $message = ''): void + public static function assertStringMatchesFormatFile(string $formatFile, string $string, string $message = ''): void { } /** - * Asserts that two variables are equal (with delta). + * Asserts that a string does not match a given format string. * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException */ - public static function assertEqualsWithDelta($expected, $actual, float $delta, string $message = ''): void + public static function assertStringNotMatchesFormatFile(string $formatFile, string $string, string $message = ''): void { } /** - * Asserts that two variables are not equal. + * Asserts that a string starts with a given prefix. * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException */ - public static function assertNotEquals($expected, $actual, string $message = ''): void + public static function assertStringStartsWith(string $prefix, string $string, string $message = ''): void { } /** - * Asserts that two variables are not equal (canonicalizing). + * Asserts that a string starts not with a given prefix. + * + * @param string $prefix + * @param string $string * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException */ - public static function assertNotEqualsCanonicalizing($expected, $actual, string $message = ''): void + public static function assertStringStartsNotWith($prefix, $string, string $message = ''): void { } /** - * Asserts that two variables are not equal (ignoring case). - * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException */ - public static function assertNotEqualsIgnoringCase($expected, $actual, string $message = ''): void + public static function assertStringContainsString(string $needle, string $haystack, string $message = ''): void { } /** - * Asserts that two variables are not equal (with delta). - * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException */ - public static function assertNotEqualsWithDelta($expected, $actual, float $delta, string $message = ''): void + public static function assertStringContainsStringIgnoringCase(string $needle, string $haystack, string $message = ''): void { } /** + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException */ - public static function assertObjectEquals(object $expected, object $actual, string $method = 'equals', string $message = ''): void + public static function assertStringNotContainsString(string $needle, string $haystack, string $message = ''): void { } /** - * Asserts that a variable is empty. - * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException - * - * @phan-assert empty $actual */ - public static function assertEmpty($actual, string $message = ''): void + public static function assertStringNotContainsStringIgnoringCase(string $needle, string $haystack, string $message = ''): void { } /** - * Asserts that a variable is not empty. + * Asserts that a string ends with a given suffix. * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException - * - * @phan-assert !empty $actual */ - public static function assertNotEmpty($actual, string $message = ''): void + public static function assertStringEndsWith(string $suffix, string $string, string $message = ''): void { } /** - * Asserts that a value is greater than another value. + * Asserts that a string ends not with a given suffix. * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException */ - public static function assertGreaterThan($expected, $actual, string $message = ''): void + public static function assertStringEndsNotWith(string $suffix, string $string, string $message = ''): void { } /** - * Asserts that a value is greater than or equal to another value. + * Asserts that two XML files are equal. * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws Exception * @throws ExpectationFailedException */ - public static function assertGreaterThanOrEqual($expected, $actual, string $message = ''): void + public static function assertXmlFileEqualsXmlFile(string $expectedFile, string $actualFile, string $message = ''): void { } /** - * Asserts that a value is smaller than another value. + * Asserts that two XML files are not equal. * + * @throws \PHPUnit\Util\Exception * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException */ - public static function assertLessThan($expected, $actual, string $message = ''): void + public static function assertXmlFileNotEqualsXmlFile(string $expectedFile, string $actualFile, string $message = ''): void { } /** - * Asserts that a value is smaller than or equal to another value. + * Asserts that two XML documents are equal. + * + * @param \DOMDocument|string $actualXml * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException + * @throws \PHPUnit\Util\Xml\Exception */ - public static function assertLessThanOrEqual($expected, $actual, string $message = ''): void + public static function assertXmlStringEqualsXmlFile(string $expectedFile, $actualXml, string $message = ''): void { } /** - * Asserts that the contents of one file is equal to the contents of another - * file. + * Asserts that two XML documents are not equal. + * + * @param \DOMDocument|string $actualXml * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException + * @throws \PHPUnit\Util\Xml\Exception */ - public static function assertFileEquals(string $expected, string $actual, string $message = ''): void + public static function assertXmlStringNotEqualsXmlFile(string $expectedFile, $actualXml, string $message = ''): void { } /** - * Asserts that the contents of one file is equal to the contents of another - * file (canonicalizing). + * Asserts that two XML documents are equal. + * + * @param \DOMDocument|string $expectedXml + * @param \DOMDocument|string $actualXml * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException + * @throws \PHPUnit\Util\Xml\Exception */ - public static function assertFileEqualsCanonicalizing(string $expected, string $actual, string $message = ''): void + public static function assertXmlStringEqualsXmlString($expectedXml, $actualXml, string $message = ''): void { } /** - * Asserts that the contents of one file is equal to the contents of another - * file (ignoring case). + * Asserts that two XML documents are not equal. + * + * @param \DOMDocument|string $expectedXml + * @param \DOMDocument|string $actualXml * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException + * @throws \PHPUnit\Util\Xml\Exception */ - public static function assertFileEqualsIgnoringCase(string $expected, string $actual, string $message = ''): void + public static function assertXmlStringNotEqualsXmlString($expectedXml, $actualXml, string $message = ''): void { } /** - * Asserts that the contents of one file is not equal to the contents of - * another file. + * Asserts that a hierarchy of DOMElements matches. * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws AssertionFailedError * @throws ExpectationFailedException + * + * @codeCoverageIgnore + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4091 */ - public static function assertFileNotEquals(string $expected, string $actual, string $message = ''): void + public static function assertEqualXMLStructure(\DOMElement $expectedElement, \DOMElement $actualElement, bool $checkAttributes = false, string $message = ''): void { } /** - * Asserts that the contents of one file is not equal to the contents of another - * file (canonicalizing). + * Evaluates a PHPUnit\Framework\Constraint matcher object. * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException */ - public static function assertFileNotEqualsCanonicalizing(string $expected, string $actual, string $message = ''): void + public static function assertThat($value, \PHPUnit\Framework\Constraint\Constraint $constraint, string $message = ''): void { } /** - * Asserts that the contents of one file is not equal to the contents of another - * file (ignoring case). + * Asserts that a string is a valid JSON string. * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException */ - public static function assertFileNotEqualsIgnoringCase(string $expected, string $actual, string $message = ''): void + public static function assertJson(string $actualJson, string $message = ''): void { } /** - * Asserts that the contents of a string is equal - * to the contents of a file. + * Asserts that two given JSON encoded objects or arrays are equal. * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException */ - public static function assertStringEqualsFile(string $expectedFile, string $actualString, string $message = ''): void + public static function assertJsonStringEqualsJsonString(string $expectedJson, string $actualJson, string $message = ''): void { } /** - * Asserts that the contents of a string is equal - * to the contents of a file (canonicalizing). + * Asserts that two given JSON encoded objects or arrays are not equal. + * + * @param string $expectedJson + * @param string $actualJson * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException */ - public static function assertStringEqualsFileCanonicalizing(string $expectedFile, string $actualString, string $message = ''): void + public static function assertJsonStringNotEqualsJsonString($expectedJson, $actualJson, string $message = ''): void { } /** - * Asserts that the contents of a string is equal - * to the contents of a file (ignoring case). + * Asserts that the generated JSON encoded object and the content of the given file are equal. * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException */ - public static function assertStringEqualsFileIgnoringCase(string $expectedFile, string $actualString, string $message = ''): void + public static function assertJsonStringEqualsJsonFile(string $expectedFile, string $actualJson, string $message = ''): void { } /** - * Asserts that the contents of a string is not equal - * to the contents of a file. + * Asserts that the generated JSON encoded object and the content of the given file are not equal. * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException */ - public static function assertStringNotEqualsFile(string $expectedFile, string $actualString, string $message = ''): void + public static function assertJsonStringNotEqualsJsonFile(string $expectedFile, string $actualJson, string $message = ''): void { } /** - * Asserts that the contents of a string is not equal - * to the contents of a file (canonicalizing). + * Asserts that two JSON files are equal. * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException */ - public static function assertStringNotEqualsFileCanonicalizing(string $expectedFile, string $actualString, string $message = ''): void + public static function assertJsonFileEqualsJsonFile(string $expectedFile, string $actualFile, string $message = ''): void { } /** - * Asserts that the contents of a string is not equal - * to the contents of a file (ignoring case). + * Asserts that two JSON files are not equal. * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException */ - public static function assertStringNotEqualsFileIgnoringCase(string $expectedFile, string $actualString, string $message = ''): void + public static function assertJsonFileNotEqualsJsonFile(string $expectedFile, string $actualFile, string $message = ''): void { } /** - * Asserts that a file/dir is readable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException + * @throws Exception */ - public static function assertIsReadable(string $filename, string $message = ''): void + public static function logicalAnd(...$func_get_args): \PHPUnit\Framework\Constraint\LogicalAnd { } - /** - * Asserts that a file/dir exists and is not readable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertIsNotReadable(string $filename, string $message = ''): void + public static function logicalOr(...$func_get_args): \PHPUnit\Framework\Constraint\LogicalOr { } - /** - * Asserts that a file/dir exists and is not readable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @codeCoverageIgnore - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4062 - */ - public static function assertNotIsReadable(string $filename, string $message = ''): void + public static function logicalNot(\PHPUnit\Framework\Constraint\Constraint $constraint): \PHPUnit\Framework\Constraint\LogicalNot { } - /** - * Asserts that a file/dir exists and is writable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertIsWritable(string $filename, string $message = ''): void + public static function logicalXor(...$func_get_args): \PHPUnit\Framework\Constraint\LogicalXor { } - /** - * Asserts that a file/dir exists and is not writable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertIsNotWritable(string $filename, string $message = ''): void + public static function anything(): \PHPUnit\Framework\Constraint\IsAnything + { + } + public static function isTrue(): \PHPUnit\Framework\Constraint\IsTrue { } /** - * Asserts that a file/dir exists and is not writable. + * @phan-template CallbackInput of mixed * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException + * @phan-param callable(CallbackInput $callback): bool $callback * - * @codeCoverageIgnore - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4065 + * @phan-return Constraint\Callback */ - public static function assertNotIsWritable(string $filename, string $message = ''): void + public static function callback(callable $callback): \PHPUnit\Framework\Constraint\Callback { } - /** - * Asserts that a directory exists. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertDirectoryExists(string $directory, string $message = ''): void + public static function isFalse(): \PHPUnit\Framework\Constraint\IsFalse { } - /** - * Asserts that a directory does not exist. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertDirectoryDoesNotExist(string $directory, string $message = ''): void + public static function isJson(): \PHPUnit\Framework\Constraint\IsJson { } - /** - * Asserts that a directory does not exist. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @codeCoverageIgnore - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4068 - */ - public static function assertDirectoryNotExists(string $directory, string $message = ''): void + public static function isNull(): \PHPUnit\Framework\Constraint\IsNull { } - /** - * Asserts that a directory exists and is readable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertDirectoryIsReadable(string $directory, string $message = ''): void + public static function isFinite(): \PHPUnit\Framework\Constraint\IsFinite { } - /** - * Asserts that a directory exists and is not readable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertDirectoryIsNotReadable(string $directory, string $message = ''): void + public static function isInfinite(): \PHPUnit\Framework\Constraint\IsInfinite { } - /** - * Asserts that a directory exists and is not readable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @codeCoverageIgnore - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4071 - */ - public static function assertDirectoryNotIsReadable(string $directory, string $message = ''): void + public static function isNan(): \PHPUnit\Framework\Constraint\IsNan { } - /** - * Asserts that a directory exists and is writable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertDirectoryIsWritable(string $directory, string $message = ''): void + public static function containsEqual($value): \PHPUnit\Framework\Constraint\TraversableContainsEqual { } - /** - * Asserts that a directory exists and is not writable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertDirectoryIsNotWritable(string $directory, string $message = ''): void + public static function containsIdentical($value): \PHPUnit\Framework\Constraint\TraversableContainsIdentical { } - /** - * Asserts that a directory exists and is not writable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @codeCoverageIgnore - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4074 - */ - public static function assertDirectoryNotIsWritable(string $directory, string $message = ''): void + public static function containsOnly(string $type): \PHPUnit\Framework\Constraint\TraversableContainsOnly { } - /** - * Asserts that a file exists. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertFileExists(string $filename, string $message = ''): void + public static function containsOnlyInstancesOf(string $className): \PHPUnit\Framework\Constraint\TraversableContainsOnly { } /** - * Asserts that a file does not exist. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException + * @param int|string $key */ - public static function assertFileDoesNotExist(string $filename, string $message = ''): void + public static function arrayHasKey($key): \PHPUnit\Framework\Constraint\ArrayHasKey { } - /** - * Asserts that a file does not exist. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @codeCoverageIgnore - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4077 - */ - public static function assertFileNotExists(string $filename, string $message = ''): void + public static function equalTo($value): \PHPUnit\Framework\Constraint\IsEqual { } - /** - * Asserts that a file exists and is readable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertFileIsReadable(string $file, string $message = ''): void + public static function equalToCanonicalizing($value): \PHPUnit\Framework\Constraint\IsEqualCanonicalizing { } - /** - * Asserts that a file exists and is not readable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertFileIsNotReadable(string $file, string $message = ''): void + public static function equalToIgnoringCase($value): \PHPUnit\Framework\Constraint\IsEqualIgnoringCase { } - /** - * Asserts that a file exists and is not readable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @codeCoverageIgnore - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4080 - */ - public static function assertFileNotIsReadable(string $file, string $message = ''): void + public static function equalToWithDelta($value, float $delta): \PHPUnit\Framework\Constraint\IsEqualWithDelta + { + } + public static function isEmpty(): \PHPUnit\Framework\Constraint\IsEmpty + { + } + public static function isWritable(): \PHPUnit\Framework\Constraint\IsWritable + { + } + public static function isReadable(): \PHPUnit\Framework\Constraint\IsReadable + { + } + public static function directoryExists(): \PHPUnit\Framework\Constraint\DirectoryExists + { + } + public static function fileExists(): \PHPUnit\Framework\Constraint\FileExists + { + } + public static function greaterThan($value): \PHPUnit\Framework\Constraint\GreaterThan + { + } + public static function greaterThanOrEqual($value): \PHPUnit\Framework\Constraint\LogicalOr { } /** - * Asserts that a file exists and is writable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 */ - public static function assertFileIsWritable(string $file, string $message = ''): void + public static function classHasAttribute(string $attributeName): \PHPUnit\Framework\Constraint\ClassHasAttribute { } /** - * Asserts that a file exists and is not writable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 */ - public static function assertFileIsNotWritable(string $file, string $message = ''): void + public static function classHasStaticAttribute(string $attributeName): \PHPUnit\Framework\Constraint\ClassHasStaticAttribute { } /** - * Asserts that a file exists and is not writable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @codeCoverageIgnore - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4083 + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 */ - public static function assertFileNotIsWritable(string $file, string $message = ''): void + public static function objectHasAttribute($attributeName): \PHPUnit\Framework\Constraint\ObjectHasAttribute + { + } + public static function identicalTo($value): \PHPUnit\Framework\Constraint\IsIdentical + { + } + public static function isInstanceOf(string $className): \PHPUnit\Framework\Constraint\IsInstanceOf + { + } + public static function isType(string $type): \PHPUnit\Framework\Constraint\IsType + { + } + public static function lessThan($value): \PHPUnit\Framework\Constraint\LessThan + { + } + public static function lessThanOrEqual($value): \PHPUnit\Framework\Constraint\LogicalOr + { + } + public static function matchesRegularExpression(string $pattern): \PHPUnit\Framework\Constraint\RegularExpression + { + } + public static function matches(string $string): \PHPUnit\Framework\Constraint\StringMatchesFormatDescription + { + } + public static function stringStartsWith($prefix): \PHPUnit\Framework\Constraint\StringStartsWith + { + } + public static function stringContains(string $string, bool $case = true): \PHPUnit\Framework\Constraint\StringContains + { + } + public static function stringEndsWith(string $suffix): \PHPUnit\Framework\Constraint\StringEndsWith + { + } + public static function countOf(int $count): \PHPUnit\Framework\Constraint\Count + { + } + public static function objectEquals(object $object, string $method = 'equals'): \PHPUnit\Framework\Constraint\ObjectEquals { } /** - * Asserts that a condition is true. + * Fails a test with the given message. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException + * @throws AssertionFailedError * - * @phan-assert true $condition + * @phan-return never-return */ - public static function assertTrue($condition, string $message = ''): void + public static function fail(string $message = ''): void { } /** - * Asserts that a condition is not true. + * Mark the test as incomplete. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException + * @throws IncompleteTestError * - * @phan-assert !true $condition + * @phan-return never-return */ - public static function assertNotTrue($condition, string $message = ''): void + public static function markTestIncomplete(string $message = ''): void { } /** - * Asserts that a condition is false. + * Mark the test as skipped. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException + * @throws SkippedTestError + * @throws SyntheticSkippedError * - * @phan-assert false $condition + * @phan-return never-return */ - public static function assertFalse($condition, string $message = ''): void + public static function markTestSkipped(string $message = ''): void { } /** - * Asserts that a condition is not false. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert !false $condition + * Return the current assertion count. */ - public static function assertNotFalse($condition, string $message = ''): void + public static function getCount(): int { } /** - * Asserts that a variable is null. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert null $actual + * Reset the assertion counter. */ - public static function assertNull($actual, string $message = ''): void + public static function resetCount(): void + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class WarningTestCase extends \PHPUnit\Framework\TestCase +{ + public function __construct(string $message = '') + { + } + public function getMessage(): string { } /** - * Asserts that a variable is not null. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert !null $actual + * Returns a string representation of the test case. */ - public static function assertNotNull($actual, string $message = ''): void + public function toString(): string { } +} +/** + * @template-implements \IteratorAggregate + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +class TestSuite implements \IteratorAggregate, \PHPUnit\Framework\Reorderable, \PHPUnit\Framework\SelfDescribing, \PHPUnit\Framework\Test +{ /** - * Asserts that a variable is finite. + * Enable or disable the backup and restoration of the $GLOBALS array. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException + * @var bool */ - public static function assertFinite($actual, string $message = ''): void - { - } + protected $backupGlobals; /** - * Asserts that a variable is infinite. + * Enable or disable the backup and restoration of static attributes. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException + * @var bool */ - public static function assertInfinite($actual, string $message = ''): void - { - } + protected $backupStaticAttributes; /** - * Asserts that a variable is nan. + * @var bool + */ + protected $runTestInSeparateProcess = false; + /** + * The name of the test suite. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException + * @var string */ - public static function assertNan($actual, string $message = ''): void - { - } + protected $name = ''; /** - * Asserts that a class has a specified attribute. + * The test groups of the test suite. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * @throws ExpectationFailedException + * @phan-var array> + */ + protected $groups = []; + /** + * The tests in the test suite. * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 + * @var Test[] */ - public static function assertClassHasAttribute(string $attributeName, string $className, string $message = ''): void - { - } + protected $tests = []; /** - * Asserts that a class does not have a specified attribute. + * The number of tests in the test suite. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * @throws ExpectationFailedException + * @var int + */ + protected $numTests = -1; + /** + * @var bool + */ + protected $testCase = false; + /** + * @var string[] + */ + protected $foundClasses = []; + /** + * @var null|list + */ + protected $providedTests; + /** + * @var null|list + */ + protected $requiredTests; + /** + * Constructs a new TestSuite. * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 + * - PHPUnit\Framework\TestSuite() constructs an empty TestSuite. + * + * - PHPUnit\Framework\TestSuite(ReflectionClass) constructs a + * TestSuite from the given class. + * + * - PHPUnit\Framework\TestSuite(ReflectionClass, String) + * constructs a TestSuite from the given class with the given + * name. + * + * - PHPUnit\Framework\TestSuite(String) either constructs a + * TestSuite from the given class (if the passed string is the + * name of an existing class) or constructs an empty TestSuite + * with the given name. + * + * @param \ReflectionClass|string $theClass + * + * @throws Exception */ - public static function assertClassNotHasAttribute(string $attributeName, string $className, string $message = ''): void + public function __construct($theClass = '', string $name = '') { } /** - * Asserts that a class has a specified static attribute. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * @throws ExpectationFailedException - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 + * Returns a string representation of the test suite. */ - public static function assertClassHasStaticAttribute(string $attributeName, string $className, string $message = ''): void + public function toString(): string { } /** - * Asserts that a class does not have a specified static attribute. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * @throws ExpectationFailedException + * Adds a test to the suite. * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 + * @param array $groups */ - public static function assertClassNotHasStaticAttribute(string $attributeName, string $className, string $message = ''): void + public function addTest(\PHPUnit\Framework\Test $test, $groups = []): void { } /** - * Asserts that an object has a specified attribute. + * Adds the tests from the given class to the suite. * - * @param object $object + * @phan-param object|class-string $testClass * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws Exception - * @throws ExpectationFailedException - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 */ - public static function assertObjectHasAttribute(string $attributeName, $object, string $message = ''): void + public function addTestSuite($testClass): void + { + } + public function addWarning(string $warning): void { } /** - * Asserts that an object does not have a specified attribute. + * Wraps both addTest() and addTestSuite + * as well as the separate import statements for the user's convenience. * - * @param object $object + * If the named file cannot be read or there are no new tests that can be + * added, a PHPUnit\Framework\WarningTestCase will be created instead, + * leaving the current test run untouched. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws Exception - * @throws ExpectationFailedException - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 */ - public static function assertObjectNotHasAttribute(string $attributeName, $object, string $message = ''): void + public function addTestFile(string $filename): void { } /** - * Asserts that an object has a specified property. + * Wrapper for addTestFile() that adds multiple test files. * - * @throws ExpectationFailedException + * @throws Exception */ - final public static function assertObjectHasProperty(string $propertyName, object $object, string $message = ''): void + public function addTestFiles(iterable $fileNames): void { } /** - * Asserts that an object does not have a specified property. + * Counts the number of test cases that will be run by this test. * - * @throws ExpectationFailedException + * @todo refactor usage of numTests in DefaultResultPrinter */ - final public static function assertObjectNotHasProperty(string $propertyName, object $object, string $message = ''): void + public function count(): int { } /** - * Asserts that two variables have the same type and value. - * Used on objects, it asserts that two variables reference - * the same object. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-template ExpectedType - * - * @phan-param ExpectedType $expected - * - * @phan-assert =ExpectedType $actual + * Returns the name of the suite. */ - public static function assertSame($expected, $actual, string $message = ''): void + public function getName(): string { } /** - * Asserts that two variables do not have the same type and value. - * Used on objects, it asserts that two variables do not reference - * the same object. + * Returns the test groups of the suite. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException + * @phan-return list */ - public static function assertNotSame($expected, $actual, string $message = ''): void + public function getGroups(): array + { + } + public function getGroupDetails(): array { } /** - * Asserts that a variable is of a given type. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * @throws ExpectationFailedException - * - * @phan-template ExpectedType of object - * - * @phan-param class-string $expected - * - * @phan-assert =ExpectedType $actual + * Set tests groups of the test case. */ - public static function assertInstanceOf(string $expected, $actual, string $message = ''): void + public function setGroupDetails(array $groups): void { } /** - * Asserts that a variable is not of a given type. + * Runs the tests and collects their result in a TestResult. * + * @throws \SebastianBergmann\CodeCoverage\InvalidArgumentException * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * @throws ExpectationFailedException - * - * @phan-template ExpectedType of object - * - * @phan-param class-string $expected - * - * @phan-assert !ExpectedType $actual + * @throws CodeCoverageException + * @throws \SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException + * @throws Warning */ - public static function assertNotInstanceOf(string $expected, $actual, string $message = ''): void + public function run(?\PHPUnit\Framework\TestResult $result = null): \PHPUnit\Framework\TestResult { } - /** - * Asserts that a variable is of type array. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert array $actual - */ - public static function assertIsArray($actual, string $message = ''): void - { - } - /** - * Asserts that a variable is of type bool. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert bool $actual - */ - public static function assertIsBool($actual, string $message = ''): void - { - } - /** - * Asserts that a variable is of type float. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert float $actual - */ - public static function assertIsFloat($actual, string $message = ''): void - { - } - /** - * Asserts that a variable is of type int. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert int $actual - */ - public static function assertIsInt($actual, string $message = ''): void - { - } - /** - * Asserts that a variable is of type numeric. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert numeric $actual - */ - public static function assertIsNumeric($actual, string $message = ''): void - { - } - /** - * Asserts that a variable is of type object. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert object $actual - */ - public static function assertIsObject($actual, string $message = ''): void - { - } - /** - * Asserts that a variable is of type resource. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert resource $actual - */ - public static function assertIsResource($actual, string $message = ''): void - { - } - /** - * Asserts that a variable is of type resource and is closed. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert resource $actual - */ - public static function assertIsClosedResource($actual, string $message = ''): void - { - } - /** - * Asserts that a variable is of type string. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert string $actual - */ - public static function assertIsString($actual, string $message = ''): void - { - } - /** - * Asserts that a variable is of type scalar. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert scalar $actual - */ - public static function assertIsScalar($actual, string $message = ''): void + public function setRunTestInSeparateProcess(bool $runTestInSeparateProcess): void { } - /** - * Asserts that a variable is of type callable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert callable $actual - */ - public static function assertIsCallable($actual, string $message = ''): void + public function setName(string $name): void { } /** - * Asserts that a variable is of type iterable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException + * Returns the tests as an enumeration. * - * @phan-assert iterable $actual + * @return Test[] */ - public static function assertIsIterable($actual, string $message = ''): void + public function tests(): array { } /** - * Asserts that a variable is not of type array. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException + * Set tests of the test suite. * - * @phan-assert !array $actual + * @param Test[] $tests */ - public static function assertIsNotArray($actual, string $message = ''): void + public function setTests(array $tests): void { } /** - * Asserts that a variable is not of type bool. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException + * Mark the test suite as skipped. * - * @phan-assert !bool $actual - */ - public static function assertIsNotBool($actual, string $message = ''): void - { - } - /** - * Asserts that a variable is not of type float. + * @param string $message * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException + * @throws SkippedTestSuiteError * - * @phan-assert !float $actual + * @phan-return never-return */ - public static function assertIsNotFloat($actual, string $message = ''): void + public function markTestSuiteSkipped($message = ''): void { } /** - * Asserts that a variable is not of type int. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert !int $actual + * @param bool $beStrictAboutChangesToGlobalState */ - public static function assertIsNotInt($actual, string $message = ''): void + public function setBeStrictAboutChangesToGlobalState($beStrictAboutChangesToGlobalState): void { } /** - * Asserts that a variable is not of type numeric. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert !numeric $actual + * @param bool $backupGlobals */ - public static function assertIsNotNumeric($actual, string $message = ''): void + public function setBackupGlobals($backupGlobals): void { } /** - * Asserts that a variable is not of type object. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert !object $actual + * @param bool $backupStaticAttributes */ - public static function assertIsNotObject($actual, string $message = ''): void + public function setBackupStaticAttributes($backupStaticAttributes): void { } /** - * Asserts that a variable is not of type resource. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert !resource $actual + * Returns an iterator for this test suite. */ - public static function assertIsNotResource($actual, string $message = ''): void + public function getIterator(): \Iterator { } - /** - * Asserts that a variable is not of type resource. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert !resource $actual - */ - public static function assertIsNotClosedResource($actual, string $message = ''): void + public function injectFilter(\PHPUnit\Runner\Filter\Factory $filter): void { } /** - * Asserts that a variable is not of type string. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert !string $actual + * @phan-return array */ - public static function assertIsNotString($actual, string $message = ''): void + public function warnings(): array { } /** - * Asserts that a variable is not of type scalar. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert !scalar $actual + * @return list */ - public static function assertIsNotScalar($actual, string $message = ''): void + public function provides(): array { } /** - * Asserts that a variable is not of type callable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert !callable $actual + * @return list */ - public static function assertIsNotCallable($actual, string $message = ''): void + public function requires(): array { } - /** - * Asserts that a variable is not of type iterable. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert !iterable $actual - */ - public static function assertIsNotIterable($actual, string $message = ''): void + public function sortId(): string { } /** - * Asserts that a string matches a given regular expression. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException + * Creates a default TestResult object. */ - public static function assertMatchesRegularExpression(string $pattern, string $string, string $message = ''): void + protected function createResult(): \PHPUnit\Framework\TestResult { } /** - * Asserts that a string matches a given regular expression. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @codeCoverageIgnore - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4086 + * @throws Exception */ - public static function assertRegExp(string $pattern, string $string, string $message = ''): void - { - } - /** - * Asserts that a string does not match a given regular expression. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertDoesNotMatchRegularExpression(string $pattern, string $string, string $message = ''): void - { - } - /** - * Asserts that a string does not match a given regular expression. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @codeCoverageIgnore - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4089 - */ - public static function assertNotRegExp(string $pattern, string $string, string $message = ''): void - { - } - /** - * Assert that the size of two arrays (or `Countable` or `Traversable` objects) - * is the same. - * - * @param \Countable|iterable $expected - * @param \Countable|iterable $actual - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * @throws ExpectationFailedException - */ - public static function assertSameSize($expected, $actual, string $message = ''): void - { - } - /** - * Assert that the size of two arrays (or `Countable` or `Traversable` objects) - * is not the same. - * - * @param \Countable|iterable $expected - * @param \Countable|iterable $actual - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * @throws ExpectationFailedException - */ - public static function assertNotSameSize($expected, $actual, string $message = ''): void - { - } - /** - * Asserts that a string matches a given format string. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertStringMatchesFormat(string $format, string $string, string $message = ''): void - { - } - /** - * Asserts that a string does not match a given format string. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertStringNotMatchesFormat(string $format, string $string, string $message = ''): void - { - } - /** - * Asserts that a string matches a given format file. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertStringMatchesFormatFile(string $formatFile, string $string, string $message = ''): void - { - } - /** - * Asserts that a string does not match a given format string. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertStringNotMatchesFormatFile(string $formatFile, string $string, string $message = ''): void - { - } - /** - * Asserts that a string starts with a given prefix. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertStringStartsWith(string $prefix, string $string, string $message = ''): void - { - } - /** - * Asserts that a string starts not with a given prefix. - * - * @param string $prefix - * @param string $string - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertStringStartsNotWith($prefix, $string, string $message = ''): void - { - } - /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertStringContainsString(string $needle, string $haystack, string $message = ''): void - { - } - /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertStringContainsStringIgnoringCase(string $needle, string $haystack, string $message = ''): void - { - } - /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertStringNotContainsString(string $needle, string $haystack, string $message = ''): void - { - } - /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertStringNotContainsStringIgnoringCase(string $needle, string $haystack, string $message = ''): void - { - } - /** - * Asserts that a string ends with a given suffix. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertStringEndsWith(string $suffix, string $string, string $message = ''): void - { - } - /** - * Asserts that a string ends not with a given suffix. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertStringEndsNotWith(string $suffix, string $string, string $message = ''): void - { - } - /** - * Asserts that two XML files are equal. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * @throws ExpectationFailedException - */ - public static function assertXmlFileEqualsXmlFile(string $expectedFile, string $actualFile, string $message = ''): void - { - } - /** - * Asserts that two XML files are not equal. - * - * @throws \PHPUnit\Util\Exception - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertXmlFileNotEqualsXmlFile(string $expectedFile, string $actualFile, string $message = ''): void - { - } - /** - * Asserts that two XML documents are equal. - * - * @param \DOMDocument|string $actualXml - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * @throws \PHPUnit\Util\Xml\Exception - */ - public static function assertXmlStringEqualsXmlFile(string $expectedFile, $actualXml, string $message = ''): void - { - } - /** - * Asserts that two XML documents are not equal. - * - * @param \DOMDocument|string $actualXml - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * @throws \PHPUnit\Util\Xml\Exception - */ - public static function assertXmlStringNotEqualsXmlFile(string $expectedFile, $actualXml, string $message = ''): void - { - } - /** - * Asserts that two XML documents are equal. - * - * @param \DOMDocument|string $expectedXml - * @param \DOMDocument|string $actualXml - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * @throws \PHPUnit\Util\Xml\Exception - */ - public static function assertXmlStringEqualsXmlString($expectedXml, $actualXml, string $message = ''): void - { - } - /** - * Asserts that two XML documents are not equal. - * - * @param \DOMDocument|string $expectedXml - * @param \DOMDocument|string $actualXml - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * @throws \PHPUnit\Util\Xml\Exception - */ - public static function assertXmlStringNotEqualsXmlString($expectedXml, $actualXml, string $message = ''): void - { - } - /** - * Asserts that a hierarchy of DOMElements matches. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws AssertionFailedError - * @throws ExpectationFailedException - * - * @codeCoverageIgnore - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4091 - */ - public static function assertEqualXMLStructure(\DOMElement $expectedElement, \DOMElement $actualElement, bool $checkAttributes = false, string $message = ''): void - { - } - /** - * Evaluates a PHPUnit\Framework\Constraint matcher object. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertThat($value, \PHPUnit\Framework\Constraint\Constraint $constraint, string $message = ''): void - { - } - /** - * Asserts that a string is a valid JSON string. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertJson(string $actualJson, string $message = ''): void - { - } - /** - * Asserts that two given JSON encoded objects or arrays are equal. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertJsonStringEqualsJsonString(string $expectedJson, string $actualJson, string $message = ''): void - { - } - /** - * Asserts that two given JSON encoded objects or arrays are not equal. - * - * @param string $expectedJson - * @param string $actualJson - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertJsonStringNotEqualsJsonString($expectedJson, $actualJson, string $message = ''): void - { - } - /** - * Asserts that the generated JSON encoded object and the content of the given file are equal. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertJsonStringEqualsJsonFile(string $expectedFile, string $actualJson, string $message = ''): void - { - } - /** - * Asserts that the generated JSON encoded object and the content of the given file are not equal. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertJsonStringNotEqualsJsonFile(string $expectedFile, string $actualJson, string $message = ''): void - { - } - /** - * Asserts that two JSON files are equal. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertJsonFileEqualsJsonFile(string $expectedFile, string $actualFile, string $message = ''): void - { - } - /** - * Asserts that two JSON files are not equal. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertJsonFileNotEqualsJsonFile(string $expectedFile, string $actualFile, string $message = ''): void - { - } - /** - * @throws Exception - */ - public static function logicalAnd(...$func_get_args): \PHPUnit\Framework\Constraint\LogicalAnd - { - } - public static function logicalOr(...$func_get_args): \PHPUnit\Framework\Constraint\LogicalOr - { - } - public static function logicalNot(\PHPUnit\Framework\Constraint\Constraint $constraint): \PHPUnit\Framework\Constraint\LogicalNot - { - } - public static function logicalXor(...$func_get_args): \PHPUnit\Framework\Constraint\LogicalXor - { - } - public static function anything(): \PHPUnit\Framework\Constraint\IsAnything - { - } - public static function isTrue(): \PHPUnit\Framework\Constraint\IsTrue - { - } - /** - * @phan-template CallbackInput of mixed - * - * @phan-param callable(CallbackInput $callback): bool $callback - * - * @phan-return Constraint\Callback - */ - public static function callback(callable $callback): \PHPUnit\Framework\Constraint\Callback - { - } - public static function isFalse(): \PHPUnit\Framework\Constraint\IsFalse - { - } - public static function isJson(): \PHPUnit\Framework\Constraint\IsJson - { - } - public static function isNull(): \PHPUnit\Framework\Constraint\IsNull - { - } - public static function isFinite(): \PHPUnit\Framework\Constraint\IsFinite - { - } - public static function isInfinite(): \PHPUnit\Framework\Constraint\IsInfinite - { - } - public static function isNan(): \PHPUnit\Framework\Constraint\IsNan - { - } - public static function containsEqual($value): \PHPUnit\Framework\Constraint\TraversableContainsEqual - { - } - public static function containsIdentical($value): \PHPUnit\Framework\Constraint\TraversableContainsIdentical - { - } - public static function containsOnly(string $type): \PHPUnit\Framework\Constraint\TraversableContainsOnly - { - } - public static function containsOnlyInstancesOf(string $className): \PHPUnit\Framework\Constraint\TraversableContainsOnly - { - } - /** - * @param int|string $key - */ - public static function arrayHasKey($key): \PHPUnit\Framework\Constraint\ArrayHasKey - { - } - public static function equalTo($value): \PHPUnit\Framework\Constraint\IsEqual - { - } - public static function equalToCanonicalizing($value): \PHPUnit\Framework\Constraint\IsEqualCanonicalizing - { - } - public static function equalToIgnoringCase($value): \PHPUnit\Framework\Constraint\IsEqualIgnoringCase - { - } - public static function equalToWithDelta($value, float $delta): \PHPUnit\Framework\Constraint\IsEqualWithDelta - { - } - public static function isEmpty(): \PHPUnit\Framework\Constraint\IsEmpty - { - } - public static function isWritable(): \PHPUnit\Framework\Constraint\IsWritable - { - } - public static function isReadable(): \PHPUnit\Framework\Constraint\IsReadable - { - } - public static function directoryExists(): \PHPUnit\Framework\Constraint\DirectoryExists - { - } - public static function fileExists(): \PHPUnit\Framework\Constraint\FileExists - { - } - public static function greaterThan($value): \PHPUnit\Framework\Constraint\GreaterThan - { - } - public static function greaterThanOrEqual($value): \PHPUnit\Framework\Constraint\LogicalOr - { - } - /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 - */ - public static function classHasAttribute(string $attributeName): \PHPUnit\Framework\Constraint\ClassHasAttribute - { - } - /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 - */ - public static function classHasStaticAttribute(string $attributeName): \PHPUnit\Framework\Constraint\ClassHasStaticAttribute - { - } - /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 - */ - public static function objectHasAttribute($attributeName): \PHPUnit\Framework\Constraint\ObjectHasAttribute - { - } - public static function identicalTo($value): \PHPUnit\Framework\Constraint\IsIdentical - { - } - public static function isInstanceOf(string $className): \PHPUnit\Framework\Constraint\IsInstanceOf - { - } - public static function isType(string $type): \PHPUnit\Framework\Constraint\IsType - { - } - public static function lessThan($value): \PHPUnit\Framework\Constraint\LessThan - { - } - public static function lessThanOrEqual($value): \PHPUnit\Framework\Constraint\LogicalOr - { - } - public static function matchesRegularExpression(string $pattern): \PHPUnit\Framework\Constraint\RegularExpression - { - } - public static function matches(string $string): \PHPUnit\Framework\Constraint\StringMatchesFormatDescription - { - } - public static function stringStartsWith($prefix): \PHPUnit\Framework\Constraint\StringStartsWith - { - } - public static function stringContains(string $string, bool $case = true): \PHPUnit\Framework\Constraint\StringContains - { - } - public static function stringEndsWith(string $suffix): \PHPUnit\Framework\Constraint\StringEndsWith - { - } - public static function countOf(int $count): \PHPUnit\Framework\Constraint\Count - { - } - public static function objectEquals(object $object, string $method = 'equals'): \PHPUnit\Framework\Constraint\ObjectEquals - { - } - /** - * Fails a test with the given message. - * - * @throws AssertionFailedError - * - * @phan-return never-return - */ - public static function fail(string $message = ''): void - { - } - /** - * Mark the test as incomplete. - * - * @throws IncompleteTestError - * - * @phan-return never-return - */ - public static function markTestIncomplete(string $message = ''): void - { - } - /** - * Mark the test as skipped. - * - * @throws SkippedTestError - * @throws SyntheticSkippedError - * - * @phan-return never-return - */ - public static function markTestSkipped(string $message = ''): void - { - } - /** - * Return the current assertion count. - */ - public static function getCount(): int - { - } - /** - * Reset the assertion counter. - */ - public static function resetCount(): void - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface SkippedTest extends \Throwable -{ -} -/** - * @template-implements \IteratorAggregate - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -class TestSuite implements \IteratorAggregate, \PHPUnit\Framework\Reorderable, \PHPUnit\Framework\SelfDescribing, \PHPUnit\Framework\Test -{ - /** - * Enable or disable the backup and restoration of the $GLOBALS array. - * - * @var bool - */ - protected $backupGlobals; - /** - * Enable or disable the backup and restoration of static attributes. - * - * @var bool - */ - protected $backupStaticAttributes; - /** - * @var bool - */ - protected $runTestInSeparateProcess = false; - /** - * The name of the test suite. - * - * @var string - */ - protected $name = ''; - /** - * The test groups of the test suite. - * - * @phan-var array> - */ - protected $groups = []; - /** - * The tests in the test suite. - * - * @var Test[] - */ - protected $tests = []; - /** - * The number of tests in the test suite. - * - * @var int - */ - protected $numTests = -1; - /** - * @var bool - */ - protected $testCase = false; - /** - * @var string[] - */ - protected $foundClasses = []; - /** - * @var null|list - */ - protected $providedTests; - /** - * @var null|list - */ - protected $requiredTests; - /** - * Constructs a new TestSuite. - * - * - PHPUnit\Framework\TestSuite() constructs an empty TestSuite. - * - * - PHPUnit\Framework\TestSuite(ReflectionClass) constructs a - * TestSuite from the given class. - * - * - PHPUnit\Framework\TestSuite(ReflectionClass, String) - * constructs a TestSuite from the given class with the given - * name. - * - * - PHPUnit\Framework\TestSuite(String) either constructs a - * TestSuite from the given class (if the passed string is the - * name of an existing class) or constructs an empty TestSuite - * with the given name. - * - * @param \ReflectionClass|string $theClass - * - * @throws Exception - */ - public function __construct($theClass = '', string $name = '') - { - } - /** - * Returns a string representation of the test suite. - */ - public function toString(): string - { - } - /** - * Adds a test to the suite. - * - * @param array $groups - */ - public function addTest(\PHPUnit\Framework\Test $test, $groups = []): void - { - } - /** - * Adds the tests from the given class to the suite. - * - * @phan-param object|class-string $testClass - * - * @throws Exception - */ - public function addTestSuite($testClass): void - { - } - public function addWarning(string $warning): void - { - } - /** - * Wraps both addTest() and addTestSuite - * as well as the separate import statements for the user's convenience. - * - * If the named file cannot be read or there are no new tests that can be - * added, a PHPUnit\Framework\WarningTestCase will be created instead, - * leaving the current test run untouched. - * - * @throws Exception - */ - public function addTestFile(string $filename): void - { - } - /** - * Wrapper for addTestFile() that adds multiple test files. - * - * @throws Exception - */ - public function addTestFiles(iterable $fileNames): void - { - } - /** - * Counts the number of test cases that will be run by this test. - * - * @todo refactor usage of numTests in DefaultResultPrinter - */ - public function count(): int - { - } - /** - * Returns the name of the suite. - */ - public function getName(): string - { - } - /** - * Returns the test groups of the suite. - * - * @phan-return list - */ - public function getGroups(): array - { - } - public function getGroupDetails(): array - { - } - /** - * Set tests groups of the test case. - */ - public function setGroupDetails(array $groups): void - { - } - /** - * Runs the tests and collects their result in a TestResult. - * - * @throws \SebastianBergmann\CodeCoverage\InvalidArgumentException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws CodeCoverageException - * @throws \SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException - * @throws Warning - */ - public function run(?\PHPUnit\Framework\TestResult $result = null): \PHPUnit\Framework\TestResult - { - } - public function setRunTestInSeparateProcess(bool $runTestInSeparateProcess): void - { - } - public function setName(string $name): void - { - } - /** - * Returns the tests as an enumeration. - * - * @return Test[] - */ - public function tests(): array - { - } - /** - * Set tests of the test suite. - * - * @param Test[] $tests - */ - public function setTests(array $tests): void - { - } - /** - * Mark the test suite as skipped. - * - * @param string $message - * - * @throws SkippedTestSuiteError - * - * @phan-return never-return - */ - public function markTestSuiteSkipped($message = ''): void - { - } - /** - * @param bool $beStrictAboutChangesToGlobalState - */ - public function setBeStrictAboutChangesToGlobalState($beStrictAboutChangesToGlobalState): void - { - } - /** - * @param bool $backupGlobals - */ - public function setBackupGlobals($backupGlobals): void - { - } - /** - * @param bool $backupStaticAttributes - */ - public function setBackupStaticAttributes($backupStaticAttributes): void - { - } - /** - * Returns an iterator for this test suite. - */ - public function getIterator(): \Iterator - { - } - public function injectFilter(\PHPUnit\Runner\Filter\Factory $filter): void - { - } - /** - * @phan-return array - */ - public function warnings(): array - { - } - /** - * @return list - */ - public function provides(): array - { - } - /** - * @return list - */ - public function requires(): array - { - } - public function sortId(): string - { - } - /** - * Creates a default TestResult object. - */ - protected function createResult(): \PHPUnit\Framework\TestResult - { - } - /** - * @throws Exception - */ - protected function addTestMethod(\ReflectionClass $class, \ReflectionMethod $method): void - { - } -} -/** - * Wraps Exceptions thrown by code under test. - * - * Re-instantiates Exceptions thrown by user-space code to retain their original - * class names, properties, and stack traces (but without arguments). - * - * Unlike PHPUnit\Framework\Exception, the complete stack of previous Exceptions - * is processed. - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ExceptionWrapper extends \PHPUnit\Framework\Exception -{ - public function __construct(\Throwable $t) - { - } - public function __toString(): string - { - } - public function getClassName(): string - { - } - public function getPreviousWrapped(): ?self - { - } - public function setClassName(string $className): void - { - } - public function setOriginalException(\Throwable $t): void - { - } - public function getOriginalException(): ?\Throwable + protected function addTestMethod(\ReflectionClass $class, \ReflectionMethod $method): void { } } @@ -5484,101 +4481,1219 @@ function matches(string $string, ...$func_get_args): \PHPUnit\Framework\Constrai function stringStartsWith($prefix, ...$func_get_args): \PHPUnit\Framework\Constraint\StringStartsWith { } -function stringContains(string $string, bool $case = true, ...$func_get_args): \PHPUnit\Framework\Constraint\StringContains +function stringContains(string $string, bool $case = true, ...$func_get_args): \PHPUnit\Framework\Constraint\StringContains +{ +} +function stringEndsWith(string $suffix, ...$func_get_args): \PHPUnit\Framework\Constraint\StringEndsWith +{ +} +function countOf(int $count, ...$func_get_args): \PHPUnit\Framework\Constraint\Count +{ +} +function objectEquals(object $object, string $method = 'equals', ...$func_get_args): \PHPUnit\Framework\Constraint\ObjectEquals +{ +} +/** + * Returns a matcher that matches when the method is executed + * zero or more times. + */ +function any(): \PHPUnit\Framework\MockObject\Rule\AnyInvokedCount +{ +} +/** + * Returns a matcher that matches when the method is never executed. + */ +function never(): \PHPUnit\Framework\MockObject\Rule\InvokedCount +{ +} +/** + * Returns a matcher that matches when the method is executed + * at least N times. + */ +function atLeast(int $requiredInvocations): \PHPUnit\Framework\MockObject\Rule\InvokedAtLeastCount +{ +} +/** + * Returns a matcher that matches when the method is executed at least once. + */ +function atLeastOnce(): \PHPUnit\Framework\MockObject\Rule\InvokedAtLeastOnce +{ +} +/** + * Returns a matcher that matches when the method is executed exactly once. + */ +function once(): \PHPUnit\Framework\MockObject\Rule\InvokedCount +{ +} +/** + * Returns a matcher that matches when the method is executed + * exactly $count times. + */ +function exactly(int $count): \PHPUnit\Framework\MockObject\Rule\InvokedCount +{ +} +/** + * Returns a matcher that matches when the method is executed + * at most N times. + */ +function atMost(int $allowedInvocations): \PHPUnit\Framework\MockObject\Rule\InvokedAtMostCount +{ +} +/** + * Returns a matcher that matches when the method is executed + * at the given index. + */ +function at(int $index): \PHPUnit\Framework\MockObject\Rule\InvokedAtIndex +{ +} +function returnValue($value): \PHPUnit\Framework\MockObject\Stub\ReturnStub +{ +} +function returnValueMap(array $valueMap): \PHPUnit\Framework\MockObject\Stub\ReturnValueMap +{ +} +function returnArgument(int $argumentIndex): \PHPUnit\Framework\MockObject\Stub\ReturnArgument +{ +} +function returnCallback($callback): \PHPUnit\Framework\MockObject\Stub\ReturnCallback +{ +} +/** + * Returns the current object. + * + * This method is useful when mocking a fluent interface. + */ +function returnSelf(): \PHPUnit\Framework\MockObject\Stub\ReturnSelf { } -function stringEndsWith(string $suffix, ...$func_get_args): \PHPUnit\Framework\Constraint\StringEndsWith +function throwException(\Throwable $exception): \PHPUnit\Framework\MockObject\Stub\Exception { } -function countOf(int $count, ...$func_get_args): \PHPUnit\Framework\Constraint\Count +function onConsecutiveCalls(...$func_get_args): \PHPUnit\Framework\MockObject\Stub\ConsecutiveCalls { } -function objectEquals(object $object, string $method = 'equals', ...$func_get_args): \PHPUnit\Framework\Constraint\ObjectEquals +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class TestFailure { + /** + * Returns a description for an exception. + */ + public static function exceptionToString(\Throwable $e): string + { + } + /** + * Constructs a TestFailure with the given test and exception. + */ + public function __construct(\PHPUnit\Framework\Test $failedTest, \Throwable $t) + { + } + /** + * Returns a short description of the failure. + */ + public function toString(): string + { + } + /** + * Returns a description for the thrown exception. + */ + public function getExceptionAsString(): string + { + } + /** + * Returns the name of the failing test (including data set, if any). + */ + public function getTestName(): string + { + } + /** + * Returns the failing test. + * + * Note: The test object is not set when the test is executed in process + * isolation. + * + * @see Exception + */ + public function failedTest(): ?\PHPUnit\Framework\Test + { + } + /** + * Gets the thrown exception. + */ + public function thrownException(): \Throwable + { + } + /** + * Returns the exception's message. + */ + public function exceptionMessage(): string + { + } + /** + * Returns true if the thrown exception + * is of type AssertionFailedError. + */ + public function isFailure(): bool + { + } } /** - * Returns a matcher that matches when the method is executed - * zero or more times. + * This interface, as well as the associated mechanism for extending PHPUnit, + * will be removed in PHPUnit 10. There is no alternative available in this + * version of PHPUnit. + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @deprecated + * @see https://github.com/sebastianbergmann/phpunit/issues/4676 */ -function any(): \PHPUnit\Framework\MockObject\Rule\AnyInvokedCount +interface TestListener { + public function addError(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void; + public function addWarning(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\Warning $e, float $time): void; + public function addFailure(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\AssertionFailedError $e, float $time): void; + public function addIncompleteTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void; + public function addRiskyTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void; + public function addSkippedTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void; + public function startTestSuite(\PHPUnit\Framework\TestSuite $suite): void; + public function endTestSuite(\PHPUnit\Framework\TestSuite $suite): void; + public function startTest(\PHPUnit\Framework\Test $test): void; + public function endTest(\PHPUnit\Framework\Test $test, float $time): void; } /** - * Returns a matcher that matches when the method is never executed. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -function never(): \PHPUnit\Framework\MockObject\Rule\InvokedCount +final class InvalidParameterGroupException extends \PHPUnit\Framework\Exception { } /** - * Returns a matcher that matches when the method is executed - * at least N times. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -function atLeast(int $requiredInvocations): \PHPUnit\Framework\MockObject\Rule\InvokedAtLeastCount +final class ErrorTestCase extends \PHPUnit\Framework\TestCase { + public function __construct(string $message = '') + { + } + public function getMessage(): string + { + } + /** + * Returns a string representation of the test case. + */ + public function toString(): string + { + } } /** - * Returns a matcher that matches when the method is executed at least once. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -function atLeastOnce(): \PHPUnit\Framework\MockObject\Rule\InvokedAtLeastOnce +final class ExecutionOrderDependency { + public static function createFromDependsAnnotation(string $className, string $annotation): self + { + } + /** + * @phan-param list $dependencies + * + * @phan-return list + */ + public static function filterInvalid(array $dependencies): array + { + } + /** + * @phan-param list $existing + * @phan-param list $additional + * + * @phan-return list + */ + public static function mergeUnique(array $existing, array $additional): array + { + } + /** + * @phan-param list $left + * @phan-param list $right + * + * @phan-return list + */ + public static function diff(array $left, array $right): array + { + } + public function __construct(string $classOrCallableName, ?string $methodName = null, ?string $option = null) + { + } + public function __toString(): string + { + } + public function isValid(): bool + { + } + public function useShallowClone(): bool + { + } + public function useDeepClone(): bool + { + } + public function targetIsClass(): bool + { + } + public function getTarget(): string + { + } + public function getTargetClassName(): string + { + } } /** - * Returns a matcher that matches when the method is executed exactly once. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -function once(): \PHPUnit\Framework\MockObject\Rule\InvokedCount +interface SkippedTest extends \Throwable { } /** - * Returns a matcher that matches when the method is executed - * exactly $count times. + * @deprecated The `TestListener` interface is deprecated + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -function exactly(int $count): \PHPUnit\Framework\MockObject\Rule\InvokedCount +trait TestListenerDefaultImplementation { + public function addError(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void + { + } + public function addWarning(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\Warning $e, float $time): void + { + } + public function addFailure(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\AssertionFailedError $e, float $time): void + { + } + public function addIncompleteTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void + { + } + public function addRiskyTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void + { + } + public function addSkippedTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void + { + } + public function startTestSuite(\PHPUnit\Framework\TestSuite $suite): void + { + } + public function endTestSuite(\PHPUnit\Framework\TestSuite $suite): void + { + } + public function startTest(\PHPUnit\Framework\Test $test): void + { + } + public function endTest(\PHPUnit\Framework\Test $test, float $time): void + { + } } /** - * Returns a matcher that matches when the method is executed - * at most N times. + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -function atMost(int $allowedInvocations): \PHPUnit\Framework\MockObject\Rule\InvokedAtMostCount +abstract class TestCase extends \PHPUnit\Framework\Assert implements \PHPUnit\Framework\Reorderable, \PHPUnit\Framework\SelfDescribing, \PHPUnit\Framework\Test { + /** + * @var ?bool + */ + protected $backupGlobals; + /** + * @var string[] + */ + protected $backupGlobalsExcludeList = []; + /** + * @var string[] + * + * @deprecated Use $backupGlobalsExcludeList instead + */ + protected $backupGlobalsBlacklist = []; + /** + * @var ?bool + */ + protected $backupStaticAttributes; + /** + * @var array> + */ + protected $backupStaticAttributesExcludeList = []; + /** + * @var array> + * + * @deprecated Use $backupStaticAttributesExcludeList instead + */ + protected $backupStaticAttributesBlacklist = []; + /** + * @var ?bool + */ + protected $runTestInSeparateProcess; + /** + * @var bool + */ + protected $preserveGlobalState = true; + /** + * @var list + */ + protected $providedTests = []; + /** + * Returns a matcher that matches when the method is executed + * zero or more times. + */ + public static function any(): \PHPUnit\Framework\MockObject\Rule\AnyInvokedCount + { + } + /** + * Returns a matcher that matches when the method is never executed. + */ + public static function never(): \PHPUnit\Framework\MockObject\Rule\InvokedCount + { + } + /** + * Returns a matcher that matches when the method is executed + * at least N times. + */ + public static function atLeast(int $requiredInvocations): \PHPUnit\Framework\MockObject\Rule\InvokedAtLeastCount + { + } + /** + * Returns a matcher that matches when the method is executed at least once. + */ + public static function atLeastOnce(): \PHPUnit\Framework\MockObject\Rule\InvokedAtLeastOnce + { + } + /** + * Returns a matcher that matches when the method is executed exactly once. + */ + public static function once(): \PHPUnit\Framework\MockObject\Rule\InvokedCount + { + } + /** + * Returns a matcher that matches when the method is executed + * exactly $count times. + */ + public static function exactly(int $count): \PHPUnit\Framework\MockObject\Rule\InvokedCount + { + } + /** + * Returns a matcher that matches when the method is executed + * at most N times. + */ + public static function atMost(int $allowedInvocations): \PHPUnit\Framework\MockObject\Rule\InvokedAtMostCount + { + } + /** + * Returns a matcher that matches when the method is executed + * at the given index. + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4297 + * + * @codeCoverageIgnore + */ + public static function at(int $index): \PHPUnit\Framework\MockObject\Rule\InvokedAtIndex + { + } + public static function returnValue($value): \PHPUnit\Framework\MockObject\Stub\ReturnStub + { + } + public static function returnValueMap(array $valueMap): \PHPUnit\Framework\MockObject\Stub\ReturnValueMap + { + } + public static function returnArgument(int $argumentIndex): \PHPUnit\Framework\MockObject\Stub\ReturnArgument + { + } + public static function returnCallback($callback): \PHPUnit\Framework\MockObject\Stub\ReturnCallback + { + } + /** + * Returns the current object. + * + * This method is useful when mocking a fluent interface. + */ + public static function returnSelf(): \PHPUnit\Framework\MockObject\Stub\ReturnSelf + { + } + public static function throwException(\Throwable $exception): \PHPUnit\Framework\MockObject\Stub\Exception + { + } + public static function onConsecutiveCalls(...$args): \PHPUnit\Framework\MockObject\Stub\ConsecutiveCalls + { + } + /** + * @param int|string $dataName + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function __construct(?string $name = null, array $data = [], $dataName = '') + { + } + /** + * This method is called before the first test of this test class is run. + */ + public static function setUpBeforeClass(): void + { + } + /** + * This method is called after the last test of this test class is run. + */ + public static function tearDownAfterClass(): void + { + } + /** + * This method is called before each test. + */ + protected function setUp(): void + { + } + /** + * Performs assertions shared by all tests of a test case. + * + * This method is called between setUp() and test. + */ + protected function assertPreConditions(): void + { + } + /** + * Performs assertions shared by all tests of a test case. + * + * This method is called between test and tearDown(). + */ + protected function assertPostConditions(): void + { + } + /** + * This method is called after each test. + */ + protected function tearDown(): void + { + } + /** + * Returns a string representation of the test case. + * + * @throws Exception + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + */ + public function toString(): string + { + } + public function count(): int + { + } + public function getActualOutputForAssertion(): string + { + } + public function expectOutputRegex(string $expectedRegex): void + { + } + public function expectOutputString(string $expectedString): void + { + } + /** + * @phan-param class-string<\Throwable> $exception + */ + public function expectException(string $exception): void + { + } + /** + * @param int|string $code + */ + public function expectExceptionCode($code): void + { + } + public function expectExceptionMessage(string $message): void + { + } + public function expectExceptionMessageMatches(string $regularExpression): void + { + } + /** + * Sets up an expectation for an exception to be raised by the code under test. + * Information for expected exception class, expected exception message, and + * expected exception code are retrieved from a given Exception object. + */ + public function expectExceptionObject(\Exception $exception): void + { + } + public function expectNotToPerformAssertions(): void + { + } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ + public function expectDeprecation(): void + { + } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ + public function expectDeprecationMessage(string $message): void + { + } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ + public function expectDeprecationMessageMatches(string $regularExpression): void + { + } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ + public function expectNotice(): void + { + } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ + public function expectNoticeMessage(string $message): void + { + } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ + public function expectNoticeMessageMatches(string $regularExpression): void + { + } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ + public function expectWarning(): void + { + } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ + public function expectWarningMessage(string $message): void + { + } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ + public function expectWarningMessageMatches(string $regularExpression): void + { + } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ + public function expectError(): void + { + } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ + public function expectErrorMessage(string $message): void + { + } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ + public function expectErrorMessageMatches(string $regularExpression): void + { + } + public function getStatus(): int + { + } + public function markAsRisky(): void + { + } + public function getStatusMessage(): string + { + } + public function hasFailed(): bool + { + } + /** + * Runs the test case and collects the results in a TestResult object. + * If no TestResult object is passed a new one will be created. + * + * @throws \SebastianBergmann\CodeCoverage\InvalidArgumentException + * @throws CodeCoverageException + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws \SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException + * @throws \PHPUnit\Util\Exception + */ + public function run(?\PHPUnit\Framework\TestResult $result = null): \PHPUnit\Framework\TestResult + { + } + /** + * Returns a builder object to create mock objects using a fluent interface. + * + * @phan-template RealInstanceType of object + * + * @phan-param class-string $className + * + * @phan-return MockObject\MockBuilder + */ + public function getMockBuilder(string $className): \PHPUnit\Framework\MockObject\MockBuilder + { + } + public function registerComparator(\SebastianBergmann\Comparator\Comparator $comparator): void + { + } + /** + * @return string[] + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function doubledTypes(): array + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function getGroups(): array + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function setGroups(array $groups): void + { + } + /** + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function getName(bool $withDataSet = true): string + { + } + /** + * Returns the size of the test. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function getSize(): int + { + } + /** + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function hasSize(): bool + { + } + /** + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function isSmall(): bool + { + } + /** + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function isMedium(): bool + { + } + /** + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function isLarge(): bool + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function getActualOutput(): string + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function hasOutput(): bool + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function doesNotPerformAssertions(): bool + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function hasExpectationOnOutput(): bool + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function getExpectedException(): ?string + { + } + /** + * @return null|int|string + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function getExpectedExceptionCode() + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function getExpectedExceptionMessage(): ?string + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function getExpectedExceptionMessageRegExp(): ?string + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function setRegisterMockObjectsFromTestArgumentsRecursively(bool $flag): void + { + } + /** + * @throws \Throwable + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function runBare(): void + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function setName(string $name): void + { + } + /** + * @param list $dependencies + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function setDependencies(array $dependencies): void + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function setDependencyInput(array $dependencyInput): void + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function setBeStrictAboutChangesToGlobalState(?bool $beStrictAboutChangesToGlobalState): void + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function setBackupGlobals(?bool $backupGlobals): void + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function setBackupStaticAttributes(?bool $backupStaticAttributes): void + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function setRunTestInSeparateProcess(bool $runTestInSeparateProcess): void + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function setRunClassInSeparateProcess(bool $runClassInSeparateProcess): void + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function setPreserveGlobalState(bool $preserveGlobalState): void + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function setInIsolation(bool $inIsolation): void + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function isInIsolation(): bool + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function getResult() + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function setResult($result): void + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function setOutputCallback(callable $callback): void + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function getTestResultObject(): ?\PHPUnit\Framework\TestResult + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function setTestResultObject(\PHPUnit\Framework\TestResult $result): void + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function registerMockObject(\PHPUnit\Framework\MockObject\MockObject $mockObject): void + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function addToAssertionCount(int $count): void + { + } + /** + * Returns the number of assertions performed by this test. + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function getNumAssertions(): int + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function usesDataProvider(): bool + { + } + /** + * @return int|string + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function dataName() + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function getDataSetAsString(bool $includeData = true): string + { + } + /** + * Gets the data set of a TestCase. + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function getProvidedData(): array + { + } + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function addWarning(string $warning): void + { + } + public function sortId(): string + { + } + /** + * Returns the normalized test name as class::method. + * + * @return list + */ + public function provides(): array + { + } + /** + * Returns a list of normalized dependency names, class::method. + * + * This list can differ from the raw dependencies as the resolver has + * no need for the [!][shallow]clone prefix that is filtered out + * during normalization. + * + * @return list + */ + public function requires(): array + { + } + /** + * Override to run the test and assert its state. + * + * @throws \SebastianBergmann\ObjectEnumerator\InvalidArgumentException + * @throws AssertionFailedError + * @throws Exception + * @throws ExpectationFailedException + * @throws \Throwable + */ + protected function runTest() + { + } + /** + * This method is a wrapper for the ini_set() function that automatically + * resets the modified php.ini setting to its original value after the + * test is run. + * + * @throws Exception + */ + protected function iniSet(string $varName, string $newValue): void + { + } + /** + * This method is a wrapper for the setlocale() function that automatically + * resets the locale to its original value after the test is run. + * + * @throws Exception + */ + protected function setLocale(...$args): void + { + } + /** + * Makes configurable stub for the specified class. + * + * @phan-template RealInstanceType of object + * + * @phan-param class-string $originalClassName + * + * @phan-return MockObject\Stub&RealInstanceType + */ + protected function createStub(string $originalClassName): \PHPUnit\Framework\MockObject\Stub + { + } + /** + * Returns a mock object for the specified class. + * + * @phan-template RealInstanceType of object + * + * @phan-param class-string $originalClassName + * + * @phan-return MockObject\MockObject&RealInstanceType + */ + protected function createMock(string $originalClassName): \PHPUnit\Framework\MockObject\MockObject + { + } + /** + * Returns a configured mock object for the specified class. + * + * @phan-template RealInstanceType of object + * + * @phan-param class-string $originalClassName + * + * @phan-return MockObject\MockObject&RealInstanceType + */ + protected function createConfiguredMock(string $originalClassName, array $configuration): \PHPUnit\Framework\MockObject\MockObject + { + } + /** + * Returns a partial mock object for the specified class. + * + * @param string[] $methods + * + * @phan-template RealInstanceType of object + * + * @phan-param class-string $originalClassName + * + * @phan-return MockObject\MockObject&RealInstanceType + */ + protected function createPartialMock(string $originalClassName, array $methods): \PHPUnit\Framework\MockObject\MockObject + { + } + /** + * Returns a test proxy for the specified class. + * + * @phan-template RealInstanceType of object + * + * @phan-param class-string $originalClassName + * + * @phan-return MockObject\MockObject&RealInstanceType + */ + protected function createTestProxy(string $originalClassName, array $constructorArguments = []): \PHPUnit\Framework\MockObject\MockObject + { + } + /** + * Mocks the specified class and returns the name of the mocked class. + * + * @param null|array $methods $methods + * + * @phan-template RealInstanceType of object + * + * @phan-param class-string|string $originalClassName + * + * @phan-return class-string + * + * @deprecated + */ + protected function getMockClass(string $originalClassName, $methods = [], array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = false, bool $callOriginalClone = true, bool $callAutoload = true, bool $cloneArguments = false): string + { + } + /** + * Returns a mock object for the specified abstract class with all abstract + * methods of the class mocked. Concrete methods are not mocked by default. + * To mock concrete methods, use the 7th parameter ($mockedMethods). + * + * @phan-template RealInstanceType of object + * + * @phan-param class-string $originalClassName + * + * @phan-return MockObject\MockObject&RealInstanceType + */ + protected function getMockForAbstractClass(string $originalClassName, array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, array $mockedMethods = [], bool $cloneArguments = false): \PHPUnit\Framework\MockObject\MockObject + { + } + /** + * Returns a mock object based on the given WSDL file. + * + * @phan-template RealInstanceType of object + * + * @phan-param class-string|string $originalClassName + * + * @phan-return MockObject\MockObject&RealInstanceType + */ + protected function getMockFromWsdl(string $wsdlFile, string $originalClassName = '', string $mockClassName = '', array $methods = [], bool $callOriginalConstructor = true, array $options = []): \PHPUnit\Framework\MockObject\MockObject + { + } + /** + * Returns a mock object for the specified trait with all abstract methods + * of the trait mocked. Concrete methods to mock can be specified with the + * `$mockedMethods` parameter. + * + * @phan-param trait-string $traitName + */ + protected function getMockForTrait(string $traitName, array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, array $mockedMethods = [], bool $cloneArguments = false): \PHPUnit\Framework\MockObject\MockObject + { + } + /** + * Returns an object for the specified trait. + * + * @phan-param trait-string $traitName + */ + protected function getObjectForTrait(string $traitName, array $arguments = [], string $traitClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true): object + { + } + /** + * @throws \Prophecy\Exception\Doubler\ClassNotFoundException + * @throws \Prophecy\Exception\Doubler\DoubleException + * @throws \Prophecy\Exception\Doubler\InterfaceNotFoundException + * + * @phan-param class-string|null $classOrInterface + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4141 + */ + protected function prophesize(?string $classOrInterface = null): \Prophecy\Prophecy\ObjectProphecy + { + } + /** + * Creates a default TestResult object. + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + protected function createResult(): \PHPUnit\Framework\TestResult + { + } + /** + * This method is called when a test method did not execute successfully. + * + * @throws \Throwable + */ + protected function onNotSuccessfulTest(\Throwable $t): void + { + } + protected function recordDoubledType(string $originalClassName): void + { + } } /** - * Returns a matcher that matches when the method is executed - * at the given index. + * @template-implements \RecursiveIterator + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -function at(int $index): \PHPUnit\Framework\MockObject\Rule\InvokedAtIndex -{ -} -function returnValue($value): \PHPUnit\Framework\MockObject\Stub\ReturnStub -{ -} -function returnValueMap(array $valueMap): \PHPUnit\Framework\MockObject\Stub\ReturnValueMap -{ -} -function returnArgument(int $argumentIndex): \PHPUnit\Framework\MockObject\Stub\ReturnArgument -{ -} -function returnCallback($callback): \PHPUnit\Framework\MockObject\Stub\ReturnCallback +final class TestSuiteIterator implements \RecursiveIterator { + public function __construct(\PHPUnit\Framework\TestSuite $testSuite) + { + } + public function rewind(): void + { + } + public function valid(): bool + { + } + public function key(): int + { + } + public function current(): \PHPUnit\Framework\Test + { + } + public function next(): void + { + } + /** + * @throws NoChildTestSuiteException + */ + public function getChildren(): self + { + } + public function hasChildren(): bool + { + } } /** - * Returns the current object. + * Wraps Exceptions thrown by code under test. * - * This method is useful when mocking a fluent interface. + * Re-instantiates Exceptions thrown by user-space code to retain their original + * class names, properties, and stack traces (but without arguments). + * + * Unlike PHPUnit\Framework\Exception, the complete stack of previous Exceptions + * is processed. + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -function returnSelf(): \PHPUnit\Framework\MockObject\Stub\ReturnSelf -{ -} -function throwException(\Throwable $exception): \PHPUnit\Framework\MockObject\Stub\Exception -{ -} -function onConsecutiveCalls(...$func_get_args): \PHPUnit\Framework\MockObject\Stub\ConsecutiveCalls +final class ExceptionWrapper extends \PHPUnit\Framework\Exception { + public function __construct(\Throwable $t) + { + } + public function __toString(): string + { + } + public function getClassName(): string + { + } + public function getPreviousWrapped(): ?self + { + } + public function setClassName(string $className): void + { + } + public function setOriginalException(\Throwable $t): void + { + } + public function getOriginalException(): ?\Throwable + { + } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class SkippedTestCase extends \PHPUnit\Framework\TestCase +final class IncompleteTestCase extends \PHPUnit\Framework\TestCase { public function __construct(string $className, string $methodName, string $message = '') { @@ -5595,12 +5710,6 @@ public function toString(): string { } } -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvalidParameterGroupException extends \PHPUnit\Framework\Exception -{ -} /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ @@ -6013,162 +6122,26 @@ public function setTimeoutForMediumTests(int $timeout): void public function setTimeoutForLargeTests(int $timeout): void { } - /** - * Returns the set timeout for large tests. - */ - public function getTimeoutForLargeTests(): int - { - } - public function setRegisterMockObjectsFromTestArgumentsRecursively(bool $flag): void - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface Reorderable -{ - public function sortId(): string; - /** - * @return list - */ - public function provides(): array; - /** - * @return list - */ - public function requires(): array; -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ErrorTestCase extends \PHPUnit\Framework\TestCase -{ - public function __construct(string $message = '') - { - } - public function getMessage(): string - { - } - /** - * Returns a string representation of the test case. - */ - public function toString(): string - { - } -} -/** - * @deprecated The `TestListener` interface is deprecated - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -trait TestListenerDefaultImplementation -{ - public function addError(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void - { - } - public function addWarning(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\Warning $e, float $time): void - { - } - public function addFailure(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\AssertionFailedError $e, float $time): void - { - } - public function addIncompleteTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void - { - } - public function addRiskyTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void - { - } - public function addSkippedTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void - { - } - public function startTestSuite(\PHPUnit\Framework\TestSuite $suite): void - { - } - public function endTestSuite(\PHPUnit\Framework\TestSuite $suite): void - { - } - public function startTest(\PHPUnit\Framework\Test $test): void - { - } - public function endTest(\PHPUnit\Framework\Test $test, float $time): void - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class IncompleteTestCase extends \PHPUnit\Framework\TestCase -{ - public function __construct(string $className, string $methodName, string $message = '') - { - } - public function getMessage(): string - { - } - /** - * Returns a string representation of the test case. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function toString(): string - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class WarningTestCase extends \PHPUnit\Framework\TestCase -{ - public function __construct(string $message = '') - { - } - public function getMessage(): string - { - } - /** - * Returns a string representation of the test case. - */ - public function toString(): string - { - } -} -namespace PHPUnit\Framework\Constraint; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class ExceptionMessageRegularExpression extends \PHPUnit\Framework\Constraint\Constraint -{ - public function __construct(string $expected) - { - } - public function toString(): string - { - } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class ExceptionMessage extends \PHPUnit\Framework\Constraint\Constraint -{ - public function __construct(string $expected) + /** + * Returns the set timeout for large tests. + */ + public function getTimeoutForLargeTests(): int { } - public function toString(): string + public function setRegisterMockObjectsFromTestArgumentsRecursively(bool $flag): void { } } +namespace PHPUnit\Framework\Constraint; + /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class ExceptionCode extends \PHPUnit\Framework\Constraint\Constraint +final class IsFinite extends \PHPUnit\Framework\Constraint\Constraint { /** - * @param int|string $expected + * Returns a string representation of the constraint. */ - public function __construct($expected) - { - } public function toString(): string { } @@ -6176,11 +6149,8 @@ public function toString(): string /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class Exception extends \PHPUnit\Framework\Constraint\Constraint +final class IsInfinite extends \PHPUnit\Framework\Constraint\Constraint { - public function __construct(string $className) - { - } /** * Returns a string representation of the constraint. */ @@ -6191,7 +6161,7 @@ public function toString(): string /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class IsReadable extends \PHPUnit\Framework\Constraint\Constraint +final class IsNan extends \PHPUnit\Framework\Constraint\Constraint { /** * Returns a string representation of the constraint. @@ -6202,8 +6172,10 @@ public function toString(): string } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 */ -final class DirectoryExists extends \PHPUnit\Framework\Constraint\Constraint +final class ClassHasStaticAttribute extends \PHPUnit\Framework\Constraint\ClassHasAttribute { /** * Returns a string representation of the constraint. @@ -6215,72 +6187,65 @@ public function toString(): string /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class FileExists extends \PHPUnit\Framework\Constraint\Constraint +final class ObjectEquals extends \PHPUnit\Framework\Constraint\Constraint { - /** - * Returns a string representation of the constraint. - */ + public function __construct(object $object, string $method = 'equals') + { + } public function toString(): string { } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 */ -final class IsWritable extends \PHPUnit\Framework\Constraint\Constraint +class ClassHasAttribute extends \PHPUnit\Framework\Constraint\Constraint { + public function __construct(string $attributeName) + { + } /** * Returns a string representation of the constraint. */ public function toString(): string { } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class JsonMatchesErrorMessageProvider -{ /** - * Translates JSON error to a human readable string. + * Evaluates the constraint for parameter $other. Returns true if the + * constraint is met, false otherwise. + * + * @param mixed $other value or object to evaluate */ - public static function determineJsonError(string $error, string $prefix = ''): ?string + protected function matches($other): bool { } /** - * Translates a given type to a human readable message prefix. + * Returns the description of the failure. + * + * The beginning of failure messages is "Failed asserting that" in most + * cases. This method should return the second part of that sentence. + * + * @param mixed $other evaluated value or object */ - public static function translateTypeToPrefix(string $type): string + protected function failureDescription($other): string + { + } + protected function attributeName(): string { } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class IsEqualCanonicalizing extends \PHPUnit\Framework\Constraint\Constraint +final class ObjectHasProperty extends \PHPUnit\Framework\Constraint\Constraint { - public function __construct($value) - { - } - /** - * Evaluates the constraint for parameter $other. - * - * If $returnResult is set to false (the default), an exception is thrown - * in case of a failure. null is returned otherwise. - * - * If $returnResult is true, the result of the evaluation is returned as - * a boolean value instead: true in case of success, false in case of a - * failure. - * - * @throws \PHPUnit\Framework\ExpectationFailedException - */ - public function evaluate($other, string $description = '', bool $returnResult = false): ?bool + public function __construct(string $propertyName) { } /** * Returns a string representation of the constraint. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ public function toString(): string { @@ -6288,31 +6253,25 @@ public function toString(): string } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 */ -final class IsEqual extends \PHPUnit\Framework\Constraint\Constraint +final class ObjectHasAttribute extends \PHPUnit\Framework\Constraint\ClassHasAttribute { - public function __construct($value, float $delta = 0.0, bool $canonicalize = false, bool $ignoreCase = false) - { - } - /** - * Evaluates the constraint for parameter $other. - * - * If $returnResult is set to false (the default), an exception is thrown - * in case of a failure. null is returned otherwise. - * - * If $returnResult is true, the result of the evaluation is returned as - * a boolean value instead: true in case of success, false in case of a - * failure. - * - * @throws \PHPUnit\Framework\ExpectationFailedException - */ - public function evaluate($other, string $description = '', bool $returnResult = false): ?bool +} +/** + * @phan-template CallbackInput of mixed + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +final class Callback extends \PHPUnit\Framework\Constraint\Constraint +{ + /** @phan-param callable(CallbackInput $input): bool $callback */ + public function __construct(callable $callback) { } /** * Returns a string representation of the constraint. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ public function toString(): string { @@ -6321,11 +6280,8 @@ public function toString(): string /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class IsEqualWithDelta extends \PHPUnit\Framework\Constraint\Constraint +abstract class Constraint implements \Countable, \PHPUnit\Framework\SelfDescribing { - public function __construct($value, float $delta) - { - } /** * Evaluates the constraint for parameter $other. * @@ -6337,192 +6293,212 @@ public function __construct($value, float $delta) * failure. * * @throws \PHPUnit\Framework\ExpectationFailedException + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ public function evaluate($other, string $description = '', bool $returnResult = false): ?bool { } /** - * Returns a string representation of the constraint. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * Counts the number of constraint elements. */ - public function toString(): string + public function count(): int { } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class IsEqualIgnoringCase extends \PHPUnit\Framework\Constraint\Constraint -{ - public function __construct($value) + protected function exporter(): \SebastianBergmann\Exporter\Exporter { } /** - * Evaluates the constraint for parameter $other. + * Evaluates the constraint for parameter $other. Returns true if the + * constraint is met, false otherwise. * - * If $returnResult is set to false (the default), an exception is thrown - * in case of a failure. null is returned otherwise. + * This method can be overridden to implement the evaluation algorithm. * - * If $returnResult is true, the result of the evaluation is returned as - * a boolean value instead: true in case of success, false in case of a - * failure. + * @param mixed $other value or object to evaluate * - * @throws \PHPUnit\Framework\ExpectationFailedException + * @codeCoverageIgnore */ - public function evaluate($other, string $description = '', bool $returnResult = false): ?bool + protected function matches($other): bool { } /** - * Returns a string representation of the constraint. + * Throws an exception for the given compared value and test description. + * + * @param mixed $other evaluated value or object + * @param string $description Additional information about the test * + * @throws \PHPUnit\Framework\ExpectationFailedException * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * + * @phan-return never-return */ - public function toString(): string + protected function fail($other, $description, ?\SebastianBergmann\Comparator\ComparisonFailure $comparisonFailure = null): void { } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class TraversableContainsOnly extends \PHPUnit\Framework\Constraint\Constraint -{ /** - * @throws \PHPUnit\Framework\Exception + * Return additional failure description where needed. + * + * The function can be overridden to provide additional failure + * information like a diff + * + * @param mixed $other evaluated value or object */ - public function __construct(string $type, bool $isNativeType = true) + protected function additionalFailureDescription($other): string { } /** - * Evaluates the constraint for parameter $other. + * Returns the description of the failure. * - * If $returnResult is set to false (the default), an exception is thrown - * in case of a failure. null is returned otherwise. + * The beginning of failure messages is "Failed asserting that" in most + * cases. This method should return the second part of that sentence. * - * If $returnResult is true, the result of the evaluation is returned as - * a boolean value instead: true in case of success, false in case of a - * failure. + * To provide additional failure information additionalFailureDescription + * can be used. * - * @param mixed|\Traversable $other + * @param mixed $other evaluated value or object * - * @throws \PHPUnit\Framework\ExpectationFailedException * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ - public function evaluate($other, string $description = '', bool $returnResult = false): ?bool + protected function failureDescription($other): string { } /** - * Returns a string representation of the constraint. + * Returns a custom string representation of the constraint object when it + * appears in context of an $operator expression. + * + * The purpose of this method is to provide meaningful descriptive string + * in context of operators such as LogicalNot. Native PHPUnit constraints + * are supported out of the box by LogicalNot, but externally developed + * ones had no way to provide correct strings in this context. + * + * The method shall return empty string, when it does not handle + * customization by itself. + * + * @param Operator $operator the $operator of the expression + * @param mixed $role role of $this constraint in the $operator expression */ - public function toString(): string + protected function toStringInContext(\PHPUnit\Framework\Constraint\Operator $operator, $role): string { } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -abstract class TraversableContains extends \PHPUnit\Framework\Constraint\Constraint -{ - public function __construct($value) + /** + * Returns the description of the failure when this constraint appears in + * context of an $operator expression. + * + * The purpose of this method is to provide meaningful failure description + * in context of operators such as LogicalNot. Native PHPUnit constraints + * are supported out of the box by LogicalNot, but externally developed + * ones had no way to provide correct messages in this context. + * + * The method shall return empty string, when it does not handle + * customization by itself. + * + * @param Operator $operator the $operator of the expression + * @param mixed $role role of $this constraint in the $operator expression + * @param mixed $other evaluated value or object + */ + protected function failureDescriptionInContext(\PHPUnit\Framework\Constraint\Operator $operator, $role, $other): string { } /** - * Returns a string representation of the constraint. + * Reduces the sub-expression starting at $this by skipping degenerate + * sub-expression and returns first descendant constraint that starts + * a non-reducible sub-expression. + * + * Returns $this for terminal constraints and for operators that start + * non-reducible sub-expression, or the nearest descendant of $this that + * starts a non-reducible sub-expression. + * + * A constraint expression may be modelled as a tree with non-terminal + * nodes (operators) and terminal nodes. For example: + * + * LogicalOr (operator, non-terminal) + * + LogicalAnd (operator, non-terminal) + * | + IsType('int') (terminal) + * | + GreaterThan(10) (terminal) + * + LogicalNot (operator, non-terminal) + * + IsType('array') (terminal) + * + * A degenerate sub-expression is a part of the tree, that effectively does + * not contribute to the evaluation of the expression it appears in. An example + * of degenerate sub-expression is a BinaryOperator constructed with single + * operand or nested BinaryOperators, each with single operand. An + * expression involving a degenerate sub-expression is equivalent to a + * reduced expression with the degenerate sub-expression removed, for example * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function toString(): string - { - } - /** - * Returns the description of the failure. + * LogicalAnd (operator) + * + LogicalOr (degenerate operator) + * | + LogicalAnd (degenerate operator) + * | + IsType('int') (terminal) + * + GreaterThan(10) (terminal) * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. + * is equivalent to * - * @param mixed $other evaluated value or object + * LogicalAnd (operator) + * + IsType('int') (terminal) + * + GreaterThan(10) (terminal) * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * because the subexpression + * + * + LogicalOr + * + LogicalAnd + * + - + * + * is degenerate. Calling reduce() on the LogicalOr object above, as well + * as on LogicalAnd, shall return the IsType('int') instance. + * + * Other specific reductions can be implemented, for example cascade of + * LogicalNot operators + * + * + LogicalNot + * + LogicalNot + * +LogicalNot + * + IsTrue + * + * can be reduced to + * + * LogicalNot + * + IsTrue */ - protected function failureDescription($other): string - { - } - protected function value() + protected function reduce(): self { } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class TraversableContainsEqual extends \PHPUnit\Framework\Constraint\TraversableContains -{ -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class ArrayHasKey extends \PHPUnit\Framework\Constraint\Constraint +final class LogicalAnd extends \PHPUnit\Framework\Constraint\BinaryOperator { /** - * @param int|string $key + * Returns the name of this operator. */ - public function __construct($key) + public function operator(): string { } /** - * Returns a string representation of the constraint. + * Returns this operator's precedence. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @see https://www.php.net/manual/en/language.operators.precedence.php */ - public function toString(): string + public function precedence(): int { } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class TraversableContainsIdentical extends \PHPUnit\Framework\Constraint\TraversableContains -{ -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 - */ -final class ClassHasStaticAttribute extends \PHPUnit\Framework\Constraint\ClassHasAttribute +final class LogicalOr extends \PHPUnit\Framework\Constraint\BinaryOperator { /** - * Returns a string representation of the constraint. + * Returns the name of this operator. */ - public function toString(): string - { - } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class ObjectEquals extends \PHPUnit\Framework\Constraint\Constraint -{ - public function __construct(object $object, string $method = 'equals') - { - } - public function toString(): string - { - } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 - */ -class ClassHasAttribute extends \PHPUnit\Framework\Constraint\Constraint -{ - public function __construct(string $attributeName) + public function operator(): string { } /** - * Returns a string representation of the constraint. + * Returns this operator's precedence. + * + * @see https://www.php.net/manual/en/language.operators.precedence.php */ - public function toString(): string + public function precedence(): int { } /** @@ -6531,182 +6507,92 @@ public function toString(): string * * @param mixed $other value or object to evaluate */ - protected function matches($other): bool - { - } - /** - * Returns the description of the failure. - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - * - * @param mixed $other evaluated value or object - */ - protected function failureDescription($other): string - { - } - protected function attributeName(): string + public function matches($other): bool { } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class ObjectHasProperty extends \PHPUnit\Framework\Constraint\Constraint +abstract class Operator extends \PHPUnit\Framework\Constraint\Constraint { - public function __construct(string $propertyName) - { - } /** - * Returns a string representation of the constraint. + * Returns the name of this operator. */ - public function toString(): string - { - } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 - */ -final class ObjectHasAttribute extends \PHPUnit\Framework\Constraint\ClassHasAttribute -{ -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class IsFinite extends \PHPUnit\Framework\Constraint\Constraint -{ + abstract public function operator(): string; /** - * Returns a string representation of the constraint. + * Returns this operator's precedence. + * + * @see https://www.php.net/manual/en/language.operators.precedence.php */ - public function toString(): string - { - } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class IsNan extends \PHPUnit\Framework\Constraint\Constraint -{ + abstract public function precedence(): int; /** - * Returns a string representation of the constraint. + * Returns the number of operands. */ - public function toString(): string + abstract public function arity(): int; + /** + * Validates $constraint argument. + */ + protected function checkConstraint($constraint): \PHPUnit\Framework\Constraint\Constraint { } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class IsInfinite extends \PHPUnit\Framework\Constraint\Constraint -{ /** - * Returns a string representation of the constraint. + * Returns true if the $constraint needs to be wrapped with braces. */ - public function toString(): string + protected function constraintNeedsParentheses(\PHPUnit\Framework\Constraint\Constraint $constraint): bool { } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class IsIdentical extends \PHPUnit\Framework\Constraint\Constraint +final class LogicalNot extends \PHPUnit\Framework\Constraint\UnaryOperator { - public function __construct($value) + public static function negate(string $string): string { } /** - * Evaluates the constraint for parameter $other. - * - * If $returnResult is set to false (the default), an exception is thrown - * in case of a failure. null is returned otherwise. - * - * If $returnResult is true, the result of the evaluation is returned as - * a boolean value instead: true in case of success, false in case of a - * failure. - * - * @throws \PHPUnit\Framework\ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * Returns the name of this operator. */ - public function evaluate($other, string $description = '', bool $returnResult = false): ?bool + public function operator(): string { } /** - * Returns a string representation of the constraint. + * Returns this operator's precedence. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @see https://www.php.net/manual/en/language.operators.precedence.php */ - public function toString(): string + public function precedence(): int { } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -abstract class Constraint implements \Countable, \PHPUnit\Framework\SelfDescribing +abstract class UnaryOperator extends \PHPUnit\Framework\Constraint\Operator { /** - * Evaluates the constraint for parameter $other. - * - * If $returnResult is set to false (the default), an exception is thrown - * in case of a failure. null is returned otherwise. - * - * If $returnResult is true, the result of the evaluation is returned as - * a boolean value instead: true in case of success, false in case of a - * failure. - * - * @throws \PHPUnit\Framework\ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function evaluate($other, string $description = '', bool $returnResult = false): ?bool - { - } - /** - * Counts the number of constraint elements. - */ - public function count(): int - { - } - protected function exporter(): \SebastianBergmann\Exporter\Exporter - { - } - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * This method can be overridden to implement the evaluation algorithm. - * - * @param mixed $other value or object to evaluate - * - * @codeCoverageIgnore + * @param Constraint|mixed $constraint */ - protected function matches($other): bool + public function __construct($constraint) { - } - /** - * Throws an exception for the given compared value and test description. - * - * @param mixed $other evaluated value or object - * @param string $description Additional information about the test - * - * @throws \PHPUnit\Framework\ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @phan-return never-return + } + /** + * Returns the number of operands (constraints). */ - protected function fail($other, $description, ?\SebastianBergmann\Comparator\ComparisonFailure $comparisonFailure = null): void + public function arity(): int { } /** - * Return additional failure description where needed. - * - * The function can be overridden to provide additional failure - * information like a diff - * - * @param mixed $other evaluated value or object + * Returns a string representation of the constraint. */ - protected function additionalFailureDescription($other): string + public function toString(): string + { + } + /** + * Counts the number of constraint elements. + */ + public function count(): int { } /** @@ -6715,9 +6601,6 @@ protected function additionalFailureDescription($other): string * The beginning of failure messages is "Failed asserting that" in most * cases. This method should return the second part of that sentence. * - * To provide additional failure information additionalFailureDescription - * can be used. - * * @param mixed $other evaluated value or object * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException @@ -6726,142 +6609,91 @@ protected function failureDescription($other): string { } /** - * Returns a custom string representation of the constraint object when it - * appears in context of an $operator expression. - * - * The purpose of this method is to provide meaningful descriptive string - * in context of operators such as LogicalNot. Native PHPUnit constraints - * are supported out of the box by LogicalNot, but externally developed - * ones had no way to provide correct strings in this context. + * Transforms string returned by the memeber constraint's toString() or + * failureDescription() such that it reflects constraint's participation in + * this expression. * - * The method shall return empty string, when it does not handle - * customization by itself. + * The method may be overwritten in a subclass to apply default + * transformation in case the operand constraint does not provide its own + * custom strings via toStringInContext() or failureDescriptionInContext(). * - * @param Operator $operator the $operator of the expression - * @param mixed $role role of $this constraint in the $operator expression + * @param string $string the string to be transformed */ - protected function toStringInContext(\PHPUnit\Framework\Constraint\Operator $operator, $role): string + protected function transformString(string $string): string { } /** - * Returns the description of the failure when this constraint appears in - * context of an $operator expression. - * - * The purpose of this method is to provide meaningful failure description - * in context of operators such as LogicalNot. Native PHPUnit constraints - * are supported out of the box by LogicalNot, but externally developed - * ones had no way to provide correct messages in this context. - * - * The method shall return empty string, when it does not handle - * customization by itself. - * - * @param Operator $operator the $operator of the expression - * @param mixed $role role of $this constraint in the $operator expression - * @param mixed $other evaluated value or object + * Provides access to $this->constraint for subclasses. */ - protected function failureDescriptionInContext(\PHPUnit\Framework\Constraint\Operator $operator, $role, $other): string + final protected function constraint(): \PHPUnit\Framework\Constraint\Constraint { } /** - * Reduces the sub-expression starting at $this by skipping degenerate - * sub-expression and returns first descendant constraint that starts - * a non-reducible sub-expression. - * - * Returns $this for terminal constraints and for operators that start - * non-reducible sub-expression, or the nearest descendant of $this that - * starts a non-reducible sub-expression. - * - * A constraint expression may be modelled as a tree with non-terminal - * nodes (operators) and terminal nodes. For example: - * - * LogicalOr (operator, non-terminal) - * + LogicalAnd (operator, non-terminal) - * | + IsType('int') (terminal) - * | + GreaterThan(10) (terminal) - * + LogicalNot (operator, non-terminal) - * + IsType('array') (terminal) - * - * A degenerate sub-expression is a part of the tree, that effectively does - * not contribute to the evaluation of the expression it appears in. An example - * of degenerate sub-expression is a BinaryOperator constructed with single - * operand or nested BinaryOperators, each with single operand. An - * expression involving a degenerate sub-expression is equivalent to a - * reduced expression with the degenerate sub-expression removed, for example - * - * LogicalAnd (operator) - * + LogicalOr (degenerate operator) - * | + LogicalAnd (degenerate operator) - * | + IsType('int') (terminal) - * + GreaterThan(10) (terminal) - * - * is equivalent to - * - * LogicalAnd (operator) - * + IsType('int') (terminal) - * + GreaterThan(10) (terminal) - * - * because the subexpression - * - * + LogicalOr - * + LogicalAnd - * + - - * - * is degenerate. Calling reduce() on the LogicalOr object above, as well - * as on LogicalAnd, shall return the IsType('int') instance. - * - * Other specific reductions can be implemented, for example cascade of - * LogicalNot operators - * - * + LogicalNot - * + LogicalNot - * +LogicalNot - * + IsTrue - * - * can be reduced to - * - * LogicalNot - * + IsTrue + * Returns true if the $constraint needs to be wrapped with parentheses. */ - protected function reduce(): self + protected function constraintNeedsParentheses(\PHPUnit\Framework\Constraint\Constraint $constraint): bool { } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -abstract class Operator extends \PHPUnit\Framework\Constraint\Constraint +abstract class BinaryOperator extends \PHPUnit\Framework\Constraint\Operator { + public static function fromConstraints(\PHPUnit\Framework\Constraint\Constraint ...$constraints): self + { + } /** - * Returns the name of this operator. + * @param mixed[] $constraints */ - abstract public function operator(): string; + public function setConstraints(array $constraints): void + { + } /** - * Returns this operator's precedence. - * - * @see https://www.php.net/manual/en/language.operators.precedence.php + * Returns the number of operands (constraints). */ - abstract public function precedence(): int; + final public function arity(): int + { + } /** - * Returns the number of operands. + * Returns a string representation of the constraint. */ - abstract public function arity(): int; + public function toString(): string + { + } /** - * Validates $constraint argument. + * Counts the number of constraint elements. */ - protected function checkConstraint($constraint): \PHPUnit\Framework\Constraint\Constraint + public function count(): int + { + } + /** + * Returns the nested constraints. + */ + final protected function constraints(): array { } /** * Returns true if the $constraint needs to be wrapped with braces. */ - protected function constraintNeedsParentheses(\PHPUnit\Framework\Constraint\Constraint $constraint): bool + final protected function constraintNeedsParentheses(\PHPUnit\Framework\Constraint\Constraint $constraint): bool + { + } + /** + * Reduces the sub-expression starting at $this by skipping degenerate + * sub-expression and returns first descendant constraint that starts + * a non-reducible sub-expression. + * + * See Constraint::reduce() for more. + */ + protected function reduce(): \PHPUnit\Framework\Constraint\Constraint { } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class LogicalOr extends \PHPUnit\Framework\Constraint\BinaryOperator +final class LogicalXor extends \PHPUnit\Framework\Constraint\BinaryOperator { /** * Returns the name of this operator. @@ -6872,7 +6704,7 @@ public function operator(): string /** * Returns this operator's precedence. * - * @see https://www.php.net/manual/en/language.operators.precedence.php + * @see https://www.php.net/manual/en/language.operators.precedence.php. */ public function precedence(): int { @@ -6890,59 +6722,73 @@ public function matches($other): bool /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class LogicalXor extends \PHPUnit\Framework\Constraint\BinaryOperator +final class TraversableContainsOnly extends \PHPUnit\Framework\Constraint\Constraint { /** - * Returns the name of this operator. + * @throws \PHPUnit\Framework\Exception */ - public function operator(): string + public function __construct(string $type, bool $isNativeType = true) { } /** - * Returns this operator's precedence. + * Evaluates the constraint for parameter $other. * - * @see https://www.php.net/manual/en/language.operators.precedence.php. + * If $returnResult is set to false (the default), an exception is thrown + * in case of a failure. null is returned otherwise. + * + * If $returnResult is true, the result of the evaluation is returned as + * a boolean value instead: true in case of success, false in case of a + * failure. + * + * @param mixed|\Traversable $other + * + * @throws \PHPUnit\Framework\ExpectationFailedException + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ - public function precedence(): int + public function evaluate($other, string $description = '', bool $returnResult = false): ?bool { } /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @param mixed $other value or object to evaluate + * Returns a string representation of the constraint. */ - public function matches($other): bool + public function toString(): string { } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -abstract class UnaryOperator extends \PHPUnit\Framework\Constraint\Operator +final class ArrayHasKey extends \PHPUnit\Framework\Constraint\Constraint { /** - * @param Constraint|mixed $constraint - */ - public function __construct($constraint) - { - } - /** - * Returns the number of operands (constraints). + * @param int|string $key */ - public function arity(): int + public function __construct($key) { } /** * Returns a string representation of the constraint. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ public function toString(): string { } +} +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +abstract class TraversableContains extends \PHPUnit\Framework\Constraint\Constraint +{ + public function __construct($value) + { + } /** - * Counts the number of constraint elements. + * Returns a string representation of the constraint. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ - public function count(): int + public function toString(): string { } /** @@ -6958,136 +6804,180 @@ public function count(): int protected function failureDescription($other): string { } - /** - * Transforms string returned by the memeber constraint's toString() or - * failureDescription() such that it reflects constraint's participation in - * this expression. - * - * The method may be overwritten in a subclass to apply default - * transformation in case the operand constraint does not provide its own - * custom strings via toStringInContext() or failureDescriptionInContext(). - * - * @param string $string the string to be transformed - */ - protected function transformString(string $string): string + protected function value() + { + } +} +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +final class TraversableContainsIdentical extends \PHPUnit\Framework\Constraint\TraversableContains +{ +} +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +final class TraversableContainsEqual extends \PHPUnit\Framework\Constraint\TraversableContains +{ +} +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +final class Exception extends \PHPUnit\Framework\Constraint\Constraint +{ + public function __construct(string $className) { } /** - * Provides access to $this->constraint for subclasses. + * Returns a string representation of the constraint. */ - final protected function constraint(): \PHPUnit\Framework\Constraint\Constraint + public function toString(): string { } - /** - * Returns true if the $constraint needs to be wrapped with parentheses. - */ - protected function constraintNeedsParentheses(\PHPUnit\Framework\Constraint\Constraint $constraint): bool +} +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +final class ExceptionMessageRegularExpression extends \PHPUnit\Framework\Constraint\Constraint +{ + public function __construct(string $expected) + { + } + public function toString(): string { } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class LogicalAnd extends \PHPUnit\Framework\Constraint\BinaryOperator +final class ExceptionCode extends \PHPUnit\Framework\Constraint\Constraint { /** - * Returns the name of this operator. + * @param int|string $expected */ - public function operator(): string + public function __construct($expected) { } - /** - * Returns this operator's precedence. - * - * @see https://www.php.net/manual/en/language.operators.precedence.php - */ - public function precedence(): int + public function toString(): string { } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class LogicalNot extends \PHPUnit\Framework\Constraint\UnaryOperator +final class ExceptionMessage extends \PHPUnit\Framework\Constraint\Constraint { - public static function negate(string $string): string + public function __construct(string $expected) + { + } + public function toString(): string + { + } +} +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +final class IsEqualIgnoringCase extends \PHPUnit\Framework\Constraint\Constraint +{ + public function __construct($value) { } /** - * Returns the name of this operator. + * Evaluates the constraint for parameter $other. + * + * If $returnResult is set to false (the default), an exception is thrown + * in case of a failure. null is returned otherwise. + * + * If $returnResult is true, the result of the evaluation is returned as + * a boolean value instead: true in case of success, false in case of a + * failure. + * + * @throws \PHPUnit\Framework\ExpectationFailedException */ - public function operator(): string + public function evaluate($other, string $description = '', bool $returnResult = false): ?bool { } /** - * Returns this operator's precedence. + * Returns a string representation of the constraint. * - * @see https://www.php.net/manual/en/language.operators.precedence.php + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ - public function precedence(): int + public function toString(): string { } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -abstract class BinaryOperator extends \PHPUnit\Framework\Constraint\Operator +final class IsEqual extends \PHPUnit\Framework\Constraint\Constraint { - public static function fromConstraints(\PHPUnit\Framework\Constraint\Constraint ...$constraints): self - { - } - /** - * @param mixed[] $constraints - */ - public function setConstraints(array $constraints): void + public function __construct($value, float $delta = 0.0, bool $canonicalize = false, bool $ignoreCase = false) { } /** - * Returns the number of operands (constraints). + * Evaluates the constraint for parameter $other. + * + * If $returnResult is set to false (the default), an exception is thrown + * in case of a failure. null is returned otherwise. + * + * If $returnResult is true, the result of the evaluation is returned as + * a boolean value instead: true in case of success, false in case of a + * failure. + * + * @throws \PHPUnit\Framework\ExpectationFailedException */ - final public function arity(): int + public function evaluate($other, string $description = '', bool $returnResult = false): ?bool { } /** * Returns a string representation of the constraint. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ public function toString(): string { } - /** - * Counts the number of constraint elements. - */ - public function count(): int - { - } - /** - * Returns the nested constraints. - */ - final protected function constraints(): array +} +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +final class IsEqualCanonicalizing extends \PHPUnit\Framework\Constraint\Constraint +{ + public function __construct($value) { } /** - * Returns true if the $constraint needs to be wrapped with braces. + * Evaluates the constraint for parameter $other. + * + * If $returnResult is set to false (the default), an exception is thrown + * in case of a failure. null is returned otherwise. + * + * If $returnResult is true, the result of the evaluation is returned as + * a boolean value instead: true in case of success, false in case of a + * failure. + * + * @throws \PHPUnit\Framework\ExpectationFailedException */ - final protected function constraintNeedsParentheses(\PHPUnit\Framework\Constraint\Constraint $constraint): bool + public function evaluate($other, string $description = '', bool $returnResult = false): ?bool { } /** - * Reduces the sub-expression starting at $this by skipping degenerate - * sub-expression and returns first descendant constraint that starts - * a non-reducible sub-expression. + * Returns a string representation of the constraint. * - * See Constraint::reduce() for more. + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ - protected function reduce(): \PHPUnit\Framework\Constraint\Constraint + public function toString(): string { } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class IsAnything extends \PHPUnit\Framework\Constraint\Constraint +final class IsEqualWithDelta extends \PHPUnit\Framework\Constraint\Constraint { + public function __construct($value, float $delta) + { + } /** * Evaluates the constraint for parameter $other. * @@ -7105,90 +6995,49 @@ public function evaluate($other, string $description = '', bool $returnResult = } /** * Returns a string representation of the constraint. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ public function toString(): string { } - /** - * Counts the number of constraint elements. - */ - public function count(): int - { - } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class IsNull extends \PHPUnit\Framework\Constraint\Constraint +final class JsonMatchesErrorMessageProvider { /** - * Returns a string representation of the constraint. + * Translates JSON error to a human readable string. */ - public function toString(): string + public static function determineJsonError(string $error, string $prefix = ''): ?string + { + } + /** + * Translates a given type to a human readable message prefix. + */ + public static function translateTypeToPrefix(string $type): string { } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class IsType extends \PHPUnit\Framework\Constraint\Constraint +final class IsAnything extends \PHPUnit\Framework\Constraint\Constraint { /** - * @var string - */ - public const TYPE_ARRAY = 'array'; - /** - * @var string - */ - public const TYPE_BOOL = 'bool'; - /** - * @var string - */ - public const TYPE_FLOAT = 'float'; - /** - * @var string - */ - public const TYPE_INT = 'int'; - /** - * @var string - */ - public const TYPE_NULL = 'null'; - /** - * @var string - */ - public const TYPE_NUMERIC = 'numeric'; - /** - * @var string - */ - public const TYPE_OBJECT = 'object'; - /** - * @var string - */ - public const TYPE_RESOURCE = 'resource'; - /** - * @var string - */ - public const TYPE_CLOSED_RESOURCE = 'resource (closed)'; - /** - * @var string - */ - public const TYPE_STRING = 'string'; - /** - * @var string - */ - public const TYPE_SCALAR = 'scalar'; - /** - * @var string - */ - public const TYPE_CALLABLE = 'callable'; - /** - * @var string - */ - public const TYPE_ITERABLE = 'iterable'; - /** - * @throws \PHPUnit\Framework\Exception + * Evaluates the constraint for parameter $other. + * + * If $returnResult is set to false (the default), an exception is thrown + * in case of a failure. null is returned otherwise. + * + * If $returnResult is true, the result of the evaluation is returned as + * a boolean value instead: true in case of success, false in case of a + * failure. + * + * @throws \PHPUnit\Framework\ExpectationFailedException */ - public function __construct(string $type) + public function evaluate($other, string $description = '', bool $returnResult = false): ?bool { } /** @@ -7197,17 +7046,41 @@ public function __construct(string $type) public function toString(): string { } + /** + * Counts the number of constraint elements. + */ + public function count(): int + { + } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class IsInstanceOf extends \PHPUnit\Framework\Constraint\Constraint +final class IsIdentical extends \PHPUnit\Framework\Constraint\Constraint { - public function __construct(string $className) + public function __construct($value) + { + } + /** + * Evaluates the constraint for parameter $other. + * + * If $returnResult is set to false (the default), an exception is thrown + * in case of a failure. null is returned otherwise. + * + * If $returnResult is true, the result of the evaluation is returned as + * a boolean value instead: true in case of success, false in case of a + * failure. + * + * @throws \PHPUnit\Framework\ExpectationFailedException + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + */ + public function evaluate($other, string $description = '', bool $returnResult = false): ?bool { } /** * Returns a string representation of the constraint. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ public function toString(): string { @@ -7322,13 +7195,10 @@ public function toString(): string /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class JsonMatches extends \PHPUnit\Framework\Constraint\Constraint +final class IsNull extends \PHPUnit\Framework\Constraint\Constraint { - public function __construct(string $value) - { - } /** - * Returns a string representation of the object. + * Returns a string representation of the constraint. */ public function toString(): string { @@ -7337,8 +7207,11 @@ public function toString(): string /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class IsTrue extends \PHPUnit\Framework\Constraint\Constraint +final class IsInstanceOf extends \PHPUnit\Framework\Constraint\Constraint { + public function __construct(string $className) + { + } /** * Returns a string representation of the constraint. */ @@ -7349,8 +7222,66 @@ public function toString(): string /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class IsFalse extends \PHPUnit\Framework\Constraint\Constraint +final class IsType extends \PHPUnit\Framework\Constraint\Constraint { + /** + * @var string + */ + public const TYPE_ARRAY = 'array'; + /** + * @var string + */ + public const TYPE_BOOL = 'bool'; + /** + * @var string + */ + public const TYPE_FLOAT = 'float'; + /** + * @var string + */ + public const TYPE_INT = 'int'; + /** + * @var string + */ + public const TYPE_NULL = 'null'; + /** + * @var string + */ + public const TYPE_NUMERIC = 'numeric'; + /** + * @var string + */ + public const TYPE_OBJECT = 'object'; + /** + * @var string + */ + public const TYPE_RESOURCE = 'resource'; + /** + * @var string + */ + public const TYPE_CLOSED_RESOURCE = 'resource (closed)'; + /** + * @var string + */ + public const TYPE_STRING = 'string'; + /** + * @var string + */ + public const TYPE_SCALAR = 'scalar'; + /** + * @var string + */ + public const TYPE_CALLABLE = 'callable'; + /** + * @var string + */ + public const TYPE_ITERABLE = 'iterable'; + /** + * @throws \PHPUnit\Framework\Exception + */ + public function __construct(string $type) + { + } /** * Returns a string representation of the constraint. */ @@ -7361,13 +7292,13 @@ public function toString(): string /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class StringStartsWith extends \PHPUnit\Framework\Constraint\Constraint +final class JsonMatches extends \PHPUnit\Framework\Constraint\Constraint { - public function __construct(string $prefix) + public function __construct(string $value) { } /** - * Returns a string representation of the constraint. + * Returns a string representation of the object. */ public function toString(): string { @@ -7376,7 +7307,7 @@ public function toString(): string /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class IsJson extends \PHPUnit\Framework\Constraint\Constraint +final class IsWritable extends \PHPUnit\Framework\Constraint\Constraint { /** * Returns a string representation of the constraint. @@ -7388,11 +7319,8 @@ public function toString(): string /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class StringEndsWith extends \PHPUnit\Framework\Constraint\Constraint +final class FileExists extends \PHPUnit\Framework\Constraint\Constraint { - public function __construct(string $suffix) - { - } /** * Returns a string representation of the constraint. */ @@ -7403,33 +7331,24 @@ public function toString(): string /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -class RegularExpression extends \PHPUnit\Framework\Constraint\Constraint +final class DirectoryExists extends \PHPUnit\Framework\Constraint\Constraint { - public function __construct(string $pattern) - { - } /** * Returns a string representation of the constraint. */ public function toString(): string { } - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @param mixed $other value or object to evaluate - */ - protected function matches($other): bool - { - } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class StringMatchesFormatDescription extends \PHPUnit\Framework\Constraint\RegularExpression +final class IsReadable extends \PHPUnit\Framework\Constraint\Constraint { - public function __construct(string $string) + /** + * Returns a string representation of the constraint. + */ + public function toString(): string { } } @@ -7449,14 +7368,11 @@ public function toString(): string } } /** - * @phan-template CallbackInput of mixed - * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class Callback extends \PHPUnit\Framework\Constraint\Constraint +final class StringEndsWith extends \PHPUnit\Framework\Constraint\Constraint { - /** @phan-param callable(CallbackInput $input): bool $callback */ - public function __construct(callable $callback) + public function __construct(string $suffix) { } /** @@ -7466,252 +7382,221 @@ public function toString(): string { } } -namespace PHPUnit\Framework\Error; - -/** - * @internal - */ -final class Deprecated extends \PHPUnit\Framework\Error\Error -{ -} -/** - * @internal - */ -final class Notice extends \PHPUnit\Framework\Error\Error -{ -} -/** - * @internal - */ -final class Warning extends \PHPUnit\Framework\Error\Error -{ -} -/** - * @internal - */ -class Error extends \PHPUnit\Framework\Exception -{ - public function __construct(string $message, int $code, string $file, int $line, ?\Exception $previous = null) - { - } -} -namespace PHPUnit\Framework\MockObject; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class UnknownTypeException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception -{ - public function __construct(string $type) - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class OriginalConstructorInvocationRequiredException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception -{ - public function __construct() - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ReturnValueNotConfiguredException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception -{ - public function __construct(\PHPUnit\Framework\MockObject\Invocation $invocation) - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class RuntimeException extends \RuntimeException implements \PHPUnit\Framework\MockObject\Exception -{ -} /** - * @internal This class is not covered by the backward compatibility promise for PHPUnit + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class DuplicateMethodException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +final class IsJson extends \PHPUnit\Framework\Constraint\Constraint { /** - * @phan-param list $methods + * Returns a string representation of the constraint. */ - public function __construct(array $methods) - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class SoapExtensionNotAvailableException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception -{ - public function __construct() - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class CannotUseOnlyMethodsException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception -{ - public function __construct(string $type, string $methodName) - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class CannotUseAddMethodsException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception -{ - public function __construct(string $type, string $methodName) + public function toString(): string { } } /** - * @internal This class is not covered by the backward compatibility promise for PHPUnit + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class ClassIsFinalException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +final class StringMatchesFormatDescription extends \PHPUnit\Framework\Constraint\RegularExpression { - public function __construct(string $className) + public function __construct(string $string) { } } /** - * @internal This class is not covered by the backward compatibility promise for PHPUnit + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class MethodParametersAlreadyConfiguredException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +class RegularExpression extends \PHPUnit\Framework\Constraint\Constraint { - public function __construct() + public function __construct(string $pattern) { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class UnknownClassException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception -{ - public function __construct(string $className) + /** + * Returns a string representation of the constraint. + */ + public function toString(): string { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ConfigurableMethodsAlreadyInitializedException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class BadMethodCallException extends \BadMethodCallException implements \PHPUnit\Framework\MockObject\Exception -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ClassIsReadonlyException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception -{ - public function __construct(string $className) + /** + * Evaluates the constraint for parameter $other. Returns true if the + * constraint is met, false otherwise. + * + * @param mixed $other value or object to evaluate + */ + protected function matches($other): bool { } } /** - * @internal This class is not covered by the backward compatibility promise for PHPUnit + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class MethodCannotBeConfiguredException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +final class StringStartsWith extends \PHPUnit\Framework\Constraint\Constraint { - public function __construct(string $method) + public function __construct(string $prefix) + { + } + /** + * Returns a string representation of the constraint. + */ + public function toString(): string { } } /** - * @internal This class is not covered by the backward compatibility promise for PHPUnit + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class MatcherAlreadyRegisteredException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +final class IsTrue extends \PHPUnit\Framework\Constraint\Constraint { - public function __construct(string $id) + /** + * Returns a string representation of the constraint. + */ + public function toString(): string { } } /** - * @internal This class is not covered by the backward compatibility promise for PHPUnit + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class MethodNameAlreadyConfiguredException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +final class IsFalse extends \PHPUnit\Framework\Constraint\Constraint { - public function __construct() + /** + * Returns a string representation of the constraint. + */ + public function toString(): string { } } +namespace PHPUnit\Framework\Error; + /** - * @internal This class is not covered by the backward compatibility promise for PHPUnit + * @internal */ -final class UnknownTraitException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +final class Warning extends \PHPUnit\Framework\Error\Error { - public function __construct(string $traitName) - { - } } /** - * @internal This class is not covered by the backward compatibility promise for PHPUnit + * @internal */ -final class MethodNameNotConfiguredException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +final class Deprecated extends \PHPUnit\Framework\Error\Error { - public function __construct() - { - } } /** - * @internal This class is not covered by the backward compatibility promise for PHPUnit + * @internal */ -interface Exception extends \Throwable +final class Notice extends \PHPUnit\Framework\Error\Error { } /** - * @internal This class is not covered by the backward compatibility promise for PHPUnit + * @internal */ -final class InvalidMethodNameException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +class Error extends \PHPUnit\Framework\Exception { - public function __construct(string $method) + public function __construct(string $message, int $code, string $file, int $line, ?\Exception $previous = null) { } } +namespace PHPUnit\Framework\MockObject; + +/** + * @method Builder\InvocationStubber method($constraint) + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +interface Stub +{ + public function __phpunit_getInvocationHandler(): \PHPUnit\Framework\MockObject\InvocationHandler; + public function __phpunit_hasMatchers(): bool; + public function __phpunit_setReturnValueGeneration(bool $returnValueGeneration): void; +} /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class IncompatibleReturnValueException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +final class MockClass implements \PHPUnit\Framework\MockObject\MockType { /** - * @param mixed $value + * @phan-param class-string $mockName */ - public function __construct(\PHPUnit\Framework\MockObject\ConfigurableMethod $method, $value) + public function __construct(string $classCode, string $mockName, array $configurableMethods) { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ClassAlreadyExistsException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception -{ - public function __construct(string $className) + /** + * @phan-return class-string + */ + public function generate(): string + { + } + public function getClassCode(): string { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class MatchBuilderNotFoundException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +final class InvocationHandler { - public function __construct(string $id) + public function __construct(array $configurableMethods, bool $returnValueGeneration) + { + } + public function hasMatchers(): bool + { + } + /** + * Looks up the match builder with identification $id and returns it. + * + * @param string $id The identification of the match builder + */ + public function lookupMatcher(string $id): ?\PHPUnit\Framework\MockObject\Matcher + { + } + /** + * Registers a matcher with the identification $id. The matcher can later be + * looked up using lookupMatcher() to figure out if it has been invoked. + * + * @param string $id The identification of the matcher + * @param Matcher $matcher The builder which is being registered + * + * @throws MatcherAlreadyRegisteredException + */ + public function registerMatcher(string $id, \PHPUnit\Framework\MockObject\Matcher $matcher): void + { + } + public function expects(\PHPUnit\Framework\MockObject\Rule\InvocationOrder $rule): \PHPUnit\Framework\MockObject\Builder\InvocationMocker + { + } + /** + * @throws \Exception + * @throws RuntimeException + */ + public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation) + { + } + public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool + { + } + /** + * @throws \Throwable + */ + public function verify(): void { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class ReflectionException extends \RuntimeException implements \PHPUnit\Framework\MockObject\Exception +final class MockMethodSet { + public function addMethods(\PHPUnit\Framework\MockObject\MockMethod ...$methods): void + { + } + /** + * @return MockMethod[] + */ + public function asArray(): array + { + } + public function hasMethod(string $methodName): bool + { + } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit @@ -7790,200 +7675,65 @@ public function getMockForAbstractClass(string $originalClassName, array $argume * @throws ReflectionException * @throws RuntimeException * @throws UnknownClassException - * @throws UnknownTraitException - * @throws UnknownTypeException - */ - public function getMockForTrait(string $traitName, array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, ?array $mockedMethods = null, bool $cloneArguments = true): \PHPUnit\Framework\MockObject\MockObject - { - } - /** - * Returns an object for the specified trait. - * - * @phan-param trait-string $traitName - * - * @throws ReflectionException - * @throws RuntimeException - * @throws UnknownTraitException - */ - public function getObjectForTrait(string $traitName, string $traitClassName = '', bool $callAutoload = true, bool $callOriginalConstructor = false, array $arguments = []): object - { - } - /** - * @throws ClassIsFinalException - * @throws ClassIsReadonlyException - * @throws ReflectionException - * @throws RuntimeException - */ - public function generate(string $type, ?array $methods = null, string $mockClassName = '', bool $callOriginalClone = true, bool $callAutoload = true, bool $cloneArguments = true, bool $callOriginalMethods = false): \PHPUnit\Framework\MockObject\MockClass - { - } - /** - * @throws RuntimeException - * @throws SoapExtensionNotAvailableException - */ - public function generateClassFromWsdl(string $wsdlFile, string $className, array $methods = [], array $options = []): string - { - } - /** - * @throws ReflectionException - * - * @return string[] - */ - public function getClassMethods(string $className): array - { - } - /** - * @throws ReflectionException - * - * @return MockMethod[] - */ - public function mockClassMethods(string $className, bool $callOriginalMethods, bool $cloneArguments): array - { - } - /** - * @throws ReflectionException - * - * @return MockMethod[] - */ - public function mockInterfaceMethods(string $interfaceName, bool $cloneArguments): array - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MethodNameConstraint extends \PHPUnit\Framework\Constraint\Constraint -{ - public function __construct(string $methodName) - { - } - public function toString(): string - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Matcher -{ - public function __construct(\PHPUnit\Framework\MockObject\Rule\InvocationOrder $rule) - { - } - public function hasMatchers(): bool - { - } - public function hasMethodNameRule(): bool - { - } - public function getMethodNameRule(): \PHPUnit\Framework\MockObject\Rule\MethodName - { - } - public function setMethodNameRule(\PHPUnit\Framework\MockObject\Rule\MethodName $rule): void - { - } - public function hasParametersRule(): bool - { - } - public function setParametersRule(\PHPUnit\Framework\MockObject\Rule\ParametersRule $rule): void - { - } - public function setStub(\PHPUnit\Framework\MockObject\Stub\Stub $stub): void - { - } - public function setAfterMatchBuilderId(string $id): void + * @throws UnknownTraitException + * @throws UnknownTypeException + */ + public function getMockForTrait(string $traitName, array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, ?array $mockedMethods = null, bool $cloneArguments = true): \PHPUnit\Framework\MockObject\MockObject { } /** - * @throws \PHPUnit\Framework\ExpectationFailedException - * @throws MatchBuilderNotFoundException - * @throws MethodNameNotConfiguredException + * Returns an object for the specified trait. + * + * @phan-param trait-string $traitName + * + * @throws ReflectionException * @throws RuntimeException + * @throws UnknownTraitException */ - public function invoked(\PHPUnit\Framework\MockObject\Invocation $invocation) + public function getObjectForTrait(string $traitName, string $traitClassName = '', bool $callAutoload = true, bool $callOriginalConstructor = false, array $arguments = []): object { } /** - * @throws \PHPUnit\Framework\ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws MatchBuilderNotFoundException - * @throws MethodNameNotConfiguredException + * @throws ClassIsFinalException + * @throws ClassIsReadonlyException + * @throws ReflectionException * @throws RuntimeException */ - public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool + public function generate(string $type, ?array $methods = null, string $mockClassName = '', bool $callOriginalClone = true, bool $callAutoload = true, bool $cloneArguments = true, bool $callOriginalMethods = false): \PHPUnit\Framework\MockObject\MockClass { } /** - * @throws \PHPUnit\Framework\ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws MethodNameNotConfiguredException + * @throws RuntimeException + * @throws SoapExtensionNotAvailableException */ - public function verify(): void - { - } - public function toString(): string - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ConfigurableMethod -{ - public function __construct(string $name, \SebastianBergmann\Type\Type $returnType) - { - } - public function getName(): string - { - } - public function mayReturn($value): bool - { - } - public function getReturnTypeDeclaration(): string + public function generateClassFromWsdl(string $wsdlFile, string $className, array $methods = [], array $options = []): string { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MockMethod -{ /** * @throws ReflectionException - * @throws RuntimeException + * + * @return string[] */ - public static function fromReflection(\ReflectionMethod $method, bool $callOriginalMethod, bool $cloneArguments): self - { - } - public static function fromName(string $fullClassName, string $methodName, bool $cloneArguments): self - { - } - public function __construct(string $className, string $methodName, bool $cloneArguments, string $modifier, string $argumentsForDeclaration, string $argumentsForCall, \SebastianBergmann\Type\Type $returnType, string $reference, bool $callOriginalMethod, bool $static, ?string $deprecation) - { - } - public function getName(): string + public function getClassMethods(string $className): array { } /** - * @throws RuntimeException + * @throws ReflectionException + * + * @return MockMethod[] */ - public function generateCode(): string + public function mockClassMethods(string $className, bool $callOriginalMethods, bool $cloneArguments): array { } - public function getReturnType(): \SebastianBergmann\Type\Type + /** + * @throws ReflectionException + * + * @return MockMethod[] + */ + public function mockInterfaceMethods(string $interfaceName, bool $cloneArguments): array { } } -/** - * @method Builder\InvocationStubber method($constraint) - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface Stub -{ - public function __phpunit_getInvocationHandler(): \PHPUnit\Framework\MockObject\InvocationHandler; - public function __phpunit_hasMatchers(): bool; - public function __phpunit_setReturnValueGeneration(bool $returnValueGeneration): void; -} /** * @phan-template MockedType * @@ -8201,183 +7951,370 @@ public function disableProxyingToOriginalMethods(): self { } /** - * Sets the proxy target. - * - * @return $this - * @phan-return $this + * Sets the proxy target. + * + * @return $this + * @phan-return $this + */ + public function setProxyTarget(object $object): self + { + } + /** + * @return $this + * @phan-return $this + */ + public function allowMockingUnknownTypes(): self + { + } + /** + * @return $this + * @phan-return $this + */ + public function disallowMockingUnknownTypes(): self + { + } + /** + * @return $this + * @phan-return $this + */ + public function enableAutoReturnValueGeneration(): self + { + } + /** + * @return $this + * @phan-return $this + */ + public function disableAutoReturnValueGeneration(): self + { + } +} +/** + * @method Builder\InvocationMocker method($constraint) + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +interface MockObject extends \PHPUnit\Framework\MockObject\Stub +{ + public function __phpunit_setOriginalObject($originalObject): void; + public function __phpunit_verify(bool $unsetInvocationMocker = true): void; + public function expects(\PHPUnit\Framework\MockObject\Rule\InvocationOrder $invocationRule): \PHPUnit\Framework\MockObject\Builder\InvocationMocker; +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class UnknownClassException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +{ + public function __construct(string $className) + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class MethodParametersAlreadyConfiguredException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +{ + public function __construct() + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class UnknownTypeException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +{ + public function __construct(string $type) + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +interface Exception extends \Throwable +{ +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class SoapExtensionNotAvailableException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +{ + public function __construct() + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class DuplicateMethodException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +{ + /** + * @phan-param list $methods + */ + public function __construct(array $methods) + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class RuntimeException extends \RuntimeException implements \PHPUnit\Framework\MockObject\Exception +{ +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class CannotUseAddMethodsException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +{ + public function __construct(string $type, string $methodName) + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class ReturnValueNotConfiguredException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +{ + public function __construct(\PHPUnit\Framework\MockObject\Invocation $invocation) + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class MatcherAlreadyRegisteredException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +{ + public function __construct(string $id) + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class ClassAlreadyExistsException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +{ + public function __construct(string $className) + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class MatchBuilderNotFoundException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +{ + public function __construct(string $id) + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class ConfigurableMethodsAlreadyInitializedException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +{ +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class UnknownTraitException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +{ + public function __construct(string $traitName) + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class IncompatibleReturnValueException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +{ + /** + * @param mixed $value */ - public function setProxyTarget(object $object): self + public function __construct(\PHPUnit\Framework\MockObject\ConfigurableMethod $method, $value) { } - /** - * @return $this - * @phan-return $this - */ - public function allowMockingUnknownTypes(): self +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class OriginalConstructorInvocationRequiredException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +{ + public function __construct() { } - /** - * @return $this - * @phan-return $this - */ - public function disallowMockingUnknownTypes(): self +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class ClassIsFinalException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +{ + public function __construct(string $className) { } - /** - * @return $this - * @phan-return $this - */ - public function enableAutoReturnValueGeneration(): self +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class ReflectionException extends \RuntimeException implements \PHPUnit\Framework\MockObject\Exception +{ +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class MethodCannotBeConfiguredException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +{ + public function __construct(string $method) { } - /** - * @return $this - * @phan-return $this - */ - public function disableAutoReturnValueGeneration(): self +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class BadMethodCallException extends \BadMethodCallException implements \PHPUnit\Framework\MockObject\Exception +{ +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class CannotUseOnlyMethodsException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +{ + public function __construct(string $type, string $methodName) { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class Invocation implements \PHPUnit\Framework\SelfDescribing +final class ClassIsReadonlyException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception { - public function __construct(string $className, string $methodName, array $parameters, string $returnType, object $object, bool $cloneObjects = false, bool $proxiedCall = false) + public function __construct(string $className) { } - public function getClassName(): string +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class InvalidMethodNameException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +{ + public function __construct(string $method) { } - public function getMethodName(): string +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class MethodNameNotConfiguredException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +{ + public function __construct() { } - public function getParameters(): array +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class MethodNameAlreadyConfiguredException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +{ + public function __construct() { } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +interface MockType +{ /** - * @throws RuntimeException - * - * @return mixed Mocked return value + * @phan-return class-string */ - public function generateReturnValue() + public function generate(): string; +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class ConfigurableMethod +{ + public function __construct(string $name, \SebastianBergmann\Type\Type $returnType) { } - public function toString(): string + public function getName(): string { } - public function getObject(): object + public function mayReturn($value): bool + { + } + public function getReturnTypeDeclaration(): string { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -interface MockType +final class MethodNameConstraint extends \PHPUnit\Framework\Constraint\Constraint { - /** - * @phan-return class-string - */ - public function generate(): string; + public function __construct(string $methodName) + { + } + public function toString(): string + { + } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class InvocationHandler +final class Matcher { - public function __construct(array $configurableMethods, bool $returnValueGeneration) + public function __construct(\PHPUnit\Framework\MockObject\Rule\InvocationOrder $rule) { } public function hasMatchers(): bool { } - /** - * Looks up the match builder with identification $id and returns it. - * - * @param string $id The identification of the match builder - */ - public function lookupMatcher(string $id): ?\PHPUnit\Framework\MockObject\Matcher + public function hasMethodNameRule(): bool { } - /** - * Registers a matcher with the identification $id. The matcher can later be - * looked up using lookupMatcher() to figure out if it has been invoked. - * - * @param string $id The identification of the matcher - * @param Matcher $matcher The builder which is being registered - * - * @throws MatcherAlreadyRegisteredException - */ - public function registerMatcher(string $id, \PHPUnit\Framework\MockObject\Matcher $matcher): void + public function getMethodNameRule(): \PHPUnit\Framework\MockObject\Rule\MethodName { } - public function expects(\PHPUnit\Framework\MockObject\Rule\InvocationOrder $rule): \PHPUnit\Framework\MockObject\Builder\InvocationMocker + public function setMethodNameRule(\PHPUnit\Framework\MockObject\Rule\MethodName $rule): void { } - /** - * @throws \Exception - * @throws RuntimeException - */ - public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation) + public function hasParametersRule(): bool { } - public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool + public function setParametersRule(\PHPUnit\Framework\MockObject\Rule\ParametersRule $rule): void { } - /** - * @throws \Throwable - */ - public function verify(): void + public function setStub(\PHPUnit\Framework\MockObject\Stub\Stub $stub): void { } -} -/** - * @method Builder\InvocationMocker method($constraint) - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface MockObject extends \PHPUnit\Framework\MockObject\Stub -{ - public function __phpunit_setOriginalObject($originalObject): void; - public function __phpunit_verify(bool $unsetInvocationMocker = true): void; - public function expects(\PHPUnit\Framework\MockObject\Rule\InvocationOrder $invocationRule): \PHPUnit\Framework\MockObject\Builder\InvocationMocker; -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MockTrait implements \PHPUnit\Framework\MockObject\MockType -{ - /** - * @phan-param class-string $mockName - */ - public function __construct(string $classCode, string $mockName) + public function setAfterMatchBuilderId(string $id): void { } /** - * @phan-return class-string + * @throws \PHPUnit\Framework\ExpectationFailedException + * @throws MatchBuilderNotFoundException + * @throws MethodNameNotConfiguredException + * @throws RuntimeException */ - public function generate(): string - { - } - public function getClassCode(): string + public function invoked(\PHPUnit\Framework\MockObject\Invocation $invocation) { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MockMethodSet -{ - public function addMethods(\PHPUnit\Framework\MockObject\MockMethod ...$methods): void + /** + * @throws \PHPUnit\Framework\ExpectationFailedException + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws MatchBuilderNotFoundException + * @throws MethodNameNotConfiguredException + * @throws RuntimeException + */ + public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool { } /** - * @return MockMethod[] + * @throws \PHPUnit\Framework\ExpectationFailedException + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws MethodNameNotConfiguredException */ - public function asArray(): array + public function verify(): void { } - public function hasMethod(string $methodName): bool + public function toString(): string { } } @@ -8390,30 +8327,9 @@ interface Verifiable * Verifies that the current expectation is valid. If everything is OK the * code should just return, if not it must throw an exception. * - * @throws \PHPUnit\Framework\ExpectationFailedException - */ - public function verify(): void; -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MockClass implements \PHPUnit\Framework\MockObject\MockType -{ - /** - * @phan-param class-string $mockName - */ - public function __construct(string $classCode, string $mockName, array $configurableMethods) - { - } - /** - * @phan-return class-string + * @throws \PHPUnit\Framework\ExpectationFailedException */ - public function generate(): string - { - } - public function getClassCode(): string - { - } + public function verify(): void; } /** * @internal This trait is not covered by the backward compatibility promise for PHPUnit @@ -8473,129 +8389,103 @@ public function method(...$func_get_args) { } } -namespace PHPUnit\Framework\MockObject\Builder; - /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -interface MethodNameMatch extends \PHPUnit\Framework\MockObject\Builder\ParametersMatch +final class MockTrait implements \PHPUnit\Framework\MockObject\MockType { /** - * Adds a new method name match and returns the parameter match object for - * further matching possibilities. - * - * @param \PHPUnit\Framework\Constraint\Constraint $constraint Constraint for matching method, if a string is passed it will use the PHPUnit_Framework_Constraint_IsEqual - * - * @return ParametersMatch + * @phan-param class-string $mockName */ - public function method($constraint); -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class InvocationMocker implements \PHPUnit\Framework\MockObject\Builder\InvocationStubber, \PHPUnit\Framework\MockObject\Builder\MethodNameMatch -{ - public function __construct(\PHPUnit\Framework\MockObject\InvocationHandler $handler, \PHPUnit\Framework\MockObject\Matcher $matcher, \PHPUnit\Framework\MockObject\ConfigurableMethod ...$configurableMethods) + public function __construct(string $classCode, string $mockName) { } /** - * @throws \PHPUnit\Framework\MockObject\MatcherAlreadyRegisteredException - * - * @return $this + * @phan-return class-string */ - public function id($id): self + public function generate(): string { } - /** - * @return $this - */ - public function will(\PHPUnit\Framework\MockObject\Stub\Stub $stub): \PHPUnit\Framework\MockObject\Builder\Identity + public function getClassCode(): string { } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class MockMethod +{ /** - * @param mixed $value - * @param mixed $nextValues - * - * @throws \PHPUnit\Framework\MockObject\IncompatibleReturnValueException + * @throws ReflectionException + * @throws RuntimeException */ - public function willReturn($value, ...$nextValues): self + public static function fromReflection(\ReflectionMethod $method, bool $callOriginalMethod, bool $cloneArguments): self { } - public function willReturnReference(&$reference): self + public static function fromName(string $fullClassName, string $methodName, bool $cloneArguments): self { } - public function willReturnMap(array $valueMap): self + public function __construct(string $className, string $methodName, bool $cloneArguments, string $modifier, string $argumentsForDeclaration, string $argumentsForCall, \SebastianBergmann\Type\Type $returnType, string $reference, bool $callOriginalMethod, bool $static, ?string $deprecation) { } - public function willReturnArgument($argumentIndex): self + public function getName(): string { } - public function willReturnCallback($callback): self + /** + * @throws RuntimeException + */ + public function generateCode(): string { } - public function willReturnSelf(): self + public function getReturnType(): \SebastianBergmann\Type\Type { } - public function willReturnOnConsecutiveCalls(...$values): self +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class Invocation implements \PHPUnit\Framework\SelfDescribing +{ + public function __construct(string $className, string $methodName, array $parameters, string $returnType, object $object, bool $cloneObjects = false, bool $proxiedCall = false) { } - public function willThrowException(\Throwable $exception): self + public function getClassName(): string { } - /** - * @return $this - */ - public function after($id): self + public function getMethodName(): string { } - /** - * @param mixed $nextValues - * - * @throws \PHPUnit\Framework\Exception - * @throws \PHPUnit\Framework\MockObject\MethodNameNotConfiguredException - * @throws \PHPUnit\Framework\MockObject\MethodParametersAlreadyConfiguredException - * - * @return $this - */ - public function with(...$arguments): self + public function getParameters(): array { } /** - * @param array ...$arguments - * - * @throws \PHPUnit\Framework\Exception - * @throws \PHPUnit\Framework\MockObject\MethodNameNotConfiguredException - * @throws \PHPUnit\Framework\MockObject\MethodParametersAlreadyConfiguredException - * - * @return $this + * @throws RuntimeException * - * @deprecated + * @return mixed Mocked return value */ - public function withConsecutive(...$arguments): self + public function generateReturnValue() { } - /** - * @throws \PHPUnit\Framework\MockObject\MethodNameNotConfiguredException - * @throws \PHPUnit\Framework\MockObject\MethodParametersAlreadyConfiguredException - * - * @return $this - */ - public function withAnyParameters(): self + public function toString(): string { } - /** - * @param \PHPUnit\Framework\Constraint\Constraint|string $constraint - * - * @throws \PHPUnit\Framework\InvalidArgumentException - * @throws \PHPUnit\Framework\MockObject\MethodCannotBeConfiguredException - * @throws \PHPUnit\Framework\MockObject\MethodNameAlreadyConfiguredException - * - * @return $this - */ - public function method($constraint): self + public function getObject(): object { } } +namespace PHPUnit\Framework\MockObject\Builder; + +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +interface Stub extends \PHPUnit\Framework\MockObject\Builder\Identity +{ + /** + * Stubs the matching method with the stub object $stub. Any invocations of + * the matched method will now be handled by the stub instead. + */ + public function will(\PHPUnit\Framework\MockObject\Stub\Stub $stub): \PHPUnit\Framework\MockObject\Builder\Identity; +} /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ @@ -8640,276 +8530,187 @@ public function willReturnOnConsecutiveCalls(...$values); public function willThrowException(\Throwable $exception); } /** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface Stub extends \PHPUnit\Framework\MockObject\Builder\Identity -{ - /** - * Stubs the matching method with the stub object $stub. Any invocations of - * the matched method will now be handled by the stub instead. - */ - public function will(\PHPUnit\Framework\MockObject\Stub\Stub $stub): \PHPUnit\Framework\MockObject\Builder\Identity; -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface Identity -{ - /** - * Sets the identification of the expectation to $id. - * - * @note The identifier is unique per mock object. - * - * @param string $id unique identification of expectation - */ - public function id($id); -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -interface ParametersMatch extends \PHPUnit\Framework\MockObject\Builder\Stub +final class InvocationMocker implements \PHPUnit\Framework\MockObject\Builder\InvocationStubber, \PHPUnit\Framework\MockObject\Builder\MethodNameMatch { + public function __construct(\PHPUnit\Framework\MockObject\InvocationHandler $handler, \PHPUnit\Framework\MockObject\Matcher $matcher, \PHPUnit\Framework\MockObject\ConfigurableMethod ...$configurableMethods) + { + } /** - * Defines the expectation which must occur before the current is valid. - * - * @param string $id the identification of the expectation that should - * occur before this one - * - * @return Stub - */ - public function after($id); - /** - * Sets the parameters to match for, each parameter to this function will - * be part of match. To perform specific matches or constraints create a - * new PHPUnit\Framework\Constraint\Constraint and use it for the parameter. - * If the parameter value is not a constraint it will use the - * PHPUnit\Framework\Constraint\IsEqual for the value. - * - * Some examples: - * - * // match first parameter with value 2 - * $b->with(2); - * // match first parameter with value 'smock' and second identical to 42 - * $b->with('smock', new PHPUnit\Framework\Constraint\IsEqual(42)); - * - * - * @return ParametersMatch - */ - public function with(...$arguments); - /** - * Sets a rule which allows any kind of parameters. - * - * Some examples: - * - * // match any number of parameters - * $b->withAnyParameters(); - * + * @throws \PHPUnit\Framework\MockObject\MatcherAlreadyRegisteredException * - * @return ParametersMatch - */ - public function withAnyParameters(); -} -namespace PHPUnit\Framework\MockObject\Rule; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvokedCount extends \PHPUnit\Framework\MockObject\Rule\InvocationOrder -{ - /** - * @param int $expectedCount + * @return $this */ - public function __construct($expectedCount) - { - } - public function isNever(): bool - { - } - public function toString(): string + public function id($id): self { } - public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool + /** + * @return $this + */ + public function will(\PHPUnit\Framework\MockObject\Stub\Stub $stub): \PHPUnit\Framework\MockObject\Builder\Identity { } /** - * Verifies that the current expectation is valid. If everything is OK the - * code should just return, if not it must throw an exception. + * @param mixed $value + * @param mixed $nextValues * - * @throws \PHPUnit\Framework\ExpectationFailedException + * @throws \PHPUnit\Framework\MockObject\IncompatibleReturnValueException */ - public function verify(): void + public function willReturn($value, ...$nextValues): self { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4297 - * - * @codeCoverageIgnore - */ -final class InvokedAtIndex extends \PHPUnit\Framework\MockObject\Rule\InvocationOrder -{ - /** - * @param int $sequenceIndex - */ - public function __construct($sequenceIndex) + public function willReturnReference(&$reference): self + { + } + public function willReturnMap(array $valueMap): self { } - public function toString(): string + public function willReturnArgument($argumentIndex): self { } - public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool + public function willReturnCallback($callback): self { } - /** - * Verifies that the current expectation is valid. If everything is OK the - * code should just return, if not it must throw an exception. - * - * @throws \PHPUnit\Framework\ExpectationFailedException - */ - public function verify(): void + public function willReturnSelf(): self { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class AnyParameters implements \PHPUnit\Framework\MockObject\Rule\ParametersRule -{ - public function toString(): string + public function willReturnOnConsecutiveCalls(...$values): self { } - public function apply(\PHPUnit\Framework\MockObject\Invocation $invocation): void + public function willThrowException(\Throwable $exception): self { } - public function verify(): void + /** + * @return $this + */ + public function after($id): self { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Parameters implements \PHPUnit\Framework\MockObject\Rule\ParametersRule -{ /** + * @param mixed $nextValues + * * @throws \PHPUnit\Framework\Exception + * @throws \PHPUnit\Framework\MockObject\MethodNameNotConfiguredException + * @throws \PHPUnit\Framework\MockObject\MethodParametersAlreadyConfiguredException + * + * @return $this */ - public function __construct(array $parameters) - { - } - public function toString(): string + public function with(...$arguments): self { } /** - * @throws \Exception + * @param array ...$arguments + * + * @throws \PHPUnit\Framework\Exception + * @throws \PHPUnit\Framework\MockObject\MethodNameNotConfiguredException + * @throws \PHPUnit\Framework\MockObject\MethodParametersAlreadyConfiguredException + * + * @return $this + * + * @deprecated */ - public function apply(\PHPUnit\Framework\MockObject\Invocation $invocation): void + public function withConsecutive(...$arguments): self { } /** - * Checks if the invocation $invocation matches the current rules. If it - * does the rule will get the invoked() method called which should check - * if an expectation is met. + * @throws \PHPUnit\Framework\MockObject\MethodNameNotConfiguredException + * @throws \PHPUnit\Framework\MockObject\MethodParametersAlreadyConfiguredException * - * @throws \PHPUnit\Framework\ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @return $this */ - public function verify(): void + public function withAnyParameters(): self { } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface ParametersRule extends \PHPUnit\Framework\SelfDescribing, \PHPUnit\Framework\MockObject\Verifiable -{ /** - * @throws \PHPUnit\Framework\ExpectationFailedException if the invocation violates the rule + * @param \PHPUnit\Framework\Constraint\Constraint|string $constraint + * + * @throws \PHPUnit\Framework\InvalidArgumentException + * @throws \PHPUnit\Framework\MockObject\MethodCannotBeConfiguredException + * @throws \PHPUnit\Framework\MockObject\MethodNameAlreadyConfiguredException + * + * @return $this */ - public function apply(\PHPUnit\Framework\MockObject\Invocation $invocation): void; - public function verify(): void; -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -abstract class InvocationOrder implements \PHPUnit\Framework\SelfDescribing, \PHPUnit\Framework\MockObject\Verifiable -{ - public function getInvocationCount(): int - { - } - public function hasBeenInvoked(): bool - { - } - final public function invoked(\PHPUnit\Framework\MockObject\Invocation $invocation) + public function method($constraint): self { } - abstract public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool; - abstract protected function invokedDo(\PHPUnit\Framework\MockObject\Invocation $invocation); } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class InvokedAtLeastOnce extends \PHPUnit\Framework\MockObject\Rule\InvocationOrder +interface ParametersMatch extends \PHPUnit\Framework\MockObject\Builder\Stub { - public function toString(): string - { - } /** - * Verifies that the current expectation is valid. If everything is OK the - * code should just return, if not it must throw an exception. + * Defines the expectation which must occur before the current is valid. * - * @throws \PHPUnit\Framework\ExpectationFailedException + * @param string $id the identification of the expectation that should + * occur before this one + * + * @return Stub */ - public function verify(): void - { - } - public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool - { - } + public function after($id); + /** + * Sets the parameters to match for, each parameter to this function will + * be part of match. To perform specific matches or constraints create a + * new PHPUnit\Framework\Constraint\Constraint and use it for the parameter. + * If the parameter value is not a constraint it will use the + * PHPUnit\Framework\Constraint\IsEqual for the value. + * + * Some examples: + * + * // match first parameter with value 2 + * $b->with(2); + * // match first parameter with value 'smock' and second identical to 42 + * $b->with('smock', new PHPUnit\Framework\Constraint\IsEqual(42)); + * + * + * @return ParametersMatch + */ + public function with(...$arguments); + /** + * Sets a rule which allows any kind of parameters. + * + * Some examples: + * + * // match any number of parameters + * $b->withAnyParameters(); + * + * + * @return ParametersMatch + */ + public function withAnyParameters(); } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class InvokedAtLeastCount extends \PHPUnit\Framework\MockObject\Rule\InvocationOrder +interface MethodNameMatch extends \PHPUnit\Framework\MockObject\Builder\ParametersMatch { /** - * @param int $requiredInvocations - */ - public function __construct($requiredInvocations) - { - } - public function toString(): string - { - } - /** - * Verifies that the current expectation is valid. If everything is OK the - * code should just return, if not it must throw an exception. + * Adds a new method name match and returns the parameter match object for + * further matching possibilities. * - * @throws \PHPUnit\Framework\ExpectationFailedException + * @param \PHPUnit\Framework\Constraint\Constraint $constraint Constraint for matching method, if a string is passed it will use the PHPUnit_Framework_Constraint_IsEqual + * + * @return ParametersMatch */ - public function verify(): void - { - } - public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool - { - } + public function method($constraint); } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class AnyInvokedCount extends \PHPUnit\Framework\MockObject\Rule\InvocationOrder +interface Identity { - public function toString(): string - { - } - public function verify(): void - { - } - public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool - { - } + /** + * Sets the identification of the expectation to $id. + * + * @note The identifier is unique per mock object. + * + * @param string $id unique identification of expectation + */ + public function id($id); } +namespace PHPUnit\Framework\MockObject\Rule; + /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ @@ -8941,33 +8742,6 @@ public function matchesName(string $methodName): bool { } } -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvokedAtMostCount extends \PHPUnit\Framework\MockObject\Rule\InvocationOrder -{ - /** - * @param int $allowedInvocations - */ - public function __construct($allowedInvocations) - { - } - public function toString(): string - { - } - /** - * Verifies that the current expectation is valid. If everything is OK the - * code should just return, if not it must throw an exception. - * - * @throws \PHPUnit\Framework\ExpectationFailedException - */ - public function verify(): void - { - } - public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool - { - } -} /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * @@ -8991,459 +8765,426 @@ public function toString(): string public function apply(\PHPUnit\Framework\MockObject\Invocation $invocation): void { } - /** - * @throws \PHPUnit\Framework\ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function verify(): void - { - } -} -namespace PHPUnit\Framework\MockObject\Stub; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface Stub extends \PHPUnit\Framework\SelfDescribing -{ - /** - * Fakes the processing of the invocation $invocation by returning a - * specific value. - * - * @param \PHPUnit\Framework\MockObject\Invocation $invocation The invocation which was mocked and matched by the current method and argument matchers - */ - public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation); -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ReturnCallback implements \PHPUnit\Framework\MockObject\Stub\Stub -{ - public function __construct($callback) - { - } - public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation) - { - } - public function toString(): string + /** + * @throws \PHPUnit\Framework\ExpectationFailedException + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + */ + public function verify(): void { } } /** - * @internal This class is not covered by the backward compatibility promise for PHPUnit + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class ReturnArgument implements \PHPUnit\Framework\MockObject\Stub\Stub +interface ParametersRule extends \PHPUnit\Framework\SelfDescribing, \PHPUnit\Framework\MockObject\Verifiable { - public function __construct($argumentIndex) - { - } - public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation) - { - } - public function toString(): string - { - } + /** + * @throws \PHPUnit\Framework\ExpectationFailedException if the invocation violates the rule + */ + public function apply(\PHPUnit\Framework\MockObject\Invocation $invocation): void; + public function verify(): void; } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class ReturnStub implements \PHPUnit\Framework\MockObject\Stub\Stub +final class InvokedAtMostCount extends \PHPUnit\Framework\MockObject\Rule\InvocationOrder { - public function __construct($value) + /** + * @param int $allowedInvocations + */ + public function __construct($allowedInvocations) { } - public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation) + public function toString(): string { } - public function toString(): string + /** + * Verifies that the current expectation is valid. If everything is OK the + * code should just return, if not it must throw an exception. + * + * @throws \PHPUnit\Framework\ExpectationFailedException + */ + public function verify(): void + { + } + public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class Exception implements \PHPUnit\Framework\MockObject\Stub\Stub +final class InvokedAtLeastCount extends \PHPUnit\Framework\MockObject\Rule\InvocationOrder { - public function __construct(\Throwable $exception) + /** + * @param int $requiredInvocations + */ + public function __construct($requiredInvocations) + { + } + public function toString(): string { } /** - * @throws \Throwable + * Verifies that the current expectation is valid. If everything is OK the + * code should just return, if not it must throw an exception. + * + * @throws \PHPUnit\Framework\ExpectationFailedException */ - public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation): void + public function verify(): void { } - public function toString(): string + public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class ConsecutiveCalls implements \PHPUnit\Framework\MockObject\Stub\Stub +abstract class InvocationOrder implements \PHPUnit\Framework\SelfDescribing, \PHPUnit\Framework\MockObject\Verifiable { - public function __construct(array $stack) + public function getInvocationCount(): int { } - public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation) + public function hasBeenInvoked(): bool { } - public function toString(): string + final public function invoked(\PHPUnit\Framework\MockObject\Invocation $invocation) { } + abstract public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool; + abstract protected function invokedDo(\PHPUnit\Framework\MockObject\Invocation $invocation); } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class ReturnValueMap implements \PHPUnit\Framework\MockObject\Stub\Stub +final class Parameters implements \PHPUnit\Framework\MockObject\Rule\ParametersRule { - public function __construct(array $valueMap) - { - } - public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation) + /** + * @throws \PHPUnit\Framework\Exception + */ + public function __construct(array $parameters) { } public function toString(): string { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ReturnSelf implements \PHPUnit\Framework\MockObject\Stub\Stub -{ /** - * @throws \PHPUnit\Framework\MockObject\RuntimeException + * @throws \Exception */ - public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation) + public function apply(\PHPUnit\Framework\MockObject\Invocation $invocation): void { } - public function toString(): string + /** + * Checks if the invocation $invocation matches the current rules. If it + * does the rule will get the invoked() method called which should check + * if an expectation is met. + * + * @throws \PHPUnit\Framework\ExpectationFailedException + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + */ + public function verify(): void { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class ReturnReference implements \PHPUnit\Framework\MockObject\Stub\Stub +final class InvokedCount extends \PHPUnit\Framework\MockObject\Rule\InvocationOrder { - public function __construct(&$reference) + /** + * @param int $expectedCount + */ + public function __construct($expectedCount) { } - public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation) + public function isNever(): bool { } public function toString(): string { } -} -namespace PHPUnit\Runner; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class Version -{ - /** - * Returns the current version of PHPUnit. - * - * @phan-return non-empty-string - */ - public static function id(): string - { - } - /** - * @phan-return non-empty-string - */ - public static function series(): string + public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool { } /** - * @phan-return non-empty-string + * Verifies that the current expectation is valid. If everything is OK the + * code should just return, if not it must throw an exception. + * + * @throws \PHPUnit\Framework\ExpectationFailedException */ - public static function getVersionString(): string + public function verify(): void { } } /** - * This interface, as well as the associated mechanism for extending PHPUnit, - * will be removed in PHPUnit 10. There is no alternative available in this - * version of PHPUnit. + * @internal This class is not covered by the backward compatibility promise for PHPUnit * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4297 * - * @see https://github.com/sebastianbergmann/phpunit/issues/4676 - */ -interface AfterIncompleteTestHook extends \PHPUnit\Runner\TestHook -{ - public function executeAfterIncompleteTest(string $test, string $message, float $time): void; -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit + * @codeCoverageIgnore */ -final class TestListenerAdapter implements \PHPUnit\Framework\TestListener +final class InvokedAtIndex extends \PHPUnit\Framework\MockObject\Rule\InvocationOrder { - public function add(\PHPUnit\Runner\TestHook $hook): void - { - } - public function startTest(\PHPUnit\Framework\Test $test): void + /** + * @param int $sequenceIndex + */ + public function __construct($sequenceIndex) { } - public function addError(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void + public function toString(): string { } - public function addWarning(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\Warning $e, float $time): void + public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool { } - public function addFailure(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\AssertionFailedError $e, float $time): void + /** + * Verifies that the current expectation is valid. If everything is OK the + * code should just return, if not it must throw an exception. + * + * @throws \PHPUnit\Framework\ExpectationFailedException + */ + public function verify(): void { } - public function addIncompleteTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class AnyParameters implements \PHPUnit\Framework\MockObject\Rule\ParametersRule +{ + public function toString(): string { } - public function addRiskyTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void + public function apply(\PHPUnit\Framework\MockObject\Invocation $invocation): void { } - public function addSkippedTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void + public function verify(): void { } - public function endTest(\PHPUnit\Framework\Test $test, float $time): void +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class InvokedAtLeastOnce extends \PHPUnit\Framework\MockObject\Rule\InvocationOrder +{ + public function toString(): string { } - public function startTestSuite(\PHPUnit\Framework\TestSuite $suite): void + /** + * Verifies that the current expectation is valid. If everything is OK the + * code should just return, if not it must throw an exception. + * + * @throws \PHPUnit\Framework\ExpectationFailedException + */ + public function verify(): void { } - public function endTestSuite(\PHPUnit\Framework\TestSuite $suite): void + public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool { - } -} -/** - * This interface, as well as the associated mechanism for extending PHPUnit, - * will be removed in PHPUnit 10. There is no alternative available in this - * version of PHPUnit. - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see https://github.com/sebastianbergmann/phpunit/issues/4676 - */ -interface AfterLastTestHook extends \PHPUnit\Runner\Hook -{ - public function executeAfterLastTest(): void; -} -/** - * This interface, as well as the associated mechanism for extending PHPUnit, - * will be removed in PHPUnit 10. There is no alternative available in this - * version of PHPUnit. - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see https://github.com/sebastianbergmann/phpunit/issues/4676 - */ -interface AfterSuccessfulTestHook extends \PHPUnit\Runner\TestHook -{ - public function executeAfterSuccessfulTest(string $test, float $time): void; -} -/** - * This interface, as well as the associated mechanism for extending PHPUnit, - * will be removed in PHPUnit 10. There is no alternative available in this - * version of PHPUnit. - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see https://github.com/sebastianbergmann/phpunit/issues/4676 - */ -interface BeforeFirstTestHook extends \PHPUnit\Runner\Hook -{ - public function executeBeforeFirstTest(): void; -} -/** - * This interface, as well as the associated mechanism for extending PHPUnit, - * will be removed in PHPUnit 10. There is no alternative available in this - * version of PHPUnit. - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see https://github.com/sebastianbergmann/phpunit/issues/4676 + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -interface AfterSkippedTestHook extends \PHPUnit\Runner\TestHook +final class AnyInvokedCount extends \PHPUnit\Framework\MockObject\Rule\InvocationOrder { - public function executeAfterSkippedTest(string $test, string $message, float $time): void; + public function toString(): string + { + } + public function verify(): void + { + } + public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool + { + } } +namespace PHPUnit\Framework\MockObject\Stub; + /** - * This interface, as well as the associated mechanism for extending PHPUnit, - * will be removed in PHPUnit 10. There is no alternative available in this - * version of PHPUnit. - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see https://github.com/sebastianbergmann/phpunit/issues/4676 + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -interface AfterTestWarningHook extends \PHPUnit\Runner\TestHook +interface Stub extends \PHPUnit\Framework\SelfDescribing { - public function executeAfterTestWarning(string $test, string $message, float $time): void; + /** + * Fakes the processing of the invocation $invocation by returning a + * specific value. + * + * @param \PHPUnit\Framework\MockObject\Invocation $invocation The invocation which was mocked and matched by the current method and argument matchers + */ + public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation); } /** - * This interface, as well as the associated mechanism for extending PHPUnit, - * will be removed in PHPUnit 10. There is no alternative available in this - * version of PHPUnit. - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see https://github.com/sebastianbergmann/phpunit/issues/4676 + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -interface AfterRiskyTestHook extends \PHPUnit\Runner\TestHook +final class Exception implements \PHPUnit\Framework\MockObject\Stub\Stub { - public function executeAfterRiskyTest(string $test, string $message, float $time): void; + public function __construct(\Throwable $exception) + { + } + /** + * @throws \Throwable + */ + public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation): void + { + } + public function toString(): string + { + } } /** - * This interface, as well as the associated mechanism for extending PHPUnit, - * will be removed in PHPUnit 10. There is no alternative available in this - * version of PHPUnit. - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see https://github.com/sebastianbergmann/phpunit/issues/4676 + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -interface AfterTestErrorHook extends \PHPUnit\Runner\TestHook +final class ReturnArgument implements \PHPUnit\Framework\MockObject\Stub\Stub { - public function executeAfterTestError(string $test, string $message, float $time): void; + public function __construct($argumentIndex) + { + } + public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation) + { + } + public function toString(): string + { + } } /** - * This interface, as well as the associated mechanism for extending PHPUnit, - * will be removed in PHPUnit 10. There is no alternative available in this - * version of PHPUnit. - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see https://github.com/sebastianbergmann/phpunit/issues/4676 + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -interface TestHook extends \PHPUnit\Runner\Hook +final class ReturnReference implements \PHPUnit\Framework\MockObject\Stub\Stub { + public function __construct(&$reference) + { + } + public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation) + { + } + public function toString(): string + { + } } /** - * This interface, as well as the associated mechanism for extending PHPUnit, - * will be removed in PHPUnit 10. There is no alternative available in this - * version of PHPUnit. - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see https://github.com/sebastianbergmann/phpunit/issues/4676 + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -interface AfterTestHook extends \PHPUnit\Runner\TestHook +final class ReturnSelf implements \PHPUnit\Framework\MockObject\Stub\Stub { /** - * This hook will fire after any test, regardless of the result. - * - * For more fine grained control, have a look at the other hooks - * that extend PHPUnit\Runner\Hook. + * @throws \PHPUnit\Framework\MockObject\RuntimeException */ - public function executeAfterTest(string $test, float $time): void; + public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation) + { + } + public function toString(): string + { + } } /** - * This interface, as well as the associated mechanism for extending PHPUnit, - * will be removed in PHPUnit 10. There is no alternative available in this - * version of PHPUnit. - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see https://github.com/sebastianbergmann/phpunit/issues/4676 + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -interface BeforeTestHook extends \PHPUnit\Runner\TestHook +final class ReturnStub implements \PHPUnit\Framework\MockObject\Stub\Stub { - public function executeBeforeTest(string $test): void; + public function __construct($value) + { + } + public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation) + { + } + public function toString(): string + { + } } /** - * This interface, as well as the associated mechanism for extending PHPUnit, - * will be removed in PHPUnit 10. There is no alternative available in this - * version of PHPUnit. - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see https://github.com/sebastianbergmann/phpunit/issues/4676 + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -interface AfterTestFailureHook extends \PHPUnit\Runner\TestHook +final class ReturnCallback implements \PHPUnit\Framework\MockObject\Stub\Stub { - public function executeAfterTestFailure(string $test, string $message, float $time): void; + public function __construct($callback) + { + } + public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation) + { + } + public function toString(): string + { + } } /** - * This interface, as well as the associated mechanism for extending PHPUnit, - * will be removed in PHPUnit 10. There is no alternative available in this - * version of PHPUnit. - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see https://github.com/sebastianbergmann/phpunit/issues/4676 + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -interface Hook +final class ReturnValueMap implements \PHPUnit\Framework\MockObject\Stub\Stub { + public function __construct(array $valueMap) + { + } + public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation) + { + } + public function toString(): string + { + } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class PhptTestCase implements \PHPUnit\Framework\Reorderable, \PHPUnit\Framework\SelfDescribing, \PHPUnit\Framework\Test +final class ConsecutiveCalls implements \PHPUnit\Framework\MockObject\Stub\Stub { - /** - * Constructs a test case with the given filename. - * - * @throws Exception - */ - public function __construct(string $filename, ?\PHPUnit\Util\PHP\AbstractPhpProcess $phpUtil = null) + public function __construct(array $stack) { } - /** - * Counts the number of test cases executed by run(TestResult result). - */ - public function count(): int + public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation) + { + } + public function toString(): string { } +} +namespace PHPUnit\Runner; + +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class Exception extends \RuntimeException implements \PHPUnit\Exception +{ +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @deprecated see https://github.com/sebastianbergmann/phpunit/issues/4039 + */ +final class StandardTestSuiteLoader implements \PHPUnit\Runner\TestSuiteLoader +{ /** - * Runs a test and collects its result in a TestResult instance. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws Exception - * @throws \SebastianBergmann\CodeCoverage\InvalidArgumentException - * @throws \SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException */ - public function run(?\PHPUnit\Framework\TestResult $result = null): \PHPUnit\Framework\TestResult + public function load(string $suiteClassFile): \ReflectionClass { } - /** - * Returns the name of the test case. - */ - public function getName(): string + public function reload(\ReflectionClass $aClass): \ReflectionClass { } +} +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +final class Version +{ /** - * Returns a string representation of the test case. + * Returns the current version of PHPUnit. + * + * @phan-return non-empty-string */ - public function toString(): string - { - } - public function usesDataProvider(): bool - { - } - public function getNumAssertions(): int - { - } - public function getActualOutput(): string - { - } - public function hasOutput(): bool - { - } - public function sortId(): string + public static function id(): string { } /** - * @return list<\PHPUnit\Framework\ExecutionOrderDependency> + * @phan-return non-empty-string */ - public function provides(): array + public static function series(): string { } /** - * @return list<\PHPUnit\Framework\ExecutionOrderDependency> + * @phan-return non-empty-string */ - public function requires(): array + public static function getVersionString(): string { } } @@ -9531,6 +9272,30 @@ public function executeAfterLastTest(): void { } } +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class NullTestResultCache implements \PHPUnit\Runner\TestResultCache +{ + public function setState(string $testName, int $state): void + { + } + public function getState(string $testName): int + { + } + public function setTime(string $testName, float $time): void + { + } + public function getTime(string $testName): float + { + } + public function load(): void + { + } + public function persist(): void + { + } +} /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ @@ -9611,14 +9376,11 @@ abstract protected function runFailed(string $message): void; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class Exception extends \RuntimeException implements \PHPUnit\Exception -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class NullTestResultCache implements \PHPUnit\Runner\TestResultCache +final class DefaultTestResultCache implements \PHPUnit\Runner\TestResultCache { + public function __construct(?string $filepath = null) + { + } public function setState(string $testName, int $state): void { } @@ -9634,27 +9396,237 @@ public function getTime(string $testName): float public function load(): void { } + /** + * @throws Exception + */ public function persist(): void { } } /** - * @internal This class is not covered by the backward compatibility promise for PHPUnit + * This interface, as well as the associated mechanism for extending PHPUnit, + * will be removed in PHPUnit 10. There is no alternative available in this + * version of PHPUnit. * - * @deprecated see https://github.com/sebastianbergmann/phpunit/issues/4039 + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @see https://github.com/sebastianbergmann/phpunit/issues/4676 */ -final class StandardTestSuiteLoader implements \PHPUnit\Runner\TestSuiteLoader +interface AfterTestFailureHook extends \PHPUnit\Runner\TestHook { - /** - * @throws Exception - */ - public function load(string $suiteClassFile): \ReflectionClass + public function executeAfterTestFailure(string $test, string $message, float $time): void; +} +/** + * This interface, as well as the associated mechanism for extending PHPUnit, + * will be removed in PHPUnit 10. There is no alternative available in this + * version of PHPUnit. + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @see https://github.com/sebastianbergmann/phpunit/issues/4676 + */ +interface TestHook extends \PHPUnit\Runner\Hook +{ +} +/** + * This interface, as well as the associated mechanism for extending PHPUnit, + * will be removed in PHPUnit 10. There is no alternative available in this + * version of PHPUnit. + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @see https://github.com/sebastianbergmann/phpunit/issues/4676 + */ +interface Hook +{ +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class TestListenerAdapter implements \PHPUnit\Framework\TestListener +{ + public function add(\PHPUnit\Runner\TestHook $hook): void { } - public function reload(\ReflectionClass $aClass): \ReflectionClass + public function startTest(\PHPUnit\Framework\Test $test): void + { + } + public function addError(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void + { + } + public function addWarning(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\Warning $e, float $time): void + { + } + public function addFailure(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\AssertionFailedError $e, float $time): void + { + } + public function addIncompleteTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void + { + } + public function addRiskyTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void + { + } + public function addSkippedTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void + { + } + public function endTest(\PHPUnit\Framework\Test $test, float $time): void + { + } + public function startTestSuite(\PHPUnit\Framework\TestSuite $suite): void + { + } + public function endTestSuite(\PHPUnit\Framework\TestSuite $suite): void { } } +/** + * This interface, as well as the associated mechanism for extending PHPUnit, + * will be removed in PHPUnit 10. There is no alternative available in this + * version of PHPUnit. + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @see https://github.com/sebastianbergmann/phpunit/issues/4676 + */ +interface AfterIncompleteTestHook extends \PHPUnit\Runner\TestHook +{ + public function executeAfterIncompleteTest(string $test, string $message, float $time): void; +} +/** + * This interface, as well as the associated mechanism for extending PHPUnit, + * will be removed in PHPUnit 10. There is no alternative available in this + * version of PHPUnit. + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @see https://github.com/sebastianbergmann/phpunit/issues/4676 + */ +interface BeforeTestHook extends \PHPUnit\Runner\TestHook +{ + public function executeBeforeTest(string $test): void; +} +/** + * This interface, as well as the associated mechanism for extending PHPUnit, + * will be removed in PHPUnit 10. There is no alternative available in this + * version of PHPUnit. + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @see https://github.com/sebastianbergmann/phpunit/issues/4676 + */ +interface AfterTestHook extends \PHPUnit\Runner\TestHook +{ + /** + * This hook will fire after any test, regardless of the result. + * + * For more fine grained control, have a look at the other hooks + * that extend PHPUnit\Runner\Hook. + */ + public function executeAfterTest(string $test, float $time): void; +} +/** + * This interface, as well as the associated mechanism for extending PHPUnit, + * will be removed in PHPUnit 10. There is no alternative available in this + * version of PHPUnit. + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @see https://github.com/sebastianbergmann/phpunit/issues/4676 + */ +interface AfterSuccessfulTestHook extends \PHPUnit\Runner\TestHook +{ + public function executeAfterSuccessfulTest(string $test, float $time): void; +} +/** + * This interface, as well as the associated mechanism for extending PHPUnit, + * will be removed in PHPUnit 10. There is no alternative available in this + * version of PHPUnit. + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @see https://github.com/sebastianbergmann/phpunit/issues/4676 + */ +interface AfterSkippedTestHook extends \PHPUnit\Runner\TestHook +{ + public function executeAfterSkippedTest(string $test, string $message, float $time): void; +} +/** + * This interface, as well as the associated mechanism for extending PHPUnit, + * will be removed in PHPUnit 10. There is no alternative available in this + * version of PHPUnit. + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @see https://github.com/sebastianbergmann/phpunit/issues/4676 + */ +interface AfterRiskyTestHook extends \PHPUnit\Runner\TestHook +{ + public function executeAfterRiskyTest(string $test, string $message, float $time): void; +} +/** + * This interface, as well as the associated mechanism for extending PHPUnit, + * will be removed in PHPUnit 10. There is no alternative available in this + * version of PHPUnit. + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @see https://github.com/sebastianbergmann/phpunit/issues/4676 + */ +interface AfterTestWarningHook extends \PHPUnit\Runner\TestHook +{ + public function executeAfterTestWarning(string $test, string $message, float $time): void; +} +/** + * This interface, as well as the associated mechanism for extending PHPUnit, + * will be removed in PHPUnit 10. There is no alternative available in this + * version of PHPUnit. + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @see https://github.com/sebastianbergmann/phpunit/issues/4676 + */ +interface BeforeFirstTestHook extends \PHPUnit\Runner\Hook +{ + public function executeBeforeFirstTest(): void; +} +/** + * This interface, as well as the associated mechanism for extending PHPUnit, + * will be removed in PHPUnit 10. There is no alternative available in this + * version of PHPUnit. + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @see https://github.com/sebastianbergmann/phpunit/issues/4676 + */ +interface AfterTestErrorHook extends \PHPUnit\Runner\TestHook +{ + public function executeAfterTestError(string $test, string $message, float $time): void; +} +/** + * This interface, as well as the associated mechanism for extending PHPUnit, + * will be removed in PHPUnit 10. There is no alternative available in this + * version of PHPUnit. + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @see https://github.com/sebastianbergmann/phpunit/issues/4676 + */ +interface AfterLastTestHook extends \PHPUnit\Runner\Hook +{ + public function executeAfterLastTest(): void; +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +interface TestResultCache +{ + public function setState(string $testName, int $state): void; + public function getState(string $testName): int; + public function setTime(string $testName, float $time): void; + public function getTime(string $testName): float; + public function load(): void; + public function persist(): void; +} /** * @deprecated see https://github.com/sebastianbergmann/phpunit/issues/4039 * @@ -9668,44 +9640,72 @@ public function reload(\ReflectionClass $aClass): \ReflectionClass; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class DefaultTestResultCache implements \PHPUnit\Runner\TestResultCache +final class PhptTestCase implements \PHPUnit\Framework\Reorderable, \PHPUnit\Framework\SelfDescribing, \PHPUnit\Framework\Test { - public function __construct(?string $filepath = null) + /** + * Constructs a test case with the given filename. + * + * @throws Exception + */ + public function __construct(string $filename, ?\PHPUnit\Util\PHP\AbstractPhpProcess $phpUtil = null) { } - public function setState(string $testName, int $state): void + /** + * Counts the number of test cases executed by run(TestResult result). + */ + public function count(): int { } - public function getState(string $testName): int + /** + * Runs a test and collects its result in a TestResult instance. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws Exception + * @throws \SebastianBergmann\CodeCoverage\InvalidArgumentException + * @throws \SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException + */ + public function run(?\PHPUnit\Framework\TestResult $result = null): \PHPUnit\Framework\TestResult { } - public function setTime(string $testName, float $time): void + /** + * Returns the name of the test case. + */ + public function getName(): string { } - public function getTime(string $testName): float + /** + * Returns a string representation of the test case. + */ + public function toString(): string { } - public function load(): void + public function usesDataProvider(): bool + { + } + public function getNumAssertions(): int + { + } + public function getActualOutput(): string + { + } + public function hasOutput(): bool + { + } + public function sortId(): string { } /** - * @throws Exception + * @return list<\PHPUnit\Framework\ExecutionOrderDependency> */ - public function persist(): void + public function provides(): array + { + } + /** + * @return list<\PHPUnit\Framework\ExecutionOrderDependency> + */ + public function requires(): array { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface TestResultCache -{ - public function setState(string $testName, int $state): void; - public function getState(string $testName): int; - public function setTime(string $testName, float $time): void; - public function getTime(string $testName): float; - public function load(): void; - public function persist(): void; } namespace PHPUnit\Runner\Extension; @@ -9746,37 +9746,8 @@ public function loadPharExtensionsInDirectory(string $directory): array /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class Factory -{ - /** - * @param array|string $args - * - * @throws \PHPUnit\Runner\Exception - */ - public function addFilter(\ReflectionClass $filter, $args): void - { - } - public function factory(\Iterator $iterator, \PHPUnit\Framework\TestSuite $suite): \FilterIterator - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class NameFilterIterator extends \RecursiveFilterIterator +final class IncludeGroupFilterIterator extends \PHPUnit\Runner\Filter\GroupFilterIterator { - /** - * @throws \Exception - */ - public function __construct(\RecursiveIterator $iterator, string $filter) - { - } - /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function accept(): bool - { - } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit @@ -9798,211 +9769,122 @@ abstract protected function doAccept(string $hash); /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class ExcludeGroupFilterIterator extends \PHPUnit\Runner\Filter\GroupFilterIterator -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class IncludeGroupFilterIterator extends \PHPUnit\Runner\Filter\GroupFilterIterator -{ -} -namespace PHPUnit\TextUI; - -/** - * @internal This interface is not covered by the backward compatibility promise for PHPUnit - */ -final class RuntimeException extends \RuntimeException implements \PHPUnit\TextUI\Exception -{ -} -/** - * @internal This interface is not covered by the backward compatibility promise for PHPUnit - */ -final class TestDirectoryNotFoundException extends \RuntimeException implements \PHPUnit\TextUI\Exception -{ - public function __construct(string $path) - { - } -} -/** - * @internal This interface is not covered by the backward compatibility promise for PHPUnit - */ -interface Exception extends \Throwable -{ -} -/** - * @internal This interface is not covered by the backward compatibility promise for PHPUnit - */ -final class TestFileNotFoundException extends \RuntimeException implements \PHPUnit\TextUI\Exception -{ - public function __construct(string $path) - { - } -} -/** - * @internal This interface is not covered by the backward compatibility promise for PHPUnit - */ -final class ReflectionException extends \RuntimeException implements \PHPUnit\TextUI\Exception -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class TestRunner extends \PHPUnit\Runner\BaseTestRunner +final class Factory { - public const SUCCESS_EXIT = 0; - public const FAILURE_EXIT = 1; - public const EXCEPTION_EXIT = 2; - public function __construct(?\PHPUnit\Runner\TestSuiteLoader $loader = null, ?\SebastianBergmann\CodeCoverage\Filter $filter = null) - { - } /** + * @param array|string $args + * * @throws \PHPUnit\Runner\Exception - * @throws \PHPUnit\Framework\Exception - * @throws XmlConfiguration\Exception - */ - public function run(\PHPUnit\Framework\TestSuite $suite, array $arguments = [], array $warnings = [], bool $exit = true): \PHPUnit\Framework\TestResult - { - } - /** - * Returns the loader to be used. */ - public function getLoader(): \PHPUnit\Runner\TestSuiteLoader + public function addFilter(\ReflectionClass $filter, $args): void { } - public function addExtension(\PHPUnit\Runner\Hook $extension): void + public function factory(\Iterator $iterator, \PHPUnit\Framework\TestSuite $suite): \FilterIterator { } } /** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -class Command +final class NameFilterIterator extends \RecursiveFilterIterator { /** - * @var array - */ - protected $arguments = []; - /** - * @var array - */ - protected $longOptions = []; - /** - * @throws Exception - */ - public static function main(bool $exit = true): int - { - } - /** - * @throws Exception - */ - public function run(array $argv, bool $exit = true): int - { - } - /** - * Create a TestRunner, override in subclasses. - */ - protected function createRunner(): \PHPUnit\TextUI\TestRunner - { - } - /** - * Handles the command-line arguments. - * - * A child class of PHPUnit\TextUI\Command can hook into the argument - * parsing by adding the switch(es) to the $longOptions array and point to a - * callback method that handles the switch(es) in the child class like this - * - * - * longOptions['my-switch'] = 'myHandler'; - * // my-secondswitch will accept a value - note the equals sign - * $this->longOptions['my-secondswitch='] = 'myOtherHandler'; - * } - * - * // --my-switch -> myHandler() - * protected function myHandler() - * { - * } - * - * // --my-secondswitch foo -> myOtherHandler('foo') - * protected function myOtherHandler ($value) - * { - * } - * - * // You will also need this - the static keyword in the - * // PHPUnit\TextUI\Command will mean that it'll be - * // PHPUnit\TextUI\Command that gets instantiated, - * // not MyCommand - * public static function main($exit = true) - * { - * $command = new static; - * - * return $command->run($_SERVER['argv'], $exit); - * } - * - * } - * - * - * @throws Exception + * @throws \Exception */ - protected function handleArguments(array $argv): void + public function __construct(\RecursiveIterator $iterator, string $filter) { } /** - * Handles the loading of the PHPUnit\Runner\TestSuiteLoader implementation. - * - * @deprecated see https://github.com/sebastianbergmann/phpunit/issues/4039 + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ - protected function handleLoader(string $loaderClass, string $loaderFile = ''): ?\PHPUnit\Runner\TestSuiteLoader + public function accept(): bool + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class ExcludeGroupFilterIterator extends \PHPUnit\Runner\Filter\GroupFilterIterator +{ +} +namespace PHPUnit\TextUI; + +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class TestRunner extends \PHPUnit\Runner\BaseTestRunner +{ + public const SUCCESS_EXIT = 0; + public const FAILURE_EXIT = 1; + public const EXCEPTION_EXIT = 2; + public function __construct(?\PHPUnit\Runner\TestSuiteLoader $loader = null, ?\SebastianBergmann\CodeCoverage\Filter $filter = null) { } /** - * Handles the loading of the PHPUnit\Util\Printer implementation. - * - * @return null|\PHPUnit\Util\Printer|string + * @throws \PHPUnit\Runner\Exception + * @throws \PHPUnit\Framework\Exception + * @throws XmlConfiguration\Exception */ - protected function handlePrinter(string $printerClass, string $printerFile = '') + public function run(\PHPUnit\Framework\TestSuite $suite, array $arguments = [], array $warnings = [], bool $exit = true): \PHPUnit\Framework\TestResult { } /** - * Loads a bootstrap file. + * Returns the loader to be used. */ - protected function handleBootstrap(string $filename): void + public function getLoader(): \PHPUnit\Runner\TestSuiteLoader { } - protected function handleVersionCheck(): void + public function addExtension(\PHPUnit\Runner\Hook $extension): void { } - /** - * Show the help message. - */ - protected function showHelp(): void +} +/** + * @internal This interface is not covered by the backward compatibility promise for PHPUnit + */ +interface Exception extends \Throwable +{ +} +/** + * @internal This interface is not covered by the backward compatibility promise for PHPUnit + */ +final class RuntimeException extends \RuntimeException implements \PHPUnit\TextUI\Exception +{ +} +/** + * @internal This interface is not covered by the backward compatibility promise for PHPUnit + */ +final class TestFileNotFoundException extends \RuntimeException implements \PHPUnit\TextUI\Exception +{ + public function __construct(string $path) { } - /** - * Custom callback for test suite discovery. - */ - protected function handleCustomTestSuite(): void +} +/** + * @internal This interface is not covered by the backward compatibility promise for PHPUnit + */ +final class TestDirectoryNotFoundException extends \RuntimeException implements \PHPUnit\TextUI\Exception +{ + public function __construct(string $path) { } } +/** + * @internal This interface is not covered by the backward compatibility promise for PHPUnit + */ +final class ReflectionException extends \RuntimeException implements \PHPUnit\TextUI\Exception +{ +} /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class Help +final class TestSuiteMapper { - public function __construct(?int $width = null, ?bool $withColor = null) - { - } /** - * Write the help file to the CLI, adapting width and colors to the console. + * @throws RuntimeException + * @throws TestDirectoryNotFoundException + * @throws TestFileNotFoundException */ - public function writeToConsole(): void + public function map(\PHPUnit\TextUI\XmlConfiguration\TestSuiteCollection $configuration, string $filter): \PHPUnit\Framework\TestSuite { } } @@ -10017,14 +9899,15 @@ public function write(string $buffer): void; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class TestSuiteMapper +final class Help { + public function __construct(?int $width = null, ?bool $withColor = null) + { + } /** - * @throws RuntimeException - * @throws TestDirectoryNotFoundException - * @throws TestFileNotFoundException + * Write the help file to the CLI, adapting width and colors to the console. */ - public function map(\PHPUnit\TextUI\XmlConfiguration\TestSuiteCollection $configuration, string $filter): \PHPUnit\Framework\TestSuite + public function writeToConsole(): void { } } @@ -10134,86 +10017,203 @@ public function addSkippedTest(\PHPUnit\Framework\Test $test, \Throwable $t, flo /** * A testsuite started. */ - public function startTestSuite(\PHPUnit\Framework\TestSuite $suite): void + public function startTestSuite(\PHPUnit\Framework\TestSuite $suite): void + { + } + /** + * A testsuite ended. + */ + public function endTestSuite(\PHPUnit\Framework\TestSuite $suite): void + { + } + /** + * A test started. + */ + public function startTest(\PHPUnit\Framework\Test $test): void + { + } + /** + * A test ended. + */ + public function endTest(\PHPUnit\Framework\Test $test, float $time): void + { + } + protected function printDefects(array $defects, string $type): void + { + } + protected function printDefect(\PHPUnit\Framework\TestFailure $defect, int $count): void + { + } + protected function printDefectHeader(\PHPUnit\Framework\TestFailure $defect, int $count): void + { + } + protected function printDefectTrace(\PHPUnit\Framework\TestFailure $defect): void + { + } + protected function printErrors(\PHPUnit\Framework\TestResult $result): void + { + } + protected function printFailures(\PHPUnit\Framework\TestResult $result): void + { + } + protected function printWarnings(\PHPUnit\Framework\TestResult $result): void + { + } + protected function printIncompletes(\PHPUnit\Framework\TestResult $result): void + { + } + protected function printRisky(\PHPUnit\Framework\TestResult $result): void + { + } + protected function printSkipped(\PHPUnit\Framework\TestResult $result): void + { + } + protected function printHeader(\PHPUnit\Framework\TestResult $result): void + { + } + protected function printFooter(\PHPUnit\Framework\TestResult $result): void + { + } + protected function writeProgress(string $progress): void + { + } + protected function writeNewLine(): void + { + } + /** + * Formats a buffer with a specified ANSI color sequence if colors are + * enabled. + */ + protected function colorizeTextBox(string $color, string $buffer): string + { + } + /** + * Writes a buffer out with a color sequence if colors are enabled. + */ + protected function writeWithColor(string $color, string $buffer, bool $lf = true): void + { + } + /** + * Writes progress with a color sequence if colors are enabled. + */ + protected function writeProgressWithColor(string $color, string $buffer): void + { + } +} +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +class Command +{ + /** + * @var array + */ + protected $arguments = []; + /** + * @var array + */ + protected $longOptions = []; + /** + * @throws Exception + */ + public static function main(bool $exit = true): int + { + } + /** + * @throws Exception + */ + public function run(array $argv, bool $exit = true): int + { + } + /** + * Create a TestRunner, override in subclasses. + */ + protected function createRunner(): \PHPUnit\TextUI\TestRunner + { + } + /** + * Handles the command-line arguments. + * + * A child class of PHPUnit\TextUI\Command can hook into the argument + * parsing by adding the switch(es) to the $longOptions array and point to a + * callback method that handles the switch(es) in the child class like this + * + * + * longOptions['my-switch'] = 'myHandler'; + * // my-secondswitch will accept a value - note the equals sign + * $this->longOptions['my-secondswitch='] = 'myOtherHandler'; + * } + * + * // --my-switch -> myHandler() + * protected function myHandler() + * { + * } + * + * // --my-secondswitch foo -> myOtherHandler('foo') + * protected function myOtherHandler ($value) + * { + * } + * + * // You will also need this - the static keyword in the + * // PHPUnit\TextUI\Command will mean that it'll be + * // PHPUnit\TextUI\Command that gets instantiated, + * // not MyCommand + * public static function main($exit = true) + * { + * $command = new static; + * + * return $command->run($_SERVER['argv'], $exit); + * } + * + * } + * + * + * @throws Exception + */ + protected function handleArguments(array $argv): void { } /** - * A testsuite ended. + * Handles the loading of the PHPUnit\Runner\TestSuiteLoader implementation. + * + * @deprecated see https://github.com/sebastianbergmann/phpunit/issues/4039 */ - public function endTestSuite(\PHPUnit\Framework\TestSuite $suite): void + protected function handleLoader(string $loaderClass, string $loaderFile = ''): ?\PHPUnit\Runner\TestSuiteLoader { } /** - * A test started. + * Handles the loading of the PHPUnit\Util\Printer implementation. + * + * @return null|\PHPUnit\Util\Printer|string */ - public function startTest(\PHPUnit\Framework\Test $test): void + protected function handlePrinter(string $printerClass, string $printerFile = '') { } /** - * A test ended. + * Loads a bootstrap file. */ - public function endTest(\PHPUnit\Framework\Test $test, float $time): void - { - } - protected function printDefects(array $defects, string $type): void - { - } - protected function printDefect(\PHPUnit\Framework\TestFailure $defect, int $count): void - { - } - protected function printDefectHeader(\PHPUnit\Framework\TestFailure $defect, int $count): void - { - } - protected function printDefectTrace(\PHPUnit\Framework\TestFailure $defect): void - { - } - protected function printErrors(\PHPUnit\Framework\TestResult $result): void - { - } - protected function printFailures(\PHPUnit\Framework\TestResult $result): void - { - } - protected function printWarnings(\PHPUnit\Framework\TestResult $result): void - { - } - protected function printIncompletes(\PHPUnit\Framework\TestResult $result): void - { - } - protected function printRisky(\PHPUnit\Framework\TestResult $result): void - { - } - protected function printSkipped(\PHPUnit\Framework\TestResult $result): void - { - } - protected function printHeader(\PHPUnit\Framework\TestResult $result): void - { - } - protected function printFooter(\PHPUnit\Framework\TestResult $result): void - { - } - protected function writeProgress(string $progress): void - { - } - protected function writeNewLine(): void + protected function handleBootstrap(string $filename): void { } - /** - * Formats a buffer with a specified ANSI color sequence if colors are - * enabled. - */ - protected function colorizeTextBox(string $color, string $buffer): string + protected function handleVersionCheck(): void { } /** - * Writes a buffer out with a color sequence if colors are enabled. + * Show the help message. */ - protected function writeWithColor(string $color, string $buffer, bool $lf = true): void + protected function showHelp(): void { } /** - * Writes progress with a color sequence if colors are enabled. + * Custom callback for test suite discovery. */ - protected function writeProgressWithColor(string $color, string $buffer): void + protected function handleCustomTestSuite(): void { } } @@ -10988,230 +10988,456 @@ public function hasTestSuffixes(): bool public function testSuffixes(): array { } - public function hasTestSuite(): bool + public function hasTestSuite(): bool + { + } + /** + * @throws Exception + */ + public function testSuite(): string + { + } + public function unrecognizedOptions(): array + { + } + public function hasUnrecognizedOrderBy(): bool + { + } + /** + * @throws Exception + */ + public function unrecognizedOrderBy(): string + { + } + public function hasUseDefaultConfiguration(): bool + { + } + /** + * @throws Exception + */ + public function useDefaultConfiguration(): bool + { + } + public function hasVerbose(): bool + { + } + /** + * @throws Exception + */ + public function verbose(): bool + { + } + public function hasVersion(): bool + { + } + /** + * @throws Exception + */ + public function version(): bool + { + } + public function hasXdebugFilterFile(): bool + { + } + /** + * @throws Exception + */ + public function xdebugFilterFile(): string + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class Mapper +{ + /** + * @throws Exception + */ + public function mapToLegacyArray(\PHPUnit\TextUI\CliArguments\Configuration $arguments): array + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class Exception extends \RuntimeException implements \PHPUnit\Exception +{ +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class Builder +{ + public function fromParameters(array $parameters, array $additionalLongOptions): \PHPUnit\TextUI\CliArguments\Configuration + { + } +} +namespace PHPUnit\TextUI\XmlConfiguration; + +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @phan-side-effect-free + */ +final class Configuration +{ + public function __construct(string $filename, \PHPUnit\Util\Xml\ValidationResult $validationResult, \PHPUnit\TextUI\XmlConfiguration\ExtensionCollection $extensions, \PHPUnit\TextUI\XmlConfiguration\CodeCoverage\CodeCoverage $codeCoverage, \PHPUnit\TextUI\XmlConfiguration\Groups $groups, \PHPUnit\TextUI\XmlConfiguration\Groups $testdoxGroups, \PHPUnit\TextUI\XmlConfiguration\ExtensionCollection $listeners, \PHPUnit\TextUI\XmlConfiguration\Logging\Logging $logging, \PHPUnit\TextUI\XmlConfiguration\Php $php, \PHPUnit\TextUI\XmlConfiguration\PHPUnit $phpunit, \PHPUnit\TextUI\XmlConfiguration\TestSuiteCollection $testSuite) + { + } + public function filename(): string + { + } + public function hasValidationErrors(): bool + { + } + public function validationErrors(): string + { + } + public function extensions(): \PHPUnit\TextUI\XmlConfiguration\ExtensionCollection + { + } + public function codeCoverage(): \PHPUnit\TextUI\XmlConfiguration\CodeCoverage\CodeCoverage + { + } + public function groups(): \PHPUnit\TextUI\XmlConfiguration\Groups + { + } + public function testdoxGroups(): \PHPUnit\TextUI\XmlConfiguration\Groups + { + } + public function listeners(): \PHPUnit\TextUI\XmlConfiguration\ExtensionCollection + { + } + public function logging(): \PHPUnit\TextUI\XmlConfiguration\Logging\Logging + { + } + public function php(): \PHPUnit\TextUI\XmlConfiguration\Php + { + } + public function phpunit(): \PHPUnit\TextUI\XmlConfiguration\PHPUnit + { + } + public function testSuite(): \PHPUnit\TextUI\XmlConfiguration\TestSuiteCollection + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class Exception extends \RuntimeException implements \PHPUnit\Exception +{ +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @template-implements \Iterator + */ +final class GroupCollectionIterator implements \Countable, \Iterator +{ + public function __construct(\PHPUnit\TextUI\XmlConfiguration\GroupCollection $groups) + { + } + public function count(): int + { + } + public function rewind(): void + { + } + public function valid(): bool + { + } + public function key(): int + { + } + public function current(): \PHPUnit\TextUI\XmlConfiguration\Group + { + } + public function next(): void + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @phan-side-effect-free + */ +final class Groups +{ + public function __construct(\PHPUnit\TextUI\XmlConfiguration\GroupCollection $include, \PHPUnit\TextUI\XmlConfiguration\GroupCollection $exclude) + { + } + public function hasInclude(): bool { } - /** - * @throws Exception - */ - public function testSuite(): string + public function include(): \PHPUnit\TextUI\XmlConfiguration\GroupCollection { } - public function unrecognizedOptions(): array + public function hasExclude(): bool { } - public function hasUnrecognizedOrderBy(): bool + public function exclude(): \PHPUnit\TextUI\XmlConfiguration\GroupCollection { } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @phan-side-effect-free + * + * @template-implements \IteratorAggregate + */ +final class GroupCollection implements \IteratorAggregate +{ /** - * @throws Exception + * @param Group[] $groups */ - public function unrecognizedOrderBy(): string - { - } - public function hasUseDefaultConfiguration(): bool + public static function fromArray(array $groups): self { } /** - * @throws Exception + * @return Group[] */ - public function useDefaultConfiguration(): bool - { - } - public function hasVerbose(): bool + public function asArray(): array { } /** - * @throws Exception + * @return string[] */ - public function verbose(): bool + public function asArrayOfStrings(): array { } - public function hasVersion(): bool + public function isEmpty(): bool { } - /** - * @throws Exception - */ - public function version(): bool + public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\GroupCollectionIterator { } - public function hasXdebugFilterFile(): bool +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @phan-side-effect-free + */ +final class Group +{ + public function __construct(string $name) { } - /** - * @throws Exception - */ - public function xdebugFilterFile(): string + public function name(): string { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class Mapper +final class Generator +{ + public function generateDefaultConfiguration(string $phpunitVersion, string $bootstrapScript, string $testsDirectory, string $srcDirectory, string $cacheDirectory): string + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class Migrator { /** * @throws Exception + * @throws MigrationBuilderException + * @throws MigrationException + * @throws \PHPUnit\Util\Xml\Exception */ - public function mapToLegacyArray(\PHPUnit\TextUI\CliArguments\Configuration $arguments): array + public function migrate(string $filename): string { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class Builder +final class MigrationException extends \RuntimeException implements \PHPUnit\Exception { - public function fromParameters(array $parameters, array $additionalLongOptions): \PHPUnit\TextUI\CliArguments\Configuration - { - } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class Exception extends \RuntimeException implements \PHPUnit\Exception +final class MigrationBuilderException extends \RuntimeException implements \PHPUnit\Exception { } -namespace PHPUnit\TextUI\XmlConfiguration; - /** * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free - * - * @template-implements \IteratorAggregate */ -final class TestFileCollection implements \Countable, \IteratorAggregate +interface Migration { - /** - * @param TestFile[] $files - */ - public static function fromArray(array $files): self + public function migrate(\DOMDocument $document): void; +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class CoverageCrap4jToReport extends \PHPUnit\TextUI\XmlConfiguration\LogToReportMigration +{ +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class RemoveLogTypes implements \PHPUnit\TextUI\XmlConfiguration\Migration +{ + public function migrate(\DOMDocument $document): void { } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class MoveWhitelistIncludesToCoverage implements \PHPUnit\TextUI\XmlConfiguration\Migration +{ /** - * @return TestFile[] + * @throws MigrationException */ - public function asArray(): array - { - } - public function count(): int - { - } - public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\TestFileCollectionIterator - { - } - public function isEmpty(): bool + public function migrate(\DOMDocument $document): void { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free - * - * @template-implements \IteratorAggregate */ -final class TestDirectoryCollection implements \Countable, \IteratorAggregate +final class CoveragePhpToReport extends \PHPUnit\TextUI\XmlConfiguration\LogToReportMigration +{ +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class MoveWhitelistExcludesToCoverage implements \PHPUnit\TextUI\XmlConfiguration\Migration { /** - * @param TestDirectory[] $directories + * @throws MigrationException */ - public static function fromArray(array $directories): self + public function migrate(\DOMDocument $document): void { } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class MoveAttributesFromFilterWhitelistToCoverage implements \PHPUnit\TextUI\XmlConfiguration\Migration +{ /** - * @return TestDirectory[] + * @throws MigrationException */ - public function asArray(): array - { - } - public function count(): int - { - } - public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\TestDirectoryCollectionIterator - { - } - public function isEmpty(): bool + public function migrate(\DOMDocument $document): void { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free */ -final class TestDirectory +final class MoveAttributesFromRootToCoverage implements \PHPUnit\TextUI\XmlConfiguration\Migration { - public function __construct(string $path, string $prefix, string $suffix, string $phpVersion, \PHPUnit\Util\VersionComparisonOperator $phpVersionOperator) - { - } - public function path(): string - { - } - public function prefix(): string - { - } - public function suffix(): string - { - } - public function phpVersion(): string - { - } - public function phpVersionOperator(): \PHPUnit\Util\VersionComparisonOperator + /** + * @throws MigrationException + */ + public function migrate(\DOMDocument $document): void { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @template-implements \Iterator */ -final class TestFileCollectionIterator implements \Countable, \Iterator +final class CoverageHtmlToReport extends \PHPUnit\TextUI\XmlConfiguration\LogToReportMigration { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\TestFileCollection $files) - { - } - public function count(): int - { - } - public function rewind(): void +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class RemoveCacheTokensAttribute implements \PHPUnit\TextUI\XmlConfiguration\Migration +{ + public function migrate(\DOMDocument $document): void { } - public function valid(): bool +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class UpdateSchemaLocationTo93 implements \PHPUnit\TextUI\XmlConfiguration\Migration +{ + public function migrate(\DOMDocument $document): void { } - public function key(): int +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +abstract class LogToReportMigration implements \PHPUnit\TextUI\XmlConfiguration\Migration +{ + /** + * @throws MigrationException + */ + public function migrate(\DOMDocument $document): void { } - public function current(): \PHPUnit\TextUI\XmlConfiguration\TestFile + protected function migrateAttributes(\DOMElement $src, \DOMElement $dest, array $attributes): void { } - public function next(): void + abstract protected function forType(): string; + abstract protected function toReportFormat(\DOMElement $logNode): \DOMElement; +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class CoverageXmlToReport extends \PHPUnit\TextUI\XmlConfiguration\LogToReportMigration +{ +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class CoverageTextToReport extends \PHPUnit\TextUI\XmlConfiguration\LogToReportMigration +{ +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class CoverageCloverToReport extends \PHPUnit\TextUI\XmlConfiguration\LogToReportMigration +{ +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class ConvertLogTypes implements \PHPUnit\TextUI\XmlConfiguration\Migration +{ + public function migrate(\DOMDocument $document): void { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free */ -final class TestSuite +final class IntroduceCoverageElement implements \PHPUnit\TextUI\XmlConfiguration\Migration { - public function __construct(string $name, \PHPUnit\TextUI\XmlConfiguration\TestDirectoryCollection $directories, \PHPUnit\TextUI\XmlConfiguration\TestFileCollection $files, \PHPUnit\TextUI\XmlConfiguration\FileCollection $exclude) - { - } - public function name(): string - { - } - public function directories(): \PHPUnit\TextUI\XmlConfiguration\TestDirectoryCollection + public function migrate(\DOMDocument $document): void { } - public function files(): \PHPUnit\TextUI\XmlConfiguration\TestFileCollection +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class RemoveEmptyFilter implements \PHPUnit\TextUI\XmlConfiguration\Migration +{ + /** + * @throws MigrationException + */ + public function migrate(\DOMDocument $document): void { } - public function exclude(): \PHPUnit\TextUI\XmlConfiguration\FileCollection +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class MigrationBuilder +{ + /** + * @throws MigrationBuilderException + */ + public function build(string $fromVersion): array { } } @@ -11220,47 +11446,32 @@ public function exclude(): \PHPUnit\TextUI\XmlConfiguration\FileCollection * * @phan-side-effect-free */ -final class TestFile +final class Constant { - public function __construct(string $path, string $phpVersion, \PHPUnit\Util\VersionComparisonOperator $phpVersionOperator) - { - } - public function path(): string + public function __construct(string $name, $value) { } - public function phpVersion(): string + public function name(): string { } - public function phpVersionOperator(): \PHPUnit\Util\VersionComparisonOperator + public function value() { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * - * @template-implements \Iterator + * @phan-side-effect-free */ -final class TestDirectoryCollectionIterator implements \Countable, \Iterator +final class IniSetting { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\TestDirectoryCollection $directories) - { - } - public function count(): int - { - } - public function rewind(): void - { - } - public function valid(): bool - { - } - public function key(): int + public function __construct(string $name, string $value) { } - public function current(): \PHPUnit\TextUI\XmlConfiguration\TestDirectory + public function name(): string { } - public function next(): void + public function value(): string { } } @@ -11269,18 +11480,18 @@ public function next(): void * * @phan-side-effect-free * - * @template-implements \IteratorAggregate + * @template-implements \IteratorAggregate */ -final class TestSuiteCollection implements \Countable, \IteratorAggregate +final class IniSettingCollection implements \Countable, \IteratorAggregate { /** - * @param TestSuite[] $testSuites + * @param IniSetting[] $iniSettings */ - public static function fromArray(array $testSuites): self + public static function fromArray(array $iniSettings): self { } /** - * @return TestSuite[] + * @return IniSetting[] */ public function asArray(): array { @@ -11288,48 +11499,35 @@ public function asArray(): array public function count(): int { } - public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\TestSuiteCollectionIterator - { - } - public function isEmpty(): bool + public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\IniSettingCollectionIterator { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * - * @template-implements \Iterator + * @phan-side-effect-free + * + * @template-implements \IteratorAggregate */ -final class TestSuiteCollectionIterator implements \Countable, \Iterator +final class VariableCollection implements \Countable, \IteratorAggregate { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\TestSuiteCollection $testSuites) - { - } - public function count(): int - { - } - public function rewind(): void - { - } - public function valid(): bool - { - } - public function key(): int + /** + * @param Variable[] $variables + */ + public static function fromArray(array $variables): self { } - public function current(): \PHPUnit\TextUI\XmlConfiguration\TestSuite + /** + * @return Variable[] + */ + public function asArray(): array { } - public function next(): void + public function count(): int { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Generator -{ - public function generateDefaultConfiguration(string $phpunitVersion, string $bootstrapScript, string $testsDirectory, string $srcDirectory, string $cacheDirectory): string + public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\VariableCollectionIterator { } } @@ -11338,85 +11536,53 @@ public function generateDefaultConfiguration(string $phpunitVersion, string $boo * * @phan-side-effect-free */ -final class Configuration +final class Php { - public function __construct(string $filename, \PHPUnit\Util\Xml\ValidationResult $validationResult, \PHPUnit\TextUI\XmlConfiguration\ExtensionCollection $extensions, \PHPUnit\TextUI\XmlConfiguration\CodeCoverage\CodeCoverage $codeCoverage, \PHPUnit\TextUI\XmlConfiguration\Groups $groups, \PHPUnit\TextUI\XmlConfiguration\Groups $testdoxGroups, \PHPUnit\TextUI\XmlConfiguration\ExtensionCollection $listeners, \PHPUnit\TextUI\XmlConfiguration\Logging\Logging $logging, \PHPUnit\TextUI\XmlConfiguration\Php $php, \PHPUnit\TextUI\XmlConfiguration\PHPUnit $phpunit, \PHPUnit\TextUI\XmlConfiguration\TestSuiteCollection $testSuite) - { - } - public function filename(): string - { - } - public function hasValidationErrors(): bool - { - } - public function validationErrors(): string - { - } - public function extensions(): \PHPUnit\TextUI\XmlConfiguration\ExtensionCollection - { - } - public function codeCoverage(): \PHPUnit\TextUI\XmlConfiguration\CodeCoverage\CodeCoverage - { - } - public function groups(): \PHPUnit\TextUI\XmlConfiguration\Groups - { - } - public function testdoxGroups(): \PHPUnit\TextUI\XmlConfiguration\Groups - { - } - public function listeners(): \PHPUnit\TextUI\XmlConfiguration\ExtensionCollection + public function __construct(\PHPUnit\TextUI\XmlConfiguration\DirectoryCollection $includePaths, \PHPUnit\TextUI\XmlConfiguration\IniSettingCollection $iniSettings, \PHPUnit\TextUI\XmlConfiguration\ConstantCollection $constants, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $globalVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $envVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $postVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $getVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $cookieVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $serverVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $filesVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $requestVariables) { } - public function logging(): \PHPUnit\TextUI\XmlConfiguration\Logging\Logging + public function includePaths(): \PHPUnit\TextUI\XmlConfiguration\DirectoryCollection { } - public function php(): \PHPUnit\TextUI\XmlConfiguration\Php + public function iniSettings(): \PHPUnit\TextUI\XmlConfiguration\IniSettingCollection { } - public function phpunit(): \PHPUnit\TextUI\XmlConfiguration\PHPUnit + public function constants(): \PHPUnit\TextUI\XmlConfiguration\ConstantCollection { } - public function testSuite(): \PHPUnit\TextUI\XmlConfiguration\TestSuiteCollection + public function globalVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @template-implements \Iterator - */ -final class DirectoryCollectionIterator implements \Countable, \Iterator -{ - public function __construct(\PHPUnit\TextUI\XmlConfiguration\DirectoryCollection $directories) + public function envVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection { } - public function count(): int + public function postVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection { } - public function rewind(): void + public function getVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection { } - public function valid(): bool + public function cookieVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection { } - public function key(): int + public function serverVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection { } - public function current(): \PHPUnit\TextUI\XmlConfiguration\Directory + public function filesVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection { } - public function next(): void + public function requestVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * - * @template-implements \Iterator + * @template-implements \Iterator */ -final class FileCollectionIterator implements \Countable, \Iterator +final class VariableCollectionIterator implements \Countable, \Iterator { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\FileCollection $files) + public function __construct(\PHPUnit\TextUI\XmlConfiguration\VariableCollection $variables) { } public function count(): int @@ -11431,7 +11597,7 @@ public function valid(): bool public function key(): int { } - public function current(): \PHPUnit\TextUI\XmlConfiguration\File + public function current(): \PHPUnit\TextUI\XmlConfiguration\Variable { } public function next(): void @@ -11442,89 +11608,48 @@ public function next(): void * @internal This class is not covered by the backward compatibility promise for PHPUnit * * @phan-side-effect-free - * - * @template-implements \IteratorAggregate */ -final class DirectoryCollection implements \Countable, \IteratorAggregate +final class Variable { - /** - * @param Directory[] $directories - */ - public static function fromArray(array $directories): self - { - } - /** - * @return Directory[] - */ - public function asArray(): array - { - } - public function count(): int - { - } - public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\DirectoryCollectionIterator + public function __construct(string $name, $value, bool $force) { } - public function isEmpty(): bool + public function name(): string { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free - */ -final class File -{ - public function __construct(string $path) + public function value() { } - public function path(): string + public function force(): bool { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * - * @phan-side-effect-free + * @template-implements \Iterator */ -final class Directory +final class IniSettingCollectionIterator implements \Countable, \Iterator { - public function __construct(string $path) + public function __construct(\PHPUnit\TextUI\XmlConfiguration\IniSettingCollection $iniSettings) { } - public function path(): string + public function count(): int { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free - * - * @template-implements \IteratorAggregate - */ -final class FileCollection implements \Countable, \IteratorAggregate -{ - /** - * @param File[] $files - */ - public static function fromArray(array $files): self + public function rewind(): void { } - /** - * @return File[] - */ - public function asArray(): array + public function valid(): bool { } - public function count(): int + public function key(): int { } - public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\FileCollectionIterator + public function current(): \PHPUnit\TextUI\XmlConfiguration\IniSetting { } - public function isEmpty(): bool + public function next(): void { } } @@ -11532,254 +11657,283 @@ public function isEmpty(): bool * @internal This class is not covered by the backward compatibility promise for PHPUnit * * @phan-side-effect-free + * + * @template-implements \IteratorAggregate */ -final class PHPUnit +final class ConstantCollection implements \Countable, \IteratorAggregate { - public function __construct(bool $cacheResult, ?string $cacheResultFile, $columns, string $colors, bool $stderr, bool $noInteraction, bool $verbose, bool $reverseDefectList, bool $convertDeprecationsToExceptions, bool $convertErrorsToExceptions, bool $convertNoticesToExceptions, bool $convertWarningsToExceptions, bool $forceCoversAnnotation, ?string $bootstrap, bool $processIsolation, bool $failOnEmptyTestSuite, bool $failOnIncomplete, bool $failOnRisky, bool $failOnSkipped, bool $failOnWarning, bool $stopOnDefect, bool $stopOnError, bool $stopOnFailure, bool $stopOnWarning, bool $stopOnIncomplete, bool $stopOnRisky, bool $stopOnSkipped, ?string $extensionsDirectory, ?string $testSuiteLoaderClass, ?string $testSuiteLoaderFile, ?string $printerClass, ?string $printerFile, bool $beStrictAboutChangesToGlobalState, bool $beStrictAboutOutputDuringTests, bool $beStrictAboutResourceUsageDuringSmallTests, bool $beStrictAboutTestsThatDoNotTestAnything, bool $beStrictAboutTodoAnnotatedTests, bool $beStrictAboutCoversAnnotation, bool $enforceTimeLimit, int $defaultTimeLimit, int $timeoutForSmallTests, int $timeoutForMediumTests, int $timeoutForLargeTests, ?string $defaultTestSuite, int $executionOrder, bool $resolveDependencies, bool $defectsFirst, bool $backupGlobals, bool $backupStaticAttributes, bool $registerMockObjectsFromTestArgumentsRecursively, bool $conflictBetweenPrinterClassAndTestdox) - { - } - public function cacheResult(): bool - { - } /** - * @psalm-assert-if-true !null $this->cacheResultFile + * @param Constant[] $constants */ - public function hasCacheResultFile(): bool + public static function fromArray(array $constants): self { } /** - * @throws Exception + * @return Constant[] */ - public function cacheResultFile(): string - { - } - public function columns() - { - } - public function colors(): string + public function asArray(): array { } - public function stderr(): bool + public function count(): int { } - public function noInteraction(): bool + public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\ConstantCollectionIterator { } - public function verbose(): bool +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @template-implements \Iterator + */ +final class ConstantCollectionIterator implements \Countable, \Iterator +{ + public function __construct(\PHPUnit\TextUI\XmlConfiguration\ConstantCollection $constants) { } - public function reverseDefectList(): bool + public function count(): int { } - public function convertDeprecationsToExceptions(): bool + public function rewind(): void { } - public function convertErrorsToExceptions(): bool + public function valid(): bool { } - public function convertNoticesToExceptions(): bool + public function key(): int { } - public function convertWarningsToExceptions(): bool + public function current(): \PHPUnit\TextUI\XmlConfiguration\Constant { } - public function forceCoversAnnotation(): bool + public function next(): void { } - /** - * @psalm-assert-if-true !null $this->bootstrap - */ - public function hasBootstrap(): bool +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class PhpHandler +{ + public function handle(\PHPUnit\TextUI\XmlConfiguration\Php $configuration): void { } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class Loader +{ /** * @throws Exception */ - public function bootstrap(): string - { - } - public function processIsolation(): bool - { - } - public function failOnEmptyTestSuite(): bool + public function load(string $filename): \PHPUnit\TextUI\XmlConfiguration\Configuration { } - public function failOnIncomplete(): bool + public function logging(string $filename, \DOMXPath $xpath): \PHPUnit\TextUI\XmlConfiguration\Logging\Logging { } - public function failOnRisky(): bool + public function legacyLogging(string $filename, \DOMXPath $xpath): \PHPUnit\TextUI\XmlConfiguration\Logging\Logging { } - public function failOnSkipped(): bool +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @phan-side-effect-free + * + * @template-implements \IteratorAggregate + */ +final class TestFileCollection implements \Countable, \IteratorAggregate +{ + /** + * @param TestFile[] $files + */ + public static function fromArray(array $files): self { } - public function failOnWarning(): bool + /** + * @return TestFile[] + */ + public function asArray(): array { } - public function stopOnDefect(): bool + public function count(): int { } - public function stopOnError(): bool + public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\TestFileCollectionIterator { } - public function stopOnFailure(): bool + public function isEmpty(): bool { } - public function stopOnWarning(): bool +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @template-implements \Iterator + */ +final class TestFileCollectionIterator implements \Countable, \Iterator +{ + public function __construct(\PHPUnit\TextUI\XmlConfiguration\TestFileCollection $files) { } - public function stopOnIncomplete(): bool + public function count(): int { } - public function stopOnRisky(): bool + public function rewind(): void { } - public function stopOnSkipped(): bool + public function valid(): bool { } - /** - * @psalm-assert-if-true !null $this->extensionsDirectory - */ - public function hasExtensionsDirectory(): bool + public function key(): int { } - /** - * @throws Exception - */ - public function extensionsDirectory(): string + public function current(): \PHPUnit\TextUI\XmlConfiguration\TestFile { } - /** - * @psalm-assert-if-true !null $this->testSuiteLoaderClass - * - * @deprecated see https://github.com/sebastianbergmann/phpunit/issues/4039 - */ - public function hasTestSuiteLoaderClass(): bool + public function next(): void { } - /** - * @throws Exception - * - * @deprecated see https://github.com/sebastianbergmann/phpunit/issues/4039 - */ - public function testSuiteLoaderClass(): string +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @phan-side-effect-free + */ +final class TestDirectory +{ + public function __construct(string $path, string $prefix, string $suffix, string $phpVersion, \PHPUnit\Util\VersionComparisonOperator $phpVersionOperator) { } - /** - * @psalm-assert-if-true !null $this->testSuiteLoaderFile - * - * @deprecated see https://github.com/sebastianbergmann/phpunit/issues/4039 - */ - public function hasTestSuiteLoaderFile(): bool + public function path(): string { } - /** - * @throws Exception - * - * @deprecated see https://github.com/sebastianbergmann/phpunit/issues/4039 - */ - public function testSuiteLoaderFile(): string + public function prefix(): string { } - /** - * @psalm-assert-if-true !null $this->printerClass - */ - public function hasPrinterClass(): bool + public function suffix(): string { } - /** - * @throws Exception - */ - public function printerClass(): string + public function phpVersion(): string { } - /** - * @psalm-assert-if-true !null $this->printerFile - */ - public function hasPrinterFile(): bool + public function phpVersionOperator(): \PHPUnit\Util\VersionComparisonOperator { } - /** - * @throws Exception - */ - public function printerFile(): string +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @phan-side-effect-free + */ +final class TestSuite +{ + public function __construct(string $name, \PHPUnit\TextUI\XmlConfiguration\TestDirectoryCollection $directories, \PHPUnit\TextUI\XmlConfiguration\TestFileCollection $files, \PHPUnit\TextUI\XmlConfiguration\FileCollection $exclude) { } - public function beStrictAboutChangesToGlobalState(): bool + public function name(): string { } - public function beStrictAboutOutputDuringTests(): bool + public function directories(): \PHPUnit\TextUI\XmlConfiguration\TestDirectoryCollection { } - public function beStrictAboutResourceUsageDuringSmallTests(): bool + public function files(): \PHPUnit\TextUI\XmlConfiguration\TestFileCollection { } - public function beStrictAboutTestsThatDoNotTestAnything(): bool + public function exclude(): \PHPUnit\TextUI\XmlConfiguration\FileCollection { } - public function beStrictAboutTodoAnnotatedTests(): bool +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @phan-side-effect-free + */ +final class TestFile +{ + public function __construct(string $path, string $phpVersion, \PHPUnit\Util\VersionComparisonOperator $phpVersionOperator) { } - public function beStrictAboutCoversAnnotation(): bool + public function path(): string { } - public function enforceTimeLimit(): bool + public function phpVersion(): string { } - public function defaultTimeLimit(): int + public function phpVersionOperator(): \PHPUnit\Util\VersionComparisonOperator { } - public function timeoutForSmallTests(): int +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @template-implements \Iterator + */ +final class TestSuiteCollectionIterator implements \Countable, \Iterator +{ + public function __construct(\PHPUnit\TextUI\XmlConfiguration\TestSuiteCollection $testSuites) { } - public function timeoutForMediumTests(): int + public function count(): int { } - public function timeoutForLargeTests(): int + public function rewind(): void { } - /** - * @psalm-assert-if-true !null $this->defaultTestSuite - */ - public function hasDefaultTestSuite(): bool + public function valid(): bool { } - /** - * @throws Exception - */ - public function defaultTestSuite(): string + public function key(): int { } - public function executionOrder(): int + public function current(): \PHPUnit\TextUI\XmlConfiguration\TestSuite { } - public function resolveDependencies(): bool + public function next(): void { } - public function defectsFirst(): bool +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @phan-side-effect-free + * + * @template-implements \IteratorAggregate + */ +final class TestSuiteCollection implements \Countable, \IteratorAggregate +{ + /** + * @param TestSuite[] $testSuites + */ + public static function fromArray(array $testSuites): self { } - public function backupGlobals(): bool + /** + * @return TestSuite[] + */ + public function asArray(): array { } - public function backupStaticAttributes(): bool + public function count(): int { } - public function registerMockObjectsFromTestArgumentsRecursively(): bool + public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\TestSuiteCollectionIterator { } - public function conflictBetweenPrinterClassAndTestdox(): bool + public function isEmpty(): bool { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * - * @template-implements \Iterator + * @template-implements \Iterator */ -final class ExtensionCollectionIterator implements \Countable, \Iterator +final class TestDirectoryCollectionIterator implements \Countable, \Iterator { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\ExtensionCollection $extensions) + public function __construct(\PHPUnit\TextUI\XmlConfiguration\TestDirectoryCollection $directories) { } public function count(): int @@ -11794,7 +11948,7 @@ public function valid(): bool public function key(): int { } - public function current(): \PHPUnit\TextUI\XmlConfiguration\Extension + public function current(): \PHPUnit\TextUI\XmlConfiguration\TestDirectory { } public function next(): void @@ -11806,23 +11960,29 @@ public function next(): void * * @phan-side-effect-free * - * @template-implements \IteratorAggregate + * @template-implements \IteratorAggregate */ -final class ExtensionCollection implements \IteratorAggregate +final class TestDirectoryCollection implements \Countable, \IteratorAggregate { /** - * @param Extension[] $extensions + * @param TestDirectory[] $directories */ - public static function fromArray(array $extensions): self + public static function fromArray(array $directories): self { } /** - * @return Extension[] + * @return TestDirectory[] */ public function asArray(): array { } - public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\ExtensionCollectionIterator + public function count(): int + { + } + public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\TestDirectoryCollectionIterator + { + } + public function isEmpty(): bool { } } @@ -11860,467 +12020,359 @@ public function arguments(): array } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @phan-side-effect-free + * + * @template-implements \IteratorAggregate */ -final class Migrator +final class ExtensionCollection implements \IteratorAggregate { /** - * @throws Exception - * @throws MigrationBuilderException - * @throws MigrationException - * @throws \PHPUnit\Util\Xml\Exception + * @param Extension[] $extensions */ - public function migrate(string $filename): string + public static function fromArray(array $extensions): self { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MigrationBuilderException extends \RuntimeException implements \PHPUnit\Exception -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MigrationException extends \RuntimeException implements \PHPUnit\Exception -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class CoverageCloverToReport extends \PHPUnit\TextUI\XmlConfiguration\LogToReportMigration -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class UpdateSchemaLocationTo93 implements \PHPUnit\TextUI\XmlConfiguration\Migration -{ - public function migrate(\DOMDocument $document): void + /** + * @return Extension[] + */ + public function asArray(): array { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class IntroduceCoverageElement implements \PHPUnit\TextUI\XmlConfiguration\Migration -{ - public function migrate(\DOMDocument $document): void + public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\ExtensionCollectionIterator { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @template-implements \Iterator */ -interface Migration -{ - public function migrate(\DOMDocument $document): void; -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class CoverageXmlToReport extends \PHPUnit\TextUI\XmlConfiguration\LogToReportMigration -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class CoverageTextToReport extends \PHPUnit\TextUI\XmlConfiguration\LogToReportMigration -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class RemoveLogTypes implements \PHPUnit\TextUI\XmlConfiguration\Migration +final class ExtensionCollectionIterator implements \Countable, \Iterator { - public function migrate(\DOMDocument $document): void + public function __construct(\PHPUnit\TextUI\XmlConfiguration\ExtensionCollection $extensions) { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MoveAttributesFromFilterWhitelistToCoverage implements \PHPUnit\TextUI\XmlConfiguration\Migration -{ - /** - * @throws MigrationException - */ - public function migrate(\DOMDocument $document): void + public function count(): int { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class CoveragePhpToReport extends \PHPUnit\TextUI\XmlConfiguration\LogToReportMigration -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class CoverageCrap4jToReport extends \PHPUnit\TextUI\XmlConfiguration\LogToReportMigration -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -abstract class LogToReportMigration implements \PHPUnit\TextUI\XmlConfiguration\Migration -{ - /** - * @throws MigrationException - */ - public function migrate(\DOMDocument $document): void + public function rewind(): void { } - protected function migrateAttributes(\DOMElement $src, \DOMElement $dest, array $attributes): void + public function valid(): bool { } - abstract protected function forType(): string; - abstract protected function toReportFormat(\DOMElement $logNode): \DOMElement; -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MoveAttributesFromRootToCoverage implements \PHPUnit\TextUI\XmlConfiguration\Migration -{ - /** - * @throws MigrationException - */ - public function migrate(\DOMDocument $document): void + public function key(): int { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class RemoveCacheTokensAttribute implements \PHPUnit\TextUI\XmlConfiguration\Migration -{ - public function migrate(\DOMDocument $document): void + public function current(): \PHPUnit\TextUI\XmlConfiguration\Extension { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ConvertLogTypes implements \PHPUnit\TextUI\XmlConfiguration\Migration -{ - public function migrate(\DOMDocument $document): void + public function next(): void { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @phan-side-effect-free */ -final class CoverageHtmlToReport extends \PHPUnit\TextUI\XmlConfiguration\LogToReportMigration -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MoveWhitelistExcludesToCoverage implements \PHPUnit\TextUI\XmlConfiguration\Migration +final class PHPUnit { - /** - * @throws MigrationException - */ - public function migrate(\DOMDocument $document): void + public function __construct(bool $cacheResult, ?string $cacheResultFile, $columns, string $colors, bool $stderr, bool $noInteraction, bool $verbose, bool $reverseDefectList, bool $convertDeprecationsToExceptions, bool $convertErrorsToExceptions, bool $convertNoticesToExceptions, bool $convertWarningsToExceptions, bool $forceCoversAnnotation, ?string $bootstrap, bool $processIsolation, bool $failOnEmptyTestSuite, bool $failOnIncomplete, bool $failOnRisky, bool $failOnSkipped, bool $failOnWarning, bool $stopOnDefect, bool $stopOnError, bool $stopOnFailure, bool $stopOnWarning, bool $stopOnIncomplete, bool $stopOnRisky, bool $stopOnSkipped, ?string $extensionsDirectory, ?string $testSuiteLoaderClass, ?string $testSuiteLoaderFile, ?string $printerClass, ?string $printerFile, bool $beStrictAboutChangesToGlobalState, bool $beStrictAboutOutputDuringTests, bool $beStrictAboutResourceUsageDuringSmallTests, bool $beStrictAboutTestsThatDoNotTestAnything, bool $beStrictAboutTodoAnnotatedTests, bool $beStrictAboutCoversAnnotation, bool $enforceTimeLimit, int $defaultTimeLimit, int $timeoutForSmallTests, int $timeoutForMediumTests, int $timeoutForLargeTests, ?string $defaultTestSuite, int $executionOrder, bool $resolveDependencies, bool $defectsFirst, bool $backupGlobals, bool $backupStaticAttributes, bool $registerMockObjectsFromTestArgumentsRecursively, bool $conflictBetweenPrinterClassAndTestdox) + { + } + public function cacheResult(): bool { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MoveWhitelistIncludesToCoverage implements \PHPUnit\TextUI\XmlConfiguration\Migration -{ /** - * @throws MigrationException + * @psalm-assert-if-true !null $this->cacheResultFile */ - public function migrate(\DOMDocument $document): void + public function hasCacheResultFile(): bool { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class RemoveEmptyFilter implements \PHPUnit\TextUI\XmlConfiguration\Migration -{ /** - * @throws MigrationException + * @throws Exception */ - public function migrate(\DOMDocument $document): void + public function cacheResultFile(): string + { + } + public function columns() + { + } + public function colors(): string + { + } + public function stderr(): bool + { + } + public function noInteraction(): bool + { + } + public function verbose(): bool + { + } + public function reverseDefectList(): bool + { + } + public function convertDeprecationsToExceptions(): bool + { + } + public function convertErrorsToExceptions(): bool + { + } + public function convertNoticesToExceptions(): bool + { + } + public function convertWarningsToExceptions(): bool + { + } + public function forceCoversAnnotation(): bool { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MigrationBuilder -{ /** - * @throws MigrationBuilderException + * @psalm-assert-if-true !null $this->bootstrap */ - public function build(string $fromVersion): array + public function hasBootstrap(): bool { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Loader -{ /** * @throws Exception */ - public function load(string $filename): \PHPUnit\TextUI\XmlConfiguration\Configuration + public function bootstrap(): string { } - public function logging(string $filename, \DOMXPath $xpath): \PHPUnit\TextUI\XmlConfiguration\Logging\Logging + public function processIsolation(): bool { } - public function legacyLogging(string $filename, \DOMXPath $xpath): \PHPUnit\TextUI\XmlConfiguration\Logging\Logging + public function failOnEmptyTestSuite(): bool { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free - */ -final class Variable -{ - public function __construct(string $name, $value, bool $force) + public function failOnIncomplete(): bool { } - public function name(): string + public function failOnRisky(): bool { } - public function value() + public function failOnSkipped(): bool { } - public function force(): bool + public function failOnWarning(): bool { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @template-implements \Iterator - */ -final class ConstantCollectionIterator implements \Countable, \Iterator -{ - public function __construct(\PHPUnit\TextUI\XmlConfiguration\ConstantCollection $constants) + public function stopOnDefect(): bool { } - public function count(): int + public function stopOnError(): bool { } - public function rewind(): void + public function stopOnFailure(): bool { } - public function valid(): bool + public function stopOnWarning(): bool { } - public function key(): int + public function stopOnIncomplete(): bool { } - public function current(): \PHPUnit\TextUI\XmlConfiguration\Constant + public function stopOnRisky(): bool { } - public function next(): void + public function stopOnSkipped(): bool { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free - * - * @template-implements \IteratorAggregate - */ -final class VariableCollection implements \Countable, \IteratorAggregate -{ /** - * @param Variable[] $variables + * @psalm-assert-if-true !null $this->extensionsDirectory */ - public static function fromArray(array $variables): self + public function hasExtensionsDirectory(): bool { } /** - * @return Variable[] + * @throws Exception */ - public function asArray(): array + public function extensionsDirectory(): string { } - public function count(): int + /** + * @psalm-assert-if-true !null $this->testSuiteLoaderClass + * + * @deprecated see https://github.com/sebastianbergmann/phpunit/issues/4039 + */ + public function hasTestSuiteLoaderClass(): bool { } - public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\VariableCollectionIterator + /** + * @throws Exception + * + * @deprecated see https://github.com/sebastianbergmann/phpunit/issues/4039 + */ + public function testSuiteLoaderClass(): string { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free - */ -final class Php -{ - public function __construct(\PHPUnit\TextUI\XmlConfiguration\DirectoryCollection $includePaths, \PHPUnit\TextUI\XmlConfiguration\IniSettingCollection $iniSettings, \PHPUnit\TextUI\XmlConfiguration\ConstantCollection $constants, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $globalVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $envVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $postVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $getVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $cookieVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $serverVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $filesVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $requestVariables) + /** + * @psalm-assert-if-true !null $this->testSuiteLoaderFile + * + * @deprecated see https://github.com/sebastianbergmann/phpunit/issues/4039 + */ + public function hasTestSuiteLoaderFile(): bool { } - public function includePaths(): \PHPUnit\TextUI\XmlConfiguration\DirectoryCollection + /** + * @throws Exception + * + * @deprecated see https://github.com/sebastianbergmann/phpunit/issues/4039 + */ + public function testSuiteLoaderFile(): string { } - public function iniSettings(): \PHPUnit\TextUI\XmlConfiguration\IniSettingCollection + /** + * @psalm-assert-if-true !null $this->printerClass + */ + public function hasPrinterClass(): bool { } - public function constants(): \PHPUnit\TextUI\XmlConfiguration\ConstantCollection + /** + * @throws Exception + */ + public function printerClass(): string { } - public function globalVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection + /** + * @psalm-assert-if-true !null $this->printerFile + */ + public function hasPrinterFile(): bool { } - public function envVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection + /** + * @throws Exception + */ + public function printerFile(): string { } - public function postVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection + public function beStrictAboutChangesToGlobalState(): bool { } - public function getVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection + public function beStrictAboutOutputDuringTests(): bool { } - public function cookieVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection + public function beStrictAboutResourceUsageDuringSmallTests(): bool { } - public function serverVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection + public function beStrictAboutTestsThatDoNotTestAnything(): bool { } - public function filesVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection + public function beStrictAboutTodoAnnotatedTests(): bool { } - public function requestVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection + public function beStrictAboutCoversAnnotation(): bool { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free - * - * @template-implements \IteratorAggregate - */ -final class IniSettingCollection implements \Countable, \IteratorAggregate -{ - /** - * @param IniSetting[] $iniSettings - */ - public static function fromArray(array $iniSettings): self + public function enforceTimeLimit(): bool { } - /** - * @return IniSetting[] - */ - public function asArray(): array + public function defaultTimeLimit(): int { } - public function count(): int + public function timeoutForSmallTests(): int { } - public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\IniSettingCollectionIterator + public function timeoutForMediumTests(): int { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @template-implements \Iterator - */ -final class IniSettingCollectionIterator implements \Countable, \Iterator -{ - public function __construct(\PHPUnit\TextUI\XmlConfiguration\IniSettingCollection $iniSettings) + public function timeoutForLargeTests(): int { } - public function count(): int + /** + * @psalm-assert-if-true !null $this->defaultTestSuite + */ + public function hasDefaultTestSuite(): bool { } - public function rewind(): void + /** + * @throws Exception + */ + public function defaultTestSuite(): string { } - public function valid(): bool + public function executionOrder(): int { } - public function key(): int + public function resolveDependencies(): bool { } - public function current(): \PHPUnit\TextUI\XmlConfiguration\IniSetting + public function defectsFirst(): bool { } - public function next(): void + public function backupGlobals(): bool + { + } + public function backupStaticAttributes(): bool + { + } + public function registerMockObjectsFromTestArgumentsRecursively(): bool + { + } + public function conflictBetweenPrinterClassAndTestdox(): bool { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * - * @template-implements \Iterator + * @phan-side-effect-free + * + * @template-implements \IteratorAggregate */ -final class VariableCollectionIterator implements \Countable, \Iterator +final class FileCollection implements \Countable, \IteratorAggregate { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\VariableCollection $variables) - { - } - public function count(): int - { - } - public function rewind(): void + /** + * @param File[] $files + */ + public static function fromArray(array $files): self { } - public function valid(): bool + /** + * @return File[] + */ + public function asArray(): array { } - public function key(): int + public function count(): int { } - public function current(): \PHPUnit\TextUI\XmlConfiguration\Variable + public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\FileCollectionIterator { } - public function next(): void + public function isEmpty(): bool { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * - * @phan-side-effect-free - * - * @template-implements \IteratorAggregate + * @template-implements \Iterator */ -final class ConstantCollection implements \Countable, \IteratorAggregate +final class FileCollectionIterator implements \Countable, \Iterator { - /** - * @param Constant[] $constants - */ - public static function fromArray(array $constants): self + public function __construct(\PHPUnit\TextUI\XmlConfiguration\FileCollection $files) { } - /** - * @return Constant[] - */ - public function asArray(): array + public function count(): int + { + } + public function rewind(): void + { + } + public function valid(): bool { } - public function count(): int + public function key(): int { } - public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\ConstantCollectionIterator + public function current(): \PHPUnit\TextUI\XmlConfiguration\File { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class PhpHandler -{ - public function handle(\PHPUnit\TextUI\XmlConfiguration\Php $configuration): void + public function next(): void { } } @@ -12329,15 +12381,12 @@ public function handle(\PHPUnit\TextUI\XmlConfiguration\Php $configuration): voi * * @phan-side-effect-free */ -final class IniSetting +final class Directory { - public function __construct(string $name, string $value) - { - } - public function name(): string + public function __construct(string $path) { } - public function value(): string + public function path(): string { } } @@ -12346,66 +12395,54 @@ public function value(): string * * @phan-side-effect-free */ -final class Constant +final class File { - public function __construct(string $name, $value) - { - } - public function name(): string + public function __construct(string $path) { } - public function value() + public function path(): string { } } -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Exception extends \RuntimeException implements \PHPUnit\Exception -{ -} /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * * @phan-side-effect-free * - * @template-implements \IteratorAggregate + * @template-implements \IteratorAggregate */ -final class GroupCollection implements \IteratorAggregate +final class DirectoryCollection implements \Countable, \IteratorAggregate { /** - * @param Group[] $groups + * @param Directory[] $directories */ - public static function fromArray(array $groups): self + public static function fromArray(array $directories): self { } /** - * @return Group[] + * @return Directory[] */ public function asArray(): array { } - /** - * @return string[] - */ - public function asArrayOfStrings(): array + public function count(): int { } - public function isEmpty(): bool + public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\DirectoryCollectionIterator { } - public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\GroupCollectionIterator + public function isEmpty(): bool { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * - * @template-implements \Iterator + * @template-implements \Iterator */ -final class GroupCollectionIterator implements \Countable, \Iterator +final class DirectoryCollectionIterator implements \Countable, \Iterator { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\GroupCollection $groups) + public function __construct(\PHPUnit\TextUI\XmlConfiguration\DirectoryCollection $directories) { } public function count(): int @@ -12420,52 +12457,24 @@ public function valid(): bool public function key(): int { } - public function current(): \PHPUnit\TextUI\XmlConfiguration\Group + public function current(): \PHPUnit\TextUI\XmlConfiguration\Directory { } public function next(): void { } } +namespace PHPUnit\TextUI\XmlConfiguration\CodeCoverage; + /** * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free - */ -final class Group -{ - public function __construct(string $name) - { - } - public function name(): string - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free */ -final class Groups +final class FilterMapper { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\GroupCollection $include, \PHPUnit\TextUI\XmlConfiguration\GroupCollection $exclude) - { - } - public function hasInclude(): bool - { - } - public function include(): \PHPUnit\TextUI\XmlConfiguration\GroupCollection - { - } - public function hasExclude(): bool - { - } - public function exclude(): \PHPUnit\TextUI\XmlConfiguration\GroupCollection + public function map(\SebastianBergmann\CodeCoverage\Filter $filter, \PHPUnit\TextUI\XmlConfiguration\CodeCoverage\CodeCoverage $configuration): void { } } -namespace PHPUnit\TextUI\XmlConfiguration\CodeCoverage; - /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * @@ -12603,43 +12612,28 @@ public function xml(): \PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Report\Xml { } } -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class FilterMapper -{ - public function map(\SebastianBergmann\CodeCoverage\Filter $filter, \PHPUnit\TextUI\XmlConfiguration\CodeCoverage\CodeCoverage $configuration): void - { - } -} namespace PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Filter; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * - * @template-implements \Iterator + * @phan-side-effect-free */ -final class DirectoryCollectionIterator implements \Countable, \Iterator +final class Directory { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Filter\DirectoryCollection $directories) - { - } - public function count(): int - { - } - public function rewind(): void + public function __construct(string $path, string $prefix, string $suffix, string $group) { } - public function valid(): bool + public function path(): string { } - public function key(): int + public function prefix(): string { } - public function current(): \PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Filter\Directory + public function suffix(): string { } - public function next(): void + public function group(): string { } } @@ -12674,23 +12668,29 @@ public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Fil /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * - * @phan-side-effect-free + * @template-implements \Iterator */ -final class Directory +final class DirectoryCollectionIterator implements \Countable, \Iterator { - public function __construct(string $path, string $prefix, string $suffix, string $group) + public function __construct(\PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Filter\DirectoryCollection $directories) { } - public function path(): string + public function count(): int { } - public function prefix(): string + public function rewind(): void { } - public function suffix(): string + public function valid(): bool { } - public function group(): string + public function key(): int + { + } + public function current(): \PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Filter\Directory + { + } + public function next(): void { } } @@ -12701,7 +12701,7 @@ public function group(): string * * @phan-side-effect-free */ -final class Clover +final class Php { public function __construct(\PHPUnit\TextUI\XmlConfiguration\File $target) { @@ -12715,20 +12715,14 @@ public function target(): \PHPUnit\TextUI\XmlConfiguration\File * * @phan-side-effect-free */ -final class Text +final class Cobertura { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\File $target, bool $showUncoveredFiles, bool $showOnlySummary) + public function __construct(\PHPUnit\TextUI\XmlConfiguration\File $target) { } public function target(): \PHPUnit\TextUI\XmlConfiguration\File { } - public function showUncoveredFiles(): bool - { - } - public function showOnlySummary(): bool - { - } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit @@ -12749,7 +12743,7 @@ public function target(): \PHPUnit\TextUI\XmlConfiguration\Directory * * @phan-side-effect-free */ -final class Php +final class Clover { public function __construct(\PHPUnit\TextUI\XmlConfiguration\File $target) { @@ -12763,18 +12757,18 @@ public function target(): \PHPUnit\TextUI\XmlConfiguration\File * * @phan-side-effect-free */ -final class Html +final class Text { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\Directory $target, int $lowUpperBound, int $highLowerBound) + public function __construct(\PHPUnit\TextUI\XmlConfiguration\File $target, bool $showUncoveredFiles, bool $showOnlySummary) { } - public function target(): \PHPUnit\TextUI\XmlConfiguration\Directory + public function target(): \PHPUnit\TextUI\XmlConfiguration\File { } - public function lowUpperBound(): int + public function showUncoveredFiles(): bool { } - public function highLowerBound(): int + public function showOnlySummary(): bool { } } @@ -12783,12 +12777,18 @@ public function highLowerBound(): int * * @phan-side-effect-free */ -final class Cobertura +final class Html { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\File $target) + public function __construct(\PHPUnit\TextUI\XmlConfiguration\Directory $target, int $lowUpperBound, int $highLowerBound) { } - public function target(): \PHPUnit\TextUI\XmlConfiguration\File + public function target(): \PHPUnit\TextUI\XmlConfiguration\Directory + { + } + public function lowUpperBound(): int + { + } + public function highLowerBound(): int { } } @@ -12816,7 +12816,7 @@ public function threshold(): int * * @phan-side-effect-free */ -final class TeamCity +final class Junit { public function __construct(\PHPUnit\TextUI\XmlConfiguration\File $target) { @@ -12830,7 +12830,7 @@ public function target(): \PHPUnit\TextUI\XmlConfiguration\File * * @phan-side-effect-free */ -final class Text +final class TeamCity { public function __construct(\PHPUnit\TextUI\XmlConfiguration\File $target) { @@ -12844,7 +12844,7 @@ public function target(): \PHPUnit\TextUI\XmlConfiguration\File * * @phan-side-effect-free */ -final class Junit +final class Text { public function __construct(\PHPUnit\TextUI\XmlConfiguration\File $target) { @@ -12907,7 +12907,7 @@ public function testDoxXml(): \PHPUnit\TextUI\XmlConfiguration\Logging\TestDox\X * * @phan-side-effect-free */ -final class Text +final class Xml { public function __construct(\PHPUnit\TextUI\XmlConfiguration\File $target) { @@ -12921,7 +12921,7 @@ public function target(): \PHPUnit\TextUI\XmlConfiguration\File * * @phan-side-effect-free */ -final class Xml +final class Text { public function __construct(\PHPUnit\TextUI\XmlConfiguration\File $target) { @@ -12940,117 +12940,51 @@ final class Html public function __construct(\PHPUnit\TextUI\XmlConfiguration\File $target) { } - public function target(): \PHPUnit\TextUI\XmlConfiguration\File - { - } -} -namespace PHPUnit\Util; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class XmlTestListRenderer -{ - /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function render(\PHPUnit\Framework\TestSuite $suite): string - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Color -{ - public static function colorize(string $color, string $buffer): string - { - } - public static function colorizePath(string $path, ?string $prevPath = null, bool $colorizeFilename = false): string - { - } - public static function dim(string $buffer): string - { - } - public static function visualizeWhitespace(string $buffer, bool $visualizeEOL = false): string - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Type -{ - public static function isType(string $type): bool - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Xml -{ - /** - * @deprecated Only used by assertEqualXMLStructure() - */ - public static function import(\DOMElement $element): \DOMElement - { - } - /** - * @deprecated Only used by assertEqualXMLStructure() - */ - public static function removeCharacterDataNodes(\DOMNode $node): void - { - } - /** - * Escapes a string for the use in XML documents. - * - * Any Unicode character is allowed, excluding the surrogate blocks, FFFE, - * and FFFF (not even as character reference). - * - * @see https://www.w3.org/TR/xml/#charsets - */ - public static function prepareString(string $string): string + public function target(): \PHPUnit\TextUI\XmlConfiguration\File { } +} +namespace PHPUnit\Util; + +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class Cloner +{ /** - * "Convert" a DOMElement object into a PHP variable. + * @phan-template OriginalType + * + * @phan-param OriginalType $original + * + * @phan-return OriginalType */ - public static function xmlToVariable(\DOMElement $element) + public static function clone(object $original): object { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class InvalidDataSetException extends \RuntimeException implements \PHPUnit\Exception +final class Exception extends \RuntimeException implements \PHPUnit\Exception { } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free */ -final class VersionComparisonOperator +class Printer { - public function __construct(string $operator) - { - } /** - * @return '!='|'<'|'<='|'<>'|'='|'=='|'>'|'>='|'eq'|'ge'|'gt'|'le'|'lt'|'ne' + * @param null|resource|string $out + * + * @throws Exception */ - public function asString(): string + public function __construct($out = null) { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @deprecated - */ -final class XdebugFilterScriptGenerator -{ - public function generate(\PHPUnit\TextUI\XmlConfiguration\CodeCoverage\CodeCoverage $filter): string + public function write(string $buffer): void + { + } + public function flush(): void { } } @@ -13189,109 +13123,111 @@ public static function isTestMethod(\ReflectionMethod $method): bool } } /** - * @internal This class is not covered by the backward compatibility promise for PHPUnit + * @deprecated Use ExcludeList instead + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class ErrorHandler +final class Blacklist { - public static function invokeIgnoringWarnings(callable $callable) - { - } - public function __construct(bool $convertDeprecationsToExceptions, bool $convertErrorsToExceptions, bool $convertNoticesToExceptions, bool $convertWarningsToExceptions) - { - } - public function __invoke(int $errorNumber, string $errorString, string $errorFile, int $errorLine): bool + public static function addDirectory(string $directory): void { } - public function register(): void + /** + * @throws Exception + * + * @return string[] + */ + public function getBlacklistedDirectories(): array { } - public function unregister(): void + /** + * @throws Exception + */ + public function isBlacklisted(string $file): bool { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class Reflection +final class Json { /** - * @phan-return list<\ReflectionMethod> + * Prettify json string. + * + * @throws \PHPUnit\Framework\Exception */ - public function publicMethodsInTestClass(\ReflectionClass $class): array + public static function prettify(string $json): string { } /** - * @phan-return list<\ReflectionMethod> + * To allow comparison of JSON strings, first process them into a consistent + * format so that they can be compared as strings. + * + * @return array ($error, $canonicalized_json) The $error parameter is used + * to indicate an error decoding the json. This is used to avoid ambiguity + * with JSON strings consisting entirely of 'null' or 'false'. */ - public function methodsInTestClass(\ReflectionClass $class): array + public static function canonicalize(string $json): array { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class Filesystem +final class GlobalState { /** - * Maps class names to source file names. + * @throws Exception + */ + public static function getIncludedFilesAsString(): string + { + } + /** + * @param string[] $files * - * - PEAR CS: Foo_Bar_Baz -> Foo/Bar/Baz.php - * - Namespace: Foo\Bar\Baz -> Foo/Bar/Baz.php + * @throws Exception */ - public static function classNameToFilename(string $className): string + public static function processIncludedFilesAsString(array $files): string { } - public static function createDirectory(string $directory): bool + public static function getIniSettingsAsString(): string { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class RegularExpression -{ - /** - * @return false|int - */ - public static function safeMatch(string $pattern, string $subject) + public static function getConstantsAsString(): string + { + } + public static function getGlobalsAsString(): string { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -class Printer +final class Filter { /** - * @param null|resource|string $out - * - * @throws Exception + * @throws \PHPUnit\Framework\Exception */ - public function __construct($out = null) - { - } - public function write(string $buffer): void - { - } - public function flush(): void + public static function getFilteredStacktrace(\Throwable $t): string { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class Exception extends \RuntimeException implements \PHPUnit\Exception +final class InvalidDataSetException extends \RuntimeException implements \PHPUnit\Exception { } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class Filter +final class XmlTestListRenderer { /** - * @throws \PHPUnit\Framework\Exception + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ - public static function getFilteredStacktrace(\Throwable $t): string + public function render(\PHPUnit\Framework\TestSuite $suite): string { } } @@ -13323,163 +13259,199 @@ public static function load(string $filename): void /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class Json +final class TextTestListRenderer { /** - * Prettify json string. - * - * @throws \PHPUnit\Framework\Exception + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ - public static function prettify(string $json): string + public function render(\PHPUnit\Framework\TestSuite $suite): string + { + } +} +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +final class ExcludeList +{ + public static function addDirectory(string $directory): void { } /** - * To allow comparison of JSON strings, first process them into a consistent - * format so that they can be compared as strings. + * @throws Exception * - * @return array ($error, $canonicalized_json) The $error parameter is used - * to indicate an error decoding the json. This is used to avoid ambiguity - * with JSON strings consisting entirely of 'null' or 'false'. + * @return string[] */ - public static function canonicalize(string $json): array + public function getExcludedDirectories(): array + { + } + /** + * @throws Exception + */ + public function isExcluded(string $file): bool { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class Cloner +final class ErrorHandler +{ + public static function invokeIgnoringWarnings(callable $callable) + { + } + public function __construct(bool $convertDeprecationsToExceptions, bool $convertErrorsToExceptions, bool $convertNoticesToExceptions, bool $convertWarningsToExceptions) + { + } + public function __invoke(int $errorNumber, string $errorString, string $errorFile, int $errorLine): bool + { + } + public function register(): void + { + } + public function unregister(): void + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class RegularExpression { /** - * @phan-template OriginalType - * - * @phan-param OriginalType $original - * - * @phan-return OriginalType + * @return false|int */ - public static function clone(object $original): object + public static function safeMatch(string $pattern, string $subject) { } } /** - * @deprecated Use ExcludeList instead - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class Blacklist +final class Xml { - public static function addDirectory(string $directory): void + /** + * @deprecated Only used by assertEqualXMLStructure() + */ + public static function import(\DOMElement $element): \DOMElement { } /** - * @throws Exception + * @deprecated Only used by assertEqualXMLStructure() + */ + public static function removeCharacterDataNodes(\DOMNode $node): void + { + } + /** + * Escapes a string for the use in XML documents. * - * @return string[] + * Any Unicode character is allowed, excluding the surrogate blocks, FFFE, + * and FFFF (not even as character reference). + * + * @see https://www.w3.org/TR/xml/#charsets */ - public function getBlacklistedDirectories(): array + public static function prepareString(string $string): string + { + } + /** + * "Convert" a DOMElement object into a PHP variable. + */ + public static function xmlToVariable(\DOMElement $element) + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class Color +{ + public static function colorize(string $color, string $buffer): string + { + } + public static function colorizePath(string $path, ?string $prevPath = null, bool $colorizeFilename = false): string { } - /** - * @throws Exception - */ - public function isBlacklisted(string $file): bool + public static function dim(string $buffer): string + { + } + public static function visualizeWhitespace(string $buffer, bool $visualizeEOL = false): string { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @deprecated */ -final class GlobalState +final class XdebugFilterScriptGenerator { - /** - * @throws Exception - */ - public static function getIncludedFilesAsString(): string + public function generate(\PHPUnit\TextUI\XmlConfiguration\CodeCoverage\CodeCoverage $filter): string { } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class Filesystem +{ /** - * @param string[] $files + * Maps class names to source file names. * - * @throws Exception + * - PEAR CS: Foo_Bar_Baz -> Foo/Bar/Baz.php + * - Namespace: Foo\Bar\Baz -> Foo/Bar/Baz.php */ - public static function processIncludedFilesAsString(array $files): string - { - } - public static function getIniSettingsAsString(): string - { - } - public static function getConstantsAsString(): string + public static function classNameToFilename(string $className): string { } - public static function getGlobalsAsString(): string + public static function createDirectory(string $directory): bool { } } /** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class ExcludeList +final class Reflection { - public static function addDirectory(string $directory): void - { - } /** - * @throws Exception - * - * @return string[] + * @phan-return list<\ReflectionMethod> */ - public function getExcludedDirectories(): array + public function publicMethodsInTestClass(\ReflectionClass $class): array { } /** - * @throws Exception + * @phan-return list<\ReflectionMethod> */ - public function isExcluded(string $file): bool + public function methodsInTestClass(\ReflectionClass $class): array { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class TextTestListRenderer +final class Type { - /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function render(\PHPUnit\Framework\TestSuite $suite): string + public static function isType(string $type): bool { } } -namespace PHPUnit\Util\Annotation; - /** - * Reflection information, and therefore DocBlock information, is static within - * a single PHP process. It is therefore okay to use a Singleton registry here. - * * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @phan-side-effect-free */ -final class Registry +final class VersionComparisonOperator { - public static function getInstance(): self - { - } - /** - * @throws \PHPUnit\Util\Exception - * - * @phan-param class-string $class - */ - public function forClassName(string $class): \PHPUnit\Util\Annotation\DocBlock + public function __construct(string $operator) { } /** - * @throws \PHPUnit\Util\Exception - * - * @phan-param class-string $classInHierarchy + * @return '!='|'<'|'<='|'<>'|'='|'=='|'>'|'>='|'eq'|'ge'|'gt'|'le'|'lt'|'ne' */ - public function forMethod(string $classInHierarchy, string $method): \PHPUnit\Util\Annotation\DocBlock + public function asString(): string { } } +namespace PHPUnit\Util\Annotation; + /** * This is an abstraction around a PHPUnit-specific docBlock, * allowing us to ask meaningful questions about a specific @@ -13553,6 +13525,34 @@ public function isToBeExecutedAsPostCondition(): bool { } } +/** + * Reflection information, and therefore DocBlock information, is static within + * a single PHP process. It is therefore okay to use a Singleton registry here. + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class Registry +{ + public static function getInstance(): self + { + } + /** + * @throws \PHPUnit\Util\Exception + * + * @phan-param class-string $class + */ + public function forClassName(string $class): \PHPUnit\Util\Annotation\DocBlock + { + } + /** + * @throws \PHPUnit\Util\Exception + * + * @phan-param class-string $classInHierarchy + */ + public function forMethod(string $classInHierarchy, string $method): \PHPUnit\Util\Annotation\DocBlock + { + } +} namespace PHPUnit\Util\Log; /** @@ -13715,45 +13715,12 @@ public function getXML(): string /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @see https://bugs.php.net/bug.php?id=51800 */ -class DefaultPhpProcess extends \PHPUnit\Util\PHP\AbstractPhpProcess +final class WindowsPhpProcess extends \PHPUnit\Util\PHP\DefaultPhpProcess { - /** - * @var string - */ - protected $tempFile; - /** - * Runs a single job (PHP code) using a separate PHP process. - * - * @throws \PHPUnit\Framework\Exception - */ - public function runJob(string $job, array $settings = []): array - { - } - /** - * Returns an array of file handles to be used in place of pipes. - */ - protected function getHandles(): array - { - } - /** - * Handles creating the child process and returning the STDOUT and STDERR. - * - * @throws \PHPUnit\Framework\Exception - */ - protected function runProcess(string $job, array $settings): array - { - } - /** - * @param resource $pipe - */ - protected function process($pipe, string $job): void - { - } - protected function cleanup(): void - { - } - protected function useTemporaryFile(): bool + public function getCommand(array $settings, ?string $file = null): string { } } @@ -13815,171 +13782,115 @@ public function setStdin(string $stdin): void /** * Returns the input string to be sent via STDIN. */ - public function getStdin(): string - { - } - /** - * Sets the string of arguments to pass to the php job. - */ - public function setArgs(string $args): void - { - } - /** - * Returns the string of arguments to pass to the php job. - */ - public function getArgs(): string - { - } - /** - * Sets the array of environment variables to start the child process with. - * - * @param array $env - */ - public function setEnv(array $env): void - { - } - /** - * Returns the array of environment variables to start the child process with. - */ - public function getEnv(): array - { - } - /** - * Sets the amount of seconds to wait before timing out. - */ - public function setTimeout(int $timeout): void - { - } - /** - * Returns the amount of seconds to wait before timing out. - */ - public function getTimeout(): int - { - } - /** - * Runs a single test in a separate PHP process. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function runTestJob(string $job, \PHPUnit\Framework\Test $test, \PHPUnit\Framework\TestResult $result, string $processResultFile): void - { - } - /** - * Returns the command based into the configurations. - */ - public function getCommand(array $settings, ?string $file = null): string - { - } - /** - * Runs a single job (PHP code) using a separate PHP process. - */ - abstract public function runJob(string $job, array $settings = []): array; - protected function settingsToParameters(array $settings): string - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @see https://bugs.php.net/bug.php?id=51800 - */ -final class WindowsPhpProcess extends \PHPUnit\Util\PHP\DefaultPhpProcess -{ - public function getCommand(array $settings, ?string $file = null): string - { - } -} -namespace PHPUnit\Util\TestDox; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -class CliTestDoxPrinter extends \PHPUnit\Util\TestDox\TestDoxPrinter -{ - /** - * @param null|resource|string $out - * @param int|string $numberOfColumns - * - * @throws \PHPUnit\Framework\Exception - */ - public function __construct($out = null, bool $verbose = false, string $colors = self::COLOR_DEFAULT, bool $debug = false, $numberOfColumns = 80, bool $reverse = false) - { - } - public function printResult(\PHPUnit\Framework\TestResult $result): void - { - } - protected function printHeader(\PHPUnit\Framework\TestResult $result): void - { - } - protected function formatClassName(\PHPUnit\Framework\Test $test): string + public function getStdin(): string { } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * Sets the string of arguments to pass to the php job. */ - protected function registerTestResult(\PHPUnit\Framework\Test $test, ?\Throwable $t, int $status, float $time, bool $verbose): void + public function setArgs(string $args): void { } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * Returns the string of arguments to pass to the php job. */ - protected function formatTestName(\PHPUnit\Framework\Test $test): string + public function getArgs(): string { } - protected function writeTestResult(array $prevResult, array $result): void + /** + * Sets the array of environment variables to start the child process with. + * + * @param array $env + */ + public function setEnv(array $env): void { } - protected function formatThrowable(\Throwable $t, ?int $status = null): string + /** + * Returns the array of environment variables to start the child process with. + */ + public function getEnv(): array { } - protected function colorizeMessageAndDiff(string $style, string $buffer): array + /** + * Sets the amount of seconds to wait before timing out. + */ + public function setTimeout(int $timeout): void { } - protected function formatStacktrace(\Throwable $t): string + /** + * Returns the amount of seconds to wait before timing out. + */ + public function getTimeout(): int { } - protected function formatTestResultMessage(\Throwable $t, array $result, ?string $prefix = null): string + /** + * Runs a single test in a separate PHP process. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + */ + public function runTestJob(string $job, \PHPUnit\Framework\Test $test, \PHPUnit\Framework\TestResult $result, string $processResultFile): void { } - protected function drawSpinner(): void + /** + * Returns the command based into the configurations. + */ + public function getCommand(array $settings, ?string $file = null): string { } - protected function undrawSpinner(): void + /** + * Runs a single job (PHP code) using a separate PHP process. + */ + abstract public function runJob(string $job, array $settings = []): array; + protected function settingsToParameters(array $settings): string { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class NamePrettifier +class DefaultPhpProcess extends \PHPUnit\Util\PHP\AbstractPhpProcess { - public function __construct(bool $useColor = false) - { - } /** - * Prettifies the name of a test class. + * @var string + */ + protected $tempFile; + /** + * Runs a single job (PHP code) using a separate PHP process. * - * @phan-param class-string $className + * @throws \PHPUnit\Framework\Exception */ - public function prettifyTestClass(string $className): string + public function runJob(string $job, array $settings = []): array { } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * Returns an array of file handles to be used in place of pipes. */ - public function prettifyTestCase(\PHPUnit\Framework\TestCase $test): string + protected function getHandles(): array { } - public function prettifyDataSet(\PHPUnit\Framework\TestCase $test): string + /** + * Handles creating the child process and returning the STDOUT and STDERR. + * + * @throws \PHPUnit\Framework\Exception + */ + protected function runProcess(string $job, array $settings): array { } /** - * Prettifies the name of a test method. + * @param resource $pipe */ - public function prettifyTestMethod(string $name): string + protected function process($pipe, string $job): void + { + } + protected function cleanup(): void + { + } + protected function useTemporaryFile(): bool { } } +namespace PHPUnit\Util\TestDox; + /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ @@ -14065,7 +13976,64 @@ public function endTest(\PHPUnit\Framework\Test $test, float $time): void /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class HtmlResultPrinter extends \PHPUnit\Util\TestDox\ResultPrinter +class CliTestDoxPrinter extends \PHPUnit\Util\TestDox\TestDoxPrinter +{ + /** + * @param null|resource|string $out + * @param int|string $numberOfColumns + * + * @throws \PHPUnit\Framework\Exception + */ + public function __construct($out = null, bool $verbose = false, string $colors = self::COLOR_DEFAULT, bool $debug = false, $numberOfColumns = 80, bool $reverse = false) + { + } + public function printResult(\PHPUnit\Framework\TestResult $result): void + { + } + protected function printHeader(\PHPUnit\Framework\TestResult $result): void + { + } + protected function formatClassName(\PHPUnit\Framework\Test $test): string + { + } + /** + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + */ + protected function registerTestResult(\PHPUnit\Framework\Test $test, ?\Throwable $t, int $status, float $time, bool $verbose): void + { + } + /** + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + */ + protected function formatTestName(\PHPUnit\Framework\Test $test): string + { + } + protected function writeTestResult(array $prevResult, array $result): void + { + } + protected function formatThrowable(\Throwable $t, ?int $status = null): string + { + } + protected function colorizeMessageAndDiff(string $style, string $buffer): array + { + } + protected function formatStacktrace(\Throwable $t): string + { + } + protected function formatTestResultMessage(\Throwable $t, array $result, ?string $prefix = null): string + { + } + protected function drawSpinner(): void + { + } + protected function undrawSpinner(): void + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class TextResultPrinter extends \PHPUnit\Util\TestDox\ResultPrinter { public function printResult(\PHPUnit\Framework\TestResult $result): void { @@ -14237,7 +14205,39 @@ protected function endRun(): void /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class TextResultPrinter extends \PHPUnit\Util\TestDox\ResultPrinter +final class NamePrettifier +{ + public function __construct(bool $useColor = false) + { + } + /** + * Prettifies the name of a test class. + * + * @phan-param class-string $className + */ + public function prettifyTestClass(string $className): string + { + } + /** + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + */ + public function prettifyTestCase(\PHPUnit\Framework\TestCase $test): string + { + } + public function prettifyDataSet(\PHPUnit\Framework\TestCase $test): string + { + } + /** + * Prettifies the name of a test method. + */ + public function prettifyTestMethod(string $name): string + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class HtmlResultPrinter extends \PHPUnit\Util\TestDox\ResultPrinter { public function printResult(\PHPUnit\Framework\TestResult $result): void { @@ -14406,137 +14406,145 @@ protected function prefixLines(string $prefix, string $message): string /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @phan-side-effect-free */ -final class Loader +abstract class SchemaDetectionResult { /** - * @throws Exception + * @psalm-assert-if-true SuccessfulSchemaDetectionResult $this */ - public function loadFile(string $filename, bool $isHtml = false, bool $xinclude = false, bool $strict = false): \DOMDocument + public function detected(): bool { } /** * @throws Exception */ - public function load(string $actual, bool $isHtml = false, string $filename = '', bool $xinclude = false, bool $strict = false): \DOMDocument + public function version(): string { } } +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class Exception extends \RuntimeException implements \PHPUnit\Exception +{ +} /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * * @phan-side-effect-free */ -final class SuccessfulSchemaDetectionResult extends \PHPUnit\Util\Xml\SchemaDetectionResult +final class ValidationResult { /** - * @phan-param non-empty-string $version + * @phan-param array $errors */ - public function __construct(string $version) + public static function fromArray(array $errors): self { } - /** - * @psalm-assert-if-true SuccessfulSchemaDetectionResult $this - */ - public function detected(): bool + public function hasValidationErrors(): bool { } - /** - * @phan-return non-empty-string - */ - public function version(): string + public function asString(): string { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class SchemaFinder +final class Loader { /** - * @phan-return non-empty-list + * @throws Exception */ - public function available(): array + public function loadFile(string $filename, bool $isHtml = false, bool $xinclude = false, bool $strict = false): \DOMDocument { } /** * @throws Exception */ - public function find(string $version): string + public function load(string $actual, bool $isHtml = false, string $filename = '', bool $xinclude = false, bool $strict = false): \DOMDocument { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @template-implements \IteratorAggregate */ -final class SchemaDetector +final class SnapshotNodeList implements \Countable, \IteratorAggregate { - /** - * @throws Exception - */ - public function detect(string $filename): \PHPUnit\Util\Xml\SchemaDetectionResult + public static function fromNodeList(\DOMNodeList $list): self + { + } + public function count(): int + { + } + public function getIterator(): \ArrayIterator { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free */ -final class ValidationResult +final class SchemaDetector { /** - * @phan-param array $errors + * @throws Exception */ - public static function fromArray(array $errors): self - { - } - public function hasValidationErrors(): bool - { - } - public function asString(): string + public function detect(string $filename): \PHPUnit\Util\Xml\SchemaDetectionResult { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class Exception extends \RuntimeException implements \PHPUnit\Exception +final class Validator { + public function validate(\DOMDocument $document, string $xsdFilename): \PHPUnit\Util\Xml\ValidationResult + { + } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class Validator +final class SchemaFinder { - public function validate(\DOMDocument $document, string $xsdFilename): \PHPUnit\Util\Xml\ValidationResult + /** + * @phan-return non-empty-list + */ + public function available(): array + { + } + /** + * @throws Exception + */ + public function find(string $version): string { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * - * @template-implements \IteratorAggregate + * @phan-side-effect-free */ -final class SnapshotNodeList implements \Countable, \IteratorAggregate +final class FailedSchemaDetectionResult extends \PHPUnit\Util\Xml\SchemaDetectionResult { - public static function fromNodeList(\DOMNodeList $list): self - { - } - public function count(): int - { - } - public function getIterator(): \ArrayIterator - { - } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * * @phan-side-effect-free */ -abstract class SchemaDetectionResult +final class SuccessfulSchemaDetectionResult extends \PHPUnit\Util\Xml\SchemaDetectionResult { + /** + * @phan-param non-empty-string $version + */ + public function __construct(string $version) + { + } /** * @psalm-assert-if-true SuccessfulSchemaDetectionResult $this */ @@ -14544,20 +14552,12 @@ public function detected(): bool { } /** - * @throws Exception + * @phan-return non-empty-string */ public function version(): string { } } -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free - */ -final class FailedSchemaDetectionResult extends \PHPUnit\Util\Xml\SchemaDetectionResult -{ -} namespace SebastianBergmann; final class Version @@ -14571,22 +14571,31 @@ public function getVersion(): string } namespace SebastianBergmann\CliParser; -final class UnknownOptionException extends \RuntimeException implements \SebastianBergmann\CliParser\Exception +final class Parser { - public function __construct(string $option) + /** + * @phan-param list $argv + * @phan-param list $longOptions + * + * @throws AmbiguousOptionException + * @throws RequiredOptionArgumentMissingException + * @throws OptionDoesNotAllowArgumentException + * @throws UnknownOptionException + */ + public function parse(array $argv, string $shortOptions, ?array $longOptions = null): array { } } +interface Exception extends \Throwable +{ +} final class OptionDoesNotAllowArgumentException extends \RuntimeException implements \SebastianBergmann\CliParser\Exception { public function __construct(string $option) { } } -interface Exception extends \Throwable -{ -} -final class RequiredOptionArgumentMissingException extends \RuntimeException implements \SebastianBergmann\CliParser\Exception +final class UnknownOptionException extends \RuntimeException implements \SebastianBergmann\CliParser\Exception { public function __construct(string $option) { @@ -14598,33 +14607,30 @@ public function __construct(string $option) { } } -final class Parser +final class RequiredOptionArgumentMissingException extends \RuntimeException implements \SebastianBergmann\CliParser\Exception { - /** - * @phan-param list $argv - * @phan-param list $longOptions - * - * @throws AmbiguousOptionException - * @throws RequiredOptionArgumentMissingException - * @throws OptionDoesNotAllowArgumentException - * @throws UnknownOptionException - */ - public function parse(array $argv, string $shortOptions, ?array $longOptions = null): array + public function __construct(string $option) { } } namespace SebastianBergmann\CodeCoverage; -final class BranchAndPathCoverageNotSupportedException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +final class Version { + public static function id(): string + { + } } -final class ReportAlreadyFinalizedException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +final class TestIdMissingException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception { public function __construct() { } } -final class ParserException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +final class InvalidArgumentException extends \InvalidArgumentException implements \SebastianBergmann\CodeCoverage\Exception +{ +} +interface Exception extends \Throwable { } final class NoCodeCoverageDriverWithPathCoverageSupportAvailableException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception @@ -14633,28 +14639,25 @@ public function __construct() { } } +final class ParserException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +{ +} final class NoCodeCoverageDriverAvailableException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception { public function __construct() { } } -final class InvalidArgumentException extends \InvalidArgumentException implements \SebastianBergmann\CodeCoverage\Exception -{ -} -final class XmlException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception -{ -} -final class TestIdMissingException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +final class ReportAlreadyFinalizedException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception { public function __construct() { } } -final class StaticAnalysisCacheNotConfiguredException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +final class XmlException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception { } -interface Exception extends \Throwable +final class BranchAndPathCoverageNotSupportedException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception { } final class DeadCodeDetectionNotSupportedException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception @@ -14672,6 +14675,45 @@ public function getUnintentionallyCoveredUnits(): array final class ReflectionException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception { } +final class StaticAnalysisCacheNotConfiguredException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +{ +} +final class Filter +{ + public function includeDirectory(string $directory, string $suffix = '.php', string $prefix = ''): void + { + } + /** + * @phan-param list $files + */ + public function includeFiles(array $filenames): void + { + } + public function includeFile(string $filename): void + { + } + public function excludeDirectory(string $directory, string $suffix = '.php', string $prefix = ''): void + { + } + public function excludeFile(string $filename): void + { + } + public function isFile(string $filename): bool + { + } + public function isExcluded(string $filename): bool + { + } + /** + * @phan-return list + */ + public function files(): array + { + } + public function isEmpty(): bool + { + } +} /** * Provides collection functionality for PHP code coverage information. */ @@ -14830,45 +14872,36 @@ public function detectsDeadCode(): bool { } } -final class Version -{ - public static function id(): string - { - } -} -final class Filter +/** + * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage + */ +final class ProcessedCodeCoverageData { - public function includeDirectory(string $directory, string $suffix = '.php', string $prefix = ''): void + public function initializeUnseenData(\SebastianBergmann\CodeCoverage\RawCodeCoverageData $rawData): void { } - /** - * @phan-param list $files - */ - public function includeFiles(array $filenames): void + public function markCodeAsExecutedByTestCase(string $testCaseId, \SebastianBergmann\CodeCoverage\RawCodeCoverageData $executedCode): void { } - public function includeFile(string $filename): void + public function setLineCoverage(array $lineCoverage): void { } - public function excludeDirectory(string $directory, string $suffix = '.php', string $prefix = ''): void + public function lineCoverage(): array { } - public function excludeFile(string $filename): void + public function setFunctionCoverage(array $functionCoverage): void { } - public function isFile(string $filename): bool + public function functionCoverage(): array { } - public function isExcluded(string $filename): bool + public function coveredFiles(): array { } - /** - * @phan-return list - */ - public function files(): array + public function renameFile(string $oldFile, string $newFile): void { } - public function isEmpty(): bool + public function merge(self $newData): void { } } @@ -14926,39 +14959,6 @@ public function removeCoverageDataForLines(string $filename, array $lines): void { } } -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class ProcessedCodeCoverageData -{ - public function initializeUnseenData(\SebastianBergmann\CodeCoverage\RawCodeCoverageData $rawData): void - { - } - public function markCodeAsExecutedByTestCase(string $testCaseId, \SebastianBergmann\CodeCoverage\RawCodeCoverageData $executedCode): void - { - } - public function setLineCoverage(array $lineCoverage): void - { - } - public function lineCoverage(): array - { - } - public function setFunctionCoverage(array $functionCoverage): void - { - } - public function functionCoverage(): array - { - } - public function coveredFiles(): array - { - } - public function renameFile(string $oldFile, string $newFile): void - { - } - public function merge(self $newData): void - { - } -} namespace SebastianBergmann\CodeCoverage\Driver; final class Xdebug2NotEnabledException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception @@ -14967,14 +14967,17 @@ public function __construct() { } } -final class Xdebug3NotEnabledException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +final class XdebugNotAvailableException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception { public function __construct() { } } -final class WrongXdebugVersionException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +final class WriteOperationFailedException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception { + public function __construct(string $path) + { + } } final class PathExistsButIsNotDirectoryException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception { @@ -14982,50 +14985,53 @@ public function __construct(string $path) { } } -final class PcovNotAvailableException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +final class WrongXdebugVersionException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception { - public function __construct() - { - } } -final class XdebugNotAvailableException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +final class PcovNotAvailableException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception { public function __construct() { } } -final class WriteOperationFailedException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +final class PhpdbgNotAvailableException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception { - public function __construct(string $path) + public function __construct() { } } -final class PhpdbgNotAvailableException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +final class Xdebug3NotEnabledException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception { public function __construct() { } } -final class Selector +/** + * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage + */ +final class Xdebug2Driver extends \SebastianBergmann\CodeCoverage\Driver\Driver { /** - * @throws \SebastianBergmann\CodeCoverage\NoCodeCoverageDriverAvailableException - * @throws PcovNotAvailableException - * @throws PhpdbgNotAvailableException + * @throws WrongXdebugVersionException * @throws Xdebug2NotEnabledException - * @throws Xdebug3NotEnabledException * @throws XdebugNotAvailableException */ - public function forLineCoverage(\SebastianBergmann\CodeCoverage\Filter $filter): \SebastianBergmann\CodeCoverage\Driver\Driver + public function __construct(\SebastianBergmann\CodeCoverage\Filter $filter) { } - /** - * @throws \SebastianBergmann\CodeCoverage\NoCodeCoverageDriverWithPathCoverageSupportAvailableException - * @throws Xdebug2NotEnabledException - * @throws Xdebug3NotEnabledException - * @throws XdebugNotAvailableException - */ - public function forLineAndPathCoverage(\SebastianBergmann\CodeCoverage\Filter $filter): \SebastianBergmann\CodeCoverage\Driver\Driver + public function canCollectBranchAndPathCoverage(): bool + { + } + public function canDetectDeadCode(): bool + { + } + public function start(): void + { + } + public function stop(): \SebastianBergmann\CodeCoverage\RawCodeCoverageData + { + } + public function nameAndVersion(): string { } } @@ -15125,22 +15131,14 @@ abstract public function stop(): \SebastianBergmann\CodeCoverage\RawCodeCoverage /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final class Xdebug2Driver extends \SebastianBergmann\CodeCoverage\Driver\Driver +final class PcovDriver extends \SebastianBergmann\CodeCoverage\Driver\Driver { /** - * @throws WrongXdebugVersionException - * @throws Xdebug2NotEnabledException - * @throws XdebugNotAvailableException + * @throws PcovNotAvailableException */ public function __construct(\SebastianBergmann\CodeCoverage\Filter $filter) { } - public function canCollectBranchAndPathCoverage(): bool - { - } - public function canDetectDeadCode(): bool - { - } public function start(): void { } @@ -15201,24 +15199,26 @@ public function nameAndVersion(): string { } } -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class PcovDriver extends \SebastianBergmann\CodeCoverage\Driver\Driver +final class Selector { /** + * @throws \SebastianBergmann\CodeCoverage\NoCodeCoverageDriverAvailableException * @throws PcovNotAvailableException + * @throws PhpdbgNotAvailableException + * @throws Xdebug2NotEnabledException + * @throws Xdebug3NotEnabledException + * @throws XdebugNotAvailableException */ - public function __construct(\SebastianBergmann\CodeCoverage\Filter $filter) - { - } - public function start(): void - { - } - public function stop(): \SebastianBergmann\CodeCoverage\RawCodeCoverageData + public function forLineCoverage(\SebastianBergmann\CodeCoverage\Filter $filter): \SebastianBergmann\CodeCoverage\Driver\Driver { } - public function nameAndVersion(): string + /** + * @throws \SebastianBergmann\CodeCoverage\NoCodeCoverageDriverWithPathCoverageSupportAvailableException + * @throws Xdebug2NotEnabledException + * @throws Xdebug3NotEnabledException + * @throws XdebugNotAvailableException + */ + public function forLineAndPathCoverage(\SebastianBergmann\CodeCoverage\Filter $filter): \SebastianBergmann\CodeCoverage\Driver\Driver { } } @@ -15227,150 +15227,96 @@ public function nameAndVersion(): string /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final class Iterator implements \RecursiveIterator +final class Builder { - public function __construct(\SebastianBergmann\CodeCoverage\Node\Directory $node) - { - } - /** - * Rewinds the Iterator to the first element. - */ - public function rewind(): void - { - } - /** - * Checks if there is a current element after calls to rewind() or next(). - */ - public function valid(): bool - { - } - /** - * Returns the key of the current element. - */ - public function key(): int + public function __construct(\SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser $analyser) { } - /** - * Returns the current element. - */ - public function current(): ?\SebastianBergmann\CodeCoverage\Node\AbstractNode + public function build(\SebastianBergmann\CodeCoverage\CodeCoverage $coverage): \SebastianBergmann\CodeCoverage\Node\Directory { } - /** - * Moves forward to next element. - */ - public function next(): void +} +/** + * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage + */ +final class Directory extends \SebastianBergmann\CodeCoverage\Node\AbstractNode implements \IteratorAggregate +{ + public function count(): int { } - /** - * Returns the sub iterator for the current element. - */ - public function getChildren(): self + public function getIterator(): \RecursiveIteratorIterator { } - /** - * Checks whether the current element has children. - */ - public function hasChildren(): bool + public function addDirectory(string $name): self { } -} -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -abstract class AbstractNode implements \Countable -{ - public function __construct(string $name, ?self $parent = null) + public function addFile(\SebastianBergmann\CodeCoverage\Node\File $file): void { } - public function name(): string + public function directories(): array { } - public function id(): string + public function files(): array { } - public function pathAsString(): string + public function children(): array { } - public function pathAsArray(): array + public function classes(): array { } - public function parent(): ?self + public function traits(): array { } - public function percentageOfTestedClasses(): \SebastianBergmann\CodeCoverage\Util\Percentage + public function functions(): array { } - public function percentageOfTestedTraits(): \SebastianBergmann\CodeCoverage\Util\Percentage + /** + * @phan-return array{linesOfCode: int, commentLinesOfCode: int, nonCommentLinesOfCode: int} + */ + public function linesOfCode(): array { } - public function percentageOfTestedClassesAndTraits(): \SebastianBergmann\CodeCoverage\Util\Percentage + public function numberOfExecutableLines(): int { } - public function percentageOfTestedFunctions(): \SebastianBergmann\CodeCoverage\Util\Percentage + public function numberOfExecutedLines(): int { } - public function percentageOfTestedMethods(): \SebastianBergmann\CodeCoverage\Util\Percentage + public function numberOfExecutableBranches(): int { } - public function percentageOfTestedFunctionsAndMethods(): \SebastianBergmann\CodeCoverage\Util\Percentage + public function numberOfExecutedBranches(): int { } - public function percentageOfExecutedLines(): \SebastianBergmann\CodeCoverage\Util\Percentage + public function numberOfExecutablePaths(): int { } - public function percentageOfExecutedBranches(): \SebastianBergmann\CodeCoverage\Util\Percentage + public function numberOfExecutedPaths(): int { } - public function percentageOfExecutedPaths(): \SebastianBergmann\CodeCoverage\Util\Percentage + public function numberOfClasses(): int { } - public function numberOfClassesAndTraits(): int + public function numberOfTestedClasses(): int { } - public function numberOfTestedClassesAndTraits(): int + public function numberOfTraits(): int { } - public function classesAndTraits(): array + public function numberOfTestedTraits(): int { } - public function numberOfFunctionsAndMethods(): int + public function numberOfMethods(): int { } - public function numberOfTestedFunctionsAndMethods(): int + public function numberOfTestedMethods(): int { } - abstract public function classes(): array; - abstract public function traits(): array; - abstract public function functions(): array; - /** - * @phan-return array{linesOfCode: int, commentLinesOfCode: int, nonCommentLinesOfCode: int} - */ - abstract public function linesOfCode(): array; - abstract public function numberOfExecutableLines(): int; - abstract public function numberOfExecutedLines(): int; - abstract public function numberOfExecutableBranches(): int; - abstract public function numberOfExecutedBranches(): int; - abstract public function numberOfExecutablePaths(): int; - abstract public function numberOfExecutedPaths(): int; - abstract public function numberOfClasses(): int; - abstract public function numberOfTestedClasses(): int; - abstract public function numberOfTraits(): int; - abstract public function numberOfTestedTraits(): int; - abstract public function numberOfMethods(): int; - abstract public function numberOfTestedMethods(): int; - abstract public function numberOfFunctions(): int; - abstract public function numberOfTestedFunctions(): int; -} -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class Builder -{ - public function __construct(\SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser $analyser) + public function numberOfFunctions(): int { } - public function build(\SebastianBergmann\CodeCoverage\CodeCoverage $coverage): \SebastianBergmann\CodeCoverage\Node\Directory + public function numberOfTestedFunctions(): int { } } @@ -15458,101 +15404,170 @@ public function numberOfTestedFunctions(): int /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final class Directory extends \SebastianBergmann\CodeCoverage\Node\AbstractNode implements \IteratorAggregate +final class CrapIndex { - public function count(): int - { - } - public function getIterator(): \RecursiveIteratorIterator + public function __construct(int $cyclomaticComplexity, float $codeCoverage) { } - public function addDirectory(string $name): self + public function asString(): string { } - public function addFile(\SebastianBergmann\CodeCoverage\Node\File $file): void +} +/** + * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage + */ +final class Iterator implements \RecursiveIterator +{ + public function __construct(\SebastianBergmann\CodeCoverage\Node\Directory $node) { } - public function directories(): array + /** + * Rewinds the Iterator to the first element. + */ + public function rewind(): void { } - public function files(): array + /** + * Checks if there is a current element after calls to rewind() or next(). + */ + public function valid(): bool { } - public function children(): array + /** + * Returns the key of the current element. + */ + public function key(): int { } - public function classes(): array + /** + * Returns the current element. + */ + public function current(): ?\SebastianBergmann\CodeCoverage\Node\AbstractNode { } - public function traits(): array + /** + * Moves forward to next element. + */ + public function next(): void { } - public function functions(): array + /** + * Returns the sub iterator for the current element. + */ + public function getChildren(): self { } /** - * @phan-return array{linesOfCode: int, commentLinesOfCode: int, nonCommentLinesOfCode: int} + * Checks whether the current element has children. */ - public function linesOfCode(): array + public function hasChildren(): bool { } - public function numberOfExecutableLines(): int +} +/** + * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage + */ +abstract class AbstractNode implements \Countable +{ + public function __construct(string $name, ?self $parent = null) { } - public function numberOfExecutedLines(): int + public function name(): string { } - public function numberOfExecutableBranches(): int + public function id(): string { } - public function numberOfExecutedBranches(): int + public function pathAsString(): string { } - public function numberOfExecutablePaths(): int + public function pathAsArray(): array + { + } + public function parent(): ?self + { + } + public function percentageOfTestedClasses(): \SebastianBergmann\CodeCoverage\Util\Percentage + { + } + public function percentageOfTestedTraits(): \SebastianBergmann\CodeCoverage\Util\Percentage + { + } + public function percentageOfTestedClassesAndTraits(): \SebastianBergmann\CodeCoverage\Util\Percentage + { + } + public function percentageOfTestedFunctions(): \SebastianBergmann\CodeCoverage\Util\Percentage + { + } + public function percentageOfTestedMethods(): \SebastianBergmann\CodeCoverage\Util\Percentage { } - public function numberOfExecutedPaths(): int + public function percentageOfTestedFunctionsAndMethods(): \SebastianBergmann\CodeCoverage\Util\Percentage { } - public function numberOfClasses(): int + public function percentageOfExecutedLines(): \SebastianBergmann\CodeCoverage\Util\Percentage { } - public function numberOfTestedClasses(): int + public function percentageOfExecutedBranches(): \SebastianBergmann\CodeCoverage\Util\Percentage { } - public function numberOfTraits(): int + public function percentageOfExecutedPaths(): \SebastianBergmann\CodeCoverage\Util\Percentage { } - public function numberOfTestedTraits(): int + public function numberOfClassesAndTraits(): int { } - public function numberOfMethods(): int + public function numberOfTestedClassesAndTraits(): int { } - public function numberOfTestedMethods(): int + public function classesAndTraits(): array { } - public function numberOfFunctions(): int + public function numberOfFunctionsAndMethods(): int { } - public function numberOfTestedFunctions(): int + public function numberOfTestedFunctionsAndMethods(): int { } + abstract public function classes(): array; + abstract public function traits(): array; + abstract public function functions(): array; + /** + * @phan-return array{linesOfCode: int, commentLinesOfCode: int, nonCommentLinesOfCode: int} + */ + abstract public function linesOfCode(): array; + abstract public function numberOfExecutableLines(): int; + abstract public function numberOfExecutedLines(): int; + abstract public function numberOfExecutableBranches(): int; + abstract public function numberOfExecutedBranches(): int; + abstract public function numberOfExecutablePaths(): int; + abstract public function numberOfExecutedPaths(): int; + abstract public function numberOfClasses(): int; + abstract public function numberOfTestedClasses(): int; + abstract public function numberOfTraits(): int; + abstract public function numberOfTestedTraits(): int; + abstract public function numberOfMethods(): int; + abstract public function numberOfTestedMethods(): int; + abstract public function numberOfFunctions(): int; + abstract public function numberOfTestedFunctions(): int; } -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class CrapIndex +namespace SebastianBergmann\CodeCoverage\Report; + +final class PHP { - public function __construct(int $cyclomaticComplexity, float $codeCoverage) + public function process(\SebastianBergmann\CodeCoverage\CodeCoverage $coverage, ?string $target = null): string { } - public function asString(): string +} +final class Cobertura +{ + /** + * @throws \SebastianBergmann\CodeCoverage\Driver\WriteOperationFailedException + */ + public function process(\SebastianBergmann\CodeCoverage\CodeCoverage $coverage, ?string $target = null): string { } } -namespace SebastianBergmann\CodeCoverage\Report; - final class Clover { /** @@ -15571,21 +15586,6 @@ public function process(\SebastianBergmann\CodeCoverage\CodeCoverage $coverage, { } } -final class PHP -{ - public function process(\SebastianBergmann\CodeCoverage\CodeCoverage $coverage, ?string $target = null): string - { - } -} -final class Cobertura -{ - /** - * @throws \SebastianBergmann\CodeCoverage\Driver\WriteOperationFailedException - */ - public function process(\SebastianBergmann\CodeCoverage\CodeCoverage $coverage, ?string $target = null): string - { - } -} final class Crap4j { public function __construct(int $threshold = 30) @@ -15603,7 +15603,7 @@ public function process(\SebastianBergmann\CodeCoverage\CodeCoverage $coverage, /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final class Dashboard extends \SebastianBergmann\CodeCoverage\Report\Html\Renderer +final class Directory extends \SebastianBergmann\CodeCoverage\Report\Html\Renderer { public function render(\SebastianBergmann\CodeCoverage\Node\Directory $node, string $file): void { @@ -15621,12 +15621,21 @@ public function render(\SebastianBergmann\CodeCoverage\Node\File $node, string $ /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final class Directory extends \SebastianBergmann\CodeCoverage\Report\Html\Renderer +final class Dashboard extends \SebastianBergmann\CodeCoverage\Report\Html\Renderer { public function render(\SebastianBergmann\CodeCoverage\Node\Directory $node, string $file): void { } } +final class Facade +{ + public function __construct(int $lowUpperBound = 50, int $highLowerBound = 90, string $generator = '') + { + } + public function process(\SebastianBergmann\CodeCoverage\CodeCoverage $coverage, string $target): void + { + } +} /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ @@ -15688,53 +15697,32 @@ protected function colorLevel(float $percent): string { } } -final class Facade -{ - public function __construct(int $lowUpperBound = 50, int $highLowerBound = 90, string $generator = '') - { - } - public function process(\SebastianBergmann\CodeCoverage\CodeCoverage $coverage, string $target): void - { - } -} namespace SebastianBergmann\CodeCoverage\Report\Xml; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -abstract class Node +final class Totals { - public function __construct(\DOMElement $context) - { - } - public function dom(): \DOMDocument - { - } - public function totals(): \SebastianBergmann\CodeCoverage\Report\Xml\Totals + public function __construct(\DOMElement $container) { } - public function addDirectory(string $name): \SebastianBergmann\CodeCoverage\Report\Xml\Directory + public function container(): \DOMNode { } - public function addFile(string $name, string $href): \SebastianBergmann\CodeCoverage\Report\Xml\File + public function setNumLines(int $loc, int $cloc, int $ncloc, int $executable, int $executed): void { } - protected function setContextNode(\DOMElement $context): void + public function setNumClasses(int $count, int $tested): void { } - protected function contextNode(): \DOMElement + public function setNumTraits(int $count, int $tested): void { } -} -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class Source -{ - public function __construct(\DOMElement $context) + public function setNumMethods(int $count, int $tested): void { } - public function setSourceCode(string $source): void + public function setNumFunctions(int $count, int $tested): void { } } @@ -15762,69 +15750,72 @@ public function asDom(): \DOMDocument /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final class Report extends \SebastianBergmann\CodeCoverage\Report\Xml\File +final class Directory extends \SebastianBergmann\CodeCoverage\Report\Xml\Node { - public function __construct(string $name) - { - } - public function asDom(): \DOMDocument - { - } - public function functionObject($name): \SebastianBergmann\CodeCoverage\Report\Xml\Method - { - } - public function classObject($name): \SebastianBergmann\CodeCoverage\Report\Xml\Unit - { - } - public function traitObject($name): \SebastianBergmann\CodeCoverage\Report\Xml\Unit +} +/** + * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage + */ +final class Tests +{ + public function __construct(\DOMElement $context) { } - public function source(): \SebastianBergmann\CodeCoverage\Report\Xml\Source + public function addTest(string $test, array $result): void { } } /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final class Totals +final class Source { - public function __construct(\DOMElement $container) + public function __construct(\DOMElement $context) { } - public function container(): \DOMNode + public function setSourceCode(string $source): void { } - public function setNumLines(int $loc, int $cloc, int $ncloc, int $executable, int $executed): void +} +/** + * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage + */ +class File +{ + public function __construct(\DOMElement $context) { } - public function setNumClasses(int $count, int $tested): void + public function totals(): \SebastianBergmann\CodeCoverage\Report\Xml\Totals { } - public function setNumTraits(int $count, int $tested): void + public function lineCoverage(string $line): \SebastianBergmann\CodeCoverage\Report\Xml\Coverage { } - public function setNumMethods(int $count, int $tested): void + protected function contextNode(): \DOMElement { } - public function setNumFunctions(int $count, int $tested): void + protected function dom(): \DOMDocument { } } /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final class Coverage +final class Unit { - public function __construct(\DOMElement $context, string $line) + public function __construct(\DOMElement $context, string $name) { } - /** - * @throws \SebastianBergmann\CodeCoverage\ReportAlreadyFinalizedException - */ - public function addTest(string $test): void + public function setLines(int $start, int $executable, int $executed): void { } - public function finalize(): void + public function setCrap(float $crap): void + { + } + public function setNamespace(string $namespace): void + { + } + public function addMethod(string $name): \SebastianBergmann\CodeCoverage\Report\Xml\Method { } } @@ -15843,60 +15834,69 @@ public function process(\SebastianBergmann\CodeCoverage\CodeCoverage $coverage, /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -class File +final class Report extends \SebastianBergmann\CodeCoverage\Report\Xml\File { - public function __construct(\DOMElement $context) + public function __construct(string $name) { } - public function totals(): \SebastianBergmann\CodeCoverage\Report\Xml\Totals + public function asDom(): \DOMDocument { } - public function lineCoverage(string $line): \SebastianBergmann\CodeCoverage\Report\Xml\Coverage + public function functionObject($name): \SebastianBergmann\CodeCoverage\Report\Xml\Method { } - protected function contextNode(): \DOMElement + public function classObject($name): \SebastianBergmann\CodeCoverage\Report\Xml\Unit { } - protected function dom(): \DOMDocument + public function traitObject($name): \SebastianBergmann\CodeCoverage\Report\Xml\Unit + { + } + public function source(): \SebastianBergmann\CodeCoverage\Report\Xml\Source { } } /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final class Directory extends \SebastianBergmann\CodeCoverage\Report\Xml\Node -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class Unit +abstract class Node { - public function __construct(\DOMElement $context, string $name) + public function __construct(\DOMElement $context) { } - public function setLines(int $start, int $executable, int $executed): void + public function dom(): \DOMDocument { } - public function setCrap(float $crap): void + public function totals(): \SebastianBergmann\CodeCoverage\Report\Xml\Totals { } - public function setNamespace(string $namespace): void + public function addDirectory(string $name): \SebastianBergmann\CodeCoverage\Report\Xml\Directory { } - public function addMethod(string $name): \SebastianBergmann\CodeCoverage\Report\Xml\Method + public function addFile(string $name, string $href): \SebastianBergmann\CodeCoverage\Report\Xml\File + { + } + protected function setContextNode(\DOMElement $context): void + { + } + protected function contextNode(): \DOMElement { } } /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final class Tests +final class Coverage { - public function __construct(\DOMElement $context) + public function __construct(\DOMElement $context, string $line) { } - public function addTest(string $test, array $result): void + /** + * @throws \SebastianBergmann\CodeCoverage\ReportAlreadyFinalizedException + */ + public function addTest(string $test): void + { + } + public function finalize(): void { } } @@ -15924,23 +15924,41 @@ public function setCrap(string $crap): void /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final class BuildInformation +final class BuildInformation +{ + public function __construct(\DOMElement $contextNode) + { + } + public function setRuntimeInformation(\SebastianBergmann\Environment\Runtime $runtime): void + { + } + public function setBuildTime(\DateTimeImmutable $date): void + { + } + public function setGeneratorVersions(string $phpUnitVersion, string $coverageVersion): void + { + } +} +namespace SebastianBergmann\CodeCoverage\StaticAnalysis; + +/** + * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage + */ +final class ExecutableLinesFindingVisitor extends \PhpParser\NodeVisitorAbstract { - public function __construct(\DOMElement $contextNode) + public function __construct(string $source) { } - public function setRuntimeInformation(\SebastianBergmann\Environment\Runtime $runtime): void + public function enterNode(\PhpParser\Node $node): void { } - public function setBuildTime(\DateTimeImmutable $date): void + public function afterTraverse(array $nodes): void { } - public function setGeneratorVersions(string $phpUnitVersion, string $coverageVersion): void + public function executableLinesGroupedByBranch(): array { } } -namespace SebastianBergmann\CodeCoverage\StaticAnalysis; - /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ @@ -15971,53 +15989,35 @@ public function functions(): array /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final class IgnoredLinesFindingVisitor extends \PhpParser\NodeVisitorAbstract +interface FileAnalyser { - public function __construct(bool $useAnnotationsForIgnoringCode, bool $ignoreDeprecated) - { - } - public function enterNode(\PhpParser\Node $node): void - { - } + public function classesIn(string $filename): array; + public function traitsIn(string $filename): array; + public function functionsIn(string $filename): array; /** - * @phan-return list + * @phan-return array{linesOfCode: int, commentLinesOfCode: int, nonCommentLinesOfCode: int} */ - public function ignoredLines(): array - { - } + public function linesOfCodeFor(string $filename): array; + public function executableLinesIn(string $filename): array; + public function ignoredLinesFor(string $filename): array; } /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final class ExecutableLinesFindingVisitor extends \PhpParser\NodeVisitorAbstract +final class IgnoredLinesFindingVisitor extends \PhpParser\NodeVisitorAbstract { - public function __construct(string $source) + public function __construct(bool $useAnnotationsForIgnoringCode, bool $ignoreDeprecated) { } public function enterNode(\PhpParser\Node $node): void { } - public function afterTraverse(array $nodes): void - { - } - public function executableLinesGroupedByBranch(): array - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -interface FileAnalyser -{ - public function classesIn(string $filename): array; - public function traitsIn(string $filename): array; - public function functionsIn(string $filename): array; /** - * @phan-return array{linesOfCode: int, commentLinesOfCode: int, nonCommentLinesOfCode: int} + * @phan-return list */ - public function linesOfCodeFor(string $filename): array; - public function executableLinesIn(string $filename): array; - public function ignoredLinesFor(string $filename): array; + public function ignoredLines(): array + { + } } final class CacheWarmer { @@ -16028,9 +16028,9 @@ public function warmCache(string $cacheDirectory, bool $useAnnotationsForIgnorin /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final class CachingFileAnalyser implements \SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser +final class ParsingFileAnalyser implements \SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser { - public function __construct(string $directory, \SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser $analyser, bool $useAnnotationsForIgnoringCode, bool $ignoreDeprecatedCode) + public function __construct(bool $useAnnotationsForIgnoringCode, bool $ignoreDeprecatedCode) { } public function classesIn(string $filename): array @@ -16054,16 +16054,13 @@ public function executableLinesIn(string $filename): array public function ignoredLinesFor(string $filename): array { } - public function process(string $filename): void - { - } } /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final class ParsingFileAnalyser implements \SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser +final class CachingFileAnalyser implements \SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser { - public function __construct(bool $useAnnotationsForIgnoringCode, bool $ignoreDeprecatedCode) + public function __construct(string $directory, \SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser $analyser, bool $useAnnotationsForIgnoringCode, bool $ignoreDeprecatedCode) { } public function classesIn(string $filename): array @@ -16087,24 +16084,12 @@ public function executableLinesIn(string $filename): array public function ignoredLinesFor(string $filename): array { } -} -namespace SebastianBergmann\CodeCoverage\Util; - -final class DirectoryCouldNotBeCreatedException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class Filesystem -{ - /** - * @throws DirectoryCouldNotBeCreatedException - */ - public static function createDirectory(string $directory): void + public function process(string $filename): void { } } +namespace SebastianBergmann\CodeCoverage\Util; + /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ @@ -16123,74 +16108,60 @@ public function asFixedWidthString(): string { } } -namespace SebastianBergmann\CodeUnit; - -final class NoTraitException extends \RuntimeException implements \SebastianBergmann\CodeUnit\Exception -{ -} -interface Exception extends \Throwable -{ -} -final class InvalidCodeUnitException extends \RuntimeException implements \SebastianBergmann\CodeUnit\Exception -{ -} -final class ReflectionException extends \RuntimeException implements \SebastianBergmann\CodeUnit\Exception -{ -} /** - * @phan-side-effect-free + * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final class FunctionUnit extends \SebastianBergmann\CodeUnit\CodeUnit +final class Filesystem { /** - * @psalm-assert-if-true FunctionUnit $this + * @throws DirectoryCouldNotBeCreatedException */ - public function isFunction(): bool + public static function createDirectory(string $directory): void { } } -final class CodeUnitCollectionIterator implements \Iterator +final class DirectoryCouldNotBeCreatedException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception { - public function __construct(\SebastianBergmann\CodeUnit\CodeUnitCollection $collection) - { - } - public function rewind(): void - { - } - public function valid(): bool - { - } - public function key(): int - { - } - public function current(): \SebastianBergmann\CodeUnit\CodeUnit +} +namespace SebastianBergmann\CodeUnit; + +final class Mapper +{ + /** + * @phan-return array> + */ + public function codeUnitsToSourceLines(\SebastianBergmann\CodeUnit\CodeUnitCollection $codeUnits): array { } - public function next(): void + /** + * @throws InvalidCodeUnitException + * @throws ReflectionException + */ + public function stringToCodeUnits(string $unit): \SebastianBergmann\CodeUnit\CodeUnitCollection { } } /** * @phan-side-effect-free */ -final class ClassMethodUnit extends \SebastianBergmann\CodeUnit\CodeUnit +final class FunctionUnit extends \SebastianBergmann\CodeUnit\CodeUnit { /** - * @psalm-assert-if-true ClassMethodUnit $this + * @psalm-assert-if-true FunctionUnit $this */ - public function isClassMethod(): bool + public function isFunction(): bool { } } /** * @phan-side-effect-free */ -final class InterfaceUnit extends \SebastianBergmann\CodeUnit\CodeUnit +final class TraitUnit extends \SebastianBergmann\CodeUnit\CodeUnit { /** - * @psalm-assert-if-true InterfaceUnit $this + * @psalm-assert-if-true TraitUnit $this */ - public function isInterface(): bool + public function isTrait(): bool { } } @@ -16299,67 +16270,96 @@ public function isFunction(): bool /** * @phan-side-effect-free */ -final class TraitMethodUnit extends \SebastianBergmann\CodeUnit\CodeUnit +final class InterfaceUnit extends \SebastianBergmann\CodeUnit\CodeUnit { /** - * @psalm-assert-if-true TraitMethodUnit $this + * @psalm-assert-if-true InterfaceUnit $this */ - public function isTraitMethod(): bool + public function isInterface(): bool { } } -final class Mapper +/** + * @phan-side-effect-free + */ +final class ClassUnit extends \SebastianBergmann\CodeUnit\CodeUnit { /** - * @phan-return array> - */ - public function codeUnitsToSourceLines(\SebastianBergmann\CodeUnit\CodeUnitCollection $codeUnits): array - { - } - /** - * @throws InvalidCodeUnitException - * @throws ReflectionException + * @psalm-assert-if-true ClassUnit $this */ - public function stringToCodeUnits(string $unit): \SebastianBergmann\CodeUnit\CodeUnitCollection + public function isClass(): bool { } } /** * @phan-side-effect-free */ -final class TraitUnit extends \SebastianBergmann\CodeUnit\CodeUnit +final class InterfaceMethodUnit extends \SebastianBergmann\CodeUnit\CodeUnit { /** - * @psalm-assert-if-true TraitUnit $this + * @psalm-assert-if-true InterfaceMethod $this */ - public function isTrait(): bool + public function isInterfaceMethod(): bool { } } /** * @phan-side-effect-free */ -final class ClassUnit extends \SebastianBergmann\CodeUnit\CodeUnit +final class TraitMethodUnit extends \SebastianBergmann\CodeUnit\CodeUnit { /** - * @psalm-assert-if-true ClassUnit $this + * @psalm-assert-if-true TraitMethodUnit $this */ - public function isClass(): bool + public function isTraitMethod(): bool + { + } +} +final class CodeUnitCollectionIterator implements \Iterator +{ + public function __construct(\SebastianBergmann\CodeUnit\CodeUnitCollection $collection) + { + } + public function rewind(): void + { + } + public function valid(): bool + { + } + public function key(): int + { + } + public function current(): \SebastianBergmann\CodeUnit\CodeUnit + { + } + public function next(): void { } } /** * @phan-side-effect-free */ -final class InterfaceMethodUnit extends \SebastianBergmann\CodeUnit\CodeUnit +final class ClassMethodUnit extends \SebastianBergmann\CodeUnit\CodeUnit { /** - * @psalm-assert-if-true InterfaceMethod $this + * @psalm-assert-if-true ClassMethodUnit $this */ - public function isInterfaceMethod(): bool + public function isClassMethod(): bool { } } +interface Exception extends \Throwable +{ +} +final class ReflectionException extends \RuntimeException implements \SebastianBergmann\CodeUnit\Exception +{ +} +final class InvalidCodeUnitException extends \RuntimeException implements \SebastianBergmann\CodeUnit\Exception +{ +} +final class NoTraitException extends \RuntimeException implements \SebastianBergmann\CodeUnit\Exception +{ +} final class CodeUnitCollection implements \Countable, \IteratorAggregate { /** @@ -16409,17 +16409,19 @@ public function lookup($filename, $lineNumber) } namespace SebastianBergmann\Comparator; -final class RuntimeException extends \RuntimeException implements \SebastianBergmann\Comparator\Exception -{ -} -interface Exception extends \Throwable -{ -} /** - * Compares objects for equality. + * Compares doubles for equality. + * + * @deprecated since v3.0.5 and v4.0.8 */ -class ObjectComparator extends \SebastianBergmann\Comparator\ArrayComparator +class DoubleComparator extends \SebastianBergmann\Comparator\NumericComparator { + /** + * Smallest value available in PHP. + * + * @var float + */ + public const EPSILON = 1.0E-10; /** * Returns whether the comparator can compare two values. * @@ -16439,29 +16441,17 @@ public function accepts($expected, $actual) * @param float $delta Allowed numerical distance between two values to consider them equal * @param bool $canonicalize Arrays are sorted before comparison when set to true * @param bool $ignoreCase Case is ignored when set to true - * @param array $processed List of already processed elements (used to prevent infinite recursion) - * - * @throws ComparisonFailure - */ - public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false, array &$processed = []) - { - } - /** - * Converts an object to an array containing all of its private, protected - * and public properties. - * - * @param object $object * - * @return array + * @throws ComparisonFailure */ - protected function toArray($object) + public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false) { } } /** - * Compares resources for equality. + * Compares DOMNode instances for equality. */ -class ResourceComparator extends \SebastianBergmann\Comparator\Comparator +class DOMNodeComparator extends \SebastianBergmann\Comparator\ObjectComparator { /** * Returns whether the comparator can compare two values. @@ -16482,17 +16472,18 @@ public function accepts($expected, $actual) * @param float $delta Allowed numerical distance between two values to consider them equal * @param bool $canonicalize Arrays are sorted before comparison when set to true * @param bool $ignoreCase Case is ignored when set to true + * @param array $processed List of already processed elements (used to prevent infinite recursion) * * @throws ComparisonFailure */ - public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false) + public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false, array &$processed = []) { } } /** - * Compares DOMNode instances for equality. + * Compares \SplObjectStorage instances for equality. */ -class DOMNodeComparator extends \SebastianBergmann\Comparator\ObjectComparator +class SplObjectStorageComparator extends \SebastianBergmann\Comparator\Comparator { /** * Returns whether the comparator can compare two values. @@ -16513,76 +16504,102 @@ public function accepts($expected, $actual) * @param float $delta Allowed numerical distance between two values to consider them equal * @param bool $canonicalize Arrays are sorted before comparison when set to true * @param bool $ignoreCase Case is ignored when set to true - * @param array $processed List of already processed elements (used to prevent infinite recursion) * * @throws ComparisonFailure */ - public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false, array &$processed = []) + public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false) { } } /** - * Factory for comparators which compare values for equality. + * Thrown when an assertion for string equality failed. */ -class Factory +class ComparisonFailure extends \RuntimeException { /** - * @return Factory + * Expected value of the retrieval which does not match $actual. + * + * @var mixed */ - public static function getInstance() - { - } + protected $expected; /** - * Constructs a new factory. + * Actually retrieved value which does not match $expected. + * + * @var mixed */ - public function __construct() - { - } + protected $actual; /** - * Returns the correct comparator for comparing two values. + * The string representation of the expected value. * - * @param mixed $expected The first value to compare - * @param mixed $actual The second value to compare + * @var string + */ + protected $expectedAsString; + /** + * The string representation of the actual value. * - * @return Comparator + * @var string */ - public function getComparatorFor($expected, $actual) - { - } + protected $actualAsString; /** - * Registers a new comparator. + * @var bool + */ + protected $identical; + /** + * Optional message which is placed in front of the first line + * returned by toString(). * - * This comparator will be returned by getComparatorFor() if its accept() method - * returns TRUE for the compared values. It has higher priority than the - * existing comparators, meaning that its accept() method will be invoked - * before those of the other comparators. + * @var string + */ + protected $message; + /** + * Initialises with the expected value and the actual value. * - * @param Comparator $comparator The comparator to be registered + * @param mixed $expected expected value retrieved + * @param mixed $actual actual value retrieved + * @param string $expectedAsString + * @param string $actualAsString + * @param bool $identical + * @param string $message a string which is prefixed on all returned lines + * in the difference output */ - public function register(\SebastianBergmann\Comparator\Comparator $comparator) + public function __construct($expected, $actual, $expectedAsString, $actualAsString, $identical = false, $message = '') + { + } + public function getActual() + { + } + public function getExpected() { } /** - * Unregisters a comparator. - * - * This comparator will no longer be considered by getComparatorFor(). - * - * @param Comparator $comparator The comparator to be unregistered + * @return string */ - public function unregister(\SebastianBergmann\Comparator\Comparator $comparator) + public function getActualAsString() { } /** - * Unregisters all non-default comparators. + * @return string */ - public function reset() + public function getExpectedAsString() + { + } + /** + * @return string + */ + public function getDiff() + { + } + /** + * @return string + */ + public function toString() { } } /** - * Compares DateTimeInterface instances for equality. + * Compares resources for equality. */ -class DateTimeComparator extends \SebastianBergmann\Comparator\ObjectComparator +class ResourceComparator extends \SebastianBergmann\Comparator\Comparator { /** * Returns whether the comparator can compare two values. @@ -16603,19 +16620,58 @@ public function accepts($expected, $actual) * @param float $delta Allowed numerical distance between two values to consider them equal * @param bool $canonicalize Arrays are sorted before comparison when set to true * @param bool $ignoreCase Case is ignored when set to true - * @param array $processed List of already processed elements (used to prevent infinite recursion) * - * @throws \Exception * @throws ComparisonFailure */ - public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false, array &$processed = []) + public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false) { } } /** - * Compares PHPUnit\Framework\MockObject\MockObject instances for equality. + * Abstract base class for comparators which compare values for equality. */ -class MockObjectComparator extends \SebastianBergmann\Comparator\ObjectComparator +abstract class Comparator +{ + /** + * @var Factory + */ + protected $factory; + /** + * @var \SebastianBergmann\Exporter\Exporter + */ + protected $exporter; + public function __construct() + { + } + public function setFactory(\SebastianBergmann\Comparator\Factory $factory) + { + } + /** + * Returns whether the comparator can compare two values. + * + * @param mixed $expected The first value to compare + * @param mixed $actual The second value to compare + * + * @return bool + */ + abstract public function accepts($expected, $actual); + /** + * Asserts that two values are equal. + * + * @param mixed $expected First value to compare + * @param mixed $actual Second value to compare + * @param float $delta Allowed numerical distance between two values to consider them equal + * @param bool $canonicalize Arrays are sorted before comparison when set to true + * @param bool $ignoreCase Case is ignored when set to true + * + * @throws ComparisonFailure + */ + abstract public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false); +} +/** + * Compares values for type equality. + */ +class TypeComparator extends \SebastianBergmann\Comparator\Comparator { /** * Returns whether the comparator can compare two values. @@ -16629,14 +16685,17 @@ public function accepts($expected, $actual) { } /** - * Converts an object to an array containing all of its private, protected - * and public properties. + * Asserts that two values are equal. * - * @param object $object + * @param mixed $expected First value to compare + * @param mixed $actual Second value to compare + * @param float $delta Allowed numerical distance between two values to consider them equal + * @param bool $canonicalize Arrays are sorted before comparison when set to true + * @param bool $ignoreCase Case is ignored when set to true * - * @return array + * @throws ComparisonFailure */ - protected function toArray($object) + public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false) { } } @@ -16669,82 +16728,72 @@ protected function toArray($object) } } /** - * Compares scalar or NULL values for equality. + * Factory for comparators which compare values for equality. */ -class ScalarComparator extends \SebastianBergmann\Comparator\Comparator +class Factory { /** - * Returns whether the comparator can compare two values. + * @return Factory + */ + public static function getInstance() + { + } + /** + * Constructs a new factory. + */ + public function __construct() + { + } + /** + * Returns the correct comparator for comparing two values. * * @param mixed $expected The first value to compare * @param mixed $actual The second value to compare * - * @return bool - * - * @since Method available since Release 3.6.0 + * @return Comparator */ - public function accepts($expected, $actual) + public function getComparatorFor($expected, $actual) { } /** - * Asserts that two values are equal. + * Registers a new comparator. * - * @param mixed $expected First value to compare - * @param mixed $actual Second value to compare - * @param float $delta Allowed numerical distance between two values to consider them equal - * @param bool $canonicalize Arrays are sorted before comparison when set to true - * @param bool $ignoreCase Case is ignored when set to true + * This comparator will be returned by getComparatorFor() if its accept() method + * returns TRUE for the compared values. It has higher priority than the + * existing comparators, meaning that its accept() method will be invoked + * before those of the other comparators. * - * @throws ComparisonFailure + * @param Comparator $comparator The comparator to be registered */ - public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false) + public function register(\SebastianBergmann\Comparator\Comparator $comparator) { } -} -/** - * Compares numerical values for equality. - */ -class NumericComparator extends \SebastianBergmann\Comparator\ScalarComparator -{ /** - * Returns whether the comparator can compare two values. + * Unregisters a comparator. * - * @param mixed $expected The first value to compare - * @param mixed $actual The second value to compare + * This comparator will no longer be considered by getComparatorFor(). * - * @return bool + * @param Comparator $comparator The comparator to be unregistered */ - public function accepts($expected, $actual) + public function unregister(\SebastianBergmann\Comparator\Comparator $comparator) { } /** - * Asserts that two values are equal. - * - * @param mixed $expected First value to compare - * @param mixed $actual Second value to compare - * @param float $delta Allowed numerical distance between two values to consider them equal - * @param bool $canonicalize Arrays are sorted before comparison when set to true - * @param bool $ignoreCase Case is ignored when set to true - * - * @throws ComparisonFailure + * Unregisters all non-default comparators. */ - public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false) + public function reset() { } } /** - * Compares doubles for equality. + * Compares arrays for equality. * - * @deprecated since v3.0.5 and v4.0.8 + * Arrays are equal if they contain the same key-value pairs. + * The order of the keys does not matter. + * The types of key-value pairs do not matter. */ -class DoubleComparator extends \SebastianBergmann\Comparator\NumericComparator -{ - /** - * Smallest value available in PHP. - * - * @var float - */ - public const EPSILON = 1.0E-10; +class ArrayComparator extends \SebastianBergmann\Comparator\Comparator +{ /** * Returns whether the comparator can compare two values. * @@ -16757,24 +16806,28 @@ public function accepts($expected, $actual) { } /** - * Asserts that two values are equal. + * Asserts that two arrays are equal. * * @param mixed $expected First value to compare * @param mixed $actual Second value to compare * @param float $delta Allowed numerical distance between two values to consider them equal * @param bool $canonicalize Arrays are sorted before comparison when set to true * @param bool $ignoreCase Case is ignored when set to true + * @param array $processed List of already processed elements (used to prevent infinite recursion) * * @throws ComparisonFailure */ - public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false) + public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false, array &$processed = []) + { + } + protected function indent($lines) { } } /** - * Compares values for type equality. + * Compares PHPUnit\Framework\MockObject\MockObject instances for equality. */ -class TypeComparator extends \SebastianBergmann\Comparator\Comparator +class MockObjectComparator extends \SebastianBergmann\Comparator\ObjectComparator { /** * Returns whether the comparator can compare two values. @@ -16788,39 +16841,28 @@ public function accepts($expected, $actual) { } /** - * Asserts that two values are equal. + * Converts an object to an array containing all of its private, protected + * and public properties. * - * @param mixed $expected First value to compare - * @param mixed $actual Second value to compare - * @param float $delta Allowed numerical distance between two values to consider them equal - * @param bool $canonicalize Arrays are sorted before comparison when set to true - * @param bool $ignoreCase Case is ignored when set to true + * @param object $object * - * @throws ComparisonFailure + * @return array */ - public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false) + protected function toArray($object) { } } +interface Exception extends \Throwable +{ +} +final class RuntimeException extends \RuntimeException implements \SebastianBergmann\Comparator\Exception +{ +} /** - * Abstract base class for comparators which compare values for equality. + * Compares objects for equality. */ -abstract class Comparator +class ObjectComparator extends \SebastianBergmann\Comparator\ArrayComparator { - /** - * @var Factory - */ - protected $factory; - /** - * @var \SebastianBergmann\Exporter\Exporter - */ - protected $exporter; - public function __construct() - { - } - public function setFactory(\SebastianBergmann\Comparator\Factory $factory) - { - } /** * Returns whether the comparator can compare two values. * @@ -16829,7 +16871,9 @@ public function setFactory(\SebastianBergmann\Comparator\Factory $factory) * * @return bool */ - abstract public function accepts($expected, $actual); + public function accepts($expected, $actual) + { + } /** * Asserts that two values are equal. * @@ -16838,100 +16882,60 @@ abstract public function accepts($expected, $actual); * @param float $delta Allowed numerical distance between two values to consider them equal * @param bool $canonicalize Arrays are sorted before comparison when set to true * @param bool $ignoreCase Case is ignored when set to true + * @param array $processed List of already processed elements (used to prevent infinite recursion) * * @throws ComparisonFailure */ - abstract public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false); -} -/** - * Thrown when an assertion for string equality failed. - */ -class ComparisonFailure extends \RuntimeException -{ - /** - * Expected value of the retrieval which does not match $actual. - * - * @var mixed - */ - protected $expected; - /** - * Actually retrieved value which does not match $expected. - * - * @var mixed - */ - protected $actual; - /** - * The string representation of the expected value. - * - * @var string - */ - protected $expectedAsString; - /** - * The string representation of the actual value. - * - * @var string - */ - protected $actualAsString; - /** - * @var bool - */ - protected $identical; - /** - * Optional message which is placed in front of the first line - * returned by toString(). - * - * @var string - */ - protected $message; - /** - * Initialises with the expected value and the actual value. - * - * @param mixed $expected expected value retrieved - * @param mixed $actual actual value retrieved - * @param string $expectedAsString - * @param string $actualAsString - * @param bool $identical - * @param string $message a string which is prefixed on all returned lines - * in the difference output - */ - public function __construct($expected, $actual, $expectedAsString, $actualAsString, $identical = false, $message = '') - { - } - public function getActual() - { - } - public function getExpected() - { - } - /** - * @return string - */ - public function getActualAsString() + public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false, array &$processed = []) { } /** - * @return string + * Converts an object to an array containing all of its private, protected + * and public properties. + * + * @param object $object + * + * @return array */ - public function getExpectedAsString() + protected function toArray($object) { } +} +/** + * Compares numerical values for equality. + */ +class NumericComparator extends \SebastianBergmann\Comparator\ScalarComparator +{ /** - * @return string + * Returns whether the comparator can compare two values. + * + * @param mixed $expected The first value to compare + * @param mixed $actual The second value to compare + * + * @return bool */ - public function getDiff() + public function accepts($expected, $actual) { } /** - * @return string + * Asserts that two values are equal. + * + * @param mixed $expected First value to compare + * @param mixed $actual Second value to compare + * @param float $delta Allowed numerical distance between two values to consider them equal + * @param bool $canonicalize Arrays are sorted before comparison when set to true + * @param bool $ignoreCase Case is ignored when set to true + * + * @throws ComparisonFailure */ - public function toString() + public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false) { } } /** - * Compares \SplObjectStorage instances for equality. + * Compares scalar or NULL values for equality. */ -class SplObjectStorageComparator extends \SebastianBergmann\Comparator\Comparator +class ScalarComparator extends \SebastianBergmann\Comparator\Comparator { /** * Returns whether the comparator can compare two values. @@ -16940,6 +16944,8 @@ class SplObjectStorageComparator extends \SebastianBergmann\Comparator\Comparato * @param mixed $actual The second value to compare * * @return bool + * + * @since Method available since Release 3.6.0 */ public function accepts($expected, $actual) { @@ -16960,13 +16966,9 @@ public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = f } } /** - * Compares arrays for equality. - * - * Arrays are equal if they contain the same key-value pairs. - * The order of the keys does not matter. - * The types of key-value pairs do not matter. + * Compares DateTimeInterface instances for equality. */ -class ArrayComparator extends \SebastianBergmann\Comparator\Comparator +class DateTimeComparator extends \SebastianBergmann\Comparator\ObjectComparator { /** * Returns whether the comparator can compare two values. @@ -16980,7 +16982,7 @@ public function accepts($expected, $actual) { } /** - * Asserts that two arrays are equal. + * Asserts that two values are equal. * * @param mixed $expected First value to compare * @param mixed $actual Second value to compare @@ -16989,62 +16991,62 @@ public function accepts($expected, $actual) * @param bool $ignoreCase Case is ignored when set to true * @param array $processed List of already processed elements (used to prevent infinite recursion) * + * @throws \Exception * @throws ComparisonFailure */ public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false, array &$processed = []) { } - protected function indent($lines) - { - } } namespace SebastianBergmann\Complexity; -final class ComplexityCalculatingVisitor extends \PhpParser\NodeVisitorAbstract +final class Calculator { - public function __construct(bool $shortCircuitTraversal) + /** + * @throws RuntimeException + */ + public function calculateForSourceFile(string $sourceFile): \SebastianBergmann\Complexity\ComplexityCollection { } - public function enterNode(\PhpParser\Node $node): ?int + /** + * @throws RuntimeException + */ + public function calculateForSourceString(string $source): \SebastianBergmann\Complexity\ComplexityCollection { } - public function result(): \SebastianBergmann\Complexity\ComplexityCollection + /** + * @param \PhpParser\Node[] $nodes + * + * @throws RuntimeException + */ + public function calculateForAbstractSyntaxTree(array $nodes): \SebastianBergmann\Complexity\ComplexityCollection { } } -final class CyclomaticComplexityCalculatingVisitor extends \PhpParser\NodeVisitorAbstract +interface Exception extends \Throwable { - public function enterNode(\PhpParser\Node $node): void - { - } - public function cyclomaticComplexity(): int - { - } } final class RuntimeException extends \RuntimeException implements \SebastianBergmann\Complexity\Exception { } -interface Exception extends \Throwable -{ -} -final class ComplexityCollectionIterator implements \Iterator +final class ComplexityCalculatingVisitor extends \PhpParser\NodeVisitorAbstract { - public function __construct(\SebastianBergmann\Complexity\ComplexityCollection $items) - { - } - public function rewind(): void + public function __construct(bool $shortCircuitTraversal) { } - public function valid(): bool + public function enterNode(\PhpParser\Node $node): ?int { } - public function key(): int + public function result(): \SebastianBergmann\Complexity\ComplexityCollection { } - public function current(): \SebastianBergmann\Complexity\Complexity +} +final class CyclomaticComplexityCalculatingVisitor extends \PhpParser\NodeVisitorAbstract +{ + public function enterNode(\PhpParser\Node $node): void { } - public function next(): void + public function cyclomaticComplexity(): int { } } @@ -17068,99 +17070,51 @@ public function getIterator(): \SebastianBergmann\Complexity\ComplexityCollectio public function count(): int { } - public function isEmpty(): bool - { - } - public function cyclomaticComplexity(): int - { - } -} -/** - * @phan-side-effect-free - */ -final class Complexity -{ - public function __construct(string $name, int $cyclomaticComplexity) - { - } - public function name(): string - { - } - public function cyclomaticComplexity(): int - { - } -} -final class Calculator -{ - /** - * @throws RuntimeException - */ - public function calculateForSourceFile(string $sourceFile): \SebastianBergmann\Complexity\ComplexityCollection - { - } - /** - * @throws RuntimeException - */ - public function calculateForSourceString(string $source): \SebastianBergmann\Complexity\ComplexityCollection + public function isEmpty(): bool { } - /** - * @param \PhpParser\Node[] $nodes - * - * @throws RuntimeException - */ - public function calculateForAbstractSyntaxTree(array $nodes): \SebastianBergmann\Complexity\ComplexityCollection + public function cyclomaticComplexity(): int { } } -namespace SebastianBergmann\Diff; - -class InvalidArgumentException extends \InvalidArgumentException implements \SebastianBergmann\Diff\Exception -{ -} -final class ConfigurationException extends \SebastianBergmann\Diff\InvalidArgumentException +final class ComplexityCollectionIterator implements \Iterator { - public function __construct(string $option, string $expected, $value, int $code = 0, ?\Exception $previous = null) + public function __construct(\SebastianBergmann\Complexity\ComplexityCollection $items) { } -} -interface Exception extends \Throwable -{ -} -final class Diff -{ - /** - * @param Chunk[] $chunks - */ - public function __construct(string $from, string $to, array $chunks = []) + public function rewind(): void { } - public function getFrom(): string + public function valid(): bool { } - public function getTo(): string + public function key(): int { } - /** - * @return Chunk[] - */ - public function getChunks(): array + public function current(): \SebastianBergmann\Complexity\Complexity { } - /** - * @param Chunk[] $chunks - */ - public function setChunks(array $chunks): void + public function next(): void { } } -interface LongestCommonSubsequenceCalculator +/** + * @phan-side-effect-free + */ +final class Complexity { - /** - * Calculates the longest common subsequence of two arrays. - */ - public function calculate(array $from, array $to): array; + public function __construct(string $name, int $cyclomaticComplexity) + { + } + public function name(): string + { + } + public function cyclomaticComplexity(): int + { + } } +namespace SebastianBergmann\Diff; + final class TimeEfficientLongestCommonSubsequenceCalculator implements \SebastianBergmann\Diff\LongestCommonSubsequenceCalculator { /** @@ -17213,6 +17167,57 @@ public function diffToArray($from, $to, ?\SebastianBergmann\Diff\LongestCommonSu { } } +class InvalidArgumentException extends \InvalidArgumentException implements \SebastianBergmann\Diff\Exception +{ +} +interface Exception extends \Throwable +{ +} +final class ConfigurationException extends \SebastianBergmann\Diff\InvalidArgumentException +{ + public function __construct(string $option, string $expected, $value, int $code = 0, ?\Exception $previous = null) + { + } +} +/** + * Unified diff parser. + */ +final class Parser +{ + /** + * @return Diff[] + */ + public function parse(string $string): array + { + } +} +final class Diff +{ + /** + * @param Chunk[] $chunks + */ + public function __construct(string $from, string $to, array $chunks = []) + { + } + public function getFrom(): string + { + } + public function getTo(): string + { + } + /** + * @return Chunk[] + */ + public function getChunks(): array + { + } + /** + * @param Chunk[] $chunks + */ + public function setChunks(array $chunks): void + { + } +} final class Line { public const ADDED = 1; @@ -17228,24 +17233,19 @@ public function getType(): int { } } -final class MemoryEfficientLongestCommonSubsequenceCalculator implements \SebastianBergmann\Diff\LongestCommonSubsequenceCalculator +interface LongestCommonSubsequenceCalculator { /** - * {@inheritdoc} + * Calculates the longest common subsequence of two arrays. */ - public function calculate(array $from, array $to): array - { - } + public function calculate(array $from, array $to): array; } -/** - * Unified diff parser. - */ -final class Parser +final class MemoryEfficientLongestCommonSubsequenceCalculator implements \SebastianBergmann\Diff\LongestCommonSubsequenceCalculator { /** - * @return Diff[] + * {@inheritdoc} */ - public function parse(string $string): array + public function calculate(array $from, array $to): array { } } @@ -17281,20 +17281,6 @@ public function setLines(array $lines): void } namespace SebastianBergmann\Diff\Output; -/** - * Strict Unified diff output builder. - * - * Generates (strict) Unified diff's (unidiffs) with hunks. - */ -final class StrictUnifiedDiffOutputBuilder implements \SebastianBergmann\Diff\Output\DiffOutputBuilderInterface -{ - public function __construct(array $options = []) - { - } - public function getDiff(array $diff): string - { - } -} abstract class AbstractChunkOutputBuilder implements \SebastianBergmann\Diff\Output\DiffOutputBuilderInterface { /** @@ -17306,12 +17292,17 @@ protected function getCommonChunks(array $diff, int $lineThreshold = 5): array } } /** - * Defines how an output builder should take a generated - * diff array and return a string representation of that diff. + * Builds a diff string representation in a loose unified diff format + * listing only changes lines. Does not include line numbers. */ -interface DiffOutputBuilderInterface +final class DiffOnlyOutputBuilder implements \SebastianBergmann\Diff\Output\DiffOutputBuilderInterface { - public function getDiff(array $diff): string; + public function __construct(string $header = "--- Original\n+++ New\n") + { + } + public function getDiff(array $diff): string + { + } } /** * Builds a diff string representation in unified diff format in chunks. @@ -17326,18 +17317,27 @@ public function getDiff(array $diff): string } } /** - * Builds a diff string representation in a loose unified diff format - * listing only changes lines. Does not include line numbers. + * Strict Unified diff output builder. + * + * Generates (strict) Unified diff's (unidiffs) with hunks. */ -final class DiffOnlyOutputBuilder implements \SebastianBergmann\Diff\Output\DiffOutputBuilderInterface +final class StrictUnifiedDiffOutputBuilder implements \SebastianBergmann\Diff\Output\DiffOutputBuilderInterface { - public function __construct(string $header = "--- Original\n+++ New\n") + public function __construct(array $options = []) { } public function getDiff(array $diff): string { } } +/** + * Defines how an output builder should take a generated + * diff array and return a string representation of that diff. + */ +interface DiffOutputBuilderInterface +{ + public function getDiff(array $diff): string; +} namespace SebastianBergmann\Environment; /** @@ -17441,16 +17441,6 @@ public function getCurrentSettings(array $values): array { } } -final class OperatingSystem -{ - /** - * Returns PHP_OS_FAMILY (if defined (which it is on PHP >= 7.2)). - * Returns a string (compatible with PHP_OS_FAMILY) derived from PHP_OS otherwise. - */ - public function getFamily(): string - { - } -} final class Console { /** @@ -17494,6 +17484,16 @@ public function isInteractive($fileDescriptor = self::STDOUT): bool { } } +final class OperatingSystem +{ + /** + * Returns PHP_OS_FAMILY (if defined (which it is on PHP >= 7.2)). + * Returns a string (compatible with PHP_OS_FAMILY) derived from PHP_OS otherwise. + */ + public function getFamily(): string + { + } +} namespace SebastianBergmann\Exporter; /** @@ -17580,6 +17580,20 @@ protected function recursiveExport(&$value, $indentation, $processed = null) } namespace SebastianBergmann\FileIterator; +class Facade +{ + /** + * @param array|string $paths + * @param array|string $suffixes + * @param array|string $prefixes + */ + public function getFilesAsArray($paths, $suffixes = '', $prefixes = '', array $exclude = [], bool $commonPath = false): array + { + } + protected function getCommonPath(array $files): string + { + } +} class Factory { /** @@ -17605,28 +17619,8 @@ public function accept(): bool { } } -class Facade -{ - /** - * @param array|string $paths - * @param array|string $suffixes - * @param array|string $prefixes - */ - public function getFilesAsArray($paths, $suffixes = '', $prefixes = '', array $exclude = [], bool $commonPath = false): array - { - } - protected function getCommonPath(array $files): string - { - } -} namespace SebastianBergmann\GlobalState; -final class RuntimeException extends \RuntimeException implements \SebastianBergmann\GlobalState\Exception -{ -} -interface Exception extends \Throwable -{ -} /** * Exports parts of a Snapshot as PHP code. */ @@ -17745,17 +17739,14 @@ public function isStaticAttributeExcluded(string $className, string $attributeNa { } } -namespace SebastianBergmann\Invoker; - -final class ProcessControlExtensionNotLoadedException extends \RuntimeException implements \SebastianBergmann\Invoker\Exception -{ -} interface Exception extends \Throwable { } -final class TimeoutException extends \RuntimeException implements \SebastianBergmann\Invoker\Exception +final class RuntimeException extends \RuntimeException implements \SebastianBergmann\GlobalState\Exception { } +namespace SebastianBergmann\Invoker; + final class Invoker { /** @@ -17768,40 +17759,54 @@ public function canInvokeWithTimeout(): bool { } } +interface Exception extends \Throwable +{ +} +final class TimeoutException extends \RuntimeException implements \SebastianBergmann\Invoker\Exception +{ +} +final class ProcessControlExtensionNotLoadedException extends \RuntimeException implements \SebastianBergmann\Invoker\Exception +{ +} namespace SebastianBergmann\LinesOfCode; -final class RuntimeException extends \RuntimeException implements \SebastianBergmann\LinesOfCode\Exception +interface Exception extends \Throwable { } -final class IllogicalValuesException extends \LogicException implements \SebastianBergmann\LinesOfCode\Exception +final class RuntimeException extends \RuntimeException implements \SebastianBergmann\LinesOfCode\Exception { } final class NegativeValueException extends \InvalidArgumentException implements \SebastianBergmann\LinesOfCode\Exception { } -interface Exception extends \Throwable +final class IllogicalValuesException extends \LogicException implements \SebastianBergmann\LinesOfCode\Exception { } -final class Counter +/** + * @phan-side-effect-free + */ +final class LinesOfCode { /** - * @throws RuntimeException + * @throws IllogicalValuesException + * @throws NegativeValueException */ - public function countInSourceFile(string $sourceFile): \SebastianBergmann\LinesOfCode\LinesOfCode + public function __construct(int $linesOfCode, int $commentLinesOfCode, int $nonCommentLinesOfCode, int $logicalLinesOfCode) { } - /** - * @throws RuntimeException - */ - public function countInSourceString(string $source): \SebastianBergmann\LinesOfCode\LinesOfCode + public function linesOfCode(): int { } - /** - * @param \PhpParser\Node[] $nodes - * - * @throws RuntimeException - */ - public function countInAbstractSyntaxTree(int $linesOfCode, array $nodes): \SebastianBergmann\LinesOfCode\LinesOfCode + public function commentLinesOfCode(): int + { + } + public function nonCommentLinesOfCode(): int + { + } + public function logicalLinesOfCode(): int + { + } + public function plus(self $other): self { } } @@ -17817,31 +17822,26 @@ public function result(): \SebastianBergmann\LinesOfCode\LinesOfCode { } } -/** - * @phan-side-effect-free - */ -final class LinesOfCode +final class Counter { /** - * @throws IllogicalValuesException - * @throws NegativeValueException + * @throws RuntimeException */ - public function __construct(int $linesOfCode, int $commentLinesOfCode, int $nonCommentLinesOfCode, int $logicalLinesOfCode) - { - } - public function linesOfCode(): int - { - } - public function commentLinesOfCode(): int - { - } - public function nonCommentLinesOfCode(): int + public function countInSourceFile(string $sourceFile): \SebastianBergmann\LinesOfCode\LinesOfCode { } - public function logicalLinesOfCode(): int + /** + * @throws RuntimeException + */ + public function countInSourceString(string $source): \SebastianBergmann\LinesOfCode\LinesOfCode { } - public function plus(self $other): self + /** + * @param \PhpParser\Node[] $nodes + * + * @throws RuntimeException + */ + public function countInAbstractSyntaxTree(int $linesOfCode, array $nodes): \SebastianBergmann\LinesOfCode\LinesOfCode { } } @@ -17892,6 +17892,12 @@ public function getAttributes($object): array } namespace SebastianBergmann\RecursionContext; +final class InvalidArgumentException extends \InvalidArgumentException implements \SebastianBergmann\RecursionContext\Exception +{ +} +interface Exception extends \Throwable +{ +} /** * A context containing previously processed arrays and objects * when recursively processing a value. @@ -17943,12 +17949,6 @@ public function contains(&$value) { } } -final class InvalidArgumentException extends \InvalidArgumentException implements \SebastianBergmann\RecursionContext\Exception -{ -} -interface Exception extends \Throwable -{ -} namespace SebastianBergmann\ResourceOperations; final class ResourceOperations @@ -17962,15 +17962,15 @@ public static function getFunctions(): array } namespace SebastianBergmann\Template; -final class RuntimeException extends \InvalidArgumentException implements \SebastianBergmann\Template\Exception -{ -} final class InvalidArgumentException extends \InvalidArgumentException implements \SebastianBergmann\Template\Exception { } interface Exception extends \Throwable { } +final class RuntimeException extends \InvalidArgumentException implements \SebastianBergmann\Template\Exception +{ +} final class Template { /** @@ -18000,13 +18000,25 @@ public function renderTo(string $target): void } namespace SebastianBergmann\Timer; -final class TimeSinceStartOfRequestNotAvailableException extends \RuntimeException implements \SebastianBergmann\Timer\Exception +final class ResourceUsageFormatter { + public function resourceUsage(\SebastianBergmann\Timer\Duration $duration): string + { + } + /** + * @throws TimeSinceStartOfRequestNotAvailableException + */ + public function resourceUsageSinceStartOfRequest(): string + { + } } -final class NoActiveTimerException extends \LogicException implements \SebastianBergmann\Timer\Exception +interface Exception extends \Throwable { } -interface Exception extends \Throwable +final class TimeSinceStartOfRequestNotAvailableException extends \RuntimeException implements \SebastianBergmann\Timer\Exception +{ +} +final class NoActiveTimerException extends \LogicException implements \SebastianBergmann\Timer\Exception { } final class Timer @@ -18048,128 +18060,77 @@ public function asString(): string { } } -final class ResourceUsageFormatter -{ - public function resourceUsage(\SebastianBergmann\Timer\Duration $duration): string - { - } - /** - * @throws TimeSinceStartOfRequestNotAvailableException - */ - public function resourceUsageSinceStartOfRequest(): string - { - } -} namespace SebastianBergmann\Type; -final class GenericObjectType extends \SebastianBergmann\Type\Type +interface Exception extends \Throwable { - public function __construct(bool $nullable) - { - } - public function isAssignable(\SebastianBergmann\Type\Type $other): bool - { - } - public function name(): string - { - } - public function allowsNull(): bool - { - } - /** - * @psalm-assert-if-true GenericObjectType $this - */ - public function isGenericObject(): bool - { - } } -final class UnionType extends \SebastianBergmann\Type\Type +final class RuntimeException extends \RuntimeException implements \SebastianBergmann\Type\Exception +{ +} +final class Parameter { /** - * @throws RuntimeException + * @phan-param non-empty-string $name */ - public function __construct(\SebastianBergmann\Type\Type ...$types) - { - } - public function isAssignable(\SebastianBergmann\Type\Type $other): bool - { - } - public function asString(): string + public function __construct(string $name, \SebastianBergmann\Type\Type $type) { } public function name(): string { } - public function allowsNull(): bool + public function type(): \SebastianBergmann\Type\Type { } +} +final class ReflectionMapper +{ /** - * @psalm-assert-if-true UnionType $this + * @phan-return list */ - public function isUnion(): bool - { - } - public function containsIntersectionTypes(): bool + public function fromParameterTypes(\ReflectionFunctionAbstract $functionOrMethod): array { } - /** - * @phan-return non-empty-list - */ - public function types(): array + public function fromReturnType(\ReflectionFunctionAbstract $functionOrMethod): \SebastianBergmann\Type\Type { } } -final class ObjectType extends \SebastianBergmann\Type\Type +final class TypeName { - public function __construct(\SebastianBergmann\Type\TypeName $className, bool $allowsNull) - { - } - public function isAssignable(\SebastianBergmann\Type\Type $other): bool + public static function fromQualifiedName(string $fullClassName): self { } - public function name(): string + public static function fromReflection(\ReflectionClass $type): self { } - public function allowsNull(): bool + public function __construct(?string $namespaceName, string $simpleName) { } - public function className(): \SebastianBergmann\Type\TypeName + public function namespaceName(): ?string { } - /** - * @psalm-assert-if-true ObjectType $this - */ - public function isObject(): bool + public function simpleName(): string { } -} -abstract class Type -{ - public static function fromValue($value, bool $allowsNull): self + public function qualifiedName(): string { } - public static function fromName(string $typeName, bool $allowsNull): self + public function isNamespaced(): bool { } - public function asString(): string +} +final class GenericObjectType extends \SebastianBergmann\Type\Type +{ + public function __construct(bool $nullable) { } - /** - * @psalm-assert-if-true CallableType $this - */ - public function isCallable(): bool + public function isAssignable(\SebastianBergmann\Type\Type $other): bool { } - /** - * @psalm-assert-if-true TrueType $this - */ - public function isTrue(): bool + public function name(): string { } - /** - * @psalm-assert-if-true FalseType $this - */ - public function isFalse(): bool + public function allowsNull(): bool { } /** @@ -18178,75 +18139,30 @@ public function isFalse(): bool public function isGenericObject(): bool { } - /** - * @psalm-assert-if-true IntersectionType $this - */ - public function isIntersection(): bool - { - } - /** - * @psalm-assert-if-true IterableType $this - */ - public function isIterable(): bool - { - } - /** - * @psalm-assert-if-true MixedType $this - */ - public function isMixed(): bool - { - } - /** - * @psalm-assert-if-true NeverType $this - */ - public function isNever(): bool - { - } - /** - * @psalm-assert-if-true NullType $this - */ - public function isNull(): bool - { - } - /** - * @psalm-assert-if-true ObjectType $this - */ - public function isObject(): bool - { - } - /** - * @psalm-assert-if-true SimpleType $this - */ - public function isSimple(): bool - { - } - /** - * @psalm-assert-if-true StaticType $this - */ - public function isStatic(): bool +} +final class IterableType extends \SebastianBergmann\Type\Type +{ + public function __construct(bool $nullable) { } /** - * @psalm-assert-if-true UnionType $this + * @throws RuntimeException */ - public function isUnion(): bool + public function isAssignable(\SebastianBergmann\Type\Type $other): bool { } - /** - * @psalm-assert-if-true UnknownType $this - */ - public function isUnknown(): bool + public function name(): string + { + } + public function allowsNull(): bool { } /** - * @psalm-assert-if-true VoidType $this + * @psalm-assert-if-true IterableType $this */ - public function isVoid(): bool + public function isIterable(): bool { } - abstract public function isAssignable(self $other): bool; - abstract public function name(): string; - abstract public function allowsNull(): bool; } final class SimpleType extends \SebastianBergmann\Type\Type { @@ -18290,17 +18206,20 @@ public function isVoid(): bool { } } -final class IterableType extends \SebastianBergmann\Type\Type +final class IntersectionType extends \SebastianBergmann\Type\Type { - public function __construct(bool $nullable) - { - } /** * @throws RuntimeException */ + public function __construct(\SebastianBergmann\Type\Type ...$types) + { + } public function isAssignable(\SebastianBergmann\Type\Type $other): bool { } + public function asString(): string + { + } public function name(): string { } @@ -18308,13 +18227,19 @@ public function allowsNull(): bool { } /** - * @psalm-assert-if-true IterableType $this + * @psalm-assert-if-true IntersectionType $this */ - public function isIterable(): bool + public function isIntersection(): bool + { + } + /** + * @phan-return non-empty-list + */ + public function types(): array { } } -final class NeverType extends \SebastianBergmann\Type\Type +final class TrueType extends \SebastianBergmann\Type\Type { public function isAssignable(\SebastianBergmann\Type\Type $other): bool { @@ -18326,20 +18251,17 @@ public function allowsNull(): bool { } /** - * @psalm-assert-if-true NeverType $this + * @psalm-assert-if-true TrueType $this */ - public function isNever(): bool + public function isTrue(): bool { } } -final class MixedType extends \SebastianBergmann\Type\Type +final class FalseType extends \SebastianBergmann\Type\Type { public function isAssignable(\SebastianBergmann\Type\Type $other): bool { } - public function asString(): string - { - } public function name(): string { } @@ -18347,9 +18269,9 @@ public function allowsNull(): bool { } /** - * @psalm-assert-if-true MixedType $this + * @psalm-assert-if-true FalseType $this */ - public function isMixed(): bool + public function isFalse(): bool { } } @@ -18374,11 +18296,20 @@ public function isNull(): bool { } } -final class TrueType extends \SebastianBergmann\Type\Type +final class UnionType extends \SebastianBergmann\Type\Type { + /** + * @throws RuntimeException + */ + public function __construct(\SebastianBergmann\Type\Type ...$types) + { + } public function isAssignable(\SebastianBergmann\Type\Type $other): bool { } + public function asString(): string + { + } public function name(): string { } @@ -18386,35 +18317,50 @@ public function allowsNull(): bool { } /** - * @psalm-assert-if-true TrueType $this + * @psalm-assert-if-true UnionType $this */ - public function isTrue(): bool + public function isUnion(): bool + { + } + public function containsIntersectionTypes(): bool + { + } + /** + * @phan-return non-empty-list + */ + public function types(): array { } } -final class UnknownType extends \SebastianBergmann\Type\Type +final class ObjectType extends \SebastianBergmann\Type\Type { + public function __construct(\SebastianBergmann\Type\TypeName $className, bool $allowsNull) + { + } public function isAssignable(\SebastianBergmann\Type\Type $other): bool { } public function name(): string { } - public function asString(): string + public function allowsNull(): bool { } - public function allowsNull(): bool + public function className(): \SebastianBergmann\Type\TypeName { } /** - * @psalm-assert-if-true UnknownType $this + * @psalm-assert-if-true ObjectType $this */ - public function isUnknown(): bool + public function isObject(): bool { } } -final class FalseType extends \SebastianBergmann\Type\Type +final class StaticType extends \SebastianBergmann\Type\Type { + public function __construct(\SebastianBergmann\Type\TypeName $className, bool $allowsNull) + { + } public function isAssignable(\SebastianBergmann\Type\Type $other): bool { } @@ -18425,30 +18371,45 @@ public function allowsNull(): bool { } /** - * @psalm-assert-if-true FalseType $this + * @psalm-assert-if-true StaticType $this */ - public function isFalse(): bool + public function isStatic(): bool { } } -final class IntersectionType extends \SebastianBergmann\Type\Type +abstract class Type { - /** - * @throws RuntimeException - */ - public function __construct(\SebastianBergmann\Type\Type ...$types) + public static function fromValue($value, bool $allowsNull): self { } - public function isAssignable(\SebastianBergmann\Type\Type $other): bool + public static function fromName(string $typeName, bool $allowsNull): self { } public function asString(): string { } - public function name(): string + /** + * @psalm-assert-if-true CallableType $this + */ + public function isCallable(): bool { } - public function allowsNull(): bool + /** + * @psalm-assert-if-true TrueType $this + */ + public function isTrue(): bool + { + } + /** + * @psalm-assert-if-true FalseType $this + */ + public function isFalse(): bool + { + } + /** + * @psalm-assert-if-true GenericObjectType $this + */ + public function isGenericObject(): bool { } /** @@ -18458,24 +18419,39 @@ public function isIntersection(): bool { } /** - * @phan-return non-empty-list + * @psalm-assert-if-true IterableType $this */ - public function types(): array + public function isIterable(): bool { } -} -final class StaticType extends \SebastianBergmann\Type\Type -{ - public function __construct(\SebastianBergmann\Type\TypeName $className, bool $allowsNull) + /** + * @psalm-assert-if-true MixedType $this + */ + public function isMixed(): bool { } - public function isAssignable(\SebastianBergmann\Type\Type $other): bool + /** + * @psalm-assert-if-true NeverType $this + */ + public function isNever(): bool { } - public function name(): string + /** + * @psalm-assert-if-true NullType $this + */ + public function isNull(): bool { } - public function allowsNull(): bool + /** + * @psalm-assert-if-true ObjectType $this + */ + public function isObject(): bool + { + } + /** + * @psalm-assert-if-true SimpleType $this + */ + public function isSimple(): bool { } /** @@ -18484,85 +18460,109 @@ public function allowsNull(): bool public function isStatic(): bool { } -} -final class CallableType extends \SebastianBergmann\Type\Type -{ - public function __construct(bool $nullable) + /** + * @psalm-assert-if-true UnionType $this + */ + public function isUnion(): bool { } /** - * @throws RuntimeException + * @psalm-assert-if-true UnknownType $this */ + public function isUnknown(): bool + { + } + /** + * @psalm-assert-if-true VoidType $this + */ + public function isVoid(): bool + { + } + abstract public function isAssignable(self $other): bool; + abstract public function name(): string; + abstract public function allowsNull(): bool; +} +final class UnknownType extends \SebastianBergmann\Type\Type +{ public function isAssignable(\SebastianBergmann\Type\Type $other): bool { } public function name(): string { } + public function asString(): string + { + } public function allowsNull(): bool { } /** - * @psalm-assert-if-true CallableType $this + * @psalm-assert-if-true UnknownType $this */ - public function isCallable(): bool + public function isUnknown(): bool { } } -final class Parameter +final class NeverType extends \SebastianBergmann\Type\Type { - /** - * @phan-param non-empty-string $name - */ - public function __construct(string $name, \SebastianBergmann\Type\Type $type) + public function isAssignable(\SebastianBergmann\Type\Type $other): bool { } public function name(): string { } - public function type(): \SebastianBergmann\Type\Type + public function allowsNull(): bool + { + } + /** + * @psalm-assert-if-true NeverType $this + */ + public function isNever(): bool { } } -final class ReflectionMapper +final class CallableType extends \SebastianBergmann\Type\Type { + public function __construct(bool $nullable) + { + } /** - * @phan-return list + * @throws RuntimeException */ - public function fromParameterTypes(\ReflectionFunctionAbstract $functionOrMethod): array + public function isAssignable(\SebastianBergmann\Type\Type $other): bool { } - public function fromReturnType(\ReflectionFunctionAbstract $functionOrMethod): \SebastianBergmann\Type\Type + public function name(): string { } -} -final class RuntimeException extends \RuntimeException implements \SebastianBergmann\Type\Exception -{ -} -interface Exception extends \Throwable -{ -} -final class TypeName -{ - public static function fromQualifiedName(string $fullClassName): self + public function allowsNull(): bool { } - public static function fromReflection(\ReflectionClass $type): self + /** + * @psalm-assert-if-true CallableType $this + */ + public function isCallable(): bool { } - public function __construct(?string $namespaceName, string $simpleName) +} +final class MixedType extends \SebastianBergmann\Type\Type +{ + public function isAssignable(\SebastianBergmann\Type\Type $other): bool { } - public function namespaceName(): ?string + public function asString(): string { } - public function simpleName(): string + public function name(): string { } - public function qualifiedName(): string + public function allowsNull(): bool { } - public function isNamespaced(): bool + /** + * @psalm-assert-if-true MixedType $this + */ + public function isMixed(): bool { } } diff --git a/.phan/stubs/woocommerce-internal-stubs.php b/.phan/stubs/woocommerce-internal-stubs.php index 330a6276638b6..c3eb561a77ca4 100644 --- a/.phan/stubs/woocommerce-internal-stubs.php +++ b/.phan/stubs/woocommerce-internal-stubs.php @@ -1,6 +1,6 @@ Date: Thu, 18 Apr 2024 15:29:35 -0400 Subject: [PATCH 2/2] ksort phpunit file list --- .phan/stubs/phpunit-stubs.php | 11232 ++++++++++++++-------------- tools/stubs/phpunit-stub-defs.php | 1 + 2 files changed, 5617 insertions(+), 5616 deletions(-) diff --git a/.phan/stubs/phpunit-stubs.php b/.phan/stubs/phpunit-stubs.php index 4d17f21cb3353..01c004657092a 100644 --- a/.phan/stubs/phpunit-stubs.php +++ b/.phan/stubs/phpunit-stubs.php @@ -17,669 +17,262 @@ interface Exception extends \Throwable namespace PHPUnit\Framework; /** - * @internal This class is not covered by the backward compatibility promise for PHPUnit + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -interface SelfDescribing +abstract class Assert { /** - * Returns a string representation of the object. + * Asserts that an array has a specified key. + * + * @param int|string $key + * @param array|\ArrayAccess $array + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws Exception + * @throws ExpectationFailedException */ - public function toString(): string; -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface Test extends \Countable -{ + public static function assertArrayHasKey($key, $array, string $message = ''): void + { + } /** - * Runs a test and collects its result in a TestResult instance. + * Asserts that an array does not have a specified key. + * + * @param int|string $key + * @param array|\ArrayAccess $array + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws Exception + * @throws ExpectationFailedException */ - public function run(?\PHPUnit\Framework\TestResult $result = null): \PHPUnit\Framework\TestResult; -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface IncompleteTest extends \Throwable -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface Reorderable -{ - public function sortId(): string; + public static function assertArrayNotHasKey($key, $array, string $message = ''): void + { + } /** - * @return list + * Asserts that a haystack contains a needle. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws Exception + * @throws ExpectationFailedException */ - public function provides(): array; + public static function assertContains($needle, iterable $haystack, string $message = ''): void + { + } + public static function assertContainsEquals($needle, iterable $haystack, string $message = ''): void + { + } /** - * @return list + * Asserts that a haystack does not contain a needle. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws Exception + * @throws ExpectationFailedException */ - public function requires(): array; -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -class SyntheticError extends \PHPUnit\Framework\AssertionFailedError -{ + public static function assertNotContains($needle, iterable $haystack, string $message = ''): void + { + } + public static function assertNotContainsEquals($needle, iterable $haystack, string $message = ''): void + { + } /** - * The synthetic file. + * Asserts that a haystack contains only values of a given type. * - * @var string + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - protected $syntheticFile = ''; + public static function assertContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = null, string $message = ''): void + { + } /** - * The synthetic line number. + * Asserts that a haystack contains only instances of a given class name. * - * @var int + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - protected $syntheticLine = 0; + public static function assertContainsOnlyInstancesOf(string $className, iterable $haystack, string $message = ''): void + { + } /** - * The synthetic trace. + * Asserts that a haystack does not contain only values of a given type. * - * @var array + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - protected $syntheticTrace = []; - public function __construct(string $message, int $code, string $file, int $line, array $trace) + public static function assertNotContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = null, string $message = ''): void { } - public function getSyntheticFile(): string + /** + * Asserts the number of elements of an array, Countable or Traversable. + * + * @param \Countable|iterable $haystack + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws Exception + * @throws ExpectationFailedException + */ + public static function assertCount(int $expectedCount, $haystack, string $message = ''): void { } - public function getSyntheticLine(): int + /** + * Asserts the number of elements of an array, Countable or Traversable. + * + * @param \Countable|iterable $haystack + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws Exception + * @throws ExpectationFailedException + */ + public static function assertNotCount(int $expectedCount, $haystack, string $message = ''): void { } - public function getSyntheticTrace(): array + /** + * Asserts that two variables are equal. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + */ + public static function assertEquals($expected, $actual, string $message = ''): void { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvalidArgumentException extends \PHPUnit\Framework\Exception -{ - public static function create(int $argument, string $type): self + /** + * Asserts that two variables are equal (canonicalizing). + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + */ + public static function assertEqualsCanonicalizing($expected, $actual, string $message = ''): void { } -} -/** - * Base class for all PHPUnit Framework exceptions. - * - * Ensures that exceptions thrown during a test run do not leave stray - * references behind. - * - * Every Exception contains a stack trace. Each stack frame contains the 'args' - * of the called function. The function arguments can contain references to - * instantiated objects. The references prevent the objects from being - * destructed (until test results are eventually printed), so memory cannot be - * freed up. - * - * With enabled process isolation, test results are serialized in the child - * process and unserialized in the parent process. The stack trace of Exceptions - * may contain objects that cannot be serialized or unserialized (e.g., PDO - * connections). Unserializing user-space objects from the child process into - * the parent would break the intended encapsulation of process isolation. - * - * @see http://fabien.potencier.org/article/9/php-serialization-stack-traces-and-exceptions - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -class Exception extends \RuntimeException implements \PHPUnit\Exception -{ /** - * @var array + * Asserts that two variables are equal (ignoring case). + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - protected $serializableTrace; - public function __construct($message = '', $code = 0, ?\Throwable $previous = null) + public static function assertEqualsIgnoringCase($expected, $actual, string $message = ''): void { } - public function __toString(): string + /** + * Asserts that two variables are equal (with delta). + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + */ + public static function assertEqualsWithDelta($expected, $actual, float $delta, string $message = ''): void { } - public function __sleep(): array + /** + * Asserts that two variables are not equal. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + */ + public static function assertNotEquals($expected, $actual, string $message = ''): void { } /** - * Returns the serializable trace (without 'args'). + * Asserts that two variables are not equal (canonicalizing). + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function getSerializableTrace(): array + public static function assertNotEqualsCanonicalizing($expected, $actual, string $message = ''): void { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class CoveredCodeNotExecutedException extends \PHPUnit\Framework\RiskyTestError -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -class CodeCoverageException extends \PHPUnit\Framework\Exception -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MissingCoversAnnotationException extends \PHPUnit\Framework\RiskyTestError -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Warning extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\SelfDescribing -{ /** - * Wrapper for getMessage() which is declared as final. + * Asserts that two variables are not equal (ignoring case). + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function toString(): string + public static function assertNotEqualsIgnoringCase($expected, $actual, string $message = ''): void { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvalidDataProviderException extends \PHPUnit\Framework\Exception -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvalidCoversTargetException extends \PHPUnit\Framework\CodeCoverageException -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class IncompleteTestError extends \PHPUnit\Framework\AssertionFailedError implements \PHPUnit\Framework\IncompleteTest -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class SyntheticSkippedError extends \PHPUnit\Framework\SyntheticError implements \PHPUnit\Framework\SkippedTest -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class SkippedTestError extends \PHPUnit\Framework\AssertionFailedError implements \PHPUnit\Framework\SkippedTest -{ -} -/** - * Exception for expectations which failed their check. - * - * The exception contains the error message and optionally a - * SebastianBergmann\Comparator\ComparisonFailure which is used to - * generate diff output of the failed expectations. - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ExpectationFailedException extends \PHPUnit\Framework\AssertionFailedError -{ - public function __construct(string $message, ?\SebastianBergmann\Comparator\ComparisonFailure $comparisonFailure = null, ?\Exception $previous = null) - { - } - public function getComparisonFailure(): ?\SebastianBergmann\Comparator\ComparisonFailure - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ActualValueIsNotAnObjectException extends \PHPUnit\Framework\Exception -{ - public function __construct() - { - } - public function __toString(): string - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -class RiskyTestError extends \PHPUnit\Framework\AssertionFailedError -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ComparisonMethodDoesNotDeclareParameterTypeException extends \PHPUnit\Framework\Exception -{ - public function __construct(string $className, string $methodName) - { - } - public function __toString(): string - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class UnintentionallyCoveredCodeError extends \PHPUnit\Framework\RiskyTestError -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class OutputError extends \PHPUnit\Framework\AssertionFailedError -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ComparisonMethodDoesNotExistException extends \PHPUnit\Framework\Exception -{ - public function __construct(string $className, string $methodName) - { - } - public function __toString(): string - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class SkippedTestSuiteError extends \PHPUnit\Framework\AssertionFailedError implements \PHPUnit\Framework\SkippedTest -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class NoChildTestSuiteException extends \PHPUnit\Framework\Exception -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ComparisonMethodDoesNotDeclareExactlyOneParameterException extends \PHPUnit\Framework\Exception -{ - public function __construct(string $className, string $methodName) - { - } - public function __toString(): string - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ComparisonMethodDoesNotAcceptParameterTypeException extends \PHPUnit\Framework\Exception -{ - public function __construct(string $className, string $methodName, string $type) - { - } - public function __toString(): string - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ComparisonMethodDoesNotDeclareBoolReturnTypeException extends \PHPUnit\Framework\Exception -{ - public function __construct(string $className, string $methodName) - { - } - public function __toString(): string - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Error extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\SelfDescribing -{ /** - * Wrapper for getMessage() which is declared as final. + * Asserts that two variables are not equal (with delta). + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function toString(): string + public static function assertNotEqualsWithDelta($expected, $actual, float $delta, string $message = ''): void { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -class AssertionFailedError extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\SelfDescribing -{ /** - * Wrapper for getMessage() which is declared as final. + * @throws ExpectationFailedException */ - public function toString(): string - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class PHPTAssertionFailedError extends \PHPUnit\Framework\SyntheticError -{ - public function __construct(string $message, int $code, string $file, int $line, array $trace, string $diff) - { - } - public function getDiff(): string - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class SkippedTestCase extends \PHPUnit\Framework\TestCase -{ - public function __construct(string $className, string $methodName, string $message = '') - { - } - public function getMessage(): string + public static function assertObjectEquals(object $expected, object $actual, string $method = 'equals', string $message = ''): void { } /** - * Returns a string representation of the test case. + * Asserts that a variable is empty. * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert empty $actual */ - public function toString(): string - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class TestBuilder -{ - public function build(\ReflectionClass $theClass, string $methodName): \PHPUnit\Framework\Test + public static function assertEmpty($actual, string $message = ''): void { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class DataProviderTestSuite extends \PHPUnit\Framework\TestSuite -{ /** - * @param list $dependencies + * Asserts that a variable is not empty. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * + * @phan-assert !empty $actual */ - public function setDependencies(array $dependencies): void + public static function assertNotEmpty($actual, string $message = ''): void { } /** - * @return list + * Asserts that a value is greater than another value. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function provides(): array + public static function assertGreaterThan($expected, $actual, string $message = ''): void { } /** - * @return list + * Asserts that a value is greater than or equal to another value. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function requires(): array + public static function assertGreaterThanOrEqual($expected, $actual, string $message = ''): void { } /** - * Returns the size of the each test created using the data provider(s). + * Asserts that a value is smaller than another value. * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ - public function getSize(): int + public static function assertLessThan($expected, $actual, string $message = ''): void { } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -abstract class Assert -{ /** - * Asserts that an array has a specified key. - * - * @param int|string $key - * @param array|\ArrayAccess $array + * Asserts that a value is smaller than or equal to another value. * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception * @throws ExpectationFailedException */ - public static function assertArrayHasKey($key, $array, string $message = ''): void + public static function assertLessThanOrEqual($expected, $actual, string $message = ''): void { } /** - * Asserts that an array does not have a specified key. - * - * @param int|string $key - * @param array|\ArrayAccess $array + * Asserts that the contents of one file is equal to the contents of another + * file. * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception * @throws ExpectationFailedException */ - public static function assertArrayNotHasKey($key, $array, string $message = ''): void + public static function assertFileEquals(string $expected, string $actual, string $message = ''): void { } /** - * Asserts that a haystack contains a needle. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * @throws ExpectationFailedException - */ - public static function assertContains($needle, iterable $haystack, string $message = ''): void - { - } - public static function assertContainsEquals($needle, iterable $haystack, string $message = ''): void - { - } - /** - * Asserts that a haystack does not contain a needle. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * @throws ExpectationFailedException - */ - public static function assertNotContains($needle, iterable $haystack, string $message = ''): void - { - } - public static function assertNotContainsEquals($needle, iterable $haystack, string $message = ''): void - { - } - /** - * Asserts that a haystack contains only values of a given type. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = null, string $message = ''): void - { - } - /** - * Asserts that a haystack contains only instances of a given class name. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertContainsOnlyInstancesOf(string $className, iterable $haystack, string $message = ''): void - { - } - /** - * Asserts that a haystack does not contain only values of a given type. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertNotContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = null, string $message = ''): void - { - } - /** - * Asserts the number of elements of an array, Countable or Traversable. - * - * @param \Countable|iterable $haystack - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * @throws ExpectationFailedException - */ - public static function assertCount(int $expectedCount, $haystack, string $message = ''): void - { - } - /** - * Asserts the number of elements of an array, Countable or Traversable. - * - * @param \Countable|iterable $haystack - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * @throws ExpectationFailedException - */ - public static function assertNotCount(int $expectedCount, $haystack, string $message = ''): void - { - } - /** - * Asserts that two variables are equal. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertEquals($expected, $actual, string $message = ''): void - { - } - /** - * Asserts that two variables are equal (canonicalizing). - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertEqualsCanonicalizing($expected, $actual, string $message = ''): void - { - } - /** - * Asserts that two variables are equal (ignoring case). - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertEqualsIgnoringCase($expected, $actual, string $message = ''): void - { - } - /** - * Asserts that two variables are equal (with delta). - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertEqualsWithDelta($expected, $actual, float $delta, string $message = ''): void - { - } - /** - * Asserts that two variables are not equal. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertNotEquals($expected, $actual, string $message = ''): void - { - } - /** - * Asserts that two variables are not equal (canonicalizing). - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertNotEqualsCanonicalizing($expected, $actual, string $message = ''): void - { - } - /** - * Asserts that two variables are not equal (ignoring case). - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertNotEqualsIgnoringCase($expected, $actual, string $message = ''): void - { - } - /** - * Asserts that two variables are not equal (with delta). - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertNotEqualsWithDelta($expected, $actual, float $delta, string $message = ''): void - { - } - /** - * @throws ExpectationFailedException - */ - public static function assertObjectEquals(object $expected, object $actual, string $method = 'equals', string $message = ''): void - { - } - /** - * Asserts that a variable is empty. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert empty $actual - */ - public static function assertEmpty($actual, string $message = ''): void - { - } - /** - * Asserts that a variable is not empty. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - * - * @phan-assert !empty $actual - */ - public static function assertNotEmpty($actual, string $message = ''): void - { - } - /** - * Asserts that a value is greater than another value. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertGreaterThan($expected, $actual, string $message = ''): void - { - } - /** - * Asserts that a value is greater than or equal to another value. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertGreaterThanOrEqual($expected, $actual, string $message = ''): void - { - } - /** - * Asserts that a value is smaller than another value. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertLessThan($expected, $actual, string $message = ''): void - { - } - /** - * Asserts that a value is smaller than or equal to another value. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertLessThanOrEqual($expected, $actual, string $message = ''): void - { - } - /** - * Asserts that the contents of one file is equal to the contents of another - * file. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws ExpectationFailedException - */ - public static function assertFileEquals(string $expected, string $actual, string $message = ''): void - { - } - /** - * Asserts that the contents of one file is equal to the contents of another - * file (canonicalizing). + * Asserts that the contents of one file is equal to the contents of another + * file (canonicalizing). * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException @@ -2077,315 +1670,24 @@ public static function resetCount(): void } } /** - * @internal This class is not covered by the backward compatibility promise for PHPUnit + * Asserts that an array has a specified key. + * + * @param int|string $key + * @param array|\ArrayAccess $array + * + * @throws ExpectationFailedException + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws Exception + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @see Assert::assertArrayHasKey */ -final class WarningTestCase extends \PHPUnit\Framework\TestCase +function assertArrayHasKey($key, $array, string $message = '', ...$func_get_args): void { - public function __construct(string $message = '') - { - } - public function getMessage(): string - { - } - /** - * Returns a string representation of the test case. - */ - public function toString(): string - { - } } /** - * @template-implements \IteratorAggregate - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -class TestSuite implements \IteratorAggregate, \PHPUnit\Framework\Reorderable, \PHPUnit\Framework\SelfDescribing, \PHPUnit\Framework\Test -{ - /** - * Enable or disable the backup and restoration of the $GLOBALS array. - * - * @var bool - */ - protected $backupGlobals; - /** - * Enable or disable the backup and restoration of static attributes. - * - * @var bool - */ - protected $backupStaticAttributes; - /** - * @var bool - */ - protected $runTestInSeparateProcess = false; - /** - * The name of the test suite. - * - * @var string - */ - protected $name = ''; - /** - * The test groups of the test suite. - * - * @phan-var array> - */ - protected $groups = []; - /** - * The tests in the test suite. - * - * @var Test[] - */ - protected $tests = []; - /** - * The number of tests in the test suite. - * - * @var int - */ - protected $numTests = -1; - /** - * @var bool - */ - protected $testCase = false; - /** - * @var string[] - */ - protected $foundClasses = []; - /** - * @var null|list - */ - protected $providedTests; - /** - * @var null|list - */ - protected $requiredTests; - /** - * Constructs a new TestSuite. - * - * - PHPUnit\Framework\TestSuite() constructs an empty TestSuite. - * - * - PHPUnit\Framework\TestSuite(ReflectionClass) constructs a - * TestSuite from the given class. - * - * - PHPUnit\Framework\TestSuite(ReflectionClass, String) - * constructs a TestSuite from the given class with the given - * name. - * - * - PHPUnit\Framework\TestSuite(String) either constructs a - * TestSuite from the given class (if the passed string is the - * name of an existing class) or constructs an empty TestSuite - * with the given name. - * - * @param \ReflectionClass|string $theClass - * - * @throws Exception - */ - public function __construct($theClass = '', string $name = '') - { - } - /** - * Returns a string representation of the test suite. - */ - public function toString(): string - { - } - /** - * Adds a test to the suite. - * - * @param array $groups - */ - public function addTest(\PHPUnit\Framework\Test $test, $groups = []): void - { - } - /** - * Adds the tests from the given class to the suite. - * - * @phan-param object|class-string $testClass - * - * @throws Exception - */ - public function addTestSuite($testClass): void - { - } - public function addWarning(string $warning): void - { - } - /** - * Wraps both addTest() and addTestSuite - * as well as the separate import statements for the user's convenience. - * - * If the named file cannot be read or there are no new tests that can be - * added, a PHPUnit\Framework\WarningTestCase will be created instead, - * leaving the current test run untouched. - * - * @throws Exception - */ - public function addTestFile(string $filename): void - { - } - /** - * Wrapper for addTestFile() that adds multiple test files. - * - * @throws Exception - */ - public function addTestFiles(iterable $fileNames): void - { - } - /** - * Counts the number of test cases that will be run by this test. - * - * @todo refactor usage of numTests in DefaultResultPrinter - */ - public function count(): int - { - } - /** - * Returns the name of the suite. - */ - public function getName(): string - { - } - /** - * Returns the test groups of the suite. - * - * @phan-return list - */ - public function getGroups(): array - { - } - public function getGroupDetails(): array - { - } - /** - * Set tests groups of the test case. - */ - public function setGroupDetails(array $groups): void - { - } - /** - * Runs the tests and collects their result in a TestResult. - * - * @throws \SebastianBergmann\CodeCoverage\InvalidArgumentException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws CodeCoverageException - * @throws \SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException - * @throws Warning - */ - public function run(?\PHPUnit\Framework\TestResult $result = null): \PHPUnit\Framework\TestResult - { - } - public function setRunTestInSeparateProcess(bool $runTestInSeparateProcess): void - { - } - public function setName(string $name): void - { - } - /** - * Returns the tests as an enumeration. - * - * @return Test[] - */ - public function tests(): array - { - } - /** - * Set tests of the test suite. - * - * @param Test[] $tests - */ - public function setTests(array $tests): void - { - } - /** - * Mark the test suite as skipped. - * - * @param string $message - * - * @throws SkippedTestSuiteError - * - * @phan-return never-return - */ - public function markTestSuiteSkipped($message = ''): void - { - } - /** - * @param bool $beStrictAboutChangesToGlobalState - */ - public function setBeStrictAboutChangesToGlobalState($beStrictAboutChangesToGlobalState): void - { - } - /** - * @param bool $backupGlobals - */ - public function setBackupGlobals($backupGlobals): void - { - } - /** - * @param bool $backupStaticAttributes - */ - public function setBackupStaticAttributes($backupStaticAttributes): void - { - } - /** - * Returns an iterator for this test suite. - */ - public function getIterator(): \Iterator - { - } - public function injectFilter(\PHPUnit\Runner\Filter\Factory $filter): void - { - } - /** - * @phan-return array - */ - public function warnings(): array - { - } - /** - * @return list - */ - public function provides(): array - { - } - /** - * @return list - */ - public function requires(): array - { - } - public function sortId(): string - { - } - /** - * Creates a default TestResult object. - */ - protected function createResult(): \PHPUnit\Framework\TestResult - { - } - /** - * @throws Exception - */ - protected function addTestMethod(\ReflectionClass $class, \ReflectionMethod $method): void - { - } -} -/** - * Asserts that an array has a specified key. - * - * @param int|string $key - * @param array|\ArrayAccess $array - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertArrayHasKey - */ -function assertArrayHasKey($key, $array, string $message = '', ...$func_get_args): void -{ -} -/** - * Asserts that an array does not have a specified key. + * Asserts that an array does not have a specified key. * * @param int|string $key * @param array|\ArrayAccess $array @@ -4421,1735 +3723,2421 @@ function equalTo($value, ...$func_get_args): \PHPUnit\Framework\Constraint\IsEqu function equalToCanonicalizing($value, ...$func_get_args): \PHPUnit\Framework\Constraint\IsEqualCanonicalizing { } -function equalToIgnoringCase($value, ...$func_get_args): \PHPUnit\Framework\Constraint\IsEqualIgnoringCase +function equalToIgnoringCase($value, ...$func_get_args): \PHPUnit\Framework\Constraint\IsEqualIgnoringCase +{ +} +function equalToWithDelta($value, float $delta, ...$func_get_args): \PHPUnit\Framework\Constraint\IsEqualWithDelta +{ +} +function isEmpty(...$func_get_args): \PHPUnit\Framework\Constraint\IsEmpty +{ +} +function isWritable(...$func_get_args): \PHPUnit\Framework\Constraint\IsWritable +{ +} +function isReadable(...$func_get_args): \PHPUnit\Framework\Constraint\IsReadable +{ +} +function directoryExists(...$func_get_args): \PHPUnit\Framework\Constraint\DirectoryExists +{ +} +function fileExists(...$func_get_args): \PHPUnit\Framework\Constraint\FileExists +{ +} +function greaterThan($value, ...$func_get_args): \PHPUnit\Framework\Constraint\GreaterThan +{ +} +function greaterThanOrEqual($value, ...$func_get_args): \PHPUnit\Framework\Constraint\LogicalOr +{ +} +function classHasAttribute(string $attributeName, ...$func_get_args): \PHPUnit\Framework\Constraint\ClassHasAttribute +{ +} +function classHasStaticAttribute(string $attributeName, ...$func_get_args): \PHPUnit\Framework\Constraint\ClassHasStaticAttribute +{ +} +function objectHasAttribute($attributeName, ...$func_get_args): \PHPUnit\Framework\Constraint\ObjectHasAttribute +{ +} +function identicalTo($value, ...$func_get_args): \PHPUnit\Framework\Constraint\IsIdentical +{ +} +function isInstanceOf(string $className, ...$func_get_args): \PHPUnit\Framework\Constraint\IsInstanceOf +{ +} +function isType(string $type, ...$func_get_args): \PHPUnit\Framework\Constraint\IsType +{ +} +function lessThan($value, ...$func_get_args): \PHPUnit\Framework\Constraint\LessThan +{ +} +function lessThanOrEqual($value, ...$func_get_args): \PHPUnit\Framework\Constraint\LogicalOr +{ +} +function matchesRegularExpression(string $pattern, ...$func_get_args): \PHPUnit\Framework\Constraint\RegularExpression +{ +} +function matches(string $string, ...$func_get_args): \PHPUnit\Framework\Constraint\StringMatchesFormatDescription +{ +} +function stringStartsWith($prefix, ...$func_get_args): \PHPUnit\Framework\Constraint\StringStartsWith +{ +} +function stringContains(string $string, bool $case = true, ...$func_get_args): \PHPUnit\Framework\Constraint\StringContains +{ +} +function stringEndsWith(string $suffix, ...$func_get_args): \PHPUnit\Framework\Constraint\StringEndsWith +{ +} +function countOf(int $count, ...$func_get_args): \PHPUnit\Framework\Constraint\Count +{ +} +function objectEquals(object $object, string $method = 'equals', ...$func_get_args): \PHPUnit\Framework\Constraint\ObjectEquals +{ +} +/** + * Returns a matcher that matches when the method is executed + * zero or more times. + */ +function any(): \PHPUnit\Framework\MockObject\Rule\AnyInvokedCount +{ +} +/** + * Returns a matcher that matches when the method is never executed. + */ +function never(): \PHPUnit\Framework\MockObject\Rule\InvokedCount +{ +} +/** + * Returns a matcher that matches when the method is executed + * at least N times. + */ +function atLeast(int $requiredInvocations): \PHPUnit\Framework\MockObject\Rule\InvokedAtLeastCount +{ +} +/** + * Returns a matcher that matches when the method is executed at least once. + */ +function atLeastOnce(): \PHPUnit\Framework\MockObject\Rule\InvokedAtLeastOnce +{ +} +/** + * Returns a matcher that matches when the method is executed exactly once. + */ +function once(): \PHPUnit\Framework\MockObject\Rule\InvokedCount +{ +} +/** + * Returns a matcher that matches when the method is executed + * exactly $count times. + */ +function exactly(int $count): \PHPUnit\Framework\MockObject\Rule\InvokedCount +{ +} +/** + * Returns a matcher that matches when the method is executed + * at most N times. + */ +function atMost(int $allowedInvocations): \PHPUnit\Framework\MockObject\Rule\InvokedAtMostCount +{ +} +/** + * Returns a matcher that matches when the method is executed + * at the given index. + */ +function at(int $index): \PHPUnit\Framework\MockObject\Rule\InvokedAtIndex +{ +} +function returnValue($value): \PHPUnit\Framework\MockObject\Stub\ReturnStub +{ +} +function returnValueMap(array $valueMap): \PHPUnit\Framework\MockObject\Stub\ReturnValueMap +{ +} +function returnArgument(int $argumentIndex): \PHPUnit\Framework\MockObject\Stub\ReturnArgument +{ +} +function returnCallback($callback): \PHPUnit\Framework\MockObject\Stub\ReturnCallback +{ +} +/** + * Returns the current object. + * + * This method is useful when mocking a fluent interface. + */ +function returnSelf(): \PHPUnit\Framework\MockObject\Stub\ReturnSelf +{ +} +function throwException(\Throwable $exception): \PHPUnit\Framework\MockObject\Stub\Exception +{ +} +function onConsecutiveCalls(...$func_get_args): \PHPUnit\Framework\MockObject\Stub\ConsecutiveCalls +{ +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class DataProviderTestSuite extends \PHPUnit\Framework\TestSuite +{ + /** + * @param list $dependencies + */ + public function setDependencies(array $dependencies): void + { + } + /** + * @return list + */ + public function provides(): array + { + } + /** + * @return list + */ + public function requires(): array + { + } + /** + * Returns the size of the each test created using the data provider(s). + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + */ + public function getSize(): int + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class ErrorTestCase extends \PHPUnit\Framework\TestCase +{ + public function __construct(string $message = '') + { + } + public function getMessage(): string + { + } + /** + * Returns a string representation of the test case. + */ + public function toString(): string + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class ActualValueIsNotAnObjectException extends \PHPUnit\Framework\Exception { + public function __construct() + { + } + public function __toString(): string + { + } } -function equalToWithDelta($value, float $delta, ...$func_get_args): \PHPUnit\Framework\Constraint\IsEqualWithDelta +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +class AssertionFailedError extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\SelfDescribing { + /** + * Wrapper for getMessage() which is declared as final. + */ + public function toString(): string + { + } } -function isEmpty(...$func_get_args): \PHPUnit\Framework\Constraint\IsEmpty +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +class CodeCoverageException extends \PHPUnit\Framework\Exception { } -function isWritable(...$func_get_args): \PHPUnit\Framework\Constraint\IsWritable +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class ComparisonMethodDoesNotAcceptParameterTypeException extends \PHPUnit\Framework\Exception { + public function __construct(string $className, string $methodName, string $type) + { + } + public function __toString(): string + { + } } -function isReadable(...$func_get_args): \PHPUnit\Framework\Constraint\IsReadable +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class ComparisonMethodDoesNotDeclareBoolReturnTypeException extends \PHPUnit\Framework\Exception { + public function __construct(string $className, string $methodName) + { + } + public function __toString(): string + { + } } -function directoryExists(...$func_get_args): \PHPUnit\Framework\Constraint\DirectoryExists +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class ComparisonMethodDoesNotDeclareExactlyOneParameterException extends \PHPUnit\Framework\Exception { + public function __construct(string $className, string $methodName) + { + } + public function __toString(): string + { + } } -function fileExists(...$func_get_args): \PHPUnit\Framework\Constraint\FileExists +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class ComparisonMethodDoesNotDeclareParameterTypeException extends \PHPUnit\Framework\Exception { + public function __construct(string $className, string $methodName) + { + } + public function __toString(): string + { + } } -function greaterThan($value, ...$func_get_args): \PHPUnit\Framework\Constraint\GreaterThan +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class ComparisonMethodDoesNotExistException extends \PHPUnit\Framework\Exception { + public function __construct(string $className, string $methodName) + { + } + public function __toString(): string + { + } } -function greaterThanOrEqual($value, ...$func_get_args): \PHPUnit\Framework\Constraint\LogicalOr +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class CoveredCodeNotExecutedException extends \PHPUnit\Framework\RiskyTestError { } -function classHasAttribute(string $attributeName, ...$func_get_args): \PHPUnit\Framework\Constraint\ClassHasAttribute +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class Error extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\SelfDescribing { + /** + * Wrapper for getMessage() which is declared as final. + */ + public function toString(): string + { + } } -function classHasStaticAttribute(string $attributeName, ...$func_get_args): \PHPUnit\Framework\Constraint\ClassHasStaticAttribute +/** + * Base class for all PHPUnit Framework exceptions. + * + * Ensures that exceptions thrown during a test run do not leave stray + * references behind. + * + * Every Exception contains a stack trace. Each stack frame contains the 'args' + * of the called function. The function arguments can contain references to + * instantiated objects. The references prevent the objects from being + * destructed (until test results are eventually printed), so memory cannot be + * freed up. + * + * With enabled process isolation, test results are serialized in the child + * process and unserialized in the parent process. The stack trace of Exceptions + * may contain objects that cannot be serialized or unserialized (e.g., PDO + * connections). Unserializing user-space objects from the child process into + * the parent would break the intended encapsulation of process isolation. + * + * @see http://fabien.potencier.org/article/9/php-serialization-stack-traces-and-exceptions + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +class Exception extends \RuntimeException implements \PHPUnit\Exception { + /** + * @var array + */ + protected $serializableTrace; + public function __construct($message = '', $code = 0, ?\Throwable $previous = null) + { + } + public function __toString(): string + { + } + public function __sleep(): array + { + } + /** + * Returns the serializable trace (without 'args'). + */ + public function getSerializableTrace(): array + { + } } -function objectHasAttribute($attributeName, ...$func_get_args): \PHPUnit\Framework\Constraint\ObjectHasAttribute +/** + * Exception for expectations which failed their check. + * + * The exception contains the error message and optionally a + * SebastianBergmann\Comparator\ComparisonFailure which is used to + * generate diff output of the failed expectations. + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class ExpectationFailedException extends \PHPUnit\Framework\AssertionFailedError { + public function __construct(string $message, ?\SebastianBergmann\Comparator\ComparisonFailure $comparisonFailure = null, ?\Exception $previous = null) + { + } + public function getComparisonFailure(): ?\SebastianBergmann\Comparator\ComparisonFailure + { + } } -function identicalTo($value, ...$func_get_args): \PHPUnit\Framework\Constraint\IsIdentical +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class IncompleteTestError extends \PHPUnit\Framework\AssertionFailedError implements \PHPUnit\Framework\IncompleteTest { } -function isInstanceOf(string $className, ...$func_get_args): \PHPUnit\Framework\Constraint\IsInstanceOf +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class InvalidArgumentException extends \PHPUnit\Framework\Exception { + public static function create(int $argument, string $type): self + { + } } -function isType(string $type, ...$func_get_args): \PHPUnit\Framework\Constraint\IsType +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class InvalidCoversTargetException extends \PHPUnit\Framework\CodeCoverageException { } -function lessThan($value, ...$func_get_args): \PHPUnit\Framework\Constraint\LessThan +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class InvalidDataProviderException extends \PHPUnit\Framework\Exception { } -function lessThanOrEqual($value, ...$func_get_args): \PHPUnit\Framework\Constraint\LogicalOr +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class MissingCoversAnnotationException extends \PHPUnit\Framework\RiskyTestError { } -function matchesRegularExpression(string $pattern, ...$func_get_args): \PHPUnit\Framework\Constraint\RegularExpression +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class NoChildTestSuiteException extends \PHPUnit\Framework\Exception { } -function matches(string $string, ...$func_get_args): \PHPUnit\Framework\Constraint\StringMatchesFormatDescription +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class OutputError extends \PHPUnit\Framework\AssertionFailedError { } -function stringStartsWith($prefix, ...$func_get_args): \PHPUnit\Framework\Constraint\StringStartsWith +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class PHPTAssertionFailedError extends \PHPUnit\Framework\SyntheticError { + public function __construct(string $message, int $code, string $file, int $line, array $trace, string $diff) + { + } + public function getDiff(): string + { + } } -function stringContains(string $string, bool $case = true, ...$func_get_args): \PHPUnit\Framework\Constraint\StringContains +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +class RiskyTestError extends \PHPUnit\Framework\AssertionFailedError { } -function stringEndsWith(string $suffix, ...$func_get_args): \PHPUnit\Framework\Constraint\StringEndsWith +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class SkippedTestError extends \PHPUnit\Framework\AssertionFailedError implements \PHPUnit\Framework\SkippedTest { } -function countOf(int $count, ...$func_get_args): \PHPUnit\Framework\Constraint\Count +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class SkippedTestSuiteError extends \PHPUnit\Framework\AssertionFailedError implements \PHPUnit\Framework\SkippedTest { } -function objectEquals(object $object, string $method = 'equals', ...$func_get_args): \PHPUnit\Framework\Constraint\ObjectEquals +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +class SyntheticError extends \PHPUnit\Framework\AssertionFailedError { + /** + * The synthetic file. + * + * @var string + */ + protected $syntheticFile = ''; + /** + * The synthetic line number. + * + * @var int + */ + protected $syntheticLine = 0; + /** + * The synthetic trace. + * + * @var array + */ + protected $syntheticTrace = []; + public function __construct(string $message, int $code, string $file, int $line, array $trace) + { + } + public function getSyntheticFile(): string + { + } + public function getSyntheticLine(): int + { + } + public function getSyntheticTrace(): array + { + } } /** - * Returns a matcher that matches when the method is executed - * zero or more times. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -function any(): \PHPUnit\Framework\MockObject\Rule\AnyInvokedCount +final class SyntheticSkippedError extends \PHPUnit\Framework\SyntheticError implements \PHPUnit\Framework\SkippedTest { } /** - * Returns a matcher that matches when the method is never executed. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -function never(): \PHPUnit\Framework\MockObject\Rule\InvokedCount +final class UnintentionallyCoveredCodeError extends \PHPUnit\Framework\RiskyTestError { } /** - * Returns a matcher that matches when the method is executed - * at least N times. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -function atLeast(int $requiredInvocations): \PHPUnit\Framework\MockObject\Rule\InvokedAtLeastCount +final class Warning extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\SelfDescribing { + /** + * Wrapper for getMessage() which is declared as final. + */ + public function toString(): string + { + } } /** - * Returns a matcher that matches when the method is executed at least once. + * Wraps Exceptions thrown by code under test. + * + * Re-instantiates Exceptions thrown by user-space code to retain their original + * class names, properties, and stack traces (but without arguments). + * + * Unlike PHPUnit\Framework\Exception, the complete stack of previous Exceptions + * is processed. + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -function atLeastOnce(): \PHPUnit\Framework\MockObject\Rule\InvokedAtLeastOnce +final class ExceptionWrapper extends \PHPUnit\Framework\Exception { + public function __construct(\Throwable $t) + { + } + public function __toString(): string + { + } + public function getClassName(): string + { + } + public function getPreviousWrapped(): ?self + { + } + public function setClassName(string $className): void + { + } + public function setOriginalException(\Throwable $t): void + { + } + public function getOriginalException(): ?\Throwable + { + } } /** - * Returns a matcher that matches when the method is executed exactly once. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -function once(): \PHPUnit\Framework\MockObject\Rule\InvokedCount +final class ExecutionOrderDependency { + public static function createFromDependsAnnotation(string $className, string $annotation): self + { + } + /** + * @phan-param list $dependencies + * + * @phan-return list + */ + public static function filterInvalid(array $dependencies): array + { + } + /** + * @phan-param list $existing + * @phan-param list $additional + * + * @phan-return list + */ + public static function mergeUnique(array $existing, array $additional): array + { + } + /** + * @phan-param list $left + * @phan-param list $right + * + * @phan-return list + */ + public static function diff(array $left, array $right): array + { + } + public function __construct(string $classOrCallableName, ?string $methodName = null, ?string $option = null) + { + } + public function __toString(): string + { + } + public function isValid(): bool + { + } + public function useShallowClone(): bool + { + } + public function useDeepClone(): bool + { + } + public function targetIsClass(): bool + { + } + public function getTarget(): string + { + } + public function getTargetClassName(): string + { + } } /** - * Returns a matcher that matches when the method is executed - * exactly $count times. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -function exactly(int $count): \PHPUnit\Framework\MockObject\Rule\InvokedCount +interface IncompleteTest extends \Throwable { } /** - * Returns a matcher that matches when the method is executed - * at most N times. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -function atMost(int $allowedInvocations): \PHPUnit\Framework\MockObject\Rule\InvokedAtMostCount +final class IncompleteTestCase extends \PHPUnit\Framework\TestCase { + public function __construct(string $className, string $methodName, string $message = '') + { + } + public function getMessage(): string + { + } + /** + * Returns a string representation of the test case. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + */ + public function toString(): string + { + } } /** - * Returns a matcher that matches when the method is executed - * at the given index. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -function at(int $index): \PHPUnit\Framework\MockObject\Rule\InvokedAtIndex -{ -} -function returnValue($value): \PHPUnit\Framework\MockObject\Stub\ReturnStub +final class InvalidParameterGroupException extends \PHPUnit\Framework\Exception { } -function returnValueMap(array $valueMap): \PHPUnit\Framework\MockObject\Stub\ReturnValueMap +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +interface Reorderable { + public function sortId(): string; + /** + * @return list + */ + public function provides(): array; + /** + * @return list + */ + public function requires(): array; } -function returnArgument(int $argumentIndex): \PHPUnit\Framework\MockObject\Stub\ReturnArgument +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +interface SelfDescribing { + /** + * Returns a string representation of the object. + */ + public function toString(): string; } -function returnCallback($callback): \PHPUnit\Framework\MockObject\Stub\ReturnCallback +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +interface SkippedTest extends \Throwable { } /** - * Returns the current object. - * - * This method is useful when mocking a fluent interface. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -function returnSelf(): \PHPUnit\Framework\MockObject\Stub\ReturnSelf +final class SkippedTestCase extends \PHPUnit\Framework\TestCase { + public function __construct(string $className, string $methodName, string $message = '') + { + } + public function getMessage(): string + { + } + /** + * Returns a string representation of the test case. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + */ + public function toString(): string + { + } } -function throwException(\Throwable $exception): \PHPUnit\Framework\MockObject\Stub\Exception +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +interface Test extends \Countable { + /** + * Runs a test and collects its result in a TestResult instance. + */ + public function run(?\PHPUnit\Framework\TestResult $result = null): \PHPUnit\Framework\TestResult; } -function onConsecutiveCalls(...$func_get_args): \PHPUnit\Framework\MockObject\Stub\ConsecutiveCalls +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class TestBuilder { + public function build(\ReflectionClass $theClass, string $methodName): \PHPUnit\Framework\Test + { + } } /** - * @internal This class is not covered by the backward compatibility promise for PHPUnit + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class TestFailure +abstract class TestCase extends \PHPUnit\Framework\Assert implements \PHPUnit\Framework\Reorderable, \PHPUnit\Framework\SelfDescribing, \PHPUnit\Framework\Test { /** - * Returns a description for an exception. + * @var ?bool + */ + protected $backupGlobals; + /** + * @var string[] + */ + protected $backupGlobalsExcludeList = []; + /** + * @var string[] + * + * @deprecated Use $backupGlobalsExcludeList instead + */ + protected $backupGlobalsBlacklist = []; + /** + * @var ?bool + */ + protected $backupStaticAttributes; + /** + * @var array> + */ + protected $backupStaticAttributesExcludeList = []; + /** + * @var array> + * + * @deprecated Use $backupStaticAttributesExcludeList instead + */ + protected $backupStaticAttributesBlacklist = []; + /** + * @var ?bool + */ + protected $runTestInSeparateProcess; + /** + * @var bool + */ + protected $preserveGlobalState = true; + /** + * @var list + */ + protected $providedTests = []; + /** + * Returns a matcher that matches when the method is executed + * zero or more times. */ - public static function exceptionToString(\Throwable $e): string + public static function any(): \PHPUnit\Framework\MockObject\Rule\AnyInvokedCount { } /** - * Constructs a TestFailure with the given test and exception. + * Returns a matcher that matches when the method is never executed. */ - public function __construct(\PHPUnit\Framework\Test $failedTest, \Throwable $t) + public static function never(): \PHPUnit\Framework\MockObject\Rule\InvokedCount { } /** - * Returns a short description of the failure. + * Returns a matcher that matches when the method is executed + * at least N times. */ - public function toString(): string + public static function atLeast(int $requiredInvocations): \PHPUnit\Framework\MockObject\Rule\InvokedAtLeastCount { } /** - * Returns a description for the thrown exception. + * Returns a matcher that matches when the method is executed at least once. */ - public function getExceptionAsString(): string + public static function atLeastOnce(): \PHPUnit\Framework\MockObject\Rule\InvokedAtLeastOnce { } /** - * Returns the name of the failing test (including data set, if any). + * Returns a matcher that matches when the method is executed exactly once. */ - public function getTestName(): string + public static function once(): \PHPUnit\Framework\MockObject\Rule\InvokedCount { } /** - * Returns the failing test. - * - * Note: The test object is not set when the test is executed in process - * isolation. - * - * @see Exception + * Returns a matcher that matches when the method is executed + * exactly $count times. */ - public function failedTest(): ?\PHPUnit\Framework\Test + public static function exactly(int $count): \PHPUnit\Framework\MockObject\Rule\InvokedCount { } /** - * Gets the thrown exception. + * Returns a matcher that matches when the method is executed + * at most N times. */ - public function thrownException(): \Throwable + public static function atMost(int $allowedInvocations): \PHPUnit\Framework\MockObject\Rule\InvokedAtMostCount { } /** - * Returns the exception's message. + * Returns a matcher that matches when the method is executed + * at the given index. + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4297 + * + * @codeCoverageIgnore */ - public function exceptionMessage(): string + public static function at(int $index): \PHPUnit\Framework\MockObject\Rule\InvokedAtIndex + { + } + public static function returnValue($value): \PHPUnit\Framework\MockObject\Stub\ReturnStub + { + } + public static function returnValueMap(array $valueMap): \PHPUnit\Framework\MockObject\Stub\ReturnValueMap + { + } + public static function returnArgument(int $argumentIndex): \PHPUnit\Framework\MockObject\Stub\ReturnArgument + { + } + public static function returnCallback($callback): \PHPUnit\Framework\MockObject\Stub\ReturnCallback { } /** - * Returns true if the thrown exception - * is of type AssertionFailedError. + * Returns the current object. + * + * This method is useful when mocking a fluent interface. */ - public function isFailure(): bool + public static function returnSelf(): \PHPUnit\Framework\MockObject\Stub\ReturnSelf { } -} -/** - * This interface, as well as the associated mechanism for extending PHPUnit, - * will be removed in PHPUnit 10. There is no alternative available in this - * version of PHPUnit. - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @deprecated - * @see https://github.com/sebastianbergmann/phpunit/issues/4676 - */ -interface TestListener -{ - public function addError(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void; - public function addWarning(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\Warning $e, float $time): void; - public function addFailure(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\AssertionFailedError $e, float $time): void; - public function addIncompleteTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void; - public function addRiskyTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void; - public function addSkippedTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void; - public function startTestSuite(\PHPUnit\Framework\TestSuite $suite): void; - public function endTestSuite(\PHPUnit\Framework\TestSuite $suite): void; - public function startTest(\PHPUnit\Framework\Test $test): void; - public function endTest(\PHPUnit\Framework\Test $test, float $time): void; -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvalidParameterGroupException extends \PHPUnit\Framework\Exception -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ErrorTestCase extends \PHPUnit\Framework\TestCase -{ - public function __construct(string $message = '') + public static function throwException(\Throwable $exception): \PHPUnit\Framework\MockObject\Stub\Exception { } - public function getMessage(): string + public static function onConsecutiveCalls(...$args): \PHPUnit\Framework\MockObject\Stub\ConsecutiveCalls { } /** - * Returns a string representation of the test case. + * @param int|string $dataName + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit */ - public function toString(): string + public function __construct(?string $name = null, array $data = [], $dataName = '') { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ExecutionOrderDependency -{ - public static function createFromDependsAnnotation(string $className, string $annotation): self + /** + * This method is called before the first test of this test class is run. + */ + public static function setUpBeforeClass(): void { } /** - * @phan-param list $dependencies + * This method is called after the last test of this test class is run. + */ + public static function tearDownAfterClass(): void + { + } + /** + * This method is called before each test. + */ + protected function setUp(): void + { + } + /** + * Performs assertions shared by all tests of a test case. * - * @phan-return list + * This method is called between setUp() and test. */ - public static function filterInvalid(array $dependencies): array + protected function assertPreConditions(): void { } /** - * @phan-param list $existing - * @phan-param list $additional + * Performs assertions shared by all tests of a test case. * - * @phan-return list + * This method is called between test and tearDown(). */ - public static function mergeUnique(array $existing, array $additional): array + protected function assertPostConditions(): void { } /** - * @phan-param list $left - * @phan-param list $right + * This method is called after each test. + */ + protected function tearDown(): void + { + } + /** + * Returns a string representation of the test case. * - * @phan-return list + * @throws Exception + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ - public static function diff(array $left, array $right): array + public function toString(): string { } - public function __construct(string $classOrCallableName, ?string $methodName = null, ?string $option = null) + public function count(): int { } - public function __toString(): string + public function getActualOutputForAssertion(): string { } - public function isValid(): bool + public function expectOutputRegex(string $expectedRegex): void { } - public function useShallowClone(): bool + public function expectOutputString(string $expectedString): void { } - public function useDeepClone(): bool + /** + * @phan-param class-string<\Throwable> $exception + */ + public function expectException(string $exception): void { } - public function targetIsClass(): bool + /** + * @param int|string $code + */ + public function expectExceptionCode($code): void { } - public function getTarget(): string + public function expectExceptionMessage(string $message): void { } - public function getTargetClassName(): string + public function expectExceptionMessageMatches(string $regularExpression): void { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface SkippedTest extends \Throwable -{ -} -/** - * @deprecated The `TestListener` interface is deprecated - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -trait TestListenerDefaultImplementation -{ - public function addError(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void + /** + * Sets up an expectation for an exception to be raised by the code under test. + * Information for expected exception class, expected exception message, and + * expected exception code are retrieved from a given Exception object. + */ + public function expectExceptionObject(\Exception $exception): void { } - public function addWarning(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\Warning $e, float $time): void + public function expectNotToPerformAssertions(): void + { + } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ + public function expectDeprecation(): void + { + } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ + public function expectDeprecationMessage(string $message): void + { + } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ + public function expectDeprecationMessageMatches(string $regularExpression): void + { + } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ + public function expectNotice(): void + { + } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ + public function expectNoticeMessage(string $message): void + { + } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ + public function expectNoticeMessageMatches(string $regularExpression): void + { + } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ + public function expectWarning(): void + { + } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ + public function expectWarningMessage(string $message): void { } - public function addFailure(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\AssertionFailedError $e, float $time): void + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ + public function expectWarningMessageMatches(string $regularExpression): void { } - public function addIncompleteTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ + public function expectError(): void { } - public function addRiskyTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ + public function expectErrorMessage(string $message): void { } - public function addSkippedTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ + public function expectErrorMessageMatches(string $regularExpression): void { } - public function startTestSuite(\PHPUnit\Framework\TestSuite $suite): void + public function getStatus(): int { } - public function endTestSuite(\PHPUnit\Framework\TestSuite $suite): void + public function markAsRisky(): void { } - public function startTest(\PHPUnit\Framework\Test $test): void + public function getStatusMessage(): string { } - public function endTest(\PHPUnit\Framework\Test $test, float $time): void + public function hasFailed(): bool { } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -abstract class TestCase extends \PHPUnit\Framework\Assert implements \PHPUnit\Framework\Reorderable, \PHPUnit\Framework\SelfDescribing, \PHPUnit\Framework\Test -{ - /** - * @var ?bool - */ - protected $backupGlobals; - /** - * @var string[] - */ - protected $backupGlobalsExcludeList = []; /** - * @var string[] + * Runs the test case and collects the results in a TestResult object. + * If no TestResult object is passed a new one will be created. * - * @deprecated Use $backupGlobalsExcludeList instead - */ - protected $backupGlobalsBlacklist = []; - /** - * @var ?bool - */ - protected $backupStaticAttributes; - /** - * @var array> + * @throws \SebastianBergmann\CodeCoverage\InvalidArgumentException + * @throws CodeCoverageException + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws \SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException + * @throws \PHPUnit\Util\Exception */ - protected $backupStaticAttributesExcludeList = []; + public function run(?\PHPUnit\Framework\TestResult $result = null): \PHPUnit\Framework\TestResult + { + } /** - * @var array> + * Returns a builder object to create mock objects using a fluent interface. * - * @deprecated Use $backupStaticAttributesExcludeList instead - */ - protected $backupStaticAttributesBlacklist = []; - /** - * @var ?bool - */ - protected $runTestInSeparateProcess; - /** - * @var bool - */ - protected $preserveGlobalState = true; - /** - * @var list - */ - protected $providedTests = []; - /** - * Returns a matcher that matches when the method is executed - * zero or more times. + * @phan-template RealInstanceType of object + * + * @phan-param class-string $className + * + * @phan-return MockObject\MockBuilder */ - public static function any(): \PHPUnit\Framework\MockObject\Rule\AnyInvokedCount + public function getMockBuilder(string $className): \PHPUnit\Framework\MockObject\MockBuilder { } - /** - * Returns a matcher that matches when the method is never executed. - */ - public static function never(): \PHPUnit\Framework\MockObject\Rule\InvokedCount + public function registerComparator(\SebastianBergmann\Comparator\Comparator $comparator): void { } /** - * Returns a matcher that matches when the method is executed - * at least N times. + * @return string[] + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit */ - public static function atLeast(int $requiredInvocations): \PHPUnit\Framework\MockObject\Rule\InvokedAtLeastCount + public function doubledTypes(): array { } /** - * Returns a matcher that matches when the method is executed at least once. + * @internal This method is not covered by the backward compatibility promise for PHPUnit */ - public static function atLeastOnce(): \PHPUnit\Framework\MockObject\Rule\InvokedAtLeastOnce + public function getGroups(): array { } /** - * Returns a matcher that matches when the method is executed exactly once. + * @internal This method is not covered by the backward compatibility promise for PHPUnit */ - public static function once(): \PHPUnit\Framework\MockObject\Rule\InvokedCount + public function setGroups(array $groups): void { } /** - * Returns a matcher that matches when the method is executed - * exactly $count times. + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit */ - public static function exactly(int $count): \PHPUnit\Framework\MockObject\Rule\InvokedCount + public function getName(bool $withDataSet = true): string { } /** - * Returns a matcher that matches when the method is executed - * at most N times. + * Returns the size of the test. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit */ - public static function atMost(int $allowedInvocations): \PHPUnit\Framework\MockObject\Rule\InvokedAtMostCount + public function getSize(): int { } /** - * Returns a matcher that matches when the method is executed - * at the given index. - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4297 + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * - * @codeCoverageIgnore + * @internal This method is not covered by the backward compatibility promise for PHPUnit */ - public static function at(int $index): \PHPUnit\Framework\MockObject\Rule\InvokedAtIndex + public function hasSize(): bool { } - public static function returnValue($value): \PHPUnit\Framework\MockObject\Stub\ReturnStub + /** + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function isSmall(): bool { } - public static function returnValueMap(array $valueMap): \PHPUnit\Framework\MockObject\Stub\ReturnValueMap + /** + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function isMedium(): bool { } - public static function returnArgument(int $argumentIndex): \PHPUnit\Framework\MockObject\Stub\ReturnArgument + /** + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function isLarge(): bool { } - public static function returnCallback($callback): \PHPUnit\Framework\MockObject\Stub\ReturnCallback + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function getActualOutput(): string { } /** - * Returns the current object. - * - * This method is useful when mocking a fluent interface. + * @internal This method is not covered by the backward compatibility promise for PHPUnit */ - public static function returnSelf(): \PHPUnit\Framework\MockObject\Stub\ReturnSelf + public function hasOutput(): bool { } - public static function throwException(\Throwable $exception): \PHPUnit\Framework\MockObject\Stub\Exception + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function doesNotPerformAssertions(): bool { } - public static function onConsecutiveCalls(...$args): \PHPUnit\Framework\MockObject\Stub\ConsecutiveCalls + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function hasExpectationOnOutput(): bool { } /** - * @param int|string $dataName - * * @internal This method is not covered by the backward compatibility promise for PHPUnit */ - public function __construct(?string $name = null, array $data = [], $dataName = '') + public function getExpectedException(): ?string { } /** - * This method is called before the first test of this test class is run. + * @return null|int|string + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit */ - public static function setUpBeforeClass(): void + public function getExpectedExceptionCode() { } /** - * This method is called after the last test of this test class is run. + * @internal This method is not covered by the backward compatibility promise for PHPUnit */ - public static function tearDownAfterClass(): void + public function getExpectedExceptionMessage(): ?string { } /** - * This method is called before each test. + * @internal This method is not covered by the backward compatibility promise for PHPUnit */ - protected function setUp(): void + public function getExpectedExceptionMessageRegExp(): ?string { } /** - * Performs assertions shared by all tests of a test case. - * - * This method is called between setUp() and test. + * @internal This method is not covered by the backward compatibility promise for PHPUnit */ - protected function assertPreConditions(): void + public function setRegisterMockObjectsFromTestArgumentsRecursively(bool $flag): void { } /** - * Performs assertions shared by all tests of a test case. + * @throws \Throwable * - * This method is called between test and tearDown(). + * @internal This method is not covered by the backward compatibility promise for PHPUnit */ - protected function assertPostConditions(): void + public function runBare(): void { } /** - * This method is called after each test. + * @internal This method is not covered by the backward compatibility promise for PHPUnit */ - protected function tearDown(): void + public function setName(string $name): void { } /** - * Returns a string representation of the test case. + * @param list $dependencies * - * @throws Exception - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @internal This method is not covered by the backward compatibility promise for PHPUnit */ - public function toString(): string + public function setDependencies(array $dependencies): void { } - public function count(): int + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function setDependencyInput(array $dependencyInput): void { } - public function getActualOutputForAssertion(): string + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function setBeStrictAboutChangesToGlobalState(?bool $beStrictAboutChangesToGlobalState): void { } - public function expectOutputRegex(string $expectedRegex): void + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function setBackupGlobals(?bool $backupGlobals): void { } - public function expectOutputString(string $expectedString): void + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function setBackupStaticAttributes(?bool $backupStaticAttributes): void { } /** - * @phan-param class-string<\Throwable> $exception + * @internal This method is not covered by the backward compatibility promise for PHPUnit */ - public function expectException(string $exception): void + public function setRunTestInSeparateProcess(bool $runTestInSeparateProcess): void { } /** - * @param int|string $code + * @internal This method is not covered by the backward compatibility promise for PHPUnit */ - public function expectExceptionCode($code): void + public function setRunClassInSeparateProcess(bool $runClassInSeparateProcess): void { } - public function expectExceptionMessage(string $message): void + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function setPreserveGlobalState(bool $preserveGlobalState): void { } - public function expectExceptionMessageMatches(string $regularExpression): void + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function setInIsolation(bool $inIsolation): void { } /** - * Sets up an expectation for an exception to be raised by the code under test. - * Information for expected exception class, expected exception message, and - * expected exception code are retrieved from a given Exception object. + * @internal This method is not covered by the backward compatibility promise for PHPUnit */ - public function expectExceptionObject(\Exception $exception): void + public function isInIsolation(): bool { } - public function expectNotToPerformAssertions(): void + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function getResult() { } /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + * @internal This method is not covered by the backward compatibility promise for PHPUnit */ - public function expectDeprecation(): void + public function setResult($result): void { } /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + * @internal This method is not covered by the backward compatibility promise for PHPUnit */ - public function expectDeprecationMessage(string $message): void + public function setOutputCallback(callable $callback): void { } /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + * @internal This method is not covered by the backward compatibility promise for PHPUnit */ - public function expectDeprecationMessageMatches(string $regularExpression): void + public function getTestResultObject(): ?\PHPUnit\Framework\TestResult { } /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + * @internal This method is not covered by the backward compatibility promise for PHPUnit */ - public function expectNotice(): void + public function setTestResultObject(\PHPUnit\Framework\TestResult $result): void { } /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + * @internal This method is not covered by the backward compatibility promise for PHPUnit */ - public function expectNoticeMessage(string $message): void + public function registerMockObject(\PHPUnit\Framework\MockObject\MockObject $mockObject): void { } /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + * @internal This method is not covered by the backward compatibility promise for PHPUnit */ - public function expectNoticeMessageMatches(string $regularExpression): void + public function addToAssertionCount(int $count): void { } /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + * Returns the number of assertions performed by this test. + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit */ - public function expectWarning(): void + public function getNumAssertions(): int { } /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + * @internal This method is not covered by the backward compatibility promise for PHPUnit */ - public function expectWarningMessage(string $message): void + public function usesDataProvider(): bool { } /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + * @return int|string + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit */ - public function expectWarningMessageMatches(string $regularExpression): void + public function dataName() { } /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + * @internal This method is not covered by the backward compatibility promise for PHPUnit */ - public function expectError(): void + public function getDataSetAsString(bool $includeData = true): string { } /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + * Gets the data set of a TestCase. + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit */ - public function expectErrorMessage(string $message): void + public function getProvidedData(): array { } /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + * @internal This method is not covered by the backward compatibility promise for PHPUnit */ - public function expectErrorMessageMatches(string $regularExpression): void + public function addWarning(string $warning): void { } - public function getStatus(): int + public function sortId(): string { } - public function markAsRisky(): void + /** + * Returns the normalized test name as class::method. + * + * @return list + */ + public function provides(): array { } - public function getStatusMessage(): string + /** + * Returns a list of normalized dependency names, class::method. + * + * This list can differ from the raw dependencies as the resolver has + * no need for the [!][shallow]clone prefix that is filtered out + * during normalization. + * + * @return list + */ + public function requires(): array { } - public function hasFailed(): bool + /** + * Override to run the test and assert its state. + * + * @throws \SebastianBergmann\ObjectEnumerator\InvalidArgumentException + * @throws AssertionFailedError + * @throws Exception + * @throws ExpectationFailedException + * @throws \Throwable + */ + protected function runTest() { } /** - * Runs the test case and collects the results in a TestResult object. - * If no TestResult object is passed a new one will be created. + * This method is a wrapper for the ini_set() function that automatically + * resets the modified php.ini setting to its original value after the + * test is run. * - * @throws \SebastianBergmann\CodeCoverage\InvalidArgumentException - * @throws CodeCoverageException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws \SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException - * @throws \PHPUnit\Util\Exception + * @throws Exception */ - public function run(?\PHPUnit\Framework\TestResult $result = null): \PHPUnit\Framework\TestResult + protected function iniSet(string $varName, string $newValue): void { } /** - * Returns a builder object to create mock objects using a fluent interface. + * This method is a wrapper for the setlocale() function that automatically + * resets the locale to its original value after the test is run. + * + * @throws Exception + */ + protected function setLocale(...$args): void + { + } + /** + * Makes configurable stub for the specified class. * * @phan-template RealInstanceType of object * - * @phan-param class-string $className + * @phan-param class-string $originalClassName * - * @phan-return MockObject\MockBuilder + * @phan-return MockObject\Stub&RealInstanceType */ - public function getMockBuilder(string $className): \PHPUnit\Framework\MockObject\MockBuilder - { - } - public function registerComparator(\SebastianBergmann\Comparator\Comparator $comparator): void + protected function createStub(string $originalClassName): \PHPUnit\Framework\MockObject\Stub { } /** - * @return string[] + * Returns a mock object for the specified class. * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @phan-template RealInstanceType of object + * + * @phan-param class-string $originalClassName + * + * @phan-return MockObject\MockObject&RealInstanceType */ - public function doubledTypes(): array + protected function createMock(string $originalClassName): \PHPUnit\Framework\MockObject\MockObject { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Returns a configured mock object for the specified class. + * + * @phan-template RealInstanceType of object + * + * @phan-param class-string $originalClassName + * + * @phan-return MockObject\MockObject&RealInstanceType */ - public function getGroups(): array + protected function createConfiguredMock(string $originalClassName, array $configuration): \PHPUnit\Framework\MockObject\MockObject { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Returns a partial mock object for the specified class. + * + * @param string[] $methods + * + * @phan-template RealInstanceType of object + * + * @phan-param class-string $originalClassName + * + * @phan-return MockObject\MockObject&RealInstanceType */ - public function setGroups(array $groups): void + protected function createPartialMock(string $originalClassName, array $methods): \PHPUnit\Framework\MockObject\MockObject { } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * Returns a test proxy for the specified class. * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @phan-template RealInstanceType of object + * + * @phan-param class-string $originalClassName + * + * @phan-return MockObject\MockObject&RealInstanceType */ - public function getName(bool $withDataSet = true): string + protected function createTestProxy(string $originalClassName, array $constructorArguments = []): \PHPUnit\Framework\MockObject\MockObject { } /** - * Returns the size of the test. + * Mocks the specified class and returns the name of the mocked class. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @param null|array $methods $methods * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @phan-template RealInstanceType of object + * + * @phan-param class-string|string $originalClassName + * + * @phan-return class-string + * + * @deprecated */ - public function getSize(): int + protected function getMockClass(string $originalClassName, $methods = [], array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = false, bool $callOriginalClone = true, bool $callAutoload = true, bool $cloneArguments = false): string { } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * Returns a mock object for the specified abstract class with all abstract + * methods of the class mocked. Concrete methods are not mocked by default. + * To mock concrete methods, use the 7th parameter ($mockedMethods). * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @phan-template RealInstanceType of object + * + * @phan-param class-string $originalClassName + * + * @phan-return MockObject\MockObject&RealInstanceType */ - public function hasSize(): bool + protected function getMockForAbstractClass(string $originalClassName, array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, array $mockedMethods = [], bool $cloneArguments = false): \PHPUnit\Framework\MockObject\MockObject { } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * Returns a mock object based on the given WSDL file. * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @phan-template RealInstanceType of object + * + * @phan-param class-string|string $originalClassName + * + * @phan-return MockObject\MockObject&RealInstanceType */ - public function isSmall(): bool + protected function getMockFromWsdl(string $wsdlFile, string $originalClassName = '', string $mockClassName = '', array $methods = [], bool $callOriginalConstructor = true, array $options = []): \PHPUnit\Framework\MockObject\MockObject { } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * Returns a mock object for the specified trait with all abstract methods + * of the trait mocked. Concrete methods to mock can be specified with the + * `$mockedMethods` parameter. * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @phan-param trait-string $traitName */ - public function isMedium(): bool + protected function getMockForTrait(string $traitName, array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, array $mockedMethods = [], bool $cloneArguments = false): \PHPUnit\Framework\MockObject\MockObject { } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * Returns an object for the specified trait. * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @phan-param trait-string $traitName */ - public function isLarge(): bool + protected function getObjectForTrait(string $traitName, array $arguments = [], string $traitClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true): object { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @throws \Prophecy\Exception\Doubler\ClassNotFoundException + * @throws \Prophecy\Exception\Doubler\DoubleException + * @throws \Prophecy\Exception\Doubler\InterfaceNotFoundException + * + * @phan-param class-string|null $classOrInterface + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4141 */ - public function getActualOutput(): string + protected function prophesize(?string $classOrInterface = null): \Prophecy\Prophecy\ObjectProphecy { } /** + * Creates a default TestResult object. + * * @internal This method is not covered by the backward compatibility promise for PHPUnit */ - public function hasOutput(): bool + protected function createResult(): \PHPUnit\Framework\TestResult { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * This method is called when a test method did not execute successfully. + * + * @throws \Throwable */ - public function doesNotPerformAssertions(): bool + protected function onNotSuccessfulTest(\Throwable $t): void { } - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function hasExpectationOnOutput(): bool + protected function recordDoubledType(string $originalClassName): void { } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class TestFailure +{ /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Returns a description for an exception. */ - public function getExpectedException(): ?string + public static function exceptionToString(\Throwable $e): string { } /** - * @return null|int|string - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Constructs a TestFailure with the given test and exception. */ - public function getExpectedExceptionCode() + public function __construct(\PHPUnit\Framework\Test $failedTest, \Throwable $t) { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Returns a short description of the failure. */ - public function getExpectedExceptionMessage(): ?string + public function toString(): string { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Returns a description for the thrown exception. */ - public function getExpectedExceptionMessageRegExp(): ?string + public function getExceptionAsString(): string { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Returns the name of the failing test (including data set, if any). */ - public function setRegisterMockObjectsFromTestArgumentsRecursively(bool $flag): void + public function getTestName(): string { } /** - * @throws \Throwable + * Returns the failing test. * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Note: The test object is not set when the test is executed in process + * isolation. + * + * @see Exception */ - public function runBare(): void + public function failedTest(): ?\PHPUnit\Framework\Test { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Gets the thrown exception. */ - public function setName(string $name): void + public function thrownException(): \Throwable { } /** - * @param list $dependencies - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Returns the exception's message. */ - public function setDependencies(array $dependencies): void + public function exceptionMessage(): string { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Returns true if the thrown exception + * is of type AssertionFailedError. */ - public function setDependencyInput(array $dependencyInput): void + public function isFailure(): bool { } - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function setBeStrictAboutChangesToGlobalState(?bool $beStrictAboutChangesToGlobalState): void +} +/** + * This interface, as well as the associated mechanism for extending PHPUnit, + * will be removed in PHPUnit 10. There is no alternative available in this + * version of PHPUnit. + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @deprecated + * @see https://github.com/sebastianbergmann/phpunit/issues/4676 + */ +interface TestListener +{ + public function addError(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void; + public function addWarning(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\Warning $e, float $time): void; + public function addFailure(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\AssertionFailedError $e, float $time): void; + public function addIncompleteTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void; + public function addRiskyTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void; + public function addSkippedTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void; + public function startTestSuite(\PHPUnit\Framework\TestSuite $suite): void; + public function endTestSuite(\PHPUnit\Framework\TestSuite $suite): void; + public function startTest(\PHPUnit\Framework\Test $test): void; + public function endTest(\PHPUnit\Framework\Test $test, float $time): void; +} +/** + * @deprecated The `TestListener` interface is deprecated + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +trait TestListenerDefaultImplementation +{ + public function addError(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void { } - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function setBackupGlobals(?bool $backupGlobals): void + public function addWarning(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\Warning $e, float $time): void { } - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function setBackupStaticAttributes(?bool $backupStaticAttributes): void + public function addFailure(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\AssertionFailedError $e, float $time): void { } - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function setRunTestInSeparateProcess(bool $runTestInSeparateProcess): void + public function addIncompleteTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void { } - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function setRunClassInSeparateProcess(bool $runClassInSeparateProcess): void + public function addRiskyTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void { } - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function setPreserveGlobalState(bool $preserveGlobalState): void + public function addSkippedTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void { } - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function setInIsolation(bool $inIsolation): void + public function startTestSuite(\PHPUnit\Framework\TestSuite $suite): void { } - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function isInIsolation(): bool + public function endTestSuite(\PHPUnit\Framework\TestSuite $suite): void { } - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function getResult() + public function startTest(\PHPUnit\Framework\Test $test): void { } - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function setResult($result): void + public function endTest(\PHPUnit\Framework\Test $test, float $time): void { } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class TestResult implements \Countable +{ /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @deprecated Use the `TestHook` interfaces instead + * + * @codeCoverageIgnore + * + * Registers a TestListener. */ - public function setOutputCallback(callable $callback): void + public function addListener(\PHPUnit\Framework\TestListener $listener): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @deprecated Use the `TestHook` interfaces instead + * + * @codeCoverageIgnore + * + * Unregisters a TestListener. */ - public function getTestResultObject(): ?\PHPUnit\Framework\TestResult + public function removeListener(\PHPUnit\Framework\TestListener $listener): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @deprecated Use the `TestHook` interfaces instead + * + * @codeCoverageIgnore + * + * Flushes all flushable TestListeners. */ - public function setTestResultObject(\PHPUnit\Framework\TestResult $result): void + public function flushListeners(): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Adds an error to the list of errors. */ - public function registerMockObject(\PHPUnit\Framework\MockObject\MockObject $mockObject): void + public function addError(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Adds a warning to the list of warnings. + * The passed in exception caused the warning. */ - public function addToAssertionCount(int $count): void + public function addWarning(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\Warning $e, float $time): void { } /** - * Returns the number of assertions performed by this test. - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Adds a failure to the list of failures. + * The passed in exception caused the failure. */ - public function getNumAssertions(): int + public function addFailure(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\AssertionFailedError $e, float $time): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Informs the result that a test suite will be started. */ - public function usesDataProvider(): bool + public function startTestSuite(\PHPUnit\Framework\TestSuite $suite): void { } /** - * @return int|string - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Informs the result that a test suite was completed. */ - public function dataName() + public function endTestSuite(\PHPUnit\Framework\TestSuite $suite): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Informs the result that a test will be started. */ - public function getDataSetAsString(bool $includeData = true): string + public function startTest(\PHPUnit\Framework\Test $test): void { } /** - * Gets the data set of a TestCase. + * Informs the result that a test was completed. * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ - public function getProvidedData(): array + public function endTest(\PHPUnit\Framework\Test $test, float $time): void { } /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Returns true if no risky test occurred. */ - public function addWarning(string $warning): void - { - } - public function sortId(): string + public function allHarmless(): bool { } /** - * Returns the normalized test name as class::method. - * - * @return list + * Gets the number of risky tests. */ - public function provides(): array + public function riskyCount(): int { } /** - * Returns a list of normalized dependency names, class::method. - * - * This list can differ from the raw dependencies as the resolver has - * no need for the [!][shallow]clone prefix that is filtered out - * during normalization. - * - * @return list + * Returns true if no incomplete test occurred. */ - public function requires(): array + public function allCompletelyImplemented(): bool { } /** - * Override to run the test and assert its state. - * - * @throws \SebastianBergmann\ObjectEnumerator\InvalidArgumentException - * @throws AssertionFailedError - * @throws Exception - * @throws ExpectationFailedException - * @throws \Throwable + * Gets the number of incomplete tests. */ - protected function runTest() + public function notImplementedCount(): int { } /** - * This method is a wrapper for the ini_set() function that automatically - * resets the modified php.ini setting to its original value after the - * test is run. + * Returns an array of TestFailure objects for the risky tests. * - * @throws Exception + * @return TestFailure[] */ - protected function iniSet(string $varName, string $newValue): void + public function risky(): array { } /** - * This method is a wrapper for the setlocale() function that automatically - * resets the locale to its original value after the test is run. + * Returns an array of TestFailure objects for the incomplete tests. * - * @throws Exception + * @return TestFailure[] */ - protected function setLocale(...$args): void + public function notImplemented(): array { } /** - * Makes configurable stub for the specified class. - * - * @phan-template RealInstanceType of object - * - * @phan-param class-string $originalClassName - * - * @phan-return MockObject\Stub&RealInstanceType + * Returns true if no test has been skipped. */ - protected function createStub(string $originalClassName): \PHPUnit\Framework\MockObject\Stub - { - } - /** - * Returns a mock object for the specified class. - * - * @phan-template RealInstanceType of object - * - * @phan-param class-string $originalClassName - * - * @phan-return MockObject\MockObject&RealInstanceType + public function noneSkipped(): bool + { + } + /** + * Gets the number of skipped tests. */ - protected function createMock(string $originalClassName): \PHPUnit\Framework\MockObject\MockObject + public function skippedCount(): int { } /** - * Returns a configured mock object for the specified class. - * - * @phan-template RealInstanceType of object - * - * @phan-param class-string $originalClassName + * Returns an array of TestFailure objects for the skipped tests. * - * @phan-return MockObject\MockObject&RealInstanceType + * @return TestFailure[] */ - protected function createConfiguredMock(string $originalClassName, array $configuration): \PHPUnit\Framework\MockObject\MockObject + public function skipped(): array { } /** - * Returns a partial mock object for the specified class. - * - * @param string[] $methods - * - * @phan-template RealInstanceType of object - * - * @phan-param class-string $originalClassName - * - * @phan-return MockObject\MockObject&RealInstanceType + * Gets the number of detected errors. */ - protected function createPartialMock(string $originalClassName, array $methods): \PHPUnit\Framework\MockObject\MockObject + public function errorCount(): int { } /** - * Returns a test proxy for the specified class. - * - * @phan-template RealInstanceType of object - * - * @phan-param class-string $originalClassName + * Returns an array of TestFailure objects for the errors. * - * @phan-return MockObject\MockObject&RealInstanceType + * @return TestFailure[] */ - protected function createTestProxy(string $originalClassName, array $constructorArguments = []): \PHPUnit\Framework\MockObject\MockObject + public function errors(): array { } /** - * Mocks the specified class and returns the name of the mocked class. - * - * @param null|array $methods $methods - * - * @phan-template RealInstanceType of object - * - * @phan-param class-string|string $originalClassName - * - * @phan-return class-string - * - * @deprecated + * Gets the number of detected failures. */ - protected function getMockClass(string $originalClassName, $methods = [], array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = false, bool $callOriginalClone = true, bool $callAutoload = true, bool $cloneArguments = false): string + public function failureCount(): int { } /** - * Returns a mock object for the specified abstract class with all abstract - * methods of the class mocked. Concrete methods are not mocked by default. - * To mock concrete methods, use the 7th parameter ($mockedMethods). - * - * @phan-template RealInstanceType of object - * - * @phan-param class-string $originalClassName + * Returns an array of TestFailure objects for the failures. * - * @phan-return MockObject\MockObject&RealInstanceType + * @return TestFailure[] */ - protected function getMockForAbstractClass(string $originalClassName, array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, array $mockedMethods = [], bool $cloneArguments = false): \PHPUnit\Framework\MockObject\MockObject + public function failures(): array { } /** - * Returns a mock object based on the given WSDL file. - * - * @phan-template RealInstanceType of object - * - * @phan-param class-string|string $originalClassName - * - * @phan-return MockObject\MockObject&RealInstanceType + * Gets the number of detected warnings. */ - protected function getMockFromWsdl(string $wsdlFile, string $originalClassName = '', string $mockClassName = '', array $methods = [], bool $callOriginalConstructor = true, array $options = []): \PHPUnit\Framework\MockObject\MockObject + public function warningCount(): int { } /** - * Returns a mock object for the specified trait with all abstract methods - * of the trait mocked. Concrete methods to mock can be specified with the - * `$mockedMethods` parameter. + * Returns an array of TestFailure objects for the warnings. * - * @phan-param trait-string $traitName + * @return TestFailure[] */ - protected function getMockForTrait(string $traitName, array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, array $mockedMethods = [], bool $cloneArguments = false): \PHPUnit\Framework\MockObject\MockObject + public function warnings(): array { } /** - * Returns an object for the specified trait. - * - * @phan-param trait-string $traitName + * Returns the names of the tests that have passed. */ - protected function getObjectForTrait(string $traitName, array $arguments = [], string $traitClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true): object + public function passed(): array { } /** - * @throws \Prophecy\Exception\Doubler\ClassNotFoundException - * @throws \Prophecy\Exception\Doubler\DoubleException - * @throws \Prophecy\Exception\Doubler\InterfaceNotFoundException - * - * @phan-param class-string|null $classOrInterface + * Returns the names of the TestSuites that have passed. * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4141 + * This enables @depends-annotations for TestClassName::class */ - protected function prophesize(?string $classOrInterface = null): \Prophecy\Prophecy\ObjectProphecy + public function passedClasses(): array { } /** - * Creates a default TestResult object. - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit + * Returns whether code coverage information should be collected. */ - protected function createResult(): \PHPUnit\Framework\TestResult + public function getCollectCodeCoverageInformation(): bool { } /** - * This method is called when a test method did not execute successfully. + * Runs a TestCase. * - * @throws \Throwable + * @throws \SebastianBergmann\CodeCoverage\InvalidArgumentException + * @throws CodeCoverageException + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws \SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException */ - protected function onNotSuccessfulTest(\Throwable $t): void + public function run(\PHPUnit\Framework\Test $test): void { } - protected function recordDoubledType(string $originalClassName): void + /** + * Gets the number of run tests. + */ + public function count(): int { } -} -/** - * @template-implements \RecursiveIterator - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class TestSuiteIterator implements \RecursiveIterator -{ - public function __construct(\PHPUnit\Framework\TestSuite $testSuite) + /** + * Checks whether the test run should stop. + */ + public function shouldStop(): bool { } - public function rewind(): void + /** + * Marks that the test run should stop. + */ + public function stop(): void { } - public function valid(): bool + /** + * Returns the code coverage object. + */ + public function getCodeCoverage(): ?\SebastianBergmann\CodeCoverage\CodeCoverage { } - public function key(): int + /** + * Sets the code coverage object. + */ + public function setCodeCoverage(\SebastianBergmann\CodeCoverage\CodeCoverage $codeCoverage): void { } - public function current(): \PHPUnit\Framework\Test + /** + * Enables or disables the deprecation-to-exception conversion. + */ + public function convertDeprecationsToExceptions(bool $flag): void { } - public function next(): void + /** + * Returns the deprecation-to-exception conversion setting. + */ + public function getConvertDeprecationsToExceptions(): bool { } /** - * @throws NoChildTestSuiteException + * Enables or disables the error-to-exception conversion. */ - public function getChildren(): self + public function convertErrorsToExceptions(bool $flag): void { } - public function hasChildren(): bool + /** + * Returns the error-to-exception conversion setting. + */ + public function getConvertErrorsToExceptions(): bool { } -} -/** - * Wraps Exceptions thrown by code under test. - * - * Re-instantiates Exceptions thrown by user-space code to retain their original - * class names, properties, and stack traces (but without arguments). - * - * Unlike PHPUnit\Framework\Exception, the complete stack of previous Exceptions - * is processed. - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ExceptionWrapper extends \PHPUnit\Framework\Exception -{ - public function __construct(\Throwable $t) + /** + * Enables or disables the notice-to-exception conversion. + */ + public function convertNoticesToExceptions(bool $flag): void { } - public function __toString(): string + /** + * Returns the notice-to-exception conversion setting. + */ + public function getConvertNoticesToExceptions(): bool { } - public function getClassName(): string + /** + * Enables or disables the warning-to-exception conversion. + */ + public function convertWarningsToExceptions(bool $flag): void { } - public function getPreviousWrapped(): ?self + /** + * Returns the warning-to-exception conversion setting. + */ + public function getConvertWarningsToExceptions(): bool { } - public function setClassName(string $className): void + /** + * Enables or disables the stopping when an error occurs. + */ + public function stopOnError(bool $flag): void { } - public function setOriginalException(\Throwable $t): void + /** + * Enables or disables the stopping when a failure occurs. + */ + public function stopOnFailure(bool $flag): void { } - public function getOriginalException(): ?\Throwable + /** + * Enables or disables the stopping when a warning occurs. + */ + public function stopOnWarning(bool $flag): void { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class IncompleteTestCase extends \PHPUnit\Framework\TestCase -{ - public function __construct(string $className, string $methodName, string $message = '') + public function beStrictAboutTestsThatDoNotTestAnything(bool $flag): void { } - public function getMessage(): string + public function isStrictAboutTestsThatDoNotTestAnything(): bool { } - /** - * Returns a string representation of the test case. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function toString(): string + public function beStrictAboutOutputDuringTests(bool $flag): void { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class TestResult implements \Countable -{ - /** - * @deprecated Use the `TestHook` interfaces instead - * - * @codeCoverageIgnore - * - * Registers a TestListener. - */ - public function addListener(\PHPUnit\Framework\TestListener $listener): void + public function isStrictAboutOutputDuringTests(): bool { } - /** - * @deprecated Use the `TestHook` interfaces instead - * - * @codeCoverageIgnore - * - * Unregisters a TestListener. - */ - public function removeListener(\PHPUnit\Framework\TestListener $listener): void + public function beStrictAboutResourceUsageDuringSmallTests(bool $flag): void { } - /** - * @deprecated Use the `TestHook` interfaces instead - * - * @codeCoverageIgnore - * - * Flushes all flushable TestListeners. - */ - public function flushListeners(): void + public function isStrictAboutResourceUsageDuringSmallTests(): bool { } - /** - * Adds an error to the list of errors. - */ - public function addError(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void + public function enforceTimeLimit(bool $flag): void { } - /** - * Adds a warning to the list of warnings. - * The passed in exception caused the warning. - */ - public function addWarning(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\Warning $e, float $time): void + public function enforcesTimeLimit(): bool { } - /** - * Adds a failure to the list of failures. - * The passed in exception caused the failure. - */ - public function addFailure(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\AssertionFailedError $e, float $time): void + public function beStrictAboutTodoAnnotatedTests(bool $flag): void { } - /** - * Informs the result that a test suite will be started. - */ - public function startTestSuite(\PHPUnit\Framework\TestSuite $suite): void + public function isStrictAboutTodoAnnotatedTests(): bool { } - /** - * Informs the result that a test suite was completed. - */ - public function endTestSuite(\PHPUnit\Framework\TestSuite $suite): void + public function forceCoversAnnotation(): void { } - /** - * Informs the result that a test will be started. - */ - public function startTest(\PHPUnit\Framework\Test $test): void + public function forcesCoversAnnotation(): bool { } /** - * Informs the result that a test was completed. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * Enables or disables the stopping for risky tests. */ - public function endTest(\PHPUnit\Framework\Test $test, float $time): void + public function stopOnRisky(bool $flag): void { } /** - * Returns true if no risky test occurred. + * Enables or disables the stopping for incomplete tests. */ - public function allHarmless(): bool + public function stopOnIncomplete(bool $flag): void { } /** - * Gets the number of risky tests. + * Enables or disables the stopping for skipped tests. */ - public function riskyCount(): int + public function stopOnSkipped(bool $flag): void { } /** - * Returns true if no incomplete test occurred. + * Enables or disables the stopping for defects: error, failure, warning. */ - public function allCompletelyImplemented(): bool + public function stopOnDefect(bool $flag): void { } /** - * Gets the number of incomplete tests. + * Returns the time spent running the tests. */ - public function notImplementedCount(): int + public function time(): float { } /** - * Returns an array of TestFailure objects for the risky tests. - * - * @return TestFailure[] + * Returns whether the entire test was successful or not. */ - public function risky(): array + public function wasSuccessful(): bool { } - /** - * Returns an array of TestFailure objects for the incomplete tests. - * - * @return TestFailure[] - */ - public function notImplemented(): array + public function wasSuccessfulIgnoringWarnings(): bool { } - /** - * Returns true if no test has been skipped. - */ - public function noneSkipped(): bool + public function wasSuccessfulAndNoTestIsRiskyOrSkippedOrIncomplete(): bool { } /** - * Gets the number of skipped tests. + * Sets the default timeout for tests. */ - public function skippedCount(): int + public function setDefaultTimeLimit(int $timeout): void { } /** - * Returns an array of TestFailure objects for the skipped tests. - * - * @return TestFailure[] + * Sets the timeout for small tests. */ - public function skipped(): array + public function setTimeoutForSmallTests(int $timeout): void { } /** - * Gets the number of detected errors. + * Sets the timeout for medium tests. */ - public function errorCount(): int + public function setTimeoutForMediumTests(int $timeout): void { } /** - * Returns an array of TestFailure objects for the errors. - * - * @return TestFailure[] + * Sets the timeout for large tests. */ - public function errors(): array + public function setTimeoutForLargeTests(int $timeout): void { } /** - * Gets the number of detected failures. + * Returns the set timeout for large tests. */ - public function failureCount(): int + public function getTimeoutForLargeTests(): int { } - /** - * Returns an array of TestFailure objects for the failures. - * - * @return TestFailure[] - */ - public function failures(): array + public function setRegisterMockObjectsFromTestArgumentsRecursively(bool $flag): void { } +} +/** + * @template-implements \IteratorAggregate + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +class TestSuite implements \IteratorAggregate, \PHPUnit\Framework\Reorderable, \PHPUnit\Framework\SelfDescribing, \PHPUnit\Framework\Test +{ /** - * Gets the number of detected warnings. + * Enable or disable the backup and restoration of the $GLOBALS array. + * + * @var bool */ - public function warningCount(): int - { - } + protected $backupGlobals; /** - * Returns an array of TestFailure objects for the warnings. + * Enable or disable the backup and restoration of static attributes. * - * @return TestFailure[] + * @var bool */ - public function warnings(): array - { - } + protected $backupStaticAttributes; /** - * Returns the names of the tests that have passed. + * @var bool */ - public function passed(): array - { - } + protected $runTestInSeparateProcess = false; /** - * Returns the names of the TestSuites that have passed. + * The name of the test suite. * - * This enables @depends-annotations for TestClassName::class + * @var string */ - public function passedClasses(): array - { - } + protected $name = ''; /** - * Returns whether code coverage information should be collected. + * The test groups of the test suite. + * + * @phan-var array> */ - public function getCollectCodeCoverageInformation(): bool - { - } + protected $groups = []; /** - * Runs a TestCase. + * The tests in the test suite. * - * @throws \SebastianBergmann\CodeCoverage\InvalidArgumentException - * @throws CodeCoverageException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws \SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException + * @var Test[] */ - public function run(\PHPUnit\Framework\Test $test): void - { - } + protected $tests = []; /** - * Gets the number of run tests. + * The number of tests in the test suite. + * + * @var int */ - public function count(): int - { - } + protected $numTests = -1; /** - * Checks whether the test run should stop. + * @var bool */ - public function shouldStop(): bool - { - } + protected $testCase = false; /** - * Marks that the test run should stop. + * @var string[] */ - public function stop(): void - { - } + protected $foundClasses = []; /** - * Returns the code coverage object. + * @var null|list */ - public function getCodeCoverage(): ?\SebastianBergmann\CodeCoverage\CodeCoverage - { - } + protected $providedTests; /** - * Sets the code coverage object. + * @var null|list */ - public function setCodeCoverage(\SebastianBergmann\CodeCoverage\CodeCoverage $codeCoverage): void + protected $requiredTests; + /** + * Constructs a new TestSuite. + * + * - PHPUnit\Framework\TestSuite() constructs an empty TestSuite. + * + * - PHPUnit\Framework\TestSuite(ReflectionClass) constructs a + * TestSuite from the given class. + * + * - PHPUnit\Framework\TestSuite(ReflectionClass, String) + * constructs a TestSuite from the given class with the given + * name. + * + * - PHPUnit\Framework\TestSuite(String) either constructs a + * TestSuite from the given class (if the passed string is the + * name of an existing class) or constructs an empty TestSuite + * with the given name. + * + * @param \ReflectionClass|string $theClass + * + * @throws Exception + */ + public function __construct($theClass = '', string $name = '') { } /** - * Enables or disables the deprecation-to-exception conversion. + * Returns a string representation of the test suite. */ - public function convertDeprecationsToExceptions(bool $flag): void + public function toString(): string { } /** - * Returns the deprecation-to-exception conversion setting. + * Adds a test to the suite. + * + * @param array $groups */ - public function getConvertDeprecationsToExceptions(): bool + public function addTest(\PHPUnit\Framework\Test $test, $groups = []): void { } /** - * Enables or disables the error-to-exception conversion. + * Adds the tests from the given class to the suite. + * + * @phan-param object|class-string $testClass + * + * @throws Exception */ - public function convertErrorsToExceptions(bool $flag): void + public function addTestSuite($testClass): void + { + } + public function addWarning(string $warning): void { } /** - * Returns the error-to-exception conversion setting. + * Wraps both addTest() and addTestSuite + * as well as the separate import statements for the user's convenience. + * + * If the named file cannot be read or there are no new tests that can be + * added, a PHPUnit\Framework\WarningTestCase will be created instead, + * leaving the current test run untouched. + * + * @throws Exception */ - public function getConvertErrorsToExceptions(): bool + public function addTestFile(string $filename): void { } /** - * Enables or disables the notice-to-exception conversion. + * Wrapper for addTestFile() that adds multiple test files. + * + * @throws Exception */ - public function convertNoticesToExceptions(bool $flag): void + public function addTestFiles(iterable $fileNames): void { } /** - * Returns the notice-to-exception conversion setting. + * Counts the number of test cases that will be run by this test. + * + * @todo refactor usage of numTests in DefaultResultPrinter */ - public function getConvertNoticesToExceptions(): bool + public function count(): int { } /** - * Enables or disables the warning-to-exception conversion. + * Returns the name of the suite. */ - public function convertWarningsToExceptions(bool $flag): void + public function getName(): string { } /** - * Returns the warning-to-exception conversion setting. + * Returns the test groups of the suite. + * + * @phan-return list */ - public function getConvertWarningsToExceptions(): bool + public function getGroups(): array { } - /** - * Enables or disables the stopping when an error occurs. - */ - public function stopOnError(bool $flag): void + public function getGroupDetails(): array { } /** - * Enables or disables the stopping when a failure occurs. + * Set tests groups of the test case. */ - public function stopOnFailure(bool $flag): void + public function setGroupDetails(array $groups): void { } /** - * Enables or disables the stopping when a warning occurs. + * Runs the tests and collects their result in a TestResult. + * + * @throws \SebastianBergmann\CodeCoverage\InvalidArgumentException + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws CodeCoverageException + * @throws \SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException + * @throws Warning */ - public function stopOnWarning(bool $flag): void - { - } - public function beStrictAboutTestsThatDoNotTestAnything(bool $flag): void - { - } - public function isStrictAboutTestsThatDoNotTestAnything(): bool + public function run(?\PHPUnit\Framework\TestResult $result = null): \PHPUnit\Framework\TestResult { } - public function beStrictAboutOutputDuringTests(bool $flag): void + public function setRunTestInSeparateProcess(bool $runTestInSeparateProcess): void { } - public function isStrictAboutOutputDuringTests(): bool + public function setName(string $name): void { } - public function beStrictAboutResourceUsageDuringSmallTests(bool $flag): void + /** + * Returns the tests as an enumeration. + * + * @return Test[] + */ + public function tests(): array { } - public function isStrictAboutResourceUsageDuringSmallTests(): bool + /** + * Set tests of the test suite. + * + * @param Test[] $tests + */ + public function setTests(array $tests): void { } - public function enforceTimeLimit(bool $flag): void + /** + * Mark the test suite as skipped. + * + * @param string $message + * + * @throws SkippedTestSuiteError + * + * @phan-return never-return + */ + public function markTestSuiteSkipped($message = ''): void { } - public function enforcesTimeLimit(): bool + /** + * @param bool $beStrictAboutChangesToGlobalState + */ + public function setBeStrictAboutChangesToGlobalState($beStrictAboutChangesToGlobalState): void { } - public function beStrictAboutTodoAnnotatedTests(bool $flag): void + /** + * @param bool $backupGlobals + */ + public function setBackupGlobals($backupGlobals): void { } - public function isStrictAboutTodoAnnotatedTests(): bool + /** + * @param bool $backupStaticAttributes + */ + public function setBackupStaticAttributes($backupStaticAttributes): void { } - public function forceCoversAnnotation(): void + /** + * Returns an iterator for this test suite. + */ + public function getIterator(): \Iterator { } - public function forcesCoversAnnotation(): bool + public function injectFilter(\PHPUnit\Runner\Filter\Factory $filter): void { } /** - * Enables or disables the stopping for risky tests. + * @phan-return array */ - public function stopOnRisky(bool $flag): void + public function warnings(): array { } /** - * Enables or disables the stopping for incomplete tests. + * @return list */ - public function stopOnIncomplete(bool $flag): void + public function provides(): array { } /** - * Enables or disables the stopping for skipped tests. + * @return list */ - public function stopOnSkipped(bool $flag): void + public function requires(): array { } - /** - * Enables or disables the stopping for defects: error, failure, warning. - */ - public function stopOnDefect(bool $flag): void + public function sortId(): string { } /** - * Returns the time spent running the tests. + * Creates a default TestResult object. */ - public function time(): float + protected function createResult(): \PHPUnit\Framework\TestResult { } /** - * Returns whether the entire test was successful or not. + * @throws Exception */ - public function wasSuccessful(): bool + protected function addTestMethod(\ReflectionClass $class, \ReflectionMethod $method): void { } - public function wasSuccessfulIgnoringWarnings(): bool +} +/** + * @template-implements \RecursiveIterator + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class TestSuiteIterator implements \RecursiveIterator +{ + public function __construct(\PHPUnit\Framework\TestSuite $testSuite) { } - public function wasSuccessfulAndNoTestIsRiskyOrSkippedOrIncomplete(): bool + public function rewind(): void { } - /** - * Sets the default timeout for tests. - */ - public function setDefaultTimeLimit(int $timeout): void + public function valid(): bool { } - /** - * Sets the timeout for small tests. - */ - public function setTimeoutForSmallTests(int $timeout): void + public function key(): int { } - /** - * Sets the timeout for medium tests. - */ - public function setTimeoutForMediumTests(int $timeout): void + public function current(): \PHPUnit\Framework\Test { } - /** - * Sets the timeout for large tests. - */ - public function setTimeoutForLargeTests(int $timeout): void + public function next(): void { } /** - * Returns the set timeout for large tests. + * @throws NoChildTestSuiteException */ - public function getTimeoutForLargeTests(): int + public function getChildren(): self { } - public function setRegisterMockObjectsFromTestArgumentsRecursively(bool $flag): void + public function hasChildren(): bool { } } -namespace PHPUnit\Framework\Constraint; - /** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class IsFinite extends \PHPUnit\Framework\Constraint\Constraint +final class WarningTestCase extends \PHPUnit\Framework\TestCase { + public function __construct(string $message = '') + { + } + public function getMessage(): string + { + } /** - * Returns a string representation of the constraint. + * Returns a string representation of the test case. */ public function toString(): string { } } +namespace PHPUnit\Framework\Constraint; + /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class IsInfinite extends \PHPUnit\Framework\Constraint\Constraint +final class IsFalse extends \PHPUnit\Framework\Constraint\Constraint { /** * Returns a string representation of the constraint. @@ -6161,7 +6149,7 @@ public function toString(): string /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class IsNan extends \PHPUnit\Framework\Constraint\Constraint +final class IsTrue extends \PHPUnit\Framework\Constraint\Constraint { /** * Returns a string representation of the constraint. @@ -6171,12 +6159,16 @@ public function toString(): string } } /** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * @phan-template CallbackInput of mixed * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class ClassHasStaticAttribute extends \PHPUnit\Framework\Constraint\ClassHasAttribute +final class Callback extends \PHPUnit\Framework\Constraint\Constraint { + /** @phan-param callable(CallbackInput $input): bool $callback */ + public function __construct(callable $callback) + { + } /** * Returns a string representation of the constraint. */ @@ -6187,38 +6179,34 @@ public function toString(): string /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class ObjectEquals extends \PHPUnit\Framework\Constraint\Constraint +class Count extends \PHPUnit\Framework\Constraint\Constraint { - public function __construct(object $object, string $method = 'equals') + public function __construct(int $expected) { } public function toString(): string { } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 - */ -class ClassHasAttribute extends \PHPUnit\Framework\Constraint\Constraint -{ - public function __construct(string $attributeName) + /** + * Evaluates the constraint for parameter $other. Returns true if the + * constraint is met, false otherwise. + * + * @throws \PHPUnit\Framework\Exception + */ + protected function matches($other): bool { } /** - * Returns a string representation of the constraint. + * @throws \PHPUnit\Framework\Exception */ - public function toString(): string + protected function getCountOf($other): ?int { } /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @param mixed $other value or object to evaluate + * Returns the total number of iterations from a generator. + * This will fully exhaust the generator. */ - protected function matches($other): bool + protected function getCountOfGenerator(\Generator $generator): int { } /** @@ -6232,20 +6220,22 @@ protected function matches($other): bool protected function failureDescription($other): string { } - protected function attributeName(): string - { - } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class ObjectHasProperty extends \PHPUnit\Framework\Constraint\Constraint +final class GreaterThan extends \PHPUnit\Framework\Constraint\Constraint { - public function __construct(string $propertyName) + /** + * @param float|int $value + */ + public function __construct($value) { } /** * Returns a string representation of the constraint. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ public function toString(): string { @@ -6253,30 +6243,45 @@ public function toString(): string } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 */ -final class ObjectHasAttribute extends \PHPUnit\Framework\Constraint\ClassHasAttribute +final class IsEmpty extends \PHPUnit\Framework\Constraint\Constraint { + /** + * Returns a string representation of the constraint. + */ + public function toString(): string + { + } } /** - * @phan-template CallbackInput of mixed - * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class Callback extends \PHPUnit\Framework\Constraint\Constraint +final class LessThan extends \PHPUnit\Framework\Constraint\Constraint { - /** @phan-param callable(CallbackInput $input): bool $callback */ - public function __construct(callable $callback) + /** + * @param float|int $value + */ + public function __construct($value) { } /** * Returns a string representation of the constraint. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ public function toString(): string { } } +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +final class SameSize extends \PHPUnit\Framework\Constraint\Count +{ + public function __construct(iterable $expected) + { + } +} /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ @@ -6465,269 +6470,73 @@ protected function reduce(): self /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class LogicalAnd extends \PHPUnit\Framework\Constraint\BinaryOperator -{ - /** - * Returns the name of this operator. - */ - public function operator(): string - { - } - /** - * Returns this operator's precedence. - * - * @see https://www.php.net/manual/en/language.operators.precedence.php - */ - public function precedence(): int - { - } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class LogicalOr extends \PHPUnit\Framework\Constraint\BinaryOperator +final class IsEqual extends \PHPUnit\Framework\Constraint\Constraint { - /** - * Returns the name of this operator. - */ - public function operator(): string - { - } - /** - * Returns this operator's precedence. - * - * @see https://www.php.net/manual/en/language.operators.precedence.php - */ - public function precedence(): int + public function __construct($value, float $delta = 0.0, bool $canonicalize = false, bool $ignoreCase = false) { } /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. + * Evaluates the constraint for parameter $other. * - * @param mixed $other value or object to evaluate - */ - public function matches($other): bool - { - } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -abstract class Operator extends \PHPUnit\Framework\Constraint\Constraint -{ - /** - * Returns the name of this operator. - */ - abstract public function operator(): string; - /** - * Returns this operator's precedence. + * If $returnResult is set to false (the default), an exception is thrown + * in case of a failure. null is returned otherwise. * - * @see https://www.php.net/manual/en/language.operators.precedence.php - */ - abstract public function precedence(): int; - /** - * Returns the number of operands. - */ - abstract public function arity(): int; - /** - * Validates $constraint argument. - */ - protected function checkConstraint($constraint): \PHPUnit\Framework\Constraint\Constraint - { - } - /** - * Returns true if the $constraint needs to be wrapped with braces. - */ - protected function constraintNeedsParentheses(\PHPUnit\Framework\Constraint\Constraint $constraint): bool - { - } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class LogicalNot extends \PHPUnit\Framework\Constraint\UnaryOperator -{ - public static function negate(string $string): string - { - } - /** - * Returns the name of this operator. - */ - public function operator(): string - { - } - /** - * Returns this operator's precedence. + * If $returnResult is true, the result of the evaluation is returned as + * a boolean value instead: true in case of success, false in case of a + * failure. * - * @see https://www.php.net/manual/en/language.operators.precedence.php - */ - public function precedence(): int - { - } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -abstract class UnaryOperator extends \PHPUnit\Framework\Constraint\Operator -{ - /** - * @param Constraint|mixed $constraint - */ - public function __construct($constraint) - { - } - /** - * Returns the number of operands (constraints). + * @throws \PHPUnit\Framework\ExpectationFailedException */ - public function arity(): int + public function evaluate($other, string $description = '', bool $returnResult = false): ?bool { } /** * Returns a string representation of the constraint. - */ - public function toString(): string - { - } - /** - * Counts the number of constraint elements. - */ - public function count(): int - { - } - /** - * Returns the description of the failure. - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - * - * @param mixed $other evaluated value or object * * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ - protected function failureDescription($other): string - { - } - /** - * Transforms string returned by the memeber constraint's toString() or - * failureDescription() such that it reflects constraint's participation in - * this expression. - * - * The method may be overwritten in a subclass to apply default - * transformation in case the operand constraint does not provide its own - * custom strings via toStringInContext() or failureDescriptionInContext(). - * - * @param string $string the string to be transformed - */ - protected function transformString(string $string): string - { - } - /** - * Provides access to $this->constraint for subclasses. - */ - final protected function constraint(): \PHPUnit\Framework\Constraint\Constraint - { - } - /** - * Returns true if the $constraint needs to be wrapped with parentheses. - */ - protected function constraintNeedsParentheses(\PHPUnit\Framework\Constraint\Constraint $constraint): bool - { - } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -abstract class BinaryOperator extends \PHPUnit\Framework\Constraint\Operator -{ - public static function fromConstraints(\PHPUnit\Framework\Constraint\Constraint ...$constraints): self - { - } - /** - * @param mixed[] $constraints - */ - public function setConstraints(array $constraints): void - { - } - /** - * Returns the number of operands (constraints). - */ - final public function arity(): int - { - } - /** - * Returns a string representation of the constraint. - */ public function toString(): string { } - /** - * Counts the number of constraint elements. - */ - public function count(): int - { - } - /** - * Returns the nested constraints. - */ - final protected function constraints(): array - { - } - /** - * Returns true if the $constraint needs to be wrapped with braces. - */ - final protected function constraintNeedsParentheses(\PHPUnit\Framework\Constraint\Constraint $constraint): bool - { - } - /** - * Reduces the sub-expression starting at $this by skipping degenerate - * sub-expression and returns first descendant constraint that starts - * a non-reducible sub-expression. - * - * See Constraint::reduce() for more. - */ - protected function reduce(): \PHPUnit\Framework\Constraint\Constraint - { - } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class LogicalXor extends \PHPUnit\Framework\Constraint\BinaryOperator +final class IsEqualCanonicalizing extends \PHPUnit\Framework\Constraint\Constraint { - /** - * Returns the name of this operator. - */ - public function operator(): string + public function __construct($value) { } /** - * Returns this operator's precedence. + * Evaluates the constraint for parameter $other. * - * @see https://www.php.net/manual/en/language.operators.precedence.php. + * If $returnResult is set to false (the default), an exception is thrown + * in case of a failure. null is returned otherwise. + * + * If $returnResult is true, the result of the evaluation is returned as + * a boolean value instead: true in case of success, false in case of a + * failure. + * + * @throws \PHPUnit\Framework\ExpectationFailedException */ - public function precedence(): int + public function evaluate($other, string $description = '', bool $returnResult = false): ?bool { } /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. + * Returns a string representation of the constraint. * - * @param mixed $other value or object to evaluate + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ - public function matches($other): bool + public function toString(): string { } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class TraversableContainsOnly extends \PHPUnit\Framework\Constraint\Constraint -{ - /** - * @throws \PHPUnit\Framework\Exception - */ - public function __construct(string $type, bool $isNativeType = true) +final class IsEqualIgnoringCase extends \PHPUnit\Framework\Constraint\Constraint +{ + public function __construct($value) { } /** @@ -6740,16 +6549,15 @@ public function __construct(string $type, bool $isNativeType = true) * a boolean value instead: true in case of success, false in case of a * failure. * - * @param mixed|\Traversable $other - * * @throws \PHPUnit\Framework\ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ public function evaluate($other, string $description = '', bool $returnResult = false): ?bool { } /** * Returns a string representation of the constraint. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ public function toString(): string { @@ -6758,12 +6566,24 @@ public function toString(): string /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class ArrayHasKey extends \PHPUnit\Framework\Constraint\Constraint +final class IsEqualWithDelta extends \PHPUnit\Framework\Constraint\Constraint { + public function __construct($value, float $delta) + { + } /** - * @param int|string $key + * Evaluates the constraint for parameter $other. + * + * If $returnResult is set to false (the default), an exception is thrown + * in case of a failure. null is returned otherwise. + * + * If $returnResult is true, the result of the evaluation is returned as + * a boolean value instead: true in case of success, false in case of a + * failure. + * + * @throws \PHPUnit\Framework\ExpectationFailedException */ - public function __construct($key) + public function evaluate($other, string $description = '', bool $returnResult = false): ?bool { } /** @@ -6778,59 +6598,41 @@ public function toString(): string /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -abstract class TraversableContains extends \PHPUnit\Framework\Constraint\Constraint +final class Exception extends \PHPUnit\Framework\Constraint\Constraint { - public function __construct($value) + public function __construct(string $className) { } /** * Returns a string representation of the constraint. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ public function toString(): string { } +} +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +final class ExceptionCode extends \PHPUnit\Framework\Constraint\Constraint +{ /** - * Returns the description of the failure. - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - * - * @param mixed $other evaluated value or object - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @param int|string $expected */ - protected function failureDescription($other): string + public function __construct($expected) { } - protected function value() + public function toString(): string { } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class TraversableContainsIdentical extends \PHPUnit\Framework\Constraint\TraversableContains -{ -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class TraversableContainsEqual extends \PHPUnit\Framework\Constraint\TraversableContains -{ -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class Exception extends \PHPUnit\Framework\Constraint\Constraint +final class ExceptionMessage extends \PHPUnit\Framework\Constraint\Constraint { - public function __construct(string $className) + public function __construct(string $expected) { } - /** - * Returns a string representation of the constraint. - */ public function toString(): string { } @@ -6850,14 +6652,11 @@ public function toString(): string /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class ExceptionCode extends \PHPUnit\Framework\Constraint\Constraint +final class DirectoryExists extends \PHPUnit\Framework\Constraint\Constraint { /** - * @param int|string $expected + * Returns a string representation of the constraint. */ - public function __construct($expected) - { - } public function toString(): string { } @@ -6865,11 +6664,11 @@ public function toString(): string /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class ExceptionMessage extends \PHPUnit\Framework\Constraint\Constraint +final class FileExists extends \PHPUnit\Framework\Constraint\Constraint { - public function __construct(string $expected) - { - } + /** + * Returns a string representation of the constraint. + */ public function toString(): string { } @@ -6877,30 +6676,22 @@ public function toString(): string /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class IsEqualIgnoringCase extends \PHPUnit\Framework\Constraint\Constraint +final class IsReadable extends \PHPUnit\Framework\Constraint\Constraint { - public function __construct($value) - { - } /** - * Evaluates the constraint for parameter $other. - * - * If $returnResult is set to false (the default), an exception is thrown - * in case of a failure. null is returned otherwise. - * - * If $returnResult is true, the result of the evaluation is returned as - * a boolean value instead: true in case of success, false in case of a - * failure. - * - * @throws \PHPUnit\Framework\ExpectationFailedException + * Returns a string representation of the constraint. */ - public function evaluate($other, string $description = '', bool $returnResult = false): ?bool + public function toString(): string { } +} +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +final class IsWritable extends \PHPUnit\Framework\Constraint\Constraint +{ /** * Returns a string representation of the constraint. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ public function toString(): string { @@ -6909,11 +6700,8 @@ public function toString(): string /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class IsEqual extends \PHPUnit\Framework\Constraint\Constraint +final class IsAnything extends \PHPUnit\Framework\Constraint\Constraint { - public function __construct($value, float $delta = 0.0, bool $canonicalize = false, bool $ignoreCase = false) - { - } /** * Evaluates the constraint for parameter $other. * @@ -6931,17 +6719,21 @@ public function evaluate($other, string $description = '', bool $returnResult = } /** * Returns a string representation of the constraint. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ public function toString(): string { } + /** + * Counts the number of constraint elements. + */ + public function count(): int + { + } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class IsEqualCanonicalizing extends \PHPUnit\Framework\Constraint\Constraint +final class IsIdentical extends \PHPUnit\Framework\Constraint\Constraint { public function __construct($value) { @@ -6957,6 +6749,7 @@ public function __construct($value) * failure. * * @throws \PHPUnit\Framework\ExpectationFailedException + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ public function evaluate($other, string $description = '', bool $returnResult = false): ?bool { @@ -6973,30 +6766,13 @@ public function toString(): string /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class IsEqualWithDelta extends \PHPUnit\Framework\Constraint\Constraint +final class JsonMatches extends \PHPUnit\Framework\Constraint\Constraint { - public function __construct($value, float $delta) - { - } - /** - * Evaluates the constraint for parameter $other. - * - * If $returnResult is set to false (the default), an exception is thrown - * in case of a failure. null is returned otherwise. - * - * If $returnResult is true, the result of the evaluation is returned as - * a boolean value instead: true in case of success, false in case of a - * failure. - * - * @throws \PHPUnit\Framework\ExpectationFailedException - */ - public function evaluate($other, string $description = '', bool $returnResult = false): ?bool + public function __construct(string $value) { } /** - * Returns a string representation of the constraint. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * Returns a string representation of the object. */ public function toString(): string { @@ -7023,64 +6799,123 @@ public static function translateTypeToPrefix(string $type): string /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class IsAnything extends \PHPUnit\Framework\Constraint\Constraint +final class IsFinite extends \PHPUnit\Framework\Constraint\Constraint { /** - * Evaluates the constraint for parameter $other. - * - * If $returnResult is set to false (the default), an exception is thrown - * in case of a failure. null is returned otherwise. - * - * If $returnResult is true, the result of the evaluation is returned as - * a boolean value instead: true in case of success, false in case of a - * failure. - * - * @throws \PHPUnit\Framework\ExpectationFailedException + * Returns a string representation of the constraint. */ - public function evaluate($other, string $description = '', bool $returnResult = false): ?bool + public function toString(): string { } +} +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +final class IsInfinite extends \PHPUnit\Framework\Constraint\Constraint +{ /** * Returns a string representation of the constraint. */ public function toString(): string { } +} +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +final class IsNan extends \PHPUnit\Framework\Constraint\Constraint +{ /** - * Counts the number of constraint elements. + * Returns a string representation of the constraint. */ - public function count(): int + public function toString(): string { } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 */ -final class IsIdentical extends \PHPUnit\Framework\Constraint\Constraint +class ClassHasAttribute extends \PHPUnit\Framework\Constraint\Constraint { - public function __construct($value) + public function __construct(string $attributeName) { } /** - * Evaluates the constraint for parameter $other. + * Returns a string representation of the constraint. + */ + public function toString(): string + { + } + /** + * Evaluates the constraint for parameter $other. Returns true if the + * constraint is met, false otherwise. * - * If $returnResult is set to false (the default), an exception is thrown - * in case of a failure. null is returned otherwise. + * @param mixed $other value or object to evaluate + */ + protected function matches($other): bool + { + } + /** + * Returns the description of the failure. * - * If $returnResult is true, the result of the evaluation is returned as - * a boolean value instead: true in case of success, false in case of a - * failure. + * The beginning of failure messages is "Failed asserting that" in most + * cases. This method should return the second part of that sentence. * - * @throws \PHPUnit\Framework\ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @param mixed $other evaluated value or object */ - public function evaluate($other, string $description = '', bool $returnResult = false): ?bool + protected function failureDescription($other): string + { + } + protected function attributeName(): string + { + } +} +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 + */ +final class ClassHasStaticAttribute extends \PHPUnit\Framework\Constraint\ClassHasAttribute +{ + /** + * Returns a string representation of the constraint. + */ + public function toString(): string + { + } +} +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +final class ObjectEquals extends \PHPUnit\Framework\Constraint\Constraint +{ + public function __construct(object $object, string $method = 'equals') + { + } + public function toString(): string + { + } +} +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 + */ +final class ObjectHasAttribute extends \PHPUnit\Framework\Constraint\ClassHasAttribute +{ +} +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +final class ObjectHasProperty extends \PHPUnit\Framework\Constraint\Constraint +{ + public function __construct(string $propertyName) { } /** * Returns a string representation of the constraint. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ public function toString(): string { @@ -7089,296 +6924,257 @@ public function toString(): string /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class SameSize extends \PHPUnit\Framework\Constraint\Count +abstract class BinaryOperator extends \PHPUnit\Framework\Constraint\Operator { - public function __construct(iterable $expected) + public static function fromConstraints(\PHPUnit\Framework\Constraint\Constraint ...$constraints): self { } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -class Count extends \PHPUnit\Framework\Constraint\Constraint -{ - public function __construct(int $expected) + /** + * @param mixed[] $constraints + */ + public function setConstraints(array $constraints): void + { + } + /** + * Returns the number of operands (constraints). + */ + final public function arity(): int { } + /** + * Returns a string representation of the constraint. + */ public function toString(): string { } /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @throws \PHPUnit\Framework\Exception + * Counts the number of constraint elements. */ - protected function matches($other): bool + public function count(): int { } /** - * @throws \PHPUnit\Framework\Exception + * Returns the nested constraints. */ - protected function getCountOf($other): ?int + final protected function constraints(): array { } /** - * Returns the total number of iterations from a generator. - * This will fully exhaust the generator. + * Returns true if the $constraint needs to be wrapped with braces. */ - protected function getCountOfGenerator(\Generator $generator): int + final protected function constraintNeedsParentheses(\PHPUnit\Framework\Constraint\Constraint $constraint): bool { } /** - * Returns the description of the failure. - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. + * Reduces the sub-expression starting at $this by skipping degenerate + * sub-expression and returns first descendant constraint that starts + * a non-reducible sub-expression. * - * @param mixed $other evaluated value or object + * See Constraint::reduce() for more. */ - protected function failureDescription($other): string + protected function reduce(): \PHPUnit\Framework\Constraint\Constraint { } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class LessThan extends \PHPUnit\Framework\Constraint\Constraint +final class LogicalAnd extends \PHPUnit\Framework\Constraint\BinaryOperator { /** - * @param float|int $value + * Returns the name of this operator. */ - public function __construct($value) + public function operator(): string { } /** - * Returns a string representation of the constraint. + * Returns this operator's precedence. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @see https://www.php.net/manual/en/language.operators.precedence.php */ - public function toString(): string + public function precedence(): int { } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class GreaterThan extends \PHPUnit\Framework\Constraint\Constraint +final class LogicalNot extends \PHPUnit\Framework\Constraint\UnaryOperator { + public static function negate(string $string): string + { + } /** - * @param float|int $value + * Returns the name of this operator. */ - public function __construct($value) + public function operator(): string { } /** - * Returns a string representation of the constraint. + * Returns this operator's precedence. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @see https://www.php.net/manual/en/language.operators.precedence.php */ - public function toString(): string + public function precedence(): int { } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class IsEmpty extends \PHPUnit\Framework\Constraint\Constraint +final class LogicalOr extends \PHPUnit\Framework\Constraint\BinaryOperator { /** - * Returns a string representation of the constraint. + * Returns the name of this operator. */ - public function toString(): string + public function operator(): string { } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class IsNull extends \PHPUnit\Framework\Constraint\Constraint -{ /** - * Returns a string representation of the constraint. + * Returns this operator's precedence. + * + * @see https://www.php.net/manual/en/language.operators.precedence.php */ - public function toString(): string + public function precedence(): int + { + } + /** + * Evaluates the constraint for parameter $other. Returns true if the + * constraint is met, false otherwise. + * + * @param mixed $other value or object to evaluate + */ + public function matches($other): bool { } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class IsInstanceOf extends \PHPUnit\Framework\Constraint\Constraint +final class LogicalXor extends \PHPUnit\Framework\Constraint\BinaryOperator { - public function __construct(string $className) + /** + * Returns the name of this operator. + */ + public function operator(): string { } /** - * Returns a string representation of the constraint. + * Returns this operator's precedence. + * + * @see https://www.php.net/manual/en/language.operators.precedence.php. */ - public function toString(): string + public function precedence(): int + { + } + /** + * Evaluates the constraint for parameter $other. Returns true if the + * constraint is met, false otherwise. + * + * @param mixed $other value or object to evaluate + */ + public function matches($other): bool { } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class IsType extends \PHPUnit\Framework\Constraint\Constraint +abstract class Operator extends \PHPUnit\Framework\Constraint\Constraint { /** - * @var string - */ - public const TYPE_ARRAY = 'array'; - /** - * @var string - */ - public const TYPE_BOOL = 'bool'; - /** - * @var string - */ - public const TYPE_FLOAT = 'float'; - /** - * @var string - */ - public const TYPE_INT = 'int'; - /** - * @var string - */ - public const TYPE_NULL = 'null'; - /** - * @var string - */ - public const TYPE_NUMERIC = 'numeric'; - /** - * @var string - */ - public const TYPE_OBJECT = 'object'; - /** - * @var string - */ - public const TYPE_RESOURCE = 'resource'; - /** - * @var string - */ - public const TYPE_CLOSED_RESOURCE = 'resource (closed)'; - /** - * @var string - */ - public const TYPE_STRING = 'string'; - /** - * @var string + * Returns the name of this operator. */ - public const TYPE_SCALAR = 'scalar'; + abstract public function operator(): string; /** - * @var string + * Returns this operator's precedence. + * + * @see https://www.php.net/manual/en/language.operators.precedence.php */ - public const TYPE_CALLABLE = 'callable'; + abstract public function precedence(): int; /** - * @var string + * Returns the number of operands. */ - public const TYPE_ITERABLE = 'iterable'; + abstract public function arity(): int; /** - * @throws \PHPUnit\Framework\Exception + * Validates $constraint argument. */ - public function __construct(string $type) + protected function checkConstraint($constraint): \PHPUnit\Framework\Constraint\Constraint { } /** - * Returns a string representation of the constraint. + * Returns true if the $constraint needs to be wrapped with braces. */ - public function toString(): string + protected function constraintNeedsParentheses(\PHPUnit\Framework\Constraint\Constraint $constraint): bool { } } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class JsonMatches extends \PHPUnit\Framework\Constraint\Constraint +abstract class UnaryOperator extends \PHPUnit\Framework\Constraint\Operator { - public function __construct(string $value) - { - } /** - * Returns a string representation of the object. + * @param Constraint|mixed $constraint */ - public function toString(): string + public function __construct($constraint) { } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class IsWritable extends \PHPUnit\Framework\Constraint\Constraint -{ /** - * Returns a string representation of the constraint. + * Returns the number of operands (constraints). */ - public function toString(): string + public function arity(): int { } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class FileExists extends \PHPUnit\Framework\Constraint\Constraint -{ /** * Returns a string representation of the constraint. */ public function toString(): string { } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class DirectoryExists extends \PHPUnit\Framework\Constraint\Constraint -{ /** - * Returns a string representation of the constraint. + * Counts the number of constraint elements. */ - public function toString(): string + public function count(): int { } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class IsReadable extends \PHPUnit\Framework\Constraint\Constraint -{ /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class StringContains extends \PHPUnit\Framework\Constraint\Constraint -{ - public function __construct(string $string, bool $ignoreCase = false) + * Returns the description of the failure. + * + * The beginning of failure messages is "Failed asserting that" in most + * cases. This method should return the second part of that sentence. + * + * @param mixed $other evaluated value or object + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + */ + protected function failureDescription($other): string { } /** - * Returns a string representation of the constraint. + * Transforms string returned by the memeber constraint's toString() or + * failureDescription() such that it reflects constraint's participation in + * this expression. + * + * The method may be overwritten in a subclass to apply default + * transformation in case the operand constraint does not provide its own + * custom strings via toStringInContext() or failureDescriptionInContext(). + * + * @param string $string the string to be transformed */ - public function toString(): string + protected function transformString(string $string): string { } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class StringEndsWith extends \PHPUnit\Framework\Constraint\Constraint -{ - public function __construct(string $suffix) + /** + * Provides access to $this->constraint for subclasses. + */ + final protected function constraint(): \PHPUnit\Framework\Constraint\Constraint { } /** - * Returns a string representation of the constraint. + * Returns true if the $constraint needs to be wrapped with parentheses. */ - public function toString(): string + protected function constraintNeedsParentheses(\PHPUnit\Framework\Constraint\Constraint $constraint): bool { } } @@ -7394,15 +7190,6 @@ public function toString(): string { } } -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class StringMatchesFormatDescription extends \PHPUnit\Framework\Constraint\RegularExpression -{ - public function __construct(string $string) - { - } -} /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ @@ -7430,9 +7217,9 @@ protected function matches($other): bool /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class StringStartsWith extends \PHPUnit\Framework\Constraint\Constraint +final class StringContains extends \PHPUnit\Framework\Constraint\Constraint { - public function __construct(string $prefix) + public function __construct(string $string, bool $ignoreCase = false) { } /** @@ -7445,20 +7232,11 @@ public function toString(): string /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class IsTrue extends \PHPUnit\Framework\Constraint\Constraint +final class StringEndsWith extends \PHPUnit\Framework\Constraint\Constraint { - /** - * Returns a string representation of the constraint. - */ - public function toString(): string + public function __construct(string $suffix) { } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class IsFalse extends \PHPUnit\Framework\Constraint\Constraint -{ /** * Returns a string representation of the constraint. */ @@ -7466,545 +7244,473 @@ public function toString(): string { } } -namespace PHPUnit\Framework\Error; - -/** - * @internal - */ -final class Warning extends \PHPUnit\Framework\Error\Error -{ -} -/** - * @internal - */ -final class Deprecated extends \PHPUnit\Framework\Error\Error -{ -} -/** - * @internal - */ -final class Notice extends \PHPUnit\Framework\Error\Error -{ -} -/** - * @internal - */ -class Error extends \PHPUnit\Framework\Exception -{ - public function __construct(string $message, int $code, string $file, int $line, ?\Exception $previous = null) - { - } -} -namespace PHPUnit\Framework\MockObject; - /** - * @method Builder\InvocationStubber method($constraint) - * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -interface Stub -{ - public function __phpunit_getInvocationHandler(): \PHPUnit\Framework\MockObject\InvocationHandler; - public function __phpunit_hasMatchers(): bool; - public function __phpunit_setReturnValueGeneration(bool $returnValueGeneration): void; -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MockClass implements \PHPUnit\Framework\MockObject\MockType -{ - /** - * @phan-param class-string $mockName - */ - public function __construct(string $classCode, string $mockName, array $configurableMethods) - { - } - /** - * @phan-return class-string - */ - public function generate(): string - { - } - public function getClassCode(): string - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvocationHandler +final class StringMatchesFormatDescription extends \PHPUnit\Framework\Constraint\RegularExpression { - public function __construct(array $configurableMethods, bool $returnValueGeneration) - { - } - public function hasMatchers(): bool - { - } - /** - * Looks up the match builder with identification $id and returns it. - * - * @param string $id The identification of the match builder - */ - public function lookupMatcher(string $id): ?\PHPUnit\Framework\MockObject\Matcher - { - } - /** - * Registers a matcher with the identification $id. The matcher can later be - * looked up using lookupMatcher() to figure out if it has been invoked. - * - * @param string $id The identification of the matcher - * @param Matcher $matcher The builder which is being registered - * - * @throws MatcherAlreadyRegisteredException - */ - public function registerMatcher(string $id, \PHPUnit\Framework\MockObject\Matcher $matcher): void - { - } - public function expects(\PHPUnit\Framework\MockObject\Rule\InvocationOrder $rule): \PHPUnit\Framework\MockObject\Builder\InvocationMocker - { - } - /** - * @throws \Exception - * @throws RuntimeException - */ - public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation) - { - } - public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool - { - } - /** - * @throws \Throwable - */ - public function verify(): void + public function __construct(string $string) { } } /** - * @internal This class is not covered by the backward compatibility promise for PHPUnit + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class MockMethodSet +final class StringStartsWith extends \PHPUnit\Framework\Constraint\Constraint { - public function addMethods(\PHPUnit\Framework\MockObject\MockMethod ...$methods): void + public function __construct(string $prefix) { } /** - * @return MockMethod[] + * Returns a string representation of the constraint. */ - public function asArray(): array - { - } - public function hasMethod(string $methodName): bool + public function toString(): string { } } /** - * @internal This class is not covered by the backward compatibility promise for PHPUnit + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class Generator +final class ArrayHasKey extends \PHPUnit\Framework\Constraint\Constraint { /** - * Returns a mock object for the specified class. - * - * @param null|array $methods - * - * @throws ClassAlreadyExistsException - * @throws ClassIsFinalException - * @throws ClassIsReadonlyException - * @throws DuplicateMethodException - * @throws \PHPUnit\Framework\InvalidArgumentException - * @throws InvalidMethodNameException - * @throws OriginalConstructorInvocationRequiredException - * @throws ReflectionException - * @throws RuntimeException - * @throws UnknownTypeException - */ - public function getMock(string $type, $methods = [], array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, bool $cloneArguments = true, bool $callOriginalMethods = false, ?object $proxyTarget = null, bool $allowMockingUnknownTypes = true, bool $returnValueGeneration = true): \PHPUnit\Framework\MockObject\MockObject - { - } - /** - * @phan-param list $interfaces - * - * @throws RuntimeException - * @throws UnknownTypeException + * @param int|string $key */ - public function getMockForInterfaces(array $interfaces, bool $callAutoload = true): \PHPUnit\Framework\MockObject\MockObject + public function __construct($key) { } /** - * Returns a mock object for the specified abstract class with all abstract - * methods of the class mocked. - * - * Concrete methods to mock can be specified with the $mockedMethods parameter. - * - * @phan-template RealInstanceType of object - * - * @phan-param class-string $originalClassName - * - * @phan-return MockObject&RealInstanceType + * Returns a string representation of the constraint. * - * @throws ClassAlreadyExistsException - * @throws ClassIsFinalException - * @throws ClassIsReadonlyException - * @throws DuplicateMethodException - * @throws \PHPUnit\Framework\InvalidArgumentException - * @throws InvalidMethodNameException - * @throws OriginalConstructorInvocationRequiredException - * @throws ReflectionException - * @throws RuntimeException - * @throws UnknownClassException - * @throws UnknownTypeException + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ - public function getMockForAbstractClass(string $originalClassName, array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, ?array $mockedMethods = null, bool $cloneArguments = true): \PHPUnit\Framework\MockObject\MockObject + public function toString(): string { } - /** - * Returns a mock object for the specified trait with all abstract methods - * of the trait mocked. Concrete methods to mock can be specified with the - * `$mockedMethods` parameter. - * - * @phan-param trait-string $traitName - * - * @throws ClassAlreadyExistsException - * @throws ClassIsFinalException - * @throws ClassIsReadonlyException - * @throws DuplicateMethodException - * @throws \PHPUnit\Framework\InvalidArgumentException - * @throws InvalidMethodNameException - * @throws OriginalConstructorInvocationRequiredException - * @throws ReflectionException - * @throws RuntimeException - * @throws UnknownClassException - * @throws UnknownTraitException - * @throws UnknownTypeException - */ - public function getMockForTrait(string $traitName, array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, ?array $mockedMethods = null, bool $cloneArguments = true): \PHPUnit\Framework\MockObject\MockObject +} +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +abstract class TraversableContains extends \PHPUnit\Framework\Constraint\Constraint +{ + public function __construct($value) { } /** - * Returns an object for the specified trait. - * - * @phan-param trait-string $traitName + * Returns a string representation of the constraint. * - * @throws ReflectionException - * @throws RuntimeException - * @throws UnknownTraitException + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ - public function getObjectForTrait(string $traitName, string $traitClassName = '', bool $callAutoload = true, bool $callOriginalConstructor = false, array $arguments = []): object + public function toString(): string { } /** - * @throws ClassIsFinalException - * @throws ClassIsReadonlyException - * @throws ReflectionException - * @throws RuntimeException + * Returns the description of the failure. + * + * The beginning of failure messages is "Failed asserting that" in most + * cases. This method should return the second part of that sentence. + * + * @param mixed $other evaluated value or object + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ - public function generate(string $type, ?array $methods = null, string $mockClassName = '', bool $callOriginalClone = true, bool $callAutoload = true, bool $cloneArguments = true, bool $callOriginalMethods = false): \PHPUnit\Framework\MockObject\MockClass + protected function failureDescription($other): string { } - /** - * @throws RuntimeException - * @throws SoapExtensionNotAvailableException - */ - public function generateClassFromWsdl(string $wsdlFile, string $className, array $methods = [], array $options = []): string + protected function value() { } +} +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +final class TraversableContainsEqual extends \PHPUnit\Framework\Constraint\TraversableContains +{ +} +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +final class TraversableContainsIdentical extends \PHPUnit\Framework\Constraint\TraversableContains +{ +} +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +final class TraversableContainsOnly extends \PHPUnit\Framework\Constraint\Constraint +{ /** - * @throws ReflectionException - * - * @return string[] + * @throws \PHPUnit\Framework\Exception */ - public function getClassMethods(string $className): array + public function __construct(string $type, bool $isNativeType = true) { } /** - * @throws ReflectionException + * Evaluates the constraint for parameter $other. * - * @return MockMethod[] + * If $returnResult is set to false (the default), an exception is thrown + * in case of a failure. null is returned otherwise. + * + * If $returnResult is true, the result of the evaluation is returned as + * a boolean value instead: true in case of success, false in case of a + * failure. + * + * @param mixed|\Traversable $other + * + * @throws \PHPUnit\Framework\ExpectationFailedException + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ - public function mockClassMethods(string $className, bool $callOriginalMethods, bool $cloneArguments): array + public function evaluate($other, string $description = '', bool $returnResult = false): ?bool { } /** - * @throws ReflectionException - * - * @return MockMethod[] + * Returns a string representation of the constraint. */ - public function mockInterfaceMethods(string $interfaceName, bool $cloneArguments): array + public function toString(): string { } } /** - * @phan-template MockedType - * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class MockBuilder +final class IsInstanceOf extends \PHPUnit\Framework\Constraint\Constraint { + public function __construct(string $className) + { + } /** - * @param string|string[] $type - * - * @phan-param class-string|string|string[] $type + * Returns a string representation of the constraint. */ - public function __construct(\PHPUnit\Framework\TestCase $testCase, $type) + public function toString(): string { } +} +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +final class IsNull extends \PHPUnit\Framework\Constraint\Constraint +{ /** - * Creates a mock object using a fluent interface. - * - * @throws ClassAlreadyExistsException - * @throws ClassIsFinalException - * @throws ClassIsReadonlyException - * @throws DuplicateMethodException - * @throws \PHPUnit\Framework\InvalidArgumentException - * @throws InvalidMethodNameException - * @throws OriginalConstructorInvocationRequiredException - * @throws ReflectionException - * @throws RuntimeException - * @throws UnknownTypeException - * - * @phan-return MockObject&MockedType + * Returns a string representation of the constraint. */ - public function getMock(): \PHPUnit\Framework\MockObject\MockObject + public function toString(): string { } +} +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +final class IsType extends \PHPUnit\Framework\Constraint\Constraint +{ + /** + * @var string + */ + public const TYPE_ARRAY = 'array'; + /** + * @var string + */ + public const TYPE_BOOL = 'bool'; + /** + * @var string + */ + public const TYPE_FLOAT = 'float'; + /** + * @var string + */ + public const TYPE_INT = 'int'; + /** + * @var string + */ + public const TYPE_NULL = 'null'; + /** + * @var string + */ + public const TYPE_NUMERIC = 'numeric'; + /** + * @var string + */ + public const TYPE_OBJECT = 'object'; + /** + * @var string + */ + public const TYPE_RESOURCE = 'resource'; + /** + * @var string + */ + public const TYPE_CLOSED_RESOURCE = 'resource (closed)'; + /** + * @var string + */ + public const TYPE_STRING = 'string'; + /** + * @var string + */ + public const TYPE_SCALAR = 'scalar'; + /** + * @var string + */ + public const TYPE_CALLABLE = 'callable'; + /** + * @var string + */ + public const TYPE_ITERABLE = 'iterable'; /** - * Creates a mock object for an abstract class using a fluent interface. - * - * @phan-return MockObject&MockedType - * * @throws \PHPUnit\Framework\Exception - * @throws ReflectionException - * @throws RuntimeException */ - public function getMockForAbstractClass(): \PHPUnit\Framework\MockObject\MockObject + public function __construct(string $type) { } /** - * Creates a mock object for a trait using a fluent interface. - * - * @phan-return MockObject&MockedType - * - * @throws \PHPUnit\Framework\Exception - * @throws ReflectionException - * @throws RuntimeException + * Returns a string representation of the constraint. */ - public function getMockForTrait(): \PHPUnit\Framework\MockObject\MockObject + public function toString(): string + { + } +} +namespace PHPUnit\Framework\Error; + +/** + * @internal + */ +final class Deprecated extends \PHPUnit\Framework\Error\Error +{ +} +/** + * @internal + */ +class Error extends \PHPUnit\Framework\Exception +{ + public function __construct(string $message, int $code, string $file, int $line, ?\Exception $previous = null) { } +} +/** + * @internal + */ +final class Notice extends \PHPUnit\Framework\Error\Error +{ +} +/** + * @internal + */ +final class Warning extends \PHPUnit\Framework\Error\Error +{ +} +namespace PHPUnit\Framework\MockObject; + +/** + * @internal This trait is not covered by the backward compatibility promise for PHPUnit + */ +trait Api +{ /** - * Specifies the subset of methods to mock. Default is to mock none of them. - * - * @deprecated https://github.com/sebastianbergmann/phpunit/pull/3687 - * - * @return $this - * @phan-return $this + * @var ConfigurableMethod[] */ - public function setMethods(?array $methods = null): self + private static $__phpunit_configurableMethods; + /** + * @var object + */ + private $__phpunit_originalObject; + /** + * @var bool + */ + private $__phpunit_returnValueGeneration = true; + /** + * @var InvocationHandler + */ + private $__phpunit_invocationMocker; + /** @noinspection MagicMethodsValidityInspection */ + public static function __phpunit_initConfigurableMethods(\PHPUnit\Framework\MockObject\ConfigurableMethod ...$configurableMethods): void + { + } + /** @noinspection MagicMethodsValidityInspection */ + public function __phpunit_setOriginalObject($originalObject): void { } - /** - * Specifies the subset of methods to mock, requiring each to exist in the class. - * - * @param string[] $methods - * - * @throws CannotUseOnlyMethodsException - * @throws ReflectionException - * - * @return $this - * @phan-return $this - */ - public function onlyMethods(array $methods): self + /** @noinspection MagicMethodsValidityInspection */ + public function __phpunit_setReturnValueGeneration(bool $returnValueGeneration): void { } - /** - * Specifies methods that don't exist in the class which you want to mock. - * - * @param string[] $methods - * - * @throws CannotUseAddMethodsException - * @throws ReflectionException - * @throws RuntimeException - * - * @return $this - * @phan-return $this - */ - public function addMethods(array $methods): self + /** @noinspection MagicMethodsValidityInspection */ + public function __phpunit_getInvocationHandler(): \PHPUnit\Framework\MockObject\InvocationHandler { } - /** - * Specifies the subset of methods to not mock. Default is to mock all of them. - * - * @deprecated https://github.com/sebastianbergmann/phpunit/pull/3687 - * - * @throws ReflectionException - */ - public function setMethodsExcept(array $methods = []): self + /** @noinspection MagicMethodsValidityInspection */ + public function __phpunit_hasMatchers(): bool { } - /** - * Specifies the arguments for the constructor. - * - * @return $this - * @phan-return $this - */ - public function setConstructorArgs(array $args): self + /** @noinspection MagicMethodsValidityInspection */ + public function __phpunit_verify(bool $unsetInvocationMocker = true): void { } - /** - * Specifies the name for the mock class. - * - * @return $this - * @phan-return $this - */ - public function setMockClassName(string $name): self + public function expects(\PHPUnit\Framework\MockObject\Rule\InvocationOrder $matcher): \PHPUnit\Framework\MockObject\Builder\InvocationMocker { } - /** - * Disables the invocation of the original constructor. - * - * @return $this - * @phan-return $this - */ - public function disableOriginalConstructor(): self +} +/** + * @internal This trait is not covered by the backward compatibility promise for PHPUnit + */ +trait Method +{ + public function method(...$func_get_args) { } - /** - * Enables the invocation of the original constructor. - * - * @return $this - * @phan-return $this - */ - public function enableOriginalConstructor(): self +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class ConfigurableMethod +{ + public function __construct(string $name, \SebastianBergmann\Type\Type $returnType) { } - /** - * Disables the invocation of the original clone constructor. - * - * @return $this - * @phan-return $this - */ - public function disableOriginalClone(): self + public function getName(): string { } - /** - * Enables the invocation of the original clone constructor. - * - * @return $this - * @phan-return $this - */ - public function enableOriginalClone(): self + public function mayReturn($value): bool { } - /** - * Disables the use of class autoloading while creating the mock object. - * - * @return $this - * @phan-return $this - */ - public function disableAutoload(): self + public function getReturnTypeDeclaration(): string { } - /** - * Enables the use of class autoloading while creating the mock object. - * - * @return $this - * @phan-return $this - */ - public function enableAutoload(): self +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class BadMethodCallException extends \BadMethodCallException implements \PHPUnit\Framework\MockObject\Exception +{ +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class CannotUseAddMethodsException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +{ + public function __construct(string $type, string $methodName) { } - /** - * Disables the cloning of arguments passed to mocked methods. - * - * @return $this - * @phan-return $this - */ - public function disableArgumentCloning(): self +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class CannotUseOnlyMethodsException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +{ + public function __construct(string $type, string $methodName) { } - /** - * Enables the cloning of arguments passed to mocked methods. - * - * @return $this - * @phan-return $this - */ - public function enableArgumentCloning(): self +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class ClassAlreadyExistsException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +{ + public function __construct(string $className) { } - /** - * Enables the invocation of the original methods. - * - * @return $this - * @phan-return $this - */ - public function enableProxyingToOriginalMethods(): self +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class ClassIsFinalException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +{ + public function __construct(string $className) { } - /** - * Disables the invocation of the original methods. - * - * @return $this - * @phan-return $this - */ - public function disableProxyingToOriginalMethods(): self +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class ClassIsReadonlyException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +{ + public function __construct(string $className) { } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class ConfigurableMethodsAlreadyInitializedException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +{ +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class DuplicateMethodException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +{ /** - * Sets the proxy target. - * - * @return $this - * @phan-return $this + * @phan-param list $methods */ - public function setProxyTarget(object $object): self + public function __construct(array $methods) { } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +interface Exception extends \Throwable +{ +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class IncompatibleReturnValueException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +{ /** - * @return $this - * @phan-return $this + * @param mixed $value */ - public function allowMockingUnknownTypes(): self + public function __construct(\PHPUnit\Framework\MockObject\ConfigurableMethod $method, $value) { } - /** - * @return $this - * @phan-return $this - */ - public function disallowMockingUnknownTypes(): self +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class InvalidMethodNameException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +{ + public function __construct(string $method) { } - /** - * @return $this - * @phan-return $this - */ - public function enableAutoReturnValueGeneration(): self +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class MatchBuilderNotFoundException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +{ + public function __construct(string $id) + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class MatcherAlreadyRegisteredException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +{ + public function __construct(string $id) { } - /** - * @return $this - * @phan-return $this - */ - public function disableAutoReturnValueGeneration(): self +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class MethodCannotBeConfiguredException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +{ + public function __construct(string $method) { } } /** - * @method Builder\InvocationMocker method($constraint) - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -interface MockObject extends \PHPUnit\Framework\MockObject\Stub +final class MethodNameAlreadyConfiguredException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception { - public function __phpunit_setOriginalObject($originalObject): void; - public function __phpunit_verify(bool $unsetInvocationMocker = true): void; - public function expects(\PHPUnit\Framework\MockObject\Rule\InvocationOrder $invocationRule): \PHPUnit\Framework\MockObject\Builder\InvocationMocker; + public function __construct() + { + } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class UnknownClassException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +final class MethodNameNotConfiguredException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception { - public function __construct(string $className) + public function __construct() { } } @@ -8020,226 +7726,348 @@ public function __construct() /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class UnknownTypeException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +final class OriginalConstructorInvocationRequiredException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception { - public function __construct(string $type) + public function __construct() { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -interface Exception extends \Throwable +final class ReflectionException extends \RuntimeException implements \PHPUnit\Framework\MockObject\Exception { } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class SoapExtensionNotAvailableException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +final class ReturnValueNotConfiguredException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception { - public function __construct() + public function __construct(\PHPUnit\Framework\MockObject\Invocation $invocation) { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class DuplicateMethodException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +final class RuntimeException extends \RuntimeException implements \PHPUnit\Framework\MockObject\Exception { - /** - * @phan-param list $methods - */ - public function __construct(array $methods) +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class SoapExtensionNotAvailableException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +{ + public function __construct() { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class RuntimeException extends \RuntimeException implements \PHPUnit\Framework\MockObject\Exception +final class UnknownClassException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception { + public function __construct(string $className) + { + } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class CannotUseAddMethodsException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +final class UnknownTraitException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception { - public function __construct(string $type, string $methodName) + public function __construct(string $traitName) { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class ReturnValueNotConfiguredException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +final class UnknownTypeException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception { - public function __construct(\PHPUnit\Framework\MockObject\Invocation $invocation) + public function __construct(string $type) { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class MatcherAlreadyRegisteredException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +final class Generator { - public function __construct(string $id) + /** + * Returns a mock object for the specified class. + * + * @param null|array $methods + * + * @throws ClassAlreadyExistsException + * @throws ClassIsFinalException + * @throws ClassIsReadonlyException + * @throws DuplicateMethodException + * @throws \PHPUnit\Framework\InvalidArgumentException + * @throws InvalidMethodNameException + * @throws OriginalConstructorInvocationRequiredException + * @throws ReflectionException + * @throws RuntimeException + * @throws UnknownTypeException + */ + public function getMock(string $type, $methods = [], array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, bool $cloneArguments = true, bool $callOriginalMethods = false, ?object $proxyTarget = null, bool $allowMockingUnknownTypes = true, bool $returnValueGeneration = true): \PHPUnit\Framework\MockObject\MockObject + { + } + /** + * @phan-param list $interfaces + * + * @throws RuntimeException + * @throws UnknownTypeException + */ + public function getMockForInterfaces(array $interfaces, bool $callAutoload = true): \PHPUnit\Framework\MockObject\MockObject + { + } + /** + * Returns a mock object for the specified abstract class with all abstract + * methods of the class mocked. + * + * Concrete methods to mock can be specified with the $mockedMethods parameter. + * + * @phan-template RealInstanceType of object + * + * @phan-param class-string $originalClassName + * + * @phan-return MockObject&RealInstanceType + * + * @throws ClassAlreadyExistsException + * @throws ClassIsFinalException + * @throws ClassIsReadonlyException + * @throws DuplicateMethodException + * @throws \PHPUnit\Framework\InvalidArgumentException + * @throws InvalidMethodNameException + * @throws OriginalConstructorInvocationRequiredException + * @throws ReflectionException + * @throws RuntimeException + * @throws UnknownClassException + * @throws UnknownTypeException + */ + public function getMockForAbstractClass(string $originalClassName, array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, ?array $mockedMethods = null, bool $cloneArguments = true): \PHPUnit\Framework\MockObject\MockObject + { + } + /** + * Returns a mock object for the specified trait with all abstract methods + * of the trait mocked. Concrete methods to mock can be specified with the + * `$mockedMethods` parameter. + * + * @phan-param trait-string $traitName + * + * @throws ClassAlreadyExistsException + * @throws ClassIsFinalException + * @throws ClassIsReadonlyException + * @throws DuplicateMethodException + * @throws \PHPUnit\Framework\InvalidArgumentException + * @throws InvalidMethodNameException + * @throws OriginalConstructorInvocationRequiredException + * @throws ReflectionException + * @throws RuntimeException + * @throws UnknownClassException + * @throws UnknownTraitException + * @throws UnknownTypeException + */ + public function getMockForTrait(string $traitName, array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, ?array $mockedMethods = null, bool $cloneArguments = true): \PHPUnit\Framework\MockObject\MockObject + { + } + /** + * Returns an object for the specified trait. + * + * @phan-param trait-string $traitName + * + * @throws ReflectionException + * @throws RuntimeException + * @throws UnknownTraitException + */ + public function getObjectForTrait(string $traitName, string $traitClassName = '', bool $callAutoload = true, bool $callOriginalConstructor = false, array $arguments = []): object + { + } + /** + * @throws ClassIsFinalException + * @throws ClassIsReadonlyException + * @throws ReflectionException + * @throws RuntimeException + */ + public function generate(string $type, ?array $methods = null, string $mockClassName = '', bool $callOriginalClone = true, bool $callAutoload = true, bool $cloneArguments = true, bool $callOriginalMethods = false): \PHPUnit\Framework\MockObject\MockClass + { + } + /** + * @throws RuntimeException + * @throws SoapExtensionNotAvailableException + */ + public function generateClassFromWsdl(string $wsdlFile, string $className, array $methods = [], array $options = []): string + { + } + /** + * @throws ReflectionException + * + * @return string[] + */ + public function getClassMethods(string $className): array + { + } + /** + * @throws ReflectionException + * + * @return MockMethod[] + */ + public function mockClassMethods(string $className, bool $callOriginalMethods, bool $cloneArguments): array + { + } + /** + * @throws ReflectionException + * + * @return MockMethod[] + */ + public function mockInterfaceMethods(string $interfaceName, bool $cloneArguments): array { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class ClassAlreadyExistsException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +final class Invocation implements \PHPUnit\Framework\SelfDescribing { - public function __construct(string $className) + public function __construct(string $className, string $methodName, array $parameters, string $returnType, object $object, bool $cloneObjects = false, bool $proxiedCall = false) + { + } + public function getClassName(): string + { + } + public function getMethodName(): string + { + } + public function getParameters(): array + { + } + /** + * @throws RuntimeException + * + * @return mixed Mocked return value + */ + public function generateReturnValue() + { + } + public function toString(): string + { + } + public function getObject(): object { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class MatchBuilderNotFoundException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +final class InvocationHandler { - public function __construct(string $id) + public function __construct(array $configurableMethods, bool $returnValueGeneration) + { + } + public function hasMatchers(): bool + { + } + /** + * Looks up the match builder with identification $id and returns it. + * + * @param string $id The identification of the match builder + */ + public function lookupMatcher(string $id): ?\PHPUnit\Framework\MockObject\Matcher + { + } + /** + * Registers a matcher with the identification $id. The matcher can later be + * looked up using lookupMatcher() to figure out if it has been invoked. + * + * @param string $id The identification of the matcher + * @param Matcher $matcher The builder which is being registered + * + * @throws MatcherAlreadyRegisteredException + */ + public function registerMatcher(string $id, \PHPUnit\Framework\MockObject\Matcher $matcher): void + { + } + public function expects(\PHPUnit\Framework\MockObject\Rule\InvocationOrder $rule): \PHPUnit\Framework\MockObject\Builder\InvocationMocker + { + } + /** + * @throws \Exception + * @throws RuntimeException + */ + public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation) { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ConfigurableMethodsAlreadyInitializedException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class UnknownTraitException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception -{ - public function __construct(string $traitName) + public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class IncompatibleReturnValueException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception -{ /** - * @param mixed $value + * @throws \Throwable */ - public function __construct(\PHPUnit\Framework\MockObject\ConfigurableMethod $method, $value) + public function verify(): void { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class OriginalConstructorInvocationRequiredException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception +final class Matcher { - public function __construct() + public function __construct(\PHPUnit\Framework\MockObject\Rule\InvocationOrder $rule) { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ClassIsFinalException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception -{ - public function __construct(string $className) + public function hasMatchers(): bool { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ReflectionException extends \RuntimeException implements \PHPUnit\Framework\MockObject\Exception -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MethodCannotBeConfiguredException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception -{ - public function __construct(string $method) + public function hasMethodNameRule(): bool { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class BadMethodCallException extends \BadMethodCallException implements \PHPUnit\Framework\MockObject\Exception -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class CannotUseOnlyMethodsException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception -{ - public function __construct(string $type, string $methodName) + public function getMethodNameRule(): \PHPUnit\Framework\MockObject\Rule\MethodName { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ClassIsReadonlyException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception -{ - public function __construct(string $className) + public function setMethodNameRule(\PHPUnit\Framework\MockObject\Rule\MethodName $rule): void { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvalidMethodNameException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception -{ - public function __construct(string $method) + public function hasParametersRule(): bool { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MethodNameNotConfiguredException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception -{ - public function __construct() + public function setParametersRule(\PHPUnit\Framework\MockObject\Rule\ParametersRule $rule): void { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MethodNameAlreadyConfiguredException extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\MockObject\Exception -{ - public function __construct() + public function setStub(\PHPUnit\Framework\MockObject\Stub\Stub $stub): void + { + } + public function setAfterMatchBuilderId(string $id): void { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface MockType -{ /** - * @phan-return class-string + * @throws \PHPUnit\Framework\ExpectationFailedException + * @throws MatchBuilderNotFoundException + * @throws MethodNameNotConfiguredException + * @throws RuntimeException */ - public function generate(): string; -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ConfigurableMethod -{ - public function __construct(string $name, \SebastianBergmann\Type\Type $returnType) + public function invoked(\PHPUnit\Framework\MockObject\Invocation $invocation) { } - public function getName(): string + /** + * @throws \PHPUnit\Framework\ExpectationFailedException + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws MatchBuilderNotFoundException + * @throws MethodNameNotConfiguredException + * @throws RuntimeException + */ + public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool { } - public function mayReturn($value): bool + /** + * @throws \PHPUnit\Framework\ExpectationFailedException + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws MethodNameNotConfiguredException + */ + public function verify(): void { } - public function getReturnTypeDeclaration(): string + public function toString(): string { } } @@ -8256,148 +8084,268 @@ public function toString(): string } } /** - * @internal This class is not covered by the backward compatibility promise for PHPUnit + * @phan-template MockedType + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class Matcher +final class MockBuilder { - public function __construct(\PHPUnit\Framework\MockObject\Rule\InvocationOrder $rule) + /** + * @param string|string[] $type + * + * @phan-param class-string|string|string[] $type + */ + public function __construct(\PHPUnit\Framework\TestCase $testCase, $type) { } - public function hasMatchers(): bool + /** + * Creates a mock object using a fluent interface. + * + * @throws ClassAlreadyExistsException + * @throws ClassIsFinalException + * @throws ClassIsReadonlyException + * @throws DuplicateMethodException + * @throws \PHPUnit\Framework\InvalidArgumentException + * @throws InvalidMethodNameException + * @throws OriginalConstructorInvocationRequiredException + * @throws ReflectionException + * @throws RuntimeException + * @throws UnknownTypeException + * + * @phan-return MockObject&MockedType + */ + public function getMock(): \PHPUnit\Framework\MockObject\MockObject { } - public function hasMethodNameRule(): bool + /** + * Creates a mock object for an abstract class using a fluent interface. + * + * @phan-return MockObject&MockedType + * + * @throws \PHPUnit\Framework\Exception + * @throws ReflectionException + * @throws RuntimeException + */ + public function getMockForAbstractClass(): \PHPUnit\Framework\MockObject\MockObject { } - public function getMethodNameRule(): \PHPUnit\Framework\MockObject\Rule\MethodName + /** + * Creates a mock object for a trait using a fluent interface. + * + * @phan-return MockObject&MockedType + * + * @throws \PHPUnit\Framework\Exception + * @throws ReflectionException + * @throws RuntimeException + */ + public function getMockForTrait(): \PHPUnit\Framework\MockObject\MockObject { } - public function setMethodNameRule(\PHPUnit\Framework\MockObject\Rule\MethodName $rule): void + /** + * Specifies the subset of methods to mock. Default is to mock none of them. + * + * @deprecated https://github.com/sebastianbergmann/phpunit/pull/3687 + * + * @return $this + * @phan-return $this + */ + public function setMethods(?array $methods = null): self { } - public function hasParametersRule(): bool + /** + * Specifies the subset of methods to mock, requiring each to exist in the class. + * + * @param string[] $methods + * + * @throws CannotUseOnlyMethodsException + * @throws ReflectionException + * + * @return $this + * @phan-return $this + */ + public function onlyMethods(array $methods): self { } - public function setParametersRule(\PHPUnit\Framework\MockObject\Rule\ParametersRule $rule): void + /** + * Specifies methods that don't exist in the class which you want to mock. + * + * @param string[] $methods + * + * @throws CannotUseAddMethodsException + * @throws ReflectionException + * @throws RuntimeException + * + * @return $this + * @phan-return $this + */ + public function addMethods(array $methods): self { } - public function setStub(\PHPUnit\Framework\MockObject\Stub\Stub $stub): void + /** + * Specifies the subset of methods to not mock. Default is to mock all of them. + * + * @deprecated https://github.com/sebastianbergmann/phpunit/pull/3687 + * + * @throws ReflectionException + */ + public function setMethodsExcept(array $methods = []): self { } - public function setAfterMatchBuilderId(string $id): void + /** + * Specifies the arguments for the constructor. + * + * @return $this + * @phan-return $this + */ + public function setConstructorArgs(array $args): self + { + } + /** + * Specifies the name for the mock class. + * + * @return $this + * @phan-return $this + */ + public function setMockClassName(string $name): self { } /** - * @throws \PHPUnit\Framework\ExpectationFailedException - * @throws MatchBuilderNotFoundException - * @throws MethodNameNotConfiguredException - * @throws RuntimeException + * Disables the invocation of the original constructor. + * + * @return $this + * @phan-return $this */ - public function invoked(\PHPUnit\Framework\MockObject\Invocation $invocation) + public function disableOriginalConstructor(): self { } /** - * @throws \PHPUnit\Framework\ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws MatchBuilderNotFoundException - * @throws MethodNameNotConfiguredException - * @throws RuntimeException + * Enables the invocation of the original constructor. + * + * @return $this + * @phan-return $this */ - public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool + public function enableOriginalConstructor(): self { } /** - * @throws \PHPUnit\Framework\ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws MethodNameNotConfiguredException + * Disables the invocation of the original clone constructor. + * + * @return $this + * @phan-return $this */ - public function verify(): void - { - } - public function toString(): string + public function disableOriginalClone(): self { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface Verifiable -{ /** - * Verifies that the current expectation is valid. If everything is OK the - * code should just return, if not it must throw an exception. + * Enables the invocation of the original clone constructor. * - * @throws \PHPUnit\Framework\ExpectationFailedException + * @return $this + * @phan-return $this */ - public function verify(): void; -} -/** - * @internal This trait is not covered by the backward compatibility promise for PHPUnit - */ -trait Api -{ + public function enableOriginalClone(): self + { + } /** - * @var ConfigurableMethod[] + * Disables the use of class autoloading while creating the mock object. + * + * @return $this + * @phan-return $this */ - private static $__phpunit_configurableMethods; + public function disableAutoload(): self + { + } /** - * @var object + * Enables the use of class autoloading while creating the mock object. + * + * @return $this + * @phan-return $this */ - private $__phpunit_originalObject; + public function enableAutoload(): self + { + } /** - * @var bool + * Disables the cloning of arguments passed to mocked methods. + * + * @return $this + * @phan-return $this */ - private $__phpunit_returnValueGeneration = true; + public function disableArgumentCloning(): self + { + } /** - * @var InvocationHandler + * Enables the cloning of arguments passed to mocked methods. + * + * @return $this + * @phan-return $this */ - private $__phpunit_invocationMocker; - /** @noinspection MagicMethodsValidityInspection */ - public static function __phpunit_initConfigurableMethods(\PHPUnit\Framework\MockObject\ConfigurableMethod ...$configurableMethods): void + public function enableArgumentCloning(): self { } - /** @noinspection MagicMethodsValidityInspection */ - public function __phpunit_setOriginalObject($originalObject): void + /** + * Enables the invocation of the original methods. + * + * @return $this + * @phan-return $this + */ + public function enableProxyingToOriginalMethods(): self { } - /** @noinspection MagicMethodsValidityInspection */ - public function __phpunit_setReturnValueGeneration(bool $returnValueGeneration): void + /** + * Disables the invocation of the original methods. + * + * @return $this + * @phan-return $this + */ + public function disableProxyingToOriginalMethods(): self { } - /** @noinspection MagicMethodsValidityInspection */ - public function __phpunit_getInvocationHandler(): \PHPUnit\Framework\MockObject\InvocationHandler + /** + * Sets the proxy target. + * + * @return $this + * @phan-return $this + */ + public function setProxyTarget(object $object): self { } - /** @noinspection MagicMethodsValidityInspection */ - public function __phpunit_hasMatchers(): bool + /** + * @return $this + * @phan-return $this + */ + public function allowMockingUnknownTypes(): self { } - /** @noinspection MagicMethodsValidityInspection */ - public function __phpunit_verify(bool $unsetInvocationMocker = true): void + /** + * @return $this + * @phan-return $this + */ + public function disallowMockingUnknownTypes(): self { } - public function expects(\PHPUnit\Framework\MockObject\Rule\InvocationOrder $matcher): \PHPUnit\Framework\MockObject\Builder\InvocationMocker + /** + * @return $this + * @phan-return $this + */ + public function enableAutoReturnValueGeneration(): self { } -} -/** - * @internal This trait is not covered by the backward compatibility promise for PHPUnit - */ -trait Method -{ - public function method(...$func_get_args) + /** + * @return $this + * @phan-return $this + */ + public function disableAutoReturnValueGeneration(): self { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class MockTrait implements \PHPUnit\Framework\MockObject\MockType +final class MockClass implements \PHPUnit\Framework\MockObject\MockType { /** * @phan-param class-string $mockName */ - public function __construct(string $classCode, string $mockName) + public function __construct(string $classCode, string $mockName, array $configurableMethods) { } /** @@ -8444,90 +8392,102 @@ public function getReturnType(): \SebastianBergmann\Type\Type /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class Invocation implements \PHPUnit\Framework\SelfDescribing +final class MockMethodSet { - public function __construct(string $className, string $methodName, array $parameters, string $returnType, object $object, bool $cloneObjects = false, bool $proxiedCall = false) - { - } - public function getClassName(): string + public function addMethods(\PHPUnit\Framework\MockObject\MockMethod ...$methods): void { } - public function getMethodName(): string + /** + * @return MockMethod[] + */ + public function asArray(): array { } - public function getParameters(): array + public function hasMethod(string $methodName): bool { } +} +/** + * @method Builder\InvocationMocker method($constraint) + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +interface MockObject extends \PHPUnit\Framework\MockObject\Stub +{ + public function __phpunit_setOriginalObject($originalObject): void; + public function __phpunit_verify(bool $unsetInvocationMocker = true): void; + public function expects(\PHPUnit\Framework\MockObject\Rule\InvocationOrder $invocationRule): \PHPUnit\Framework\MockObject\Builder\InvocationMocker; +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class MockTrait implements \PHPUnit\Framework\MockObject\MockType +{ /** - * @throws RuntimeException - * - * @return mixed Mocked return value + * @phan-param class-string $mockName */ - public function generateReturnValue() + public function __construct(string $classCode, string $mockName) { } - public function toString(): string + /** + * @phan-return class-string + */ + public function generate(): string { } - public function getObject(): object + public function getClassCode(): string { } } -namespace PHPUnit\Framework\MockObject\Builder; - /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -interface Stub extends \PHPUnit\Framework\MockObject\Builder\Identity +interface MockType { /** - * Stubs the matching method with the stub object $stub. Any invocations of - * the matched method will now be handled by the stub instead. + * @phan-return class-string */ - public function will(\PHPUnit\Framework\MockObject\Stub\Stub $stub): \PHPUnit\Framework\MockObject\Builder\Identity; + public function generate(): string; } /** + * @method Builder\InvocationStubber method($constraint) + * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -interface InvocationStubber +interface Stub +{ + public function __phpunit_getInvocationHandler(): \PHPUnit\Framework\MockObject\InvocationHandler; + public function __phpunit_hasMatchers(): bool; + public function __phpunit_setReturnValueGeneration(bool $returnValueGeneration): void; +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +interface Verifiable { - public function will(\PHPUnit\Framework\MockObject\Stub\Stub $stub): \PHPUnit\Framework\MockObject\Builder\Identity; - /** @return self */ - public function willReturn($value, ...$nextValues); - /** - * @param mixed $reference - * - * @return self - */ - public function willReturnReference(&$reference); - /** - * @param array> $valueMap - * - * @return self - */ - public function willReturnMap(array $valueMap); - /** - * @param int $argumentIndex - * - * @return self - */ - public function willReturnArgument($argumentIndex); /** - * @param callable $callback + * Verifies that the current expectation is valid. If everything is OK the + * code should just return, if not it must throw an exception. * - * @return self + * @throws \PHPUnit\Framework\ExpectationFailedException */ - public function willReturnCallback($callback); - /** @return self */ - public function willReturnSelf(); + public function verify(): void; +} +namespace PHPUnit\Framework\MockObject\Builder; + +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +interface Identity +{ /** - * @param mixed $values + * Sets the identification of the expectation to $id. * - * @return self + * @note The identifier is unique per mock object. + * + * @param string $id unique identification of expectation */ - public function willReturnOnConsecutiveCalls(...$values); - /** @return self */ - public function willThrowException(\Throwable $exception); + public function id($id); } /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -8635,6 +8595,64 @@ public function method($constraint): self { } } +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +interface InvocationStubber +{ + public function will(\PHPUnit\Framework\MockObject\Stub\Stub $stub): \PHPUnit\Framework\MockObject\Builder\Identity; + /** @return self */ + public function willReturn($value, ...$nextValues); + /** + * @param mixed $reference + * + * @return self + */ + public function willReturnReference(&$reference); + /** + * @param array> $valueMap + * + * @return self + */ + public function willReturnMap(array $valueMap); + /** + * @param int $argumentIndex + * + * @return self + */ + public function willReturnArgument($argumentIndex); + /** + * @param callable $callback + * + * @return self + */ + public function willReturnCallback($callback); + /** @return self */ + public function willReturnSelf(); + /** + * @param mixed $values + * + * @return self + */ + public function willReturnOnConsecutiveCalls(...$values); + /** @return self */ + public function willThrowException(\Throwable $exception); +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +interface MethodNameMatch extends \PHPUnit\Framework\MockObject\Builder\ParametersMatch +{ + /** + * Adds a new method name match and returns the parameter match object for + * further matching possibilities. + * + * @param \PHPUnit\Framework\Constraint\Constraint $constraint Constraint for matching method, if a string is passed it will use the PHPUnit_Framework_Constraint_IsEqual + * + * @return ParametersMatch + */ + public function method($constraint); +} /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ @@ -8683,160 +8701,76 @@ public function withAnyParameters(); /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -interface MethodNameMatch extends \PHPUnit\Framework\MockObject\Builder\ParametersMatch -{ - /** - * Adds a new method name match and returns the parameter match object for - * further matching possibilities. - * - * @param \PHPUnit\Framework\Constraint\Constraint $constraint Constraint for matching method, if a string is passed it will use the PHPUnit_Framework_Constraint_IsEqual - * - * @return ParametersMatch - */ - public function method($constraint); -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface Identity +interface Stub extends \PHPUnit\Framework\MockObject\Builder\Identity { /** - * Sets the identification of the expectation to $id. - * - * @note The identifier is unique per mock object. - * - * @param string $id unique identification of expectation + * Stubs the matching method with the stub object $stub. Any invocations of + * the matched method will now be handled by the stub instead. */ - public function id($id); + public function will(\PHPUnit\Framework\MockObject\Stub\Stub $stub): \PHPUnit\Framework\MockObject\Builder\Identity; } namespace PHPUnit\Framework\MockObject\Rule; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class MethodName +final class AnyInvokedCount extends \PHPUnit\Framework\MockObject\Rule\InvocationOrder { - /** - * @param \PHPUnit\Framework\Constraint\Constraint|string $constraint - * - * @throws \PHPUnit\Framework\InvalidArgumentException - */ - public function __construct($constraint) - { - } public function toString(): string { } - /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws \PHPUnit\Framework\ExpectationFailedException - */ - public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool + public function verify(): void { } - /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws \PHPUnit\Framework\ExpectationFailedException - */ - public function matchesName(string $methodName): bool + public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @deprecated */ -final class ConsecutiveParameters implements \PHPUnit\Framework\MockObject\Rule\ParametersRule +final class AnyParameters implements \PHPUnit\Framework\MockObject\Rule\ParametersRule { - /** - * @throws \PHPUnit\Framework\Exception - */ - public function __construct(array $parameterGroups) - { - } public function toString(): string { } - /** - * @throws \PHPUnit\Framework\ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ public function apply(\PHPUnit\Framework\MockObject\Invocation $invocation): void { } - /** - * @throws \PHPUnit\Framework\ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ public function verify(): void { } } -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface ParametersRule extends \PHPUnit\Framework\SelfDescribing, \PHPUnit\Framework\MockObject\Verifiable -{ - /** - * @throws \PHPUnit\Framework\ExpectationFailedException if the invocation violates the rule - */ - public function apply(\PHPUnit\Framework\MockObject\Invocation $invocation): void; - public function verify(): void; -} /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @deprecated */ -final class InvokedAtMostCount extends \PHPUnit\Framework\MockObject\Rule\InvocationOrder +final class ConsecutiveParameters implements \PHPUnit\Framework\MockObject\Rule\ParametersRule { /** - * @param int $allowedInvocations + * @throws \PHPUnit\Framework\Exception */ - public function __construct($allowedInvocations) + public function __construct(array $parameterGroups) { } public function toString(): string { } /** - * Verifies that the current expectation is valid. If everything is OK the - * code should just return, if not it must throw an exception. - * * @throws \PHPUnit\Framework\ExpectationFailedException + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ - public function verify(): void - { - } - public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvokedAtLeastCount extends \PHPUnit\Framework\MockObject\Rule\InvocationOrder -{ - /** - * @param int $requiredInvocations - */ - public function __construct($requiredInvocations) - { - } - public function toString(): string + public function apply(\PHPUnit\Framework\MockObject\Invocation $invocation): void { } /** - * Verifies that the current expectation is valid. If everything is OK the - * code should just return, if not it must throw an exception. - * * @throws \PHPUnit\Framework\ExpectationFailedException + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ public function verify(): void { } - public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool - { - } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit @@ -8857,31 +8791,30 @@ abstract protected function invokedDo(\PHPUnit\Framework\MockObject\Invocation $ } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4297 + * + * @codeCoverageIgnore */ -final class Parameters implements \PHPUnit\Framework\MockObject\Rule\ParametersRule +final class InvokedAtIndex extends \PHPUnit\Framework\MockObject\Rule\InvocationOrder { /** - * @throws \PHPUnit\Framework\Exception + * @param int $sequenceIndex */ - public function __construct(array $parameters) + public function __construct($sequenceIndex) { } public function toString(): string { } - /** - * @throws \Exception - */ - public function apply(\PHPUnit\Framework\MockObject\Invocation $invocation): void + public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool { } /** - * Checks if the invocation $invocation matches the current rules. If it - * does the rule will get the invoked() method called which should check - * if an expectation is met. + * Verifies that the current expectation is valid. If everything is OK the + * code should just return, if not it must throw an exception. * * @throws \PHPUnit\Framework\ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ public function verify(): void { @@ -8890,23 +8823,17 @@ public function verify(): void /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class InvokedCount extends \PHPUnit\Framework\MockObject\Rule\InvocationOrder +final class InvokedAtLeastCount extends \PHPUnit\Framework\MockObject\Rule\InvocationOrder { /** - * @param int $expectedCount + * @param int $requiredInvocations */ - public function __construct($expectedCount) - { - } - public function isNever(): bool + public function __construct($requiredInvocations) { } public function toString(): string { } - public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool - { - } /** * Verifies that the current expectation is valid. If everything is OK the * code should just return, if not it must throw an exception. @@ -8916,28 +8843,18 @@ public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): b public function verify(): void { } + public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool + { + } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4297 - * - * @codeCoverageIgnore */ -final class InvokedAtIndex extends \PHPUnit\Framework\MockObject\Rule\InvocationOrder +final class InvokedAtLeastOnce extends \PHPUnit\Framework\MockObject\Rule\InvocationOrder { - /** - * @param int $sequenceIndex - */ - public function __construct($sequenceIndex) - { - } public function toString(): string { } - public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool - { - } /** * Verifies that the current expectation is valid. If everything is OK the * code should just return, if not it must throw an exception. @@ -8947,27 +8864,21 @@ public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): b public function verify(): void { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class AnyParameters implements \PHPUnit\Framework\MockObject\Rule\ParametersRule -{ - public function toString(): string - { - } - public function apply(\PHPUnit\Framework\MockObject\Invocation $invocation): void - { - } - public function verify(): void + public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class InvokedAtLeastOnce extends \PHPUnit\Framework\MockObject\Rule\InvocationOrder +final class InvokedAtMostCount extends \PHPUnit\Framework\MockObject\Rule\InvocationOrder { + /** + * @param int $allowedInvocations + */ + public function __construct($allowedInvocations) + { + } public function toString(): string { } @@ -8987,102 +8898,115 @@ public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): b /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class AnyInvokedCount extends \PHPUnit\Framework\MockObject\Rule\InvocationOrder +final class InvokedCount extends \PHPUnit\Framework\MockObject\Rule\InvocationOrder { - public function toString(): string + /** + * @param int $expectedCount + */ + public function __construct($expectedCount) { } - public function verify(): void + public function isNever(): bool + { + } + public function toString(): string { } public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool { } -} -namespace PHPUnit\Framework\MockObject\Stub; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface Stub extends \PHPUnit\Framework\SelfDescribing -{ /** - * Fakes the processing of the invocation $invocation by returning a - * specific value. + * Verifies that the current expectation is valid. If everything is OK the + * code should just return, if not it must throw an exception. * - * @param \PHPUnit\Framework\MockObject\Invocation $invocation The invocation which was mocked and matched by the current method and argument matchers + * @throws \PHPUnit\Framework\ExpectationFailedException */ - public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation); + public function verify(): void + { + } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class Exception implements \PHPUnit\Framework\MockObject\Stub\Stub +final class MethodName { - public function __construct(\Throwable $exception) - { - } /** - * @throws \Throwable + * @param \PHPUnit\Framework\Constraint\Constraint|string $constraint + * + * @throws \PHPUnit\Framework\InvalidArgumentException */ - public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation): void + public function __construct($constraint) { } public function toString(): string { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ReturnArgument implements \PHPUnit\Framework\MockObject\Stub\Stub -{ - public function __construct($argumentIndex) - { - } - public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation) + /** + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws \PHPUnit\Framework\ExpectationFailedException + */ + public function matches(\PHPUnit\Framework\MockObject\Invocation $invocation): bool { } - public function toString(): string + /** + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws \PHPUnit\Framework\ExpectationFailedException + */ + public function matchesName(string $methodName): bool { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class ReturnReference implements \PHPUnit\Framework\MockObject\Stub\Stub +final class Parameters implements \PHPUnit\Framework\MockObject\Rule\ParametersRule { - public function __construct(&$reference) + /** + * @throws \PHPUnit\Framework\Exception + */ + public function __construct(array $parameters) { } - public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation) + public function toString(): string { } - public function toString(): string + /** + * @throws \Exception + */ + public function apply(\PHPUnit\Framework\MockObject\Invocation $invocation): void + { + } + /** + * Checks if the invocation $invocation matches the current rules. If it + * does the rule will get the invoked() method called which should check + * if an expectation is met. + * + * @throws \PHPUnit\Framework\ExpectationFailedException + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + */ + public function verify(): void { } } /** - * @internal This class is not covered by the backward compatibility promise for PHPUnit + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class ReturnSelf implements \PHPUnit\Framework\MockObject\Stub\Stub +interface ParametersRule extends \PHPUnit\Framework\SelfDescribing, \PHPUnit\Framework\MockObject\Verifiable { /** - * @throws \PHPUnit\Framework\MockObject\RuntimeException + * @throws \PHPUnit\Framework\ExpectationFailedException if the invocation violates the rule */ - public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation) - { - } - public function toString(): string - { - } + public function apply(\PHPUnit\Framework\MockObject\Invocation $invocation): void; + public function verify(): void; } +namespace PHPUnit\Framework\MockObject\Stub; + /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class ReturnStub implements \PHPUnit\Framework\MockObject\Stub\Stub +final class ConsecutiveCalls implements \PHPUnit\Framework\MockObject\Stub\Stub { - public function __construct($value) + public function __construct(array $stack) { } public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation) @@ -9095,12 +9019,15 @@ public function toString(): string /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class ReturnCallback implements \PHPUnit\Framework\MockObject\Stub\Stub +final class Exception implements \PHPUnit\Framework\MockObject\Stub\Stub { - public function __construct($callback) + public function __construct(\Throwable $exception) { } - public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation) + /** + * @throws \Throwable + */ + public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation): void { } public function toString(): string @@ -9110,9 +9037,9 @@ public function toString(): string /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class ReturnValueMap implements \PHPUnit\Framework\MockObject\Stub\Stub +final class ReturnArgument implements \PHPUnit\Framework\MockObject\Stub\Stub { - public function __construct(array $valueMap) + public function __construct($argumentIndex) { } public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation) @@ -9125,9 +9052,9 @@ public function toString(): string /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class ConsecutiveCalls implements \PHPUnit\Framework\MockObject\Stub\Stub +final class ReturnCallback implements \PHPUnit\Framework\MockObject\Stub\Stub { - public function __construct(array $stack) + public function __construct($callback) { } public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation) @@ -9137,165 +9064,81 @@ public function toString(): string { } } -namespace PHPUnit\Runner; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Exception extends \RuntimeException implements \PHPUnit\Exception -{ -} /** * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @deprecated see https://github.com/sebastianbergmann/phpunit/issues/4039 - */ -final class StandardTestSuiteLoader implements \PHPUnit\Runner\TestSuiteLoader -{ - /** - * @throws Exception - */ - public function load(string $suiteClassFile): \ReflectionClass - { - } - public function reload(\ReflectionClass $aClass): \ReflectionClass - { - } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class Version +final class ReturnReference implements \PHPUnit\Framework\MockObject\Stub\Stub { - /** - * Returns the current version of PHPUnit. - * - * @phan-return non-empty-string - */ - public static function id(): string + public function __construct(&$reference) { } - /** - * @phan-return non-empty-string - */ - public static function series(): string + public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation) { } - /** - * @phan-return non-empty-string - */ - public static function getVersionString(): string + public function toString(): string { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class TestSuiteSorter +final class ReturnSelf implements \PHPUnit\Framework\MockObject\Stub\Stub { /** - * @var int - */ - public const ORDER_DEFAULT = 0; - /** - * @var int - */ - public const ORDER_RANDOMIZED = 1; - /** - * @var int - */ - public const ORDER_REVERSED = 2; - /** - * @var int - */ - public const ORDER_DEFECTS_FIRST = 3; - /** - * @var int - */ - public const ORDER_DURATION = 4; - /** - * Order tests by @size annotation 'small', 'medium', 'large'. - * - * @var int - */ - public const ORDER_SIZE = 5; - public function __construct(?\PHPUnit\Runner\TestResultCache $cache = null) - { - } - /** - * @throws Exception - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws \PHPUnit\Framework\MockObject\RuntimeException */ - public function reorderTestsInSuite(\PHPUnit\Framework\Test $suite, int $order, bool $resolveDependencies, int $orderDefects, bool $isRootTestSuite = true): void - { - } - public function getOriginalExecutionOrder(): array - { - } - public function getExecutionOrder(): array - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ResultCacheExtension implements \PHPUnit\Runner\AfterIncompleteTestHook, \PHPUnit\Runner\AfterLastTestHook, \PHPUnit\Runner\AfterRiskyTestHook, \PHPUnit\Runner\AfterSkippedTestHook, \PHPUnit\Runner\AfterSuccessfulTestHook, \PHPUnit\Runner\AfterTestErrorHook, \PHPUnit\Runner\AfterTestFailureHook, \PHPUnit\Runner\AfterTestWarningHook -{ - public function __construct(\PHPUnit\Runner\TestResultCache $cache) - { - } - public function flush(): void - { - } - public function executeAfterSuccessfulTest(string $test, float $time): void - { - } - public function executeAfterIncompleteTest(string $test, string $message, float $time): void - { - } - public function executeAfterRiskyTest(string $test, string $message, float $time): void - { - } - public function executeAfterSkippedTest(string $test, string $message, float $time): void - { - } - public function executeAfterTestError(string $test, string $message, float $time): void - { - } - public function executeAfterTestFailure(string $test, string $message, float $time): void - { - } - public function executeAfterTestWarning(string $test, string $message, float $time): void + public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation) { } - public function executeAfterLastTest(): void + public function toString(): string { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class NullTestResultCache implements \PHPUnit\Runner\TestResultCache +final class ReturnStub implements \PHPUnit\Framework\MockObject\Stub\Stub { - public function setState(string $testName, int $state): void + public function __construct($value) { } - public function getState(string $testName): int + public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation) { } - public function setTime(string $testName, float $time): void + public function toString(): string { } - public function getTime(string $testName): float +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class ReturnValueMap implements \PHPUnit\Framework\MockObject\Stub\Stub +{ + public function __construct(array $valueMap) { } - public function load(): void + public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation) { } - public function persist(): void + public function toString(): string { } } +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +interface Stub extends \PHPUnit\Framework\SelfDescribing +{ + /** + * Fakes the processing of the invocation $invocation by returning a + * specific value. + * + * @param \PHPUnit\Framework\MockObject\Invocation $invocation The invocation which was mocked and matched by the current method and argument matchers + */ + public function invoke(\PHPUnit\Framework\MockObject\Invocation $invocation); +} +namespace PHPUnit\Runner; + /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ @@ -9403,6 +9246,12 @@ public function persist(): void { } } +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class Exception extends \RuntimeException implements \PHPUnit\Exception +{ +} /** * This interface, as well as the associated mechanism for extending PHPUnit, * will be removed in PHPUnit 10. There is no alternative available in this @@ -9412,9 +9261,9 @@ public function persist(): void * * @see https://github.com/sebastianbergmann/phpunit/issues/4676 */ -interface AfterTestFailureHook extends \PHPUnit\Runner\TestHook +interface AfterIncompleteTestHook extends \PHPUnit\Runner\TestHook { - public function executeAfterTestFailure(string $test, string $message, float $time): void; + public function executeAfterIncompleteTest(string $test, string $message, float $time): void; } /** * This interface, as well as the associated mechanism for extending PHPUnit, @@ -9425,8 +9274,9 @@ public function executeAfterTestFailure(string $test, string $message, float $ti * * @see https://github.com/sebastianbergmann/phpunit/issues/4676 */ -interface TestHook extends \PHPUnit\Runner\Hook +interface AfterLastTestHook extends \PHPUnit\Runner\Hook { + public function executeAfterLastTest(): void; } /** * This interface, as well as the associated mechanism for extending PHPUnit, @@ -9437,47 +9287,22 @@ interface TestHook extends \PHPUnit\Runner\Hook * * @see https://github.com/sebastianbergmann/phpunit/issues/4676 */ -interface Hook +interface AfterRiskyTestHook extends \PHPUnit\Runner\TestHook { + public function executeAfterRiskyTest(string $test, string $message, float $time): void; } /** - * @internal This class is not covered by the backward compatibility promise for PHPUnit + * This interface, as well as the associated mechanism for extending PHPUnit, + * will be removed in PHPUnit 10. There is no alternative available in this + * version of PHPUnit. + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @see https://github.com/sebastianbergmann/phpunit/issues/4676 */ -final class TestListenerAdapter implements \PHPUnit\Framework\TestListener +interface AfterSkippedTestHook extends \PHPUnit\Runner\TestHook { - public function add(\PHPUnit\Runner\TestHook $hook): void - { - } - public function startTest(\PHPUnit\Framework\Test $test): void - { - } - public function addError(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void - { - } - public function addWarning(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\Warning $e, float $time): void - { - } - public function addFailure(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\AssertionFailedError $e, float $time): void - { - } - public function addIncompleteTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void - { - } - public function addRiskyTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void - { - } - public function addSkippedTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void - { - } - public function endTest(\PHPUnit\Framework\Test $test, float $time): void - { - } - public function startTestSuite(\PHPUnit\Framework\TestSuite $suite): void - { - } - public function endTestSuite(\PHPUnit\Framework\TestSuite $suite): void - { - } + public function executeAfterSkippedTest(string $test, string $message, float $time): void; } /** * This interface, as well as the associated mechanism for extending PHPUnit, @@ -9488,9 +9313,9 @@ public function endTestSuite(\PHPUnit\Framework\TestSuite $suite): void * * @see https://github.com/sebastianbergmann/phpunit/issues/4676 */ -interface AfterIncompleteTestHook extends \PHPUnit\Runner\TestHook +interface AfterSuccessfulTestHook extends \PHPUnit\Runner\TestHook { - public function executeAfterIncompleteTest(string $test, string $message, float $time): void; + public function executeAfterSuccessfulTest(string $test, float $time): void; } /** * This interface, as well as the associated mechanism for extending PHPUnit, @@ -9501,9 +9326,22 @@ public function executeAfterIncompleteTest(string $test, string $message, float * * @see https://github.com/sebastianbergmann/phpunit/issues/4676 */ -interface BeforeTestHook extends \PHPUnit\Runner\TestHook +interface AfterTestErrorHook extends \PHPUnit\Runner\TestHook { - public function executeBeforeTest(string $test): void; + public function executeAfterTestError(string $test, string $message, float $time): void; +} +/** + * This interface, as well as the associated mechanism for extending PHPUnit, + * will be removed in PHPUnit 10. There is no alternative available in this + * version of PHPUnit. + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @see https://github.com/sebastianbergmann/phpunit/issues/4676 + */ +interface AfterTestFailureHook extends \PHPUnit\Runner\TestHook +{ + public function executeAfterTestFailure(string $test, string $message, float $time): void; } /** * This interface, as well as the associated mechanism for extending PHPUnit, @@ -9533,9 +9371,9 @@ public function executeAfterTest(string $test, float $time): void; * * @see https://github.com/sebastianbergmann/phpunit/issues/4676 */ -interface AfterSuccessfulTestHook extends \PHPUnit\Runner\TestHook +interface AfterTestWarningHook extends \PHPUnit\Runner\TestHook { - public function executeAfterSuccessfulTest(string $test, float $time): void; + public function executeAfterTestWarning(string $test, string $message, float $time): void; } /** * This interface, as well as the associated mechanism for extending PHPUnit, @@ -9546,9 +9384,9 @@ public function executeAfterSuccessfulTest(string $test, float $time): void; * * @see https://github.com/sebastianbergmann/phpunit/issues/4676 */ -interface AfterSkippedTestHook extends \PHPUnit\Runner\TestHook +interface BeforeFirstTestHook extends \PHPUnit\Runner\Hook { - public function executeAfterSkippedTest(string $test, string $message, float $time): void; + public function executeBeforeFirstTest(): void; } /** * This interface, as well as the associated mechanism for extending PHPUnit, @@ -9559,9 +9397,9 @@ public function executeAfterSkippedTest(string $test, string $message, float $ti * * @see https://github.com/sebastianbergmann/phpunit/issues/4676 */ -interface AfterRiskyTestHook extends \PHPUnit\Runner\TestHook +interface BeforeTestHook extends \PHPUnit\Runner\TestHook { - public function executeAfterRiskyTest(string $test, string $message, float $time): void; + public function executeBeforeTest(string $test): void; } /** * This interface, as well as the associated mechanism for extending PHPUnit, @@ -9572,9 +9410,8 @@ public function executeAfterRiskyTest(string $test, string $message, float $time * * @see https://github.com/sebastianbergmann/phpunit/issues/4676 */ -interface AfterTestWarningHook extends \PHPUnit\Runner\TestHook +interface Hook { - public function executeAfterTestWarning(string $test, string $message, float $time): void; } /** * This interface, as well as the associated mechanism for extending PHPUnit, @@ -9585,35 +9422,194 @@ public function executeAfterTestWarning(string $test, string $message, float $ti * * @see https://github.com/sebastianbergmann/phpunit/issues/4676 */ -interface BeforeFirstTestHook extends \PHPUnit\Runner\Hook +interface TestHook extends \PHPUnit\Runner\Hook { - public function executeBeforeFirstTest(): void; } /** - * This interface, as well as the associated mechanism for extending PHPUnit, - * will be removed in PHPUnit 10. There is no alternative available in this - * version of PHPUnit. - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see https://github.com/sebastianbergmann/phpunit/issues/4676 + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class TestListenerAdapter implements \PHPUnit\Framework\TestListener +{ + public function add(\PHPUnit\Runner\TestHook $hook): void + { + } + public function startTest(\PHPUnit\Framework\Test $test): void + { + } + public function addError(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void + { + } + public function addWarning(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\Warning $e, float $time): void + { + } + public function addFailure(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\AssertionFailedError $e, float $time): void + { + } + public function addIncompleteTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void + { + } + public function addRiskyTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void + { + } + public function addSkippedTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void + { + } + public function endTest(\PHPUnit\Framework\Test $test, float $time): void + { + } + public function startTestSuite(\PHPUnit\Framework\TestSuite $suite): void + { + } + public function endTestSuite(\PHPUnit\Framework\TestSuite $suite): void + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class NullTestResultCache implements \PHPUnit\Runner\TestResultCache +{ + public function setState(string $testName, int $state): void + { + } + public function getState(string $testName): int + { + } + public function setTime(string $testName, float $time): void + { + } + public function getTime(string $testName): float + { + } + public function load(): void + { + } + public function persist(): void + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class PhptTestCase implements \PHPUnit\Framework\Reorderable, \PHPUnit\Framework\SelfDescribing, \PHPUnit\Framework\Test +{ + /** + * Constructs a test case with the given filename. + * + * @throws Exception + */ + public function __construct(string $filename, ?\PHPUnit\Util\PHP\AbstractPhpProcess $phpUtil = null) + { + } + /** + * Counts the number of test cases executed by run(TestResult result). + */ + public function count(): int + { + } + /** + * Runs a test and collects its result in a TestResult instance. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws Exception + * @throws \SebastianBergmann\CodeCoverage\InvalidArgumentException + * @throws \SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException + */ + public function run(?\PHPUnit\Framework\TestResult $result = null): \PHPUnit\Framework\TestResult + { + } + /** + * Returns the name of the test case. + */ + public function getName(): string + { + } + /** + * Returns a string representation of the test case. + */ + public function toString(): string + { + } + public function usesDataProvider(): bool + { + } + public function getNumAssertions(): int + { + } + public function getActualOutput(): string + { + } + public function hasOutput(): bool + { + } + public function sortId(): string + { + } + /** + * @return list<\PHPUnit\Framework\ExecutionOrderDependency> + */ + public function provides(): array + { + } + /** + * @return list<\PHPUnit\Framework\ExecutionOrderDependency> + */ + public function requires(): array + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -interface AfterTestErrorHook extends \PHPUnit\Runner\TestHook +final class ResultCacheExtension implements \PHPUnit\Runner\AfterIncompleteTestHook, \PHPUnit\Runner\AfterLastTestHook, \PHPUnit\Runner\AfterRiskyTestHook, \PHPUnit\Runner\AfterSkippedTestHook, \PHPUnit\Runner\AfterSuccessfulTestHook, \PHPUnit\Runner\AfterTestErrorHook, \PHPUnit\Runner\AfterTestFailureHook, \PHPUnit\Runner\AfterTestWarningHook { - public function executeAfterTestError(string $test, string $message, float $time): void; + public function __construct(\PHPUnit\Runner\TestResultCache $cache) + { + } + public function flush(): void + { + } + public function executeAfterSuccessfulTest(string $test, float $time): void + { + } + public function executeAfterIncompleteTest(string $test, string $message, float $time): void + { + } + public function executeAfterRiskyTest(string $test, string $message, float $time): void + { + } + public function executeAfterSkippedTest(string $test, string $message, float $time): void + { + } + public function executeAfterTestError(string $test, string $message, float $time): void + { + } + public function executeAfterTestFailure(string $test, string $message, float $time): void + { + } + public function executeAfterTestWarning(string $test, string $message, float $time): void + { + } + public function executeAfterLastTest(): void + { + } } /** - * This interface, as well as the associated mechanism for extending PHPUnit, - * will be removed in PHPUnit 10. There is no alternative available in this - * version of PHPUnit. - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * @internal This class is not covered by the backward compatibility promise for PHPUnit * - * @see https://github.com/sebastianbergmann/phpunit/issues/4676 + * @deprecated see https://github.com/sebastianbergmann/phpunit/issues/4039 */ -interface AfterLastTestHook extends \PHPUnit\Runner\Hook +final class StandardTestSuiteLoader implements \PHPUnit\Runner\TestSuiteLoader { - public function executeAfterLastTest(): void; + /** + * @throws Exception + */ + public function load(string $suiteClassFile): \ReflectionClass + { + } + public function reload(\ReflectionClass $aClass): \ReflectionClass + { + } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit @@ -9640,70 +9636,74 @@ public function reload(\ReflectionClass $aClass): \ReflectionClass; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class PhptTestCase implements \PHPUnit\Framework\Reorderable, \PHPUnit\Framework\SelfDescribing, \PHPUnit\Framework\Test +final class TestSuiteSorter { /** - * Constructs a test case with the given filename. - * - * @throws Exception + * @var int */ - public function __construct(string $filename, ?\PHPUnit\Util\PHP\AbstractPhpProcess $phpUtil = null) - { - } + public const ORDER_DEFAULT = 0; /** - * Counts the number of test cases executed by run(TestResult result). + * @var int */ - public function count(): int - { - } + public const ORDER_RANDOMIZED = 1; /** - * Runs a test and collects its result in a TestResult instance. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * @throws \SebastianBergmann\CodeCoverage\InvalidArgumentException - * @throws \SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException + * @var int */ - public function run(?\PHPUnit\Framework\TestResult $result = null): \PHPUnit\Framework\TestResult - { - } + public const ORDER_REVERSED = 2; /** - * Returns the name of the test case. + * @var int */ - public function getName(): string - { - } + public const ORDER_DEFECTS_FIRST = 3; /** - * Returns a string representation of the test case. + * @var int */ - public function toString(): string - { - } - public function usesDataProvider(): bool + public const ORDER_DURATION = 4; + /** + * Order tests by @size annotation 'small', 'medium', 'large'. + * + * @var int + */ + public const ORDER_SIZE = 5; + public function __construct(?\PHPUnit\Runner\TestResultCache $cache = null) { } - public function getNumAssertions(): int + /** + * @throws Exception + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + */ + public function reorderTestsInSuite(\PHPUnit\Framework\Test $suite, int $order, bool $resolveDependencies, int $orderDefects, bool $isRootTestSuite = true): void { } - public function getActualOutput(): string + public function getOriginalExecutionOrder(): array { } - public function hasOutput(): bool + public function getExecutionOrder(): array { } - public function sortId(): string +} +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +final class Version +{ + /** + * Returns the current version of PHPUnit. + * + * @phan-return non-empty-string + */ + public static function id(): string { } /** - * @return list<\PHPUnit\Framework\ExecutionOrderDependency> + * @phan-return non-empty-string */ - public function provides(): array + public static function series(): string { } /** - * @return list<\PHPUnit\Framework\ExecutionOrderDependency> + * @phan-return non-empty-string */ - public function requires(): array + public static function getVersionString(): string { } } @@ -9746,42 +9746,48 @@ public function loadPharExtensionsInDirectory(string $directory): array /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class IncludeGroupFilterIterator extends \PHPUnit\Runner\Filter\GroupFilterIterator +final class ExcludeGroupFilterIterator extends \PHPUnit\Runner\Filter\GroupFilterIterator { } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -abstract class GroupFilterIterator extends \RecursiveFilterIterator +final class Factory { /** - * @var string[] + * @param array|string $args + * + * @throws \PHPUnit\Runner\Exception */ - protected $groupTests = []; - public function __construct(\RecursiveIterator $iterator, array $groups, \PHPUnit\Framework\TestSuite $suite) + public function addFilter(\ReflectionClass $filter, $args): void { } - public function accept(): bool + public function factory(\Iterator $iterator, \PHPUnit\Framework\TestSuite $suite): \FilterIterator { } - abstract protected function doAccept(string $hash); } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class Factory +abstract class GroupFilterIterator extends \RecursiveFilterIterator { /** - * @param array|string $args - * - * @throws \PHPUnit\Runner\Exception + * @var string[] */ - public function addFilter(\ReflectionClass $filter, $args): void + protected $groupTests = []; + public function __construct(\RecursiveIterator $iterator, array $groups, \PHPUnit\Framework\TestSuite $suite) { } - public function factory(\Iterator $iterator, \PHPUnit\Framework\TestSuite $suite): \FilterIterator + public function accept(): bool { } + abstract protected function doAccept(string $hash); +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class IncludeGroupFilterIterator extends \PHPUnit\Runner\Filter\GroupFilterIterator +{ } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit @@ -9801,113 +9807,122 @@ public function accept(): bool { } } -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ExcludeGroupFilterIterator extends \PHPUnit\Runner\Filter\GroupFilterIterator -{ -} namespace PHPUnit\TextUI; /** - * @internal This class is not covered by the backward compatibility promise for PHPUnit + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final class TestRunner extends \PHPUnit\Runner\BaseTestRunner +class Command { - public const SUCCESS_EXIT = 0; - public const FAILURE_EXIT = 1; - public const EXCEPTION_EXIT = 2; - public function __construct(?\PHPUnit\Runner\TestSuiteLoader $loader = null, ?\SebastianBergmann\CodeCoverage\Filter $filter = null) + /** + * @var array + */ + protected $arguments = []; + /** + * @var array + */ + protected $longOptions = []; + /** + * @throws Exception + */ + public static function main(bool $exit = true): int + { + } + /** + * @throws Exception + */ + public function run(array $argv, bool $exit = true): int + { + } + /** + * Create a TestRunner, override in subclasses. + */ + protected function createRunner(): \PHPUnit\TextUI\TestRunner + { + } + /** + * Handles the command-line arguments. + * + * A child class of PHPUnit\TextUI\Command can hook into the argument + * parsing by adding the switch(es) to the $longOptions array and point to a + * callback method that handles the switch(es) in the child class like this + * + * + * longOptions['my-switch'] = 'myHandler'; + * // my-secondswitch will accept a value - note the equals sign + * $this->longOptions['my-secondswitch='] = 'myOtherHandler'; + * } + * + * // --my-switch -> myHandler() + * protected function myHandler() + * { + * } + * + * // --my-secondswitch foo -> myOtherHandler('foo') + * protected function myOtherHandler ($value) + * { + * } + * + * // You will also need this - the static keyword in the + * // PHPUnit\TextUI\Command will mean that it'll be + * // PHPUnit\TextUI\Command that gets instantiated, + * // not MyCommand + * public static function main($exit = true) + * { + * $command = new static; + * + * return $command->run($_SERVER['argv'], $exit); + * } + * + * } + * + * + * @throws Exception + */ + protected function handleArguments(array $argv): void { } /** - * @throws \PHPUnit\Runner\Exception - * @throws \PHPUnit\Framework\Exception - * @throws XmlConfiguration\Exception + * Handles the loading of the PHPUnit\Runner\TestSuiteLoader implementation. + * + * @deprecated see https://github.com/sebastianbergmann/phpunit/issues/4039 */ - public function run(\PHPUnit\Framework\TestSuite $suite, array $arguments = [], array $warnings = [], bool $exit = true): \PHPUnit\Framework\TestResult + protected function handleLoader(string $loaderClass, string $loaderFile = ''): ?\PHPUnit\Runner\TestSuiteLoader { } /** - * Returns the loader to be used. + * Handles the loading of the PHPUnit\Util\Printer implementation. + * + * @return null|\PHPUnit\Util\Printer|string */ - public function getLoader(): \PHPUnit\Runner\TestSuiteLoader - { - } - public function addExtension(\PHPUnit\Runner\Hook $extension): void + protected function handlePrinter(string $printerClass, string $printerFile = '') { } -} -/** - * @internal This interface is not covered by the backward compatibility promise for PHPUnit - */ -interface Exception extends \Throwable -{ -} -/** - * @internal This interface is not covered by the backward compatibility promise for PHPUnit - */ -final class RuntimeException extends \RuntimeException implements \PHPUnit\TextUI\Exception -{ -} -/** - * @internal This interface is not covered by the backward compatibility promise for PHPUnit - */ -final class TestFileNotFoundException extends \RuntimeException implements \PHPUnit\TextUI\Exception -{ - public function __construct(string $path) + /** + * Loads a bootstrap file. + */ + protected function handleBootstrap(string $filename): void { } -} -/** - * @internal This interface is not covered by the backward compatibility promise for PHPUnit - */ -final class TestDirectoryNotFoundException extends \RuntimeException implements \PHPUnit\TextUI\Exception -{ - public function __construct(string $path) + protected function handleVersionCheck(): void { } -} -/** - * @internal This interface is not covered by the backward compatibility promise for PHPUnit - */ -final class ReflectionException extends \RuntimeException implements \PHPUnit\TextUI\Exception -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class TestSuiteMapper -{ /** - * @throws RuntimeException - * @throws TestDirectoryNotFoundException - * @throws TestFileNotFoundException + * Show the help message. */ - public function map(\PHPUnit\TextUI\XmlConfiguration\TestSuiteCollection $configuration, string $filter): \PHPUnit\Framework\TestSuite - { - } -} -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface ResultPrinter extends \PHPUnit\Framework\TestListener -{ - public function printResult(\PHPUnit\Framework\TestResult $result): void; - public function write(string $buffer): void; -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Help -{ - public function __construct(?int $width = null, ?bool $withColor = null) + protected function showHelp(): void { } /** - * Write the help file to the CLI, adapting width and colors to the console. + * Custom callback for test suite discovery. */ - public function writeToConsole(): void + protected function handleCustomTestSuite(): void { } } @@ -10101,124 +10116,118 @@ protected function writeProgressWithColor(string $color, string $buffer): void } } /** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * @internal This interface is not covered by the backward compatibility promise for PHPUnit */ -class Command +interface Exception extends \Throwable { - /** - * @var array - */ - protected $arguments = []; - /** - * @var array - */ - protected $longOptions = []; - /** - * @throws Exception - */ - public static function main(bool $exit = true): int +} +/** + * @internal This interface is not covered by the backward compatibility promise for PHPUnit + */ +final class ReflectionException extends \RuntimeException implements \PHPUnit\TextUI\Exception +{ +} +/** + * @internal This interface is not covered by the backward compatibility promise for PHPUnit + */ +final class RuntimeException extends \RuntimeException implements \PHPUnit\TextUI\Exception +{ +} +/** + * @internal This interface is not covered by the backward compatibility promise for PHPUnit + */ +final class TestDirectoryNotFoundException extends \RuntimeException implements \PHPUnit\TextUI\Exception +{ + public function __construct(string $path) { } - /** - * @throws Exception - */ - public function run(array $argv, bool $exit = true): int +} +/** + * @internal This interface is not covered by the backward compatibility promise for PHPUnit + */ +final class TestFileNotFoundException extends \RuntimeException implements \PHPUnit\TextUI\Exception +{ + public function __construct(string $path) { } - /** - * Create a TestRunner, override in subclasses. - */ - protected function createRunner(): \PHPUnit\TextUI\TestRunner +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class Help +{ + public function __construct(?int $width = null, ?bool $withColor = null) { } /** - * Handles the command-line arguments. - * - * A child class of PHPUnit\TextUI\Command can hook into the argument - * parsing by adding the switch(es) to the $longOptions array and point to a - * callback method that handles the switch(es) in the child class like this - * - * - * longOptions['my-switch'] = 'myHandler'; - * // my-secondswitch will accept a value - note the equals sign - * $this->longOptions['my-secondswitch='] = 'myOtherHandler'; - * } - * - * // --my-switch -> myHandler() - * protected function myHandler() - * { - * } - * - * // --my-secondswitch foo -> myOtherHandler('foo') - * protected function myOtherHandler ($value) - * { - * } - * - * // You will also need this - the static keyword in the - * // PHPUnit\TextUI\Command will mean that it'll be - * // PHPUnit\TextUI\Command that gets instantiated, - * // not MyCommand - * public static function main($exit = true) - * { - * $command = new static; - * - * return $command->run($_SERVER['argv'], $exit); - * } - * - * } - * - * - * @throws Exception + * Write the help file to the CLI, adapting width and colors to the console. */ - protected function handleArguments(array $argv): void + public function writeToConsole(): void { } - /** - * Handles the loading of the PHPUnit\Runner\TestSuiteLoader implementation. - * - * @deprecated see https://github.com/sebastianbergmann/phpunit/issues/4039 - */ - protected function handleLoader(string $loaderClass, string $loaderFile = ''): ?\PHPUnit\Runner\TestSuiteLoader +} +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +interface ResultPrinter extends \PHPUnit\Framework\TestListener +{ + public function printResult(\PHPUnit\Framework\TestResult $result): void; + public function write(string $buffer): void; +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class TestRunner extends \PHPUnit\Runner\BaseTestRunner +{ + public const SUCCESS_EXIT = 0; + public const FAILURE_EXIT = 1; + public const EXCEPTION_EXIT = 2; + public function __construct(?\PHPUnit\Runner\TestSuiteLoader $loader = null, ?\SebastianBergmann\CodeCoverage\Filter $filter = null) { } /** - * Handles the loading of the PHPUnit\Util\Printer implementation. - * - * @return null|\PHPUnit\Util\Printer|string + * @throws \PHPUnit\Runner\Exception + * @throws \PHPUnit\Framework\Exception + * @throws XmlConfiguration\Exception */ - protected function handlePrinter(string $printerClass, string $printerFile = '') + public function run(\PHPUnit\Framework\TestSuite $suite, array $arguments = [], array $warnings = [], bool $exit = true): \PHPUnit\Framework\TestResult { } /** - * Loads a bootstrap file. + * Returns the loader to be used. */ - protected function handleBootstrap(string $filename): void + public function getLoader(): \PHPUnit\Runner\TestSuiteLoader { } - protected function handleVersionCheck(): void + public function addExtension(\PHPUnit\Runner\Hook $extension): void { } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class TestSuiteMapper +{ /** - * Show the help message. + * @throws RuntimeException + * @throws TestDirectoryNotFoundException + * @throws TestFileNotFoundException */ - protected function showHelp(): void + public function map(\PHPUnit\TextUI\XmlConfiguration\TestSuiteCollection $configuration, string $filter): \PHPUnit\Framework\TestSuite { } - /** - * Custom callback for test suite discovery. - */ - protected function handleCustomTestSuite(): void +} +namespace PHPUnit\TextUI\CliArguments; + +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class Builder +{ + public function fromParameters(array $parameters, array $additionalLongOptions): \PHPUnit\TextUI\CliArguments\Configuration { } } -namespace PHPUnit\TextUI\CliArguments; - /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * @@ -11046,18 +11055,6 @@ public function xdebugFilterFile(): string { } } -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Mapper -{ - /** - * @throws Exception - */ - public function mapToLegacyArray(\PHPUnit\TextUI\CliArguments\Configuration $arguments): array - { - } -} /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ @@ -11067,9 +11064,12 @@ final class Exception extends \RuntimeException implements \PHPUnit\Exception /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class Builder +final class Mapper { - public function fromParameters(array $parameters, array $additionalLongOptions): \PHPUnit\TextUI\CliArguments\Configuration + /** + * @throws Exception + */ + public function mapToLegacyArray(\PHPUnit\TextUI\CliArguments\Configuration $arguments): array { } } @@ -11131,11 +11131,56 @@ final class Exception extends \RuntimeException implements \PHPUnit\Exception /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * - * @template-implements \Iterator + * @phan-side-effect-free */ -final class GroupCollectionIterator implements \Countable, \Iterator +final class Directory { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\GroupCollection $groups) + public function __construct(string $path) + { + } + public function path(): string + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @phan-side-effect-free + * + * @template-implements \IteratorAggregate + */ +final class DirectoryCollection implements \Countable, \IteratorAggregate +{ + /** + * @param Directory[] $directories + */ + public static function fromArray(array $directories): self + { + } + /** + * @return Directory[] + */ + public function asArray(): array + { + } + public function count(): int + { + } + public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\DirectoryCollectionIterator + { + } + public function isEmpty(): bool + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @template-implements \Iterator + */ +final class DirectoryCollectionIterator implements \Countable, \Iterator +{ + public function __construct(\PHPUnit\TextUI\XmlConfiguration\DirectoryCollection $directories) { } public function count(): int @@ -11150,7 +11195,7 @@ public function valid(): bool public function key(): int { } - public function current(): \PHPUnit\TextUI\XmlConfiguration\Group + public function current(): \PHPUnit\TextUI\XmlConfiguration\Directory { } public function next(): void @@ -11162,21 +11207,95 @@ public function next(): void * * @phan-side-effect-free */ -final class Groups +final class File { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\GroupCollection $include, \PHPUnit\TextUI\XmlConfiguration\GroupCollection $exclude) + public function __construct(string $path) { } - public function hasInclude(): bool + public function path(): string { } - public function include(): \PHPUnit\TextUI\XmlConfiguration\GroupCollection +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @phan-side-effect-free + * + * @template-implements \IteratorAggregate + */ +final class FileCollection implements \Countable, \IteratorAggregate +{ + /** + * @param File[] $files + */ + public static function fromArray(array $files): self { } - public function hasExclude(): bool + /** + * @return File[] + */ + public function asArray(): array { } - public function exclude(): \PHPUnit\TextUI\XmlConfiguration\GroupCollection + public function count(): int + { + } + public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\FileCollectionIterator + { + } + public function isEmpty(): bool + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @template-implements \Iterator + */ +final class FileCollectionIterator implements \Countable, \Iterator +{ + public function __construct(\PHPUnit\TextUI\XmlConfiguration\FileCollection $files) + { + } + public function count(): int + { + } + public function rewind(): void + { + } + public function valid(): bool + { + } + public function key(): int + { + } + public function current(): \PHPUnit\TextUI\XmlConfiguration\File + { + } + public function next(): void + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class Generator +{ + public function generateDefaultConfiguration(string $phpunitVersion, string $bootstrapScript, string $testsDirectory, string $srcDirectory, string $cacheDirectory): string + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @phan-side-effect-free + */ +final class Group +{ + public function __construct(string $name) + { + } + public function name(): string { } } @@ -11217,46 +11336,84 @@ public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\GroupCollectionI /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * - * @phan-side-effect-free + * @template-implements \Iterator */ -final class Group +final class GroupCollectionIterator implements \Countable, \Iterator { - public function __construct(string $name) + public function __construct(\PHPUnit\TextUI\XmlConfiguration\GroupCollection $groups) { } - public function name(): string + public function count(): int + { + } + public function rewind(): void + { + } + public function valid(): bool + { + } + public function key(): int + { + } + public function current(): \PHPUnit\TextUI\XmlConfiguration\Group + { + } + public function next(): void { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @phan-side-effect-free */ -final class Generator +final class Groups { - public function generateDefaultConfiguration(string $phpunitVersion, string $bootstrapScript, string $testsDirectory, string $srcDirectory, string $cacheDirectory): string + public function __construct(\PHPUnit\TextUI\XmlConfiguration\GroupCollection $include, \PHPUnit\TextUI\XmlConfiguration\GroupCollection $exclude) + { + } + public function hasInclude(): bool + { + } + public function include(): \PHPUnit\TextUI\XmlConfiguration\GroupCollection + { + } + public function hasExclude(): bool + { + } + public function exclude(): \PHPUnit\TextUI\XmlConfiguration\GroupCollection { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class Migrator +final class Loader { /** * @throws Exception - * @throws MigrationBuilderException - * @throws MigrationException - * @throws \PHPUnit\Util\Xml\Exception */ - public function migrate(string $filename): string + public function load(string $filename): \PHPUnit\TextUI\XmlConfiguration\Configuration + { + } + public function logging(string $filename, \DOMXPath $xpath): \PHPUnit\TextUI\XmlConfiguration\Logging\Logging + { + } + public function legacyLogging(string $filename, \DOMXPath $xpath): \PHPUnit\TextUI\XmlConfiguration\Logging\Logging { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class MigrationException extends \RuntimeException implements \PHPUnit\Exception +final class MigrationBuilder { + /** + * @throws MigrationBuilderException + */ + public function build(string $fromVersion): array + { + } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit @@ -11267,33 +11424,14 @@ final class MigrationBuilderException extends \RuntimeException implements \PHPU /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -interface Migration -{ - public function migrate(\DOMDocument $document): void; -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class CoverageCrap4jToReport extends \PHPUnit\TextUI\XmlConfiguration\LogToReportMigration -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class RemoveLogTypes implements \PHPUnit\TextUI\XmlConfiguration\Migration +final class MigrationException extends \RuntimeException implements \PHPUnit\Exception { - public function migrate(\DOMDocument $document): void - { - } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class MoveWhitelistIncludesToCoverage implements \PHPUnit\TextUI\XmlConfiguration\Migration +final class ConvertLogTypes implements \PHPUnit\TextUI\XmlConfiguration\Migration { - /** - * @throws MigrationException - */ public function migrate(\DOMDocument $document): void { } @@ -11301,64 +11439,43 @@ public function migrate(\DOMDocument $document): void /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class CoveragePhpToReport extends \PHPUnit\TextUI\XmlConfiguration\LogToReportMigration +final class CoverageCloverToReport extends \PHPUnit\TextUI\XmlConfiguration\LogToReportMigration { } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class MoveWhitelistExcludesToCoverage implements \PHPUnit\TextUI\XmlConfiguration\Migration +final class CoverageCrap4jToReport extends \PHPUnit\TextUI\XmlConfiguration\LogToReportMigration { - /** - * @throws MigrationException - */ - public function migrate(\DOMDocument $document): void - { - } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class MoveAttributesFromFilterWhitelistToCoverage implements \PHPUnit\TextUI\XmlConfiguration\Migration +final class CoverageHtmlToReport extends \PHPUnit\TextUI\XmlConfiguration\LogToReportMigration { - /** - * @throws MigrationException - */ - public function migrate(\DOMDocument $document): void - { - } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class MoveAttributesFromRootToCoverage implements \PHPUnit\TextUI\XmlConfiguration\Migration +final class CoveragePhpToReport extends \PHPUnit\TextUI\XmlConfiguration\LogToReportMigration { - /** - * @throws MigrationException - */ - public function migrate(\DOMDocument $document): void - { - } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class CoverageHtmlToReport extends \PHPUnit\TextUI\XmlConfiguration\LogToReportMigration +final class CoverageTextToReport extends \PHPUnit\TextUI\XmlConfiguration\LogToReportMigration { } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class RemoveCacheTokensAttribute implements \PHPUnit\TextUI\XmlConfiguration\Migration +final class CoverageXmlToReport extends \PHPUnit\TextUI\XmlConfiguration\LogToReportMigration { - public function migrate(\DOMDocument $document): void - { - } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class UpdateSchemaLocationTo93 implements \PHPUnit\TextUI\XmlConfiguration\Migration +final class IntroduceCoverageElement implements \PHPUnit\TextUI\XmlConfiguration\Migration { public function migrate(\DOMDocument $document): void { @@ -11384,26 +11501,18 @@ abstract protected function toReportFormat(\DOMElement $logNode): \DOMElement; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class CoverageXmlToReport extends \PHPUnit\TextUI\XmlConfiguration\LogToReportMigration -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class CoverageTextToReport extends \PHPUnit\TextUI\XmlConfiguration\LogToReportMigration -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class CoverageCloverToReport extends \PHPUnit\TextUI\XmlConfiguration\LogToReportMigration +interface Migration { + public function migrate(\DOMDocument $document): void; } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class ConvertLogTypes implements \PHPUnit\TextUI\XmlConfiguration\Migration +final class MoveAttributesFromFilterWhitelistToCoverage implements \PHPUnit\TextUI\XmlConfiguration\Migration { + /** + * @throws MigrationException + */ public function migrate(\DOMDocument $document): void { } @@ -11411,8 +11520,11 @@ public function migrate(\DOMDocument $document): void /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class IntroduceCoverageElement implements \PHPUnit\TextUI\XmlConfiguration\Migration +final class MoveAttributesFromRootToCoverage implements \PHPUnit\TextUI\XmlConfiguration\Migration { + /** + * @throws MigrationException + */ public function migrate(\DOMDocument $document): void { } @@ -11420,7 +11532,7 @@ public function migrate(\DOMDocument $document): void /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class RemoveEmptyFilter implements \PHPUnit\TextUI\XmlConfiguration\Migration +final class MoveWhitelistExcludesToCoverage implements \PHPUnit\TextUI\XmlConfiguration\Migration { /** * @throws MigrationException @@ -11432,175 +11544,66 @@ public function migrate(\DOMDocument $document): void /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class MigrationBuilder +final class MoveWhitelistIncludesToCoverage implements \PHPUnit\TextUI\XmlConfiguration\Migration { /** - * @throws MigrationBuilderException + * @throws MigrationException */ - public function build(string $fromVersion): array - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free - */ -final class Constant -{ - public function __construct(string $name, $value) - { - } - public function name(): string - { - } - public function value() + public function migrate(\DOMDocument $document): void { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free */ -final class IniSetting +final class RemoveCacheTokensAttribute implements \PHPUnit\TextUI\XmlConfiguration\Migration { - public function __construct(string $name, string $value) - { - } - public function name(): string - { - } - public function value(): string + public function migrate(\DOMDocument $document): void { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free - * - * @template-implements \IteratorAggregate */ -final class IniSettingCollection implements \Countable, \IteratorAggregate +final class RemoveEmptyFilter implements \PHPUnit\TextUI\XmlConfiguration\Migration { /** - * @param IniSetting[] $iniSettings - */ - public static function fromArray(array $iniSettings): self - { - } - /** - * @return IniSetting[] + * @throws MigrationException */ - public function asArray(): array - { - } - public function count(): int - { - } - public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\IniSettingCollectionIterator + public function migrate(\DOMDocument $document): void { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free - * - * @template-implements \IteratorAggregate */ -final class VariableCollection implements \Countable, \IteratorAggregate +final class RemoveLogTypes implements \PHPUnit\TextUI\XmlConfiguration\Migration { - /** - * @param Variable[] $variables - */ - public static function fromArray(array $variables): self - { - } - /** - * @return Variable[] - */ - public function asArray(): array - { - } - public function count(): int - { - } - public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\VariableCollectionIterator + public function migrate(\DOMDocument $document): void { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free */ -final class Php +final class UpdateSchemaLocationTo93 implements \PHPUnit\TextUI\XmlConfiguration\Migration { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\DirectoryCollection $includePaths, \PHPUnit\TextUI\XmlConfiguration\IniSettingCollection $iniSettings, \PHPUnit\TextUI\XmlConfiguration\ConstantCollection $constants, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $globalVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $envVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $postVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $getVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $cookieVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $serverVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $filesVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $requestVariables) - { - } - public function includePaths(): \PHPUnit\TextUI\XmlConfiguration\DirectoryCollection - { - } - public function iniSettings(): \PHPUnit\TextUI\XmlConfiguration\IniSettingCollection - { - } - public function constants(): \PHPUnit\TextUI\XmlConfiguration\ConstantCollection - { - } - public function globalVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection - { - } - public function envVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection - { - } - public function postVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection - { - } - public function getVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection - { - } - public function cookieVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection - { - } - public function serverVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection - { - } - public function filesVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection - { - } - public function requestVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection + public function migrate(\DOMDocument $document): void { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @template-implements \Iterator */ -final class VariableCollectionIterator implements \Countable, \Iterator +final class Migrator { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\VariableCollection $variables) - { - } - public function count(): int - { - } - public function rewind(): void - { - } - public function valid(): bool - { - } - public function key(): int - { - } - public function current(): \PHPUnit\TextUI\XmlConfiguration\Variable - { - } - public function next(): void + /** + * @throws Exception + * @throws MigrationBuilderException + * @throws MigrationException + * @throws \PHPUnit\Util\Xml\Exception + */ + public function migrate(string $filename): string { } } @@ -11609,9 +11612,9 @@ public function next(): void * * @phan-side-effect-free */ -final class Variable +final class Constant { - public function __construct(string $name, $value, bool $force) + public function __construct(string $name, $value) { } public function name(): string @@ -11620,38 +11623,6 @@ public function name(): string public function value() { } - public function force(): bool - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @template-implements \Iterator - */ -final class IniSettingCollectionIterator implements \Countable, \Iterator -{ - public function __construct(\PHPUnit\TextUI\XmlConfiguration\IniSettingCollection $iniSettings) - { - } - public function count(): int - { - } - public function rewind(): void - { - } - public function valid(): bool - { - } - public function key(): int - { - } - public function current(): \PHPUnit\TextUI\XmlConfiguration\IniSetting - { - } - public function next(): void - { - } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit @@ -11712,28 +11683,18 @@ public function next(): void } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @phan-side-effect-free */ -final class PhpHandler -{ - public function handle(\PHPUnit\TextUI\XmlConfiguration\Php $configuration): void - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Loader +final class IniSetting { - /** - * @throws Exception - */ - public function load(string $filename): \PHPUnit\TextUI\XmlConfiguration\Configuration + public function __construct(string $name, string $value) { } - public function logging(string $filename, \DOMXPath $xpath): \PHPUnit\TextUI\XmlConfiguration\Logging\Logging + public function name(): string { } - public function legacyLogging(string $filename, \DOMXPath $xpath): \PHPUnit\TextUI\XmlConfiguration\Logging\Logging + public function value(): string { } } @@ -11742,18 +11703,18 @@ public function legacyLogging(string $filename, \DOMXPath $xpath): \PHPUnit\Text * * @phan-side-effect-free * - * @template-implements \IteratorAggregate + * @template-implements \IteratorAggregate */ -final class TestFileCollection implements \Countable, \IteratorAggregate +final class IniSettingCollection implements \Countable, \IteratorAggregate { /** - * @param TestFile[] $files + * @param IniSetting[] $iniSettings */ - public static function fromArray(array $files): self + public static function fromArray(array $iniSettings): self { } /** - * @return TestFile[] + * @return IniSetting[] */ public function asArray(): array { @@ -11761,21 +11722,18 @@ public function asArray(): array public function count(): int { } - public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\TestFileCollectionIterator - { - } - public function isEmpty(): bool + public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\IniSettingCollectionIterator { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * - * @template-implements \Iterator + * @template-implements \Iterator */ -final class TestFileCollectionIterator implements \Countable, \Iterator +final class IniSettingCollectionIterator implements \Countable, \Iterator { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\TestFileCollection $files) + public function __construct(\PHPUnit\TextUI\XmlConfiguration\IniSettingCollection $iniSettings) { } public function count(): int @@ -11790,7 +11748,7 @@ public function valid(): bool public function key(): int { } - public function current(): \PHPUnit\TextUI\XmlConfiguration\TestFile + public function current(): \PHPUnit\TextUI\XmlConfiguration\IniSetting { } public function next(): void @@ -11802,96 +11760,71 @@ public function next(): void * * @phan-side-effect-free */ -final class TestDirectory +final class Php { - public function __construct(string $path, string $prefix, string $suffix, string $phpVersion, \PHPUnit\Util\VersionComparisonOperator $phpVersionOperator) + public function __construct(\PHPUnit\TextUI\XmlConfiguration\DirectoryCollection $includePaths, \PHPUnit\TextUI\XmlConfiguration\IniSettingCollection $iniSettings, \PHPUnit\TextUI\XmlConfiguration\ConstantCollection $constants, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $globalVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $envVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $postVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $getVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $cookieVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $serverVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $filesVariables, \PHPUnit\TextUI\XmlConfiguration\VariableCollection $requestVariables) { } - public function path(): string + public function includePaths(): \PHPUnit\TextUI\XmlConfiguration\DirectoryCollection { } - public function prefix(): string + public function iniSettings(): \PHPUnit\TextUI\XmlConfiguration\IniSettingCollection { } - public function suffix(): string + public function constants(): \PHPUnit\TextUI\XmlConfiguration\ConstantCollection { } - public function phpVersion(): string + public function globalVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection { } - public function phpVersionOperator(): \PHPUnit\Util\VersionComparisonOperator + public function envVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free - */ -final class TestSuite -{ - public function __construct(string $name, \PHPUnit\TextUI\XmlConfiguration\TestDirectoryCollection $directories, \PHPUnit\TextUI\XmlConfiguration\TestFileCollection $files, \PHPUnit\TextUI\XmlConfiguration\FileCollection $exclude) + public function postVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection { } - public function name(): string + public function getVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection { } - public function directories(): \PHPUnit\TextUI\XmlConfiguration\TestDirectoryCollection + public function cookieVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection { } - public function files(): \PHPUnit\TextUI\XmlConfiguration\TestFileCollection + public function serverVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection { } - public function exclude(): \PHPUnit\TextUI\XmlConfiguration\FileCollection + public function filesVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection + { + } + public function requestVariables(): \PHPUnit\TextUI\XmlConfiguration\VariableCollection { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free */ -final class TestFile +final class PhpHandler { - public function __construct(string $path, string $phpVersion, \PHPUnit\Util\VersionComparisonOperator $phpVersionOperator) - { - } - public function path(): string - { - } - public function phpVersion(): string - { - } - public function phpVersionOperator(): \PHPUnit\Util\VersionComparisonOperator + public function handle(\PHPUnit\TextUI\XmlConfiguration\Php $configuration): void { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * - * @template-implements \Iterator + * @phan-side-effect-free */ -final class TestSuiteCollectionIterator implements \Countable, \Iterator +final class Variable { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\TestSuiteCollection $testSuites) - { - } - public function count(): int - { - } - public function rewind(): void - { - } - public function valid(): bool + public function __construct(string $name, $value, bool $force) { } - public function key(): int + public function name(): string { } - public function current(): \PHPUnit\TextUI\XmlConfiguration\TestSuite + public function value() { } - public function next(): void + public function force(): bool { } } @@ -11900,18 +11833,18 @@ public function next(): void * * @phan-side-effect-free * - * @template-implements \IteratorAggregate + * @template-implements \IteratorAggregate */ -final class TestSuiteCollection implements \Countable, \IteratorAggregate +final class VariableCollection implements \Countable, \IteratorAggregate { /** - * @param TestSuite[] $testSuites + * @param Variable[] $variables */ - public static function fromArray(array $testSuites): self + public static function fromArray(array $variables): self { } /** - * @return TestSuite[] + * @return Variable[] */ public function asArray(): array { @@ -11919,21 +11852,18 @@ public function asArray(): array public function count(): int { } - public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\TestSuiteCollectionIterator - { - } - public function isEmpty(): bool + public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\VariableCollectionIterator { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * - * @template-implements \Iterator + * @template-implements \Iterator */ -final class TestDirectoryCollectionIterator implements \Countable, \Iterator +final class VariableCollectionIterator implements \Countable, \Iterator { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\TestDirectoryCollection $directories) + public function __construct(\PHPUnit\TextUI\XmlConfiguration\VariableCollection $variables) { } public function count(): int @@ -11948,44 +11878,13 @@ public function valid(): bool public function key(): int { } - public function current(): \PHPUnit\TextUI\XmlConfiguration\TestDirectory + public function current(): \PHPUnit\TextUI\XmlConfiguration\Variable { } public function next(): void { } } -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free - * - * @template-implements \IteratorAggregate - */ -final class TestDirectoryCollection implements \Countable, \IteratorAggregate -{ - /** - * @param TestDirectory[] $directories - */ - public static function fromArray(array $directories): self - { - } - /** - * @return TestDirectory[] - */ - public function asArray(): array - { - } - public function count(): int - { - } - public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\TestDirectoryCollectionIterator - { - } - public function isEmpty(): bool - { - } -} /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * @@ -12312,7 +12211,113 @@ public function backupStaticAttributes(): bool public function registerMockObjectsFromTestArgumentsRecursively(): bool { } - public function conflictBetweenPrinterClassAndTestdox(): bool + public function conflictBetweenPrinterClassAndTestdox(): bool + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @phan-side-effect-free + */ +final class TestDirectory +{ + public function __construct(string $path, string $prefix, string $suffix, string $phpVersion, \PHPUnit\Util\VersionComparisonOperator $phpVersionOperator) + { + } + public function path(): string + { + } + public function prefix(): string + { + } + public function suffix(): string + { + } + public function phpVersion(): string + { + } + public function phpVersionOperator(): \PHPUnit\Util\VersionComparisonOperator + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @phan-side-effect-free + * + * @template-implements \IteratorAggregate + */ +final class TestDirectoryCollection implements \Countable, \IteratorAggregate +{ + /** + * @param TestDirectory[] $directories + */ + public static function fromArray(array $directories): self + { + } + /** + * @return TestDirectory[] + */ + public function asArray(): array + { + } + public function count(): int + { + } + public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\TestDirectoryCollectionIterator + { + } + public function isEmpty(): bool + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @template-implements \Iterator + */ +final class TestDirectoryCollectionIterator implements \Countable, \Iterator +{ + public function __construct(\PHPUnit\TextUI\XmlConfiguration\TestDirectoryCollection $directories) + { + } + public function count(): int + { + } + public function rewind(): void + { + } + public function valid(): bool + { + } + public function key(): int + { + } + public function current(): \PHPUnit\TextUI\XmlConfiguration\TestDirectory + { + } + public function next(): void + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @phan-side-effect-free + */ +final class TestFile +{ + public function __construct(string $path, string $phpVersion, \PHPUnit\Util\VersionComparisonOperator $phpVersionOperator) + { + } + public function path(): string + { + } + public function phpVersion(): string + { + } + public function phpVersionOperator(): \PHPUnit\Util\VersionComparisonOperator { } } @@ -12321,18 +12326,18 @@ public function conflictBetweenPrinterClassAndTestdox(): bool * * @phan-side-effect-free * - * @template-implements \IteratorAggregate + * @template-implements \IteratorAggregate */ -final class FileCollection implements \Countable, \IteratorAggregate +final class TestFileCollection implements \Countable, \IteratorAggregate { /** - * @param File[] $files + * @param TestFile[] $files */ public static function fromArray(array $files): self { } /** - * @return File[] + * @return TestFile[] */ public function asArray(): array { @@ -12340,7 +12345,7 @@ public function asArray(): array public function count(): int { } - public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\FileCollectionIterator + public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\TestFileCollectionIterator { } public function isEmpty(): bool @@ -12350,11 +12355,11 @@ public function isEmpty(): bool /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * - * @template-implements \Iterator + * @template-implements \Iterator */ -final class FileCollectionIterator implements \Countable, \Iterator +final class TestFileCollectionIterator implements \Countable, \Iterator { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\FileCollection $files) + public function __construct(\PHPUnit\TextUI\XmlConfiguration\TestFileCollection $files) { } public function count(): int @@ -12369,7 +12374,7 @@ public function valid(): bool public function key(): int { } - public function current(): \PHPUnit\TextUI\XmlConfiguration\File + public function current(): \PHPUnit\TextUI\XmlConfiguration\TestFile { } public function next(): void @@ -12381,26 +12386,21 @@ public function next(): void * * @phan-side-effect-free */ -final class Directory +final class TestSuite { - public function __construct(string $path) + public function __construct(string $name, \PHPUnit\TextUI\XmlConfiguration\TestDirectoryCollection $directories, \PHPUnit\TextUI\XmlConfiguration\TestFileCollection $files, \PHPUnit\TextUI\XmlConfiguration\FileCollection $exclude) { } - public function path(): string + public function name(): string { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free - */ -final class File -{ - public function __construct(string $path) + public function directories(): \PHPUnit\TextUI\XmlConfiguration\TestDirectoryCollection { } - public function path(): string + public function files(): \PHPUnit\TextUI\XmlConfiguration\TestFileCollection + { + } + public function exclude(): \PHPUnit\TextUI\XmlConfiguration\FileCollection { } } @@ -12409,18 +12409,18 @@ public function path(): string * * @phan-side-effect-free * - * @template-implements \IteratorAggregate + * @template-implements \IteratorAggregate */ -final class DirectoryCollection implements \Countable, \IteratorAggregate +final class TestSuiteCollection implements \Countable, \IteratorAggregate { /** - * @param Directory[] $directories + * @param TestSuite[] $testSuites */ - public static function fromArray(array $directories): self + public static function fromArray(array $testSuites): self { } /** - * @return Directory[] + * @return TestSuite[] */ public function asArray(): array { @@ -12428,7 +12428,7 @@ public function asArray(): array public function count(): int { } - public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\DirectoryCollectionIterator + public function getIterator(): \PHPUnit\TextUI\XmlConfiguration\TestSuiteCollectionIterator { } public function isEmpty(): bool @@ -12438,11 +12438,11 @@ public function isEmpty(): bool /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * - * @template-implements \Iterator + * @template-implements \Iterator */ -final class DirectoryCollectionIterator implements \Countable, \Iterator +final class TestSuiteCollectionIterator implements \Countable, \Iterator { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\DirectoryCollection $directories) + public function __construct(\PHPUnit\TextUI\XmlConfiguration\TestSuiteCollection $testSuites) { } public function count(): int @@ -12457,7 +12457,7 @@ public function valid(): bool public function key(): int { } - public function current(): \PHPUnit\TextUI\XmlConfiguration\Directory + public function current(): \PHPUnit\TextUI\XmlConfiguration\TestSuite { } public function next(): void @@ -12466,15 +12466,6 @@ public function next(): void } namespace PHPUnit\TextUI\XmlConfiguration\CodeCoverage; -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class FilterMapper -{ - public function map(\SebastianBergmann\CodeCoverage\Filter $filter, \PHPUnit\TextUI\XmlConfiguration\CodeCoverage\CodeCoverage $configuration): void - { - } -} /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * @@ -12612,6 +12603,15 @@ public function xml(): \PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Report\Xml { } } +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class FilterMapper +{ + public function map(\SebastianBergmann\CodeCoverage\Filter $filter, \PHPUnit\TextUI\XmlConfiguration\CodeCoverage\CodeCoverage $configuration): void + { + } +} namespace PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Filter; /** @@ -12701,7 +12701,7 @@ public function next(): void * * @phan-side-effect-free */ -final class Php +final class Clover { public function __construct(\PHPUnit\TextUI\XmlConfiguration\File $target) { @@ -12729,21 +12729,44 @@ public function target(): \PHPUnit\TextUI\XmlConfiguration\File * * @phan-side-effect-free */ -final class Xml +final class Crap4j { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\Directory $target) + public function __construct(\PHPUnit\TextUI\XmlConfiguration\File $target, int $threshold) + { + } + public function target(): \PHPUnit\TextUI\XmlConfiguration\File + { + } + public function threshold(): int + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @phan-side-effect-free + */ +final class Html +{ + public function __construct(\PHPUnit\TextUI\XmlConfiguration\Directory $target, int $lowUpperBound, int $highLowerBound) { } public function target(): \PHPUnit\TextUI\XmlConfiguration\Directory { } + public function lowUpperBound(): int + { + } + public function highLowerBound(): int + { + } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * * @phan-side-effect-free */ -final class Clover +final class Php { public function __construct(\PHPUnit\TextUI\XmlConfiguration\File $target) { @@ -12777,18 +12800,28 @@ public function showOnlySummary(): bool * * @phan-side-effect-free */ -final class Html +final class Xml { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\Directory $target, int $lowUpperBound, int $highLowerBound) + public function __construct(\PHPUnit\TextUI\XmlConfiguration\Directory $target) { } public function target(): \PHPUnit\TextUI\XmlConfiguration\Directory { } - public function lowUpperBound(): int +} +namespace PHPUnit\TextUI\XmlConfiguration\Logging; + +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @phan-side-effect-free + */ +final class Junit +{ + public function __construct(\PHPUnit\TextUI\XmlConfiguration\File $target) { } - public function highLowerBound(): int + public function target(): \PHPUnit\TextUI\XmlConfiguration\File { } } @@ -12797,26 +12830,54 @@ public function highLowerBound(): int * * @phan-side-effect-free */ -final class Crap4j +final class Logging { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\File $target, int $threshold) + public function __construct(?\PHPUnit\TextUI\XmlConfiguration\Logging\Junit $junit, ?\PHPUnit\TextUI\XmlConfiguration\Logging\Text $text, ?\PHPUnit\TextUI\XmlConfiguration\Logging\TeamCity $teamCity, ?\PHPUnit\TextUI\XmlConfiguration\Logging\TestDox\Html $testDoxHtml, ?\PHPUnit\TextUI\XmlConfiguration\Logging\TestDox\Text $testDoxText, ?\PHPUnit\TextUI\XmlConfiguration\Logging\TestDox\Xml $testDoxXml) { } - public function target(): \PHPUnit\TextUI\XmlConfiguration\File + public function hasJunit(): bool { } - public function threshold(): int + public function junit(): \PHPUnit\TextUI\XmlConfiguration\Logging\Junit + { + } + public function hasText(): bool + { + } + public function text(): \PHPUnit\TextUI\XmlConfiguration\Logging\Text + { + } + public function hasTeamCity(): bool + { + } + public function teamCity(): \PHPUnit\TextUI\XmlConfiguration\Logging\TeamCity + { + } + public function hasTestDoxHtml(): bool + { + } + public function testDoxHtml(): \PHPUnit\TextUI\XmlConfiguration\Logging\TestDox\Html + { + } + public function hasTestDoxText(): bool + { + } + public function testDoxText(): \PHPUnit\TextUI\XmlConfiguration\Logging\TestDox\Text + { + } + public function hasTestDoxXml(): bool + { + } + public function testDoxXml(): \PHPUnit\TextUI\XmlConfiguration\Logging\TestDox\Xml { } } -namespace PHPUnit\TextUI\XmlConfiguration\Logging; - /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * * @phan-side-effect-free */ -final class Junit +final class TeamCity { public function __construct(\PHPUnit\TextUI\XmlConfiguration\File $target) { @@ -12830,7 +12891,23 @@ public function target(): \PHPUnit\TextUI\XmlConfiguration\File * * @phan-side-effect-free */ -final class TeamCity +final class Text +{ + public function __construct(\PHPUnit\TextUI\XmlConfiguration\File $target) + { + } + public function target(): \PHPUnit\TextUI\XmlConfiguration\File + { + } +} +namespace PHPUnit\TextUI\XmlConfiguration\Logging\TestDox; + +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @phan-side-effect-free + */ +final class Html { public function __construct(\PHPUnit\TextUI\XmlConfiguration\File $target) { @@ -12858,115 +12935,240 @@ public function target(): \PHPUnit\TextUI\XmlConfiguration\File * * @phan-side-effect-free */ -final class Logging +final class Xml { - public function __construct(?\PHPUnit\TextUI\XmlConfiguration\Logging\Junit $junit, ?\PHPUnit\TextUI\XmlConfiguration\Logging\Text $text, ?\PHPUnit\TextUI\XmlConfiguration\Logging\TeamCity $teamCity, ?\PHPUnit\TextUI\XmlConfiguration\Logging\TestDox\Html $testDoxHtml, ?\PHPUnit\TextUI\XmlConfiguration\Logging\TestDox\Text $testDoxText, ?\PHPUnit\TextUI\XmlConfiguration\Logging\TestDox\Xml $testDoxXml) + public function __construct(\PHPUnit\TextUI\XmlConfiguration\File $target) { } - public function hasJunit(): bool + public function target(): \PHPUnit\TextUI\XmlConfiguration\File { } - public function junit(): \PHPUnit\TextUI\XmlConfiguration\Logging\Junit +} +namespace PHPUnit\Util; + +/** + * @deprecated Use ExcludeList instead + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +final class Blacklist +{ + public static function addDirectory(string $directory): void { } - public function hasText(): bool + /** + * @throws Exception + * + * @return string[] + */ + public function getBlacklistedDirectories(): array { } - public function text(): \PHPUnit\TextUI\XmlConfiguration\Logging\Text + /** + * @throws Exception + */ + public function isBlacklisted(string $file): bool { } - public function hasTeamCity(): bool +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class Cloner +{ + /** + * @phan-template OriginalType + * + * @phan-param OriginalType $original + * + * @phan-return OriginalType + */ + public static function clone(object $original): object + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class Color +{ + public static function colorize(string $color, string $buffer): string + { + } + public static function colorizePath(string $path, ?string $prevPath = null, bool $colorizeFilename = false): string + { + } + public static function dim(string $buffer): string + { + } + public static function visualizeWhitespace(string $buffer, bool $visualizeEOL = false): string + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class ErrorHandler +{ + public static function invokeIgnoringWarnings(callable $callable) { } - public function teamCity(): \PHPUnit\TextUI\XmlConfiguration\Logging\TeamCity + public function __construct(bool $convertDeprecationsToExceptions, bool $convertErrorsToExceptions, bool $convertNoticesToExceptions, bool $convertWarningsToExceptions) { } - public function hasTestDoxHtml(): bool + public function __invoke(int $errorNumber, string $errorString, string $errorFile, int $errorLine): bool { } - public function testDoxHtml(): \PHPUnit\TextUI\XmlConfiguration\Logging\TestDox\Html + public function register(): void { } - public function hasTestDoxText(): bool + public function unregister(): void { } - public function testDoxText(): \PHPUnit\TextUI\XmlConfiguration\Logging\TestDox\Text +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class Exception extends \RuntimeException implements \PHPUnit\Exception +{ +} +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +final class ExcludeList +{ + public static function addDirectory(string $directory): void { } - public function hasTestDoxXml(): bool + /** + * @throws Exception + * + * @return string[] + */ + public function getExcludedDirectories(): array { } - public function testDoxXml(): \PHPUnit\TextUI\XmlConfiguration\Logging\TestDox\Xml + /** + * @throws Exception + */ + public function isExcluded(string $file): bool { } } -namespace PHPUnit\TextUI\XmlConfiguration\Logging\TestDox; - /** * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free */ -final class Xml +final class FileLoader { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\File $target) + /** + * Checks if a PHP sourcecode file is readable. The sourcecode file is loaded through the load() method. + * + * As a fallback, PHP looks in the directory of the file executing the stream_resolve_include_path function. + * We do not want to load the Test.php file here, so skip it if it found that. + * PHP prioritizes the include_path setting, so if the current directory is in there, it will first look in the + * current working directory. + * + * @throws Exception + */ + public static function checkAndLoad(string $filename): string { } - public function target(): \PHPUnit\TextUI\XmlConfiguration\File + /** + * Loads a PHP sourcefile. + */ + public static function load(string $filename): void { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free */ -final class Text +final class Filesystem { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\File $target) + /** + * Maps class names to source file names. + * + * - PEAR CS: Foo_Bar_Baz -> Foo/Bar/Baz.php + * - Namespace: Foo\Bar\Baz -> Foo/Bar/Baz.php + */ + public static function classNameToFilename(string $className): string { } - public function target(): \PHPUnit\TextUI\XmlConfiguration\File + public static function createDirectory(string $directory): bool { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free */ -final class Html +final class Filter { - public function __construct(\PHPUnit\TextUI\XmlConfiguration\File $target) - { - } - public function target(): \PHPUnit\TextUI\XmlConfiguration\File + /** + * @throws \PHPUnit\Framework\Exception + */ + public static function getFilteredStacktrace(\Throwable $t): string { } } -namespace PHPUnit\Util; - /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class Cloner +final class GlobalState { /** - * @phan-template OriginalType - * - * @phan-param OriginalType $original + * @throws Exception + */ + public static function getIncludedFilesAsString(): string + { + } + /** + * @param string[] $files * - * @phan-return OriginalType + * @throws Exception */ - public static function clone(object $original): object + public static function processIncludedFilesAsString(array $files): string + { + } + public static function getIniSettingsAsString(): string + { + } + public static function getConstantsAsString(): string + { + } + public static function getGlobalsAsString(): string { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class Exception extends \RuntimeException implements \PHPUnit\Exception +final class InvalidDataSetException extends \RuntimeException implements \PHPUnit\Exception +{ +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class Json { + /** + * Prettify json string. + * + * @throws \PHPUnit\Framework\Exception + */ + public static function prettify(string $json): string + { + } + /** + * To allow comparison of JSON strings, first process them into a consistent + * format so that they can be compared as strings. + * + * @return array ($error, $canonicalized_json) The $error parameter is used + * to indicate an error decoding the json. This is used to avoid ambiguity + * with JSON strings consisting entirely of 'null' or 'false'. + */ + public static function canonicalize(string $json): array + { + } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit @@ -12988,6 +13190,36 @@ public function flush(): void { } } +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class Reflection +{ + /** + * @phan-return list<\ReflectionMethod> + */ + public function publicMethodsInTestClass(\ReflectionClass $class): array + { + } + /** + * @phan-return list<\ReflectionMethod> + */ + public function methodsInTestClass(\ReflectionClass $class): array + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class RegularExpression +{ + /** + * @return false|int + */ + public static function safeMatch(string $pattern, string $subject) + { + } +} /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ @@ -13046,213 +13278,79 @@ public static function requiresCodeCoverageDataCollection(\PHPUnit\Framework\Tes * * @phan-param class-string $className */ - public static function getRequirements(string $className, string $methodName): array - { - } - /** - * Returns the missing requirements for a test. - * - * @throws Exception - * @throws \PHPUnit\Framework\Warning - * - * @phan-param class-string $className - */ - public static function getMissingRequirements(string $className, string $methodName): array - { - } - /** - * Returns the provided data for a method. - * - * @throws Exception - * - * @phan-param class-string $className - */ - public static function getProvidedData(string $className, string $methodName): ?array - { - } - /** - * @phan-param class-string $className - */ - public static function parseTestMethodAnnotations(string $className, ?string $methodName = null): array - { - } - /** - * @phan-param class-string $className - */ - public static function getInlineAnnotations(string $className, string $methodName): array - { - } - /** @phan-param class-string $className */ - public static function getBackupSettings(string $className, string $methodName): array - { - } - /** - * @phan-param class-string $className - * - * @return \PHPUnit\Framework\ExecutionOrderDependency[] - */ - public static function getDependencies(string $className, string $methodName): array - { - } - /** @phan-param class-string $className */ - public static function getGroups(string $className, ?string $methodName = ''): array - { - } - /** @phan-param class-string $className */ - public static function getSize(string $className, ?string $methodName): int - { - } - /** @phan-param class-string $className */ - public static function getProcessIsolationSettings(string $className, string $methodName): bool - { - } - /** @phan-param class-string $className */ - public static function getClassProcessIsolationSettings(string $className, string $methodName): bool - { - } - /** @phan-param class-string $className */ - public static function getPreserveGlobalStateSettings(string $className, string $methodName): ?bool - { - } - /** @phan-param class-string $className */ - public static function getHookMethods(string $className): array - { - } - public static function isTestMethod(\ReflectionMethod $method): bool - { - } -} -/** - * @deprecated Use ExcludeList instead - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class Blacklist -{ - public static function addDirectory(string $directory): void + public static function getRequirements(string $className, string $methodName): array { } /** + * Returns the missing requirements for a test. + * * @throws Exception + * @throws \PHPUnit\Framework\Warning * - * @return string[] + * @phan-param class-string $className */ - public function getBlacklistedDirectories(): array + public static function getMissingRequirements(string $className, string $methodName): array { } /** + * Returns the provided data for a method. + * * @throws Exception + * + * @phan-param class-string $className */ - public function isBlacklisted(string $file): bool + public static function getProvidedData(string $className, string $methodName): ?array { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Json -{ /** - * Prettify json string. - * - * @throws \PHPUnit\Framework\Exception + * @phan-param class-string $className */ - public static function prettify(string $json): string + public static function parseTestMethodAnnotations(string $className, ?string $methodName = null): array { } /** - * To allow comparison of JSON strings, first process them into a consistent - * format so that they can be compared as strings. - * - * @return array ($error, $canonicalized_json) The $error parameter is used - * to indicate an error decoding the json. This is used to avoid ambiguity - * with JSON strings consisting entirely of 'null' or 'false'. + * @phan-param class-string $className */ - public static function canonicalize(string $json): array + public static function getInlineAnnotations(string $className, string $methodName): array { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class GlobalState -{ - /** - * @throws Exception - */ - public static function getIncludedFilesAsString(): string + /** @phan-param class-string $className */ + public static function getBackupSettings(string $className, string $methodName): array { } /** - * @param string[] $files + * @phan-param class-string $className * - * @throws Exception + * @return \PHPUnit\Framework\ExecutionOrderDependency[] */ - public static function processIncludedFilesAsString(array $files): string + public static function getDependencies(string $className, string $methodName): array { } - public static function getIniSettingsAsString(): string + /** @phan-param class-string $className */ + public static function getGroups(string $className, ?string $methodName = ''): array { } - public static function getConstantsAsString(): string + /** @phan-param class-string $className */ + public static function getSize(string $className, ?string $methodName): int { } - public static function getGlobalsAsString(): string + /** @phan-param class-string $className */ + public static function getProcessIsolationSettings(string $className, string $methodName): bool { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Filter -{ - /** - * @throws \PHPUnit\Framework\Exception - */ - public static function getFilteredStacktrace(\Throwable $t): string + /** @phan-param class-string $className */ + public static function getClassProcessIsolationSettings(string $className, string $methodName): bool { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvalidDataSetException extends \RuntimeException implements \PHPUnit\Exception -{ -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class XmlTestListRenderer -{ - /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function render(\PHPUnit\Framework\TestSuite $suite): string + /** @phan-param class-string $className */ + public static function getPreserveGlobalStateSettings(string $className, string $methodName): ?bool { } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class FileLoader -{ - /** - * Checks if a PHP sourcecode file is readable. The sourcecode file is loaded through the load() method. - * - * As a fallback, PHP looks in the directory of the file executing the stream_resolve_include_path function. - * We do not want to load the Test.php file here, so skip it if it found that. - * PHP prioritizes the include_path setting, so if the current directory is in there, it will first look in the - * current working directory. - * - * @throws Exception - */ - public static function checkAndLoad(string $filename): string + /** @phan-param class-string $className */ + public static function getHookMethods(string $className): array { } - /** - * Loads a PHP sourcefile. - */ - public static function load(string $filename): void + public static function isTestMethod(\ReflectionMethod $method): bool { } } @@ -13269,58 +13367,39 @@ public function render(\PHPUnit\Framework\TestSuite $suite): string } } /** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class ExcludeList +final class Type { - public static function addDirectory(string $directory): void - { - } - /** - * @throws Exception - * - * @return string[] - */ - public function getExcludedDirectories(): array - { - } - /** - * @throws Exception - */ - public function isExcluded(string $file): bool + public static function isType(string $type): bool { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @phan-side-effect-free */ -final class ErrorHandler +final class VersionComparisonOperator { - public static function invokeIgnoringWarnings(callable $callable) - { - } - public function __construct(bool $convertDeprecationsToExceptions, bool $convertErrorsToExceptions, bool $convertNoticesToExceptions, bool $convertWarningsToExceptions) - { - } - public function __invoke(int $errorNumber, string $errorString, string $errorFile, int $errorLine): bool - { - } - public function register(): void + public function __construct(string $operator) { } - public function unregister(): void + /** + * @return '!='|'<'|'<='|'<>'|'='|'=='|'>'|'>='|'eq'|'ge'|'gt'|'le'|'lt'|'ne' + */ + public function asString(): string { } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @deprecated */ -final class RegularExpression +final class XdebugFilterScriptGenerator { - /** - * @return false|int - */ - public static function safeMatch(string $pattern, string $subject) + public function generate(\PHPUnit\TextUI\XmlConfiguration\CodeCoverage\CodeCoverage $filter): string { } } @@ -13362,91 +13441,12 @@ public static function xmlToVariable(\DOMElement $element) /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class Color -{ - public static function colorize(string $color, string $buffer): string - { - } - public static function colorizePath(string $path, ?string $prevPath = null, bool $colorizeFilename = false): string - { - } - public static function dim(string $buffer): string - { - } - public static function visualizeWhitespace(string $buffer, bool $visualizeEOL = false): string - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @deprecated - */ -final class XdebugFilterScriptGenerator -{ - public function generate(\PHPUnit\TextUI\XmlConfiguration\CodeCoverage\CodeCoverage $filter): string - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Filesystem -{ - /** - * Maps class names to source file names. - * - * - PEAR CS: Foo_Bar_Baz -> Foo/Bar/Baz.php - * - Namespace: Foo\Bar\Baz -> Foo/Bar/Baz.php - */ - public static function classNameToFilename(string $className): string - { - } - public static function createDirectory(string $directory): bool - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Reflection -{ - /** - * @phan-return list<\ReflectionMethod> - */ - public function publicMethodsInTestClass(\ReflectionClass $class): array - { - } - /** - * @phan-return list<\ReflectionMethod> - */ - public function methodsInTestClass(\ReflectionClass $class): array - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Type -{ - public static function isType(string $type): bool - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free - */ -final class VersionComparisonOperator +final class XmlTestListRenderer { - public function __construct(string $operator) - { - } /** - * @return '!='|'<'|'<='|'<>'|'='|'=='|'>'|'>='|'eq'|'ge'|'gt'|'le'|'lt'|'ne' + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ - public function asString(): string + public function render(\PHPUnit\Framework\TestSuite $suite): string { } } @@ -13558,9 +13558,18 @@ public function forMethod(string $classInHierarchy, string $method): \PHPUnit\Ut /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class TeamCity extends \PHPUnit\TextUI\DefaultResultPrinter +final class JUnit extends \PHPUnit\Util\Printer implements \PHPUnit\Framework\TestListener { - public function printResult(\PHPUnit\Framework\TestResult $result): void + /** + * @param null|mixed $out + */ + public function __construct($out = null, bool $reportRiskyTests = false) + { + } + /** + * Flush buffer and close output. + */ + public function flush(): void { } /** @@ -13599,9 +13608,6 @@ public function addRiskyTest(\PHPUnit\Framework\Test $test, \Throwable $t, float public function addSkippedTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void { } - public function printIgnoredTest(string $testName, \Throwable $t, float $time): void - { - } /** * A testsuite started. */ @@ -13626,22 +13632,19 @@ public function startTest(\PHPUnit\Framework\Test $test): void public function endTest(\PHPUnit\Framework\Test $test, float $time): void { } + /** + * Returns the XML as a string. + */ + public function getXML(): string + { + } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class JUnit extends \PHPUnit\Util\Printer implements \PHPUnit\Framework\TestListener +final class TeamCity extends \PHPUnit\TextUI\DefaultResultPrinter { - /** - * @param null|mixed $out - */ - public function __construct($out = null, bool $reportRiskyTests = false) - { - } - /** - * Flush buffer and close output. - */ - public function flush(): void + public function printResult(\PHPUnit\Framework\TestResult $result): void { } /** @@ -13680,6 +13683,9 @@ public function addRiskyTest(\PHPUnit\Framework\Test $test, \Throwable $t, float public function addSkippedTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void { } + public function printIgnoredTest(string $testName, \Throwable $t, float $time): void + { + } /** * A testsuite started. */ @@ -13704,26 +13710,9 @@ public function startTest(\PHPUnit\Framework\Test $test): void public function endTest(\PHPUnit\Framework\Test $test, float $time): void { } - /** - * Returns the XML as a string. - */ - public function getXML(): string - { - } } namespace PHPUnit\Util\PHP; -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @see https://bugs.php.net/bug.php?id=51800 - */ -final class WindowsPhpProcess extends \PHPUnit\Util\PHP\DefaultPhpProcess -{ - public function getCommand(array $settings, ?string $file = null): string - { - } -} /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ @@ -13889,90 +13878,19 @@ protected function useTemporaryFile(): bool { } } -namespace PHPUnit\Util\TestDox; - /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @see https://bugs.php.net/bug.php?id=51800 */ -final class XmlResultPrinter extends \PHPUnit\Util\Printer implements \PHPUnit\Framework\TestListener +final class WindowsPhpProcess extends \PHPUnit\Util\PHP\DefaultPhpProcess { - /** - * @param resource|string $out - * - * @throws \PHPUnit\Framework\Exception - */ - public function __construct($out = null) - { - } - /** - * Flush buffer and close output. - */ - public function flush(): void - { - } - /** - * An error occurred. - */ - public function addError(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void - { - } - /** - * A warning occurred. - */ - public function addWarning(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\Warning $e, float $time): void - { - } - /** - * A failure occurred. - */ - public function addFailure(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\AssertionFailedError $e, float $time): void - { - } - /** - * Incomplete test. - */ - public function addIncompleteTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void - { - } - /** - * Risky test. - */ - public function addRiskyTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void - { - } - /** - * Skipped test. - */ - public function addSkippedTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void - { - } - /** - * A test suite started. - */ - public function startTestSuite(\PHPUnit\Framework\TestSuite $suite): void - { - } - /** - * A test suite ended. - */ - public function endTestSuite(\PHPUnit\Framework\TestSuite $suite): void - { - } - /** - * A test started. - */ - public function startTest(\PHPUnit\Framework\Test $test): void - { - } - /** - * A test ended. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function endTest(\PHPUnit\Framework\Test $test, float $time): void + public function getCommand(array $settings, ?string $file = null): string { } } +namespace PHPUnit\Util\TestDox; + /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ @@ -14033,12 +13951,44 @@ protected function undrawSpinner(): void /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class TextResultPrinter extends \PHPUnit\Util\TestDox\ResultPrinter +final class HtmlResultPrinter extends \PHPUnit\Util\TestDox\ResultPrinter { public function printResult(\PHPUnit\Framework\TestResult $result): void { } } +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class NamePrettifier +{ + public function __construct(bool $useColor = false) + { + } + /** + * Prettifies the name of a test class. + * + * @phan-param class-string $className + */ + public function prettifyTestClass(string $className): string + { + } + /** + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + */ + public function prettifyTestCase(\PHPUnit\Framework\TestCase $test): string + { + } + public function prettifyDataSet(\PHPUnit\Framework\TestCase $test): string + { + } + /** + * Prettifies the name of a test method. + */ + public function prettifyTestMethod(string $name): string + { + } +} /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ @@ -14202,47 +14152,6 @@ protected function endRun(): void { } } -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class NamePrettifier -{ - public function __construct(bool $useColor = false) - { - } - /** - * Prettifies the name of a test class. - * - * @phan-param class-string $className - */ - public function prettifyTestClass(string $className): string - { - } - /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function prettifyTestCase(\PHPUnit\Framework\TestCase $test): string - { - } - public function prettifyDataSet(\PHPUnit\Framework\TestCase $test): string - { - } - /** - * Prettifies the name of a test method. - */ - public function prettifyTestMethod(string $name): string - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class HtmlResultPrinter extends \PHPUnit\Util\TestDox\ResultPrinter -{ - public function printResult(\PHPUnit\Framework\TestResult $result): void - { - } -} /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ @@ -14374,56 +14283,127 @@ protected function showSpinner(): void protected function hideSpinner(): void { } - protected function drawSpinner(): void + protected function drawSpinner(): void + { + } + protected function undrawSpinner(): void + { + } + protected function writeTestResult(array $prevResult, array $result): void + { + } + protected function getEmptyTestResult(): array + { + } + protected function getTestResultByName(?string $testName): array + { + } + protected function formatThrowable(\Throwable $t, ?int $status = null): string + { + } + protected function formatStacktrace(\Throwable $t): string + { + } + protected function formatTestResultMessage(\Throwable $t, array $result, string $prefix = '│'): string + { + } + protected function prefixLines(string $prefix, string $message): string + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class TextResultPrinter extends \PHPUnit\Util\TestDox\ResultPrinter +{ + public function printResult(\PHPUnit\Framework\TestResult $result): void + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class XmlResultPrinter extends \PHPUnit\Util\Printer implements \PHPUnit\Framework\TestListener +{ + /** + * @param resource|string $out + * + * @throws \PHPUnit\Framework\Exception + */ + public function __construct($out = null) + { + } + /** + * Flush buffer and close output. + */ + public function flush(): void { } - protected function undrawSpinner(): void + /** + * An error occurred. + */ + public function addError(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void { } - protected function writeTestResult(array $prevResult, array $result): void + /** + * A warning occurred. + */ + public function addWarning(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\Warning $e, float $time): void { } - protected function getEmptyTestResult(): array + /** + * A failure occurred. + */ + public function addFailure(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\AssertionFailedError $e, float $time): void { } - protected function getTestResultByName(?string $testName): array + /** + * Incomplete test. + */ + public function addIncompleteTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void { } - protected function formatThrowable(\Throwable $t, ?int $status = null): string + /** + * Risky test. + */ + public function addRiskyTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void { } - protected function formatStacktrace(\Throwable $t): string + /** + * Skipped test. + */ + public function addSkippedTest(\PHPUnit\Framework\Test $test, \Throwable $t, float $time): void { } - protected function formatTestResultMessage(\Throwable $t, array $result, string $prefix = '│'): string + /** + * A test suite started. + */ + public function startTestSuite(\PHPUnit\Framework\TestSuite $suite): void { } - protected function prefixLines(string $prefix, string $message): string + /** + * A test suite ended. + */ + public function endTestSuite(\PHPUnit\Framework\TestSuite $suite): void { } -} -namespace PHPUnit\Util\Xml; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @phan-side-effect-free - */ -abstract class SchemaDetectionResult -{ /** - * @psalm-assert-if-true SuccessfulSchemaDetectionResult $this + * A test started. */ - public function detected(): bool + public function startTest(\PHPUnit\Framework\Test $test): void { } /** - * @throws Exception + * A test ended. + * + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ - public function version(): string + public function endTest(\PHPUnit\Framework\Test $test, float $time): void { } } +namespace PHPUnit\Util\Xml; + /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ @@ -14435,20 +14415,8 @@ final class Exception extends \RuntimeException implements \PHPUnit\Exception * * @phan-side-effect-free */ -final class ValidationResult +final class FailedSchemaDetectionResult extends \PHPUnit\Util\Xml\SchemaDetectionResult { - /** - * @phan-param array $errors - */ - public static function fromArray(array $errors): self - { - } - public function hasValidationErrors(): bool - { - } - public function asString(): string - { - } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit @@ -14471,17 +14439,20 @@ public function load(string $actual, bool $isHtml = false, string $filename = '' /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * - * @template-implements \IteratorAggregate + * @phan-side-effect-free */ -final class SnapshotNodeList implements \Countable, \IteratorAggregate +abstract class SchemaDetectionResult { - public static function fromNodeList(\DOMNodeList $list): self - { - } - public function count(): int + /** + * @psalm-assert-if-true SuccessfulSchemaDetectionResult $this + */ + public function detected(): bool { } - public function getIterator(): \ArrayIterator + /** + * @throws Exception + */ + public function version(): string { } } @@ -14497,15 +14468,6 @@ public function detect(string $filename): \PHPUnit\Util\Xml\SchemaDetectionResul { } } -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Validator -{ - public function validate(\DOMDocument $document, string $xsdFilename): \PHPUnit\Util\Xml\ValidationResult - { - } -} /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ @@ -14527,10 +14489,19 @@ public function find(string $version): string /** * @internal This class is not covered by the backward compatibility promise for PHPUnit * - * @phan-side-effect-free + * @template-implements \IteratorAggregate */ -final class FailedSchemaDetectionResult extends \PHPUnit\Util\Xml\SchemaDetectionResult +final class SnapshotNodeList implements \Countable, \IteratorAggregate { + public static function fromNodeList(\DOMNodeList $list): self + { + } + public function count(): int + { + } + public function getIterator(): \ArrayIterator + { + } } /** * @internal This class is not covered by the backward compatibility promise for PHPUnit @@ -14558,162 +14529,92 @@ public function version(): string { } } -namespace SebastianBergmann; - -final class Version -{ - public function __construct(string $release, string $path) - { - } - public function getVersion(): string - { - } -} -namespace SebastianBergmann\CliParser; - -final class Parser +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @phan-side-effect-free + */ +final class ValidationResult { /** - * @phan-param list $argv - * @phan-param list $longOptions - * - * @throws AmbiguousOptionException - * @throws RequiredOptionArgumentMissingException - * @throws OptionDoesNotAllowArgumentException - * @throws UnknownOptionException + * @phan-param array $errors */ - public function parse(array $argv, string $shortOptions, ?array $longOptions = null): array - { - } -} -interface Exception extends \Throwable -{ -} -final class OptionDoesNotAllowArgumentException extends \RuntimeException implements \SebastianBergmann\CliParser\Exception -{ - public function __construct(string $option) + public static function fromArray(array $errors): self { } -} -final class UnknownOptionException extends \RuntimeException implements \SebastianBergmann\CliParser\Exception -{ - public function __construct(string $option) + public function hasValidationErrors(): bool { } -} -final class AmbiguousOptionException extends \RuntimeException implements \SebastianBergmann\CliParser\Exception -{ - public function __construct(string $option) + public function asString(): string { } } -final class RequiredOptionArgumentMissingException extends \RuntimeException implements \SebastianBergmann\CliParser\Exception +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class Validator { - public function __construct(string $option) + public function validate(\DOMDocument $document, string $xsdFilename): \PHPUnit\Util\Xml\ValidationResult { } } -namespace SebastianBergmann\CodeCoverage; +namespace SebastianBergmann; final class Version { - public static function id(): string - { - } -} -final class TestIdMissingException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception -{ - public function __construct() - { - } -} -final class InvalidArgumentException extends \InvalidArgumentException implements \SebastianBergmann\CodeCoverage\Exception -{ -} -interface Exception extends \Throwable -{ -} -final class NoCodeCoverageDriverWithPathCoverageSupportAvailableException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception -{ - public function __construct() - { - } -} -final class ParserException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception -{ -} -final class NoCodeCoverageDriverAvailableException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception -{ - public function __construct() - { - } -} -final class ReportAlreadyFinalizedException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception -{ - public function __construct() - { - } -} -final class XmlException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception -{ -} -final class BranchAndPathCoverageNotSupportedException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception -{ -} -final class DeadCodeDetectionNotSupportedException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception -{ -} -final class UnintentionallyCoveredCodeException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception -{ - public function __construct(array $unintentionallyCoveredUnits) + public function __construct(string $release, string $path) { } - public function getUnintentionallyCoveredUnits(): array + public function getVersion(): string { } } -final class ReflectionException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception -{ -} -final class StaticAnalysisCacheNotConfiguredException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception -{ -} -final class Filter +namespace SebastianBergmann\CliParser; + +final class Parser { - public function includeDirectory(string $directory, string $suffix = '.php', string $prefix = ''): void - { - } /** - * @phan-param list $files - */ - public function includeFiles(array $filenames): void - { - } - public function includeFile(string $filename): void - { - } - public function excludeDirectory(string $directory, string $suffix = '.php', string $prefix = ''): void - { - } - public function excludeFile(string $filename): void + * @phan-param list $argv + * @phan-param list $longOptions + * + * @throws AmbiguousOptionException + * @throws RequiredOptionArgumentMissingException + * @throws OptionDoesNotAllowArgumentException + * @throws UnknownOptionException + */ + public function parse(array $argv, string $shortOptions, ?array $longOptions = null): array { } - public function isFile(string $filename): bool +} +final class AmbiguousOptionException extends \RuntimeException implements \SebastianBergmann\CliParser\Exception +{ + public function __construct(string $option) { } - public function isExcluded(string $filename): bool +} +interface Exception extends \Throwable +{ +} +final class OptionDoesNotAllowArgumentException extends \RuntimeException implements \SebastianBergmann\CliParser\Exception +{ + public function __construct(string $option) { } - /** - * @phan-return list - */ - public function files(): array +} +final class RequiredOptionArgumentMissingException extends \RuntimeException implements \SebastianBergmann\CliParser\Exception +{ + public function __construct(string $option) { } - public function isEmpty(): bool +} +final class UnknownOptionException extends \RuntimeException implements \SebastianBergmann\CliParser\Exception +{ + public function __construct(string $option) { } } +namespace SebastianBergmann\CodeCoverage; + /** * Provides collection functionality for PHP code coverage information. */ @@ -14872,6 +14773,99 @@ public function detectsDeadCode(): bool { } } +final class BranchAndPathCoverageNotSupportedException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +{ +} +final class DeadCodeDetectionNotSupportedException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +{ +} +interface Exception extends \Throwable +{ +} +final class InvalidArgumentException extends \InvalidArgumentException implements \SebastianBergmann\CodeCoverage\Exception +{ +} +final class NoCodeCoverageDriverAvailableException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +{ + public function __construct() + { + } +} +final class NoCodeCoverageDriverWithPathCoverageSupportAvailableException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +{ + public function __construct() + { + } +} +final class ParserException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +{ +} +final class ReflectionException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +{ +} +final class ReportAlreadyFinalizedException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +{ + public function __construct() + { + } +} +final class StaticAnalysisCacheNotConfiguredException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +{ +} +final class TestIdMissingException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +{ + public function __construct() + { + } +} +final class UnintentionallyCoveredCodeException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +{ + public function __construct(array $unintentionallyCoveredUnits) + { + } + public function getUnintentionallyCoveredUnits(): array + { + } +} +final class XmlException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +{ +} +final class Filter +{ + public function includeDirectory(string $directory, string $suffix = '.php', string $prefix = ''): void + { + } + /** + * @phan-param list $files + */ + public function includeFiles(array $filenames): void + { + } + public function includeFile(string $filename): void + { + } + public function excludeDirectory(string $directory, string $suffix = '.php', string $prefix = ''): void + { + } + public function excludeFile(string $filename): void + { + } + public function isFile(string $filename): bool + { + } + public function isExcluded(string $filename): bool + { + } + /** + * @phan-return list + */ + public function files(): array + { + } + public function isEmpty(): bool + { + } +} /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ @@ -14959,82 +14953,14 @@ public function removeCoverageDataForLines(string $filename, array $lines): void { } } -namespace SebastianBergmann\CodeCoverage\Driver; - -final class Xdebug2NotEnabledException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception -{ - public function __construct() - { - } -} -final class XdebugNotAvailableException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception -{ - public function __construct() - { - } -} -final class WriteOperationFailedException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception -{ - public function __construct(string $path) - { - } -} -final class PathExistsButIsNotDirectoryException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception -{ - public function __construct(string $path) - { - } -} -final class WrongXdebugVersionException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception -{ -} -final class PcovNotAvailableException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception -{ - public function __construct() - { - } -} -final class PhpdbgNotAvailableException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception -{ - public function __construct() - { - } -} -final class Xdebug3NotEnabledException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception -{ - public function __construct() - { - } -} -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class Xdebug2Driver extends \SebastianBergmann\CodeCoverage\Driver\Driver +final class Version { - /** - * @throws WrongXdebugVersionException - * @throws Xdebug2NotEnabledException - * @throws XdebugNotAvailableException - */ - public function __construct(\SebastianBergmann\CodeCoverage\Filter $filter) - { - } - public function canCollectBranchAndPathCoverage(): bool - { - } - public function canDetectDeadCode(): bool - { - } - public function start(): void - { - } - public function stop(): \SebastianBergmann\CodeCoverage\RawCodeCoverageData - { - } - public function nameAndVersion(): string + public static function id(): string { } } +namespace SebastianBergmann\CodeCoverage\Driver; + /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ @@ -15170,6 +15096,58 @@ public function nameAndVersion(): string { } } +final class Selector +{ + /** + * @throws \SebastianBergmann\CodeCoverage\NoCodeCoverageDriverAvailableException + * @throws PcovNotAvailableException + * @throws PhpdbgNotAvailableException + * @throws Xdebug2NotEnabledException + * @throws Xdebug3NotEnabledException + * @throws XdebugNotAvailableException + */ + public function forLineCoverage(\SebastianBergmann\CodeCoverage\Filter $filter): \SebastianBergmann\CodeCoverage\Driver\Driver + { + } + /** + * @throws \SebastianBergmann\CodeCoverage\NoCodeCoverageDriverWithPathCoverageSupportAvailableException + * @throws Xdebug2NotEnabledException + * @throws Xdebug3NotEnabledException + * @throws XdebugNotAvailableException + */ + public function forLineAndPathCoverage(\SebastianBergmann\CodeCoverage\Filter $filter): \SebastianBergmann\CodeCoverage\Driver\Driver + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage + */ +final class Xdebug2Driver extends \SebastianBergmann\CodeCoverage\Driver\Driver +{ + /** + * @throws WrongXdebugVersionException + * @throws Xdebug2NotEnabledException + * @throws XdebugNotAvailableException + */ + public function __construct(\SebastianBergmann\CodeCoverage\Filter $filter) + { + } + public function canCollectBranchAndPathCoverage(): bool + { + } + public function canDetectDeadCode(): bool + { + } + public function start(): void + { + } + public function stop(): \SebastianBergmann\CodeCoverage\RawCodeCoverageData + { + } + public function nameAndVersion(): string + { + } +} /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ @@ -15199,148 +15177,188 @@ public function nameAndVersion(): string { } } -final class Selector +final class PathExistsButIsNotDirectoryException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception { - /** - * @throws \SebastianBergmann\CodeCoverage\NoCodeCoverageDriverAvailableException - * @throws PcovNotAvailableException - * @throws PhpdbgNotAvailableException - * @throws Xdebug2NotEnabledException - * @throws Xdebug3NotEnabledException - * @throws XdebugNotAvailableException - */ - public function forLineCoverage(\SebastianBergmann\CodeCoverage\Filter $filter): \SebastianBergmann\CodeCoverage\Driver\Driver + public function __construct(string $path) { } - /** - * @throws \SebastianBergmann\CodeCoverage\NoCodeCoverageDriverWithPathCoverageSupportAvailableException - * @throws Xdebug2NotEnabledException - * @throws Xdebug3NotEnabledException - * @throws XdebugNotAvailableException - */ - public function forLineAndPathCoverage(\SebastianBergmann\CodeCoverage\Filter $filter): \SebastianBergmann\CodeCoverage\Driver\Driver +} +final class PcovNotAvailableException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +{ + public function __construct() { } } -namespace SebastianBergmann\CodeCoverage\Node; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class Builder +final class PhpdbgNotAvailableException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception { - public function __construct(\SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser $analyser) + public function __construct() { } - public function build(\SebastianBergmann\CodeCoverage\CodeCoverage $coverage): \SebastianBergmann\CodeCoverage\Node\Directory +} +final class WriteOperationFailedException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +{ + public function __construct(string $path) { } } -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class Directory extends \SebastianBergmann\CodeCoverage\Node\AbstractNode implements \IteratorAggregate +final class WrongXdebugVersionException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception { - public function count(): int +} +final class Xdebug2NotEnabledException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +{ + public function __construct() { } - public function getIterator(): \RecursiveIteratorIterator +} +final class Xdebug3NotEnabledException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +{ + public function __construct() { } - public function addDirectory(string $name): self +} +final class XdebugNotAvailableException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +{ + public function __construct() { } - public function addFile(\SebastianBergmann\CodeCoverage\Node\File $file): void +} +namespace SebastianBergmann\CodeCoverage\Node; + +/** + * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage + */ +abstract class AbstractNode implements \Countable +{ + public function __construct(string $name, ?self $parent = null) { } - public function directories(): array + public function name(): string { } - public function files(): array + public function id(): string { } - public function children(): array + public function pathAsString(): string { } - public function classes(): array + public function pathAsArray(): array { } - public function traits(): array + public function parent(): ?self { } - public function functions(): array + public function percentageOfTestedClasses(): \SebastianBergmann\CodeCoverage\Util\Percentage { } - /** - * @phan-return array{linesOfCode: int, commentLinesOfCode: int, nonCommentLinesOfCode: int} - */ - public function linesOfCode(): array + public function percentageOfTestedTraits(): \SebastianBergmann\CodeCoverage\Util\Percentage { } - public function numberOfExecutableLines(): int + public function percentageOfTestedClassesAndTraits(): \SebastianBergmann\CodeCoverage\Util\Percentage { } - public function numberOfExecutedLines(): int + public function percentageOfTestedFunctions(): \SebastianBergmann\CodeCoverage\Util\Percentage { } - public function numberOfExecutableBranches(): int + public function percentageOfTestedMethods(): \SebastianBergmann\CodeCoverage\Util\Percentage { } - public function numberOfExecutedBranches(): int + public function percentageOfTestedFunctionsAndMethods(): \SebastianBergmann\CodeCoverage\Util\Percentage { } - public function numberOfExecutablePaths(): int + public function percentageOfExecutedLines(): \SebastianBergmann\CodeCoverage\Util\Percentage { } - public function numberOfExecutedPaths(): int + public function percentageOfExecutedBranches(): \SebastianBergmann\CodeCoverage\Util\Percentage { } - public function numberOfClasses(): int + public function percentageOfExecutedPaths(): \SebastianBergmann\CodeCoverage\Util\Percentage { } - public function numberOfTestedClasses(): int + public function numberOfClassesAndTraits(): int { } - public function numberOfTraits(): int + public function numberOfTestedClassesAndTraits(): int { } - public function numberOfTestedTraits(): int + public function classesAndTraits(): array { } - public function numberOfMethods(): int + public function numberOfFunctionsAndMethods(): int { } - public function numberOfTestedMethods(): int + public function numberOfTestedFunctionsAndMethods(): int { } - public function numberOfFunctions(): int + abstract public function classes(): array; + abstract public function traits(): array; + abstract public function functions(): array; + /** + * @phan-return array{linesOfCode: int, commentLinesOfCode: int, nonCommentLinesOfCode: int} + */ + abstract public function linesOfCode(): array; + abstract public function numberOfExecutableLines(): int; + abstract public function numberOfExecutedLines(): int; + abstract public function numberOfExecutableBranches(): int; + abstract public function numberOfExecutedBranches(): int; + abstract public function numberOfExecutablePaths(): int; + abstract public function numberOfExecutedPaths(): int; + abstract public function numberOfClasses(): int; + abstract public function numberOfTestedClasses(): int; + abstract public function numberOfTraits(): int; + abstract public function numberOfTestedTraits(): int; + abstract public function numberOfMethods(): int; + abstract public function numberOfTestedMethods(): int; + abstract public function numberOfFunctions(): int; + abstract public function numberOfTestedFunctions(): int; +} +/** + * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage + */ +final class Builder +{ + public function __construct(\SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser $analyser) { } - public function numberOfTestedFunctions(): int + public function build(\SebastianBergmann\CodeCoverage\CodeCoverage $coverage): \SebastianBergmann\CodeCoverage\Node\Directory { } } /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final class File extends \SebastianBergmann\CodeCoverage\Node\AbstractNode +final class CrapIndex { - /** - * @phan-param array{linesOfCode: int, commentLinesOfCode: int, nonCommentLinesOfCode: int} $linesOfCode - */ - public function __construct(string $name, \SebastianBergmann\CodeCoverage\Node\AbstractNode $parent, array $lineCoverageData, array $functionCoverageData, array $testData, array $classes, array $traits, array $functions, array $linesOfCode) + public function __construct(int $cyclomaticComplexity, float $codeCoverage) { } + public function asString(): string + { + } +} +/** + * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage + */ +final class Directory extends \SebastianBergmann\CodeCoverage\Node\AbstractNode implements \IteratorAggregate +{ public function count(): int { } - public function lineCoverageData(): array + public function getIterator(): \RecursiveIteratorIterator { } - public function functionCoverageData(): array + public function addDirectory(string $name): self { } - public function testData(): array + public function addFile(\SebastianBergmann\CodeCoverage\Node\File $file): void + { + } + public function directories(): array + { + } + public function files(): array + { + } + public function children(): array { } public function classes(): array @@ -15404,170 +15422,137 @@ public function numberOfTestedFunctions(): int /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final class CrapIndex +final class File extends \SebastianBergmann\CodeCoverage\Node\AbstractNode { - public function __construct(int $cyclomaticComplexity, float $codeCoverage) - { - } - public function asString(): string + /** + * @phan-param array{linesOfCode: int, commentLinesOfCode: int, nonCommentLinesOfCode: int} $linesOfCode + */ + public function __construct(string $name, \SebastianBergmann\CodeCoverage\Node\AbstractNode $parent, array $lineCoverageData, array $functionCoverageData, array $testData, array $classes, array $traits, array $functions, array $linesOfCode) { } -} -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class Iterator implements \RecursiveIterator -{ - public function __construct(\SebastianBergmann\CodeCoverage\Node\Directory $node) + public function count(): int { } - /** - * Rewinds the Iterator to the first element. - */ - public function rewind(): void + public function lineCoverageData(): array { } - /** - * Checks if there is a current element after calls to rewind() or next(). - */ - public function valid(): bool + public function functionCoverageData(): array { } - /** - * Returns the key of the current element. - */ - public function key(): int + public function testData(): array { } - /** - * Returns the current element. - */ - public function current(): ?\SebastianBergmann\CodeCoverage\Node\AbstractNode + public function classes(): array { } - /** - * Moves forward to next element. - */ - public function next(): void + public function traits(): array { } - /** - * Returns the sub iterator for the current element. - */ - public function getChildren(): self + public function functions(): array { } /** - * Checks whether the current element has children. + * @phan-return array{linesOfCode: int, commentLinesOfCode: int, nonCommentLinesOfCode: int} */ - public function hasChildren(): bool + public function linesOfCode(): array { } -} -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -abstract class AbstractNode implements \Countable -{ - public function __construct(string $name, ?self $parent = null) + public function numberOfExecutableLines(): int { } - public function name(): string + public function numberOfExecutedLines(): int { } - public function id(): string + public function numberOfExecutableBranches(): int { } - public function pathAsString(): string + public function numberOfExecutedBranches(): int { } - public function pathAsArray(): array + public function numberOfExecutablePaths(): int { } - public function parent(): ?self + public function numberOfExecutedPaths(): int { } - public function percentageOfTestedClasses(): \SebastianBergmann\CodeCoverage\Util\Percentage + public function numberOfClasses(): int { } - public function percentageOfTestedTraits(): \SebastianBergmann\CodeCoverage\Util\Percentage + public function numberOfTestedClasses(): int { } - public function percentageOfTestedClassesAndTraits(): \SebastianBergmann\CodeCoverage\Util\Percentage + public function numberOfTraits(): int { } - public function percentageOfTestedFunctions(): \SebastianBergmann\CodeCoverage\Util\Percentage + public function numberOfTestedTraits(): int { } - public function percentageOfTestedMethods(): \SebastianBergmann\CodeCoverage\Util\Percentage + public function numberOfMethods(): int { } - public function percentageOfTestedFunctionsAndMethods(): \SebastianBergmann\CodeCoverage\Util\Percentage + public function numberOfTestedMethods(): int { } - public function percentageOfExecutedLines(): \SebastianBergmann\CodeCoverage\Util\Percentage + public function numberOfFunctions(): int { } - public function percentageOfExecutedBranches(): \SebastianBergmann\CodeCoverage\Util\Percentage + public function numberOfTestedFunctions(): int { } - public function percentageOfExecutedPaths(): \SebastianBergmann\CodeCoverage\Util\Percentage +} +/** + * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage + */ +final class Iterator implements \RecursiveIterator +{ + public function __construct(\SebastianBergmann\CodeCoverage\Node\Directory $node) { } - public function numberOfClassesAndTraits(): int + /** + * Rewinds the Iterator to the first element. + */ + public function rewind(): void { } - public function numberOfTestedClassesAndTraits(): int + /** + * Checks if there is a current element after calls to rewind() or next(). + */ + public function valid(): bool { } - public function classesAndTraits(): array + /** + * Returns the key of the current element. + */ + public function key(): int { } - public function numberOfFunctionsAndMethods(): int + /** + * Returns the current element. + */ + public function current(): ?\SebastianBergmann\CodeCoverage\Node\AbstractNode { } - public function numberOfTestedFunctionsAndMethods(): int + /** + * Moves forward to next element. + */ + public function next(): void { } - abstract public function classes(): array; - abstract public function traits(): array; - abstract public function functions(): array; /** - * @phan-return array{linesOfCode: int, commentLinesOfCode: int, nonCommentLinesOfCode: int} + * Returns the sub iterator for the current element. */ - abstract public function linesOfCode(): array; - abstract public function numberOfExecutableLines(): int; - abstract public function numberOfExecutedLines(): int; - abstract public function numberOfExecutableBranches(): int; - abstract public function numberOfExecutedBranches(): int; - abstract public function numberOfExecutablePaths(): int; - abstract public function numberOfExecutedPaths(): int; - abstract public function numberOfClasses(): int; - abstract public function numberOfTestedClasses(): int; - abstract public function numberOfTraits(): int; - abstract public function numberOfTestedTraits(): int; - abstract public function numberOfMethods(): int; - abstract public function numberOfTestedMethods(): int; - abstract public function numberOfFunctions(): int; - abstract public function numberOfTestedFunctions(): int; -} -namespace SebastianBergmann\CodeCoverage\Report; - -final class PHP -{ - public function process(\SebastianBergmann\CodeCoverage\CodeCoverage $coverage, ?string $target = null): string + public function getChildren(): self { } -} -final class Cobertura -{ /** - * @throws \SebastianBergmann\CodeCoverage\Driver\WriteOperationFailedException + * Checks whether the current element has children. */ - public function process(\SebastianBergmann\CodeCoverage\CodeCoverage $coverage, ?string $target = null): string + public function hasChildren(): bool { } } +namespace SebastianBergmann\CodeCoverage\Report; + final class Clover { /** @@ -15577,12 +15562,12 @@ public function process(\SebastianBergmann\CodeCoverage\CodeCoverage $coverage, { } } -final class Text +final class Cobertura { - public function __construct(int $lowUpperBound = 50, int $highLowerBound = 90, bool $showUncoveredFiles = false, bool $showOnlySummary = false) - { - } - public function process(\SebastianBergmann\CodeCoverage\CodeCoverage $coverage, bool $showColors = false): string + /** + * @throws \SebastianBergmann\CodeCoverage\Driver\WriteOperationFailedException + */ + public function process(\SebastianBergmann\CodeCoverage\CodeCoverage $coverage, ?string $target = null): string { } } @@ -15598,35 +15583,23 @@ public function process(\SebastianBergmann\CodeCoverage\CodeCoverage $coverage, { } } -namespace SebastianBergmann\CodeCoverage\Report\Html; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class Directory extends \SebastianBergmann\CodeCoverage\Report\Html\Renderer +final class PHP { - public function render(\SebastianBergmann\CodeCoverage\Node\Directory $node, string $file): void + public function process(\SebastianBergmann\CodeCoverage\CodeCoverage $coverage, ?string $target = null): string { } } -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class File extends \SebastianBergmann\CodeCoverage\Report\Html\Renderer +final class Text { - public function render(\SebastianBergmann\CodeCoverage\Node\File $node, string $file): void + public function __construct(int $lowUpperBound = 50, int $highLowerBound = 90, bool $showUncoveredFiles = false, bool $showOnlySummary = false) { } -} -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class Dashboard extends \SebastianBergmann\CodeCoverage\Report\Html\Renderer -{ - public function render(\SebastianBergmann\CodeCoverage\Node\Directory $node, string $file): void + public function process(\SebastianBergmann\CodeCoverage\CodeCoverage $coverage, bool $showColors = false): string { } } +namespace SebastianBergmann\CodeCoverage\Report\Html; + final class Facade { public function __construct(int $lowUpperBound = 50, int $highLowerBound = 90, string $generator = '') @@ -15697,53 +15670,68 @@ protected function colorLevel(float $percent): string { } } -namespace SebastianBergmann\CodeCoverage\Report\Xml; - /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final class Totals +final class Dashboard extends \SebastianBergmann\CodeCoverage\Report\Html\Renderer { - public function __construct(\DOMElement $container) + public function render(\SebastianBergmann\CodeCoverage\Node\Directory $node, string $file): void { } - public function container(): \DOMNode +} +/** + * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage + */ +final class Directory extends \SebastianBergmann\CodeCoverage\Report\Html\Renderer +{ + public function render(\SebastianBergmann\CodeCoverage\Node\Directory $node, string $file): void { } - public function setNumLines(int $loc, int $cloc, int $ncloc, int $executable, int $executed): void +} +/** + * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage + */ +final class File extends \SebastianBergmann\CodeCoverage\Report\Html\Renderer +{ + public function render(\SebastianBergmann\CodeCoverage\Node\File $node, string $file): void { } - public function setNumClasses(int $count, int $tested): void +} +namespace SebastianBergmann\CodeCoverage\Report\Xml; + +/** + * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage + */ +final class BuildInformation +{ + public function __construct(\DOMElement $contextNode) { } - public function setNumTraits(int $count, int $tested): void + public function setRuntimeInformation(\SebastianBergmann\Environment\Runtime $runtime): void { } - public function setNumMethods(int $count, int $tested): void + public function setBuildTime(\DateTimeImmutable $date): void { } - public function setNumFunctions(int $count, int $tested): void + public function setGeneratorVersions(string $phpUnitVersion, string $coverageVersion): void { } } /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final class Project extends \SebastianBergmann\CodeCoverage\Report\Xml\Node +final class Coverage { - public function __construct(string $directory) - { - } - public function projectSourceDirectory(): string - { - } - public function buildInformation(): \SebastianBergmann\CodeCoverage\Report\Xml\BuildInformation + public function __construct(\DOMElement $context, string $line) { } - public function tests(): \SebastianBergmann\CodeCoverage\Report\Xml\Tests + /** + * @throws \SebastianBergmann\CodeCoverage\ReportAlreadyFinalizedException + */ + public function addTest(string $test): void { } - public function asDom(): \DOMDocument + public function finalize(): void { } } @@ -15753,81 +15741,105 @@ public function asDom(): \DOMDocument final class Directory extends \SebastianBergmann\CodeCoverage\Report\Xml\Node { } -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class Tests +final class Facade { - public function __construct(\DOMElement $context) + public function __construct(string $version) { } - public function addTest(string $test, array $result): void + /** + * @throws \SebastianBergmann\CodeCoverage\XmlException + */ + public function process(\SebastianBergmann\CodeCoverage\CodeCoverage $coverage, string $target): void { } } /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final class Source +class File { public function __construct(\DOMElement $context) { } - public function setSourceCode(string $source): void + public function totals(): \SebastianBergmann\CodeCoverage\Report\Xml\Totals + { + } + public function lineCoverage(string $line): \SebastianBergmann\CodeCoverage\Report\Xml\Coverage + { + } + protected function contextNode(): \DOMElement + { + } + protected function dom(): \DOMDocument { } } /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -class File +final class Method { - public function __construct(\DOMElement $context) + public function __construct(\DOMElement $context, string $name) { } - public function totals(): \SebastianBergmann\CodeCoverage\Report\Xml\Totals + public function setSignature(string $signature): void { } - public function lineCoverage(string $line): \SebastianBergmann\CodeCoverage\Report\Xml\Coverage + public function setLines(string $start, ?string $end = null): void { } - protected function contextNode(): \DOMElement + public function setTotals(string $executable, string $executed, string $coverage): void { } - protected function dom(): \DOMDocument + public function setCrap(string $crap): void { } } /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final class Unit +abstract class Node { - public function __construct(\DOMElement $context, string $name) + public function __construct(\DOMElement $context) { } - public function setLines(int $start, int $executable, int $executed): void + public function dom(): \DOMDocument { } - public function setCrap(float $crap): void + public function totals(): \SebastianBergmann\CodeCoverage\Report\Xml\Totals { } - public function setNamespace(string $namespace): void + public function addDirectory(string $name): \SebastianBergmann\CodeCoverage\Report\Xml\Directory { } - public function addMethod(string $name): \SebastianBergmann\CodeCoverage\Report\Xml\Method + public function addFile(string $name, string $href): \SebastianBergmann\CodeCoverage\Report\Xml\File + { + } + protected function setContextNode(\DOMElement $context): void + { + } + protected function contextNode(): \DOMElement { } } -final class Facade +/** + * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage + */ +final class Project extends \SebastianBergmann\CodeCoverage\Report\Xml\Node { - public function __construct(string $version) + public function __construct(string $directory) { } - /** - * @throws \SebastianBergmann\CodeCoverage\XmlException - */ - public function process(\SebastianBergmann\CodeCoverage\CodeCoverage $coverage, string $target): void + public function projectSourceDirectory(): string + { + } + public function buildInformation(): \SebastianBergmann\CodeCoverage\Report\Xml\BuildInformation + { + } + public function tests(): \SebastianBergmann\CodeCoverage\Report\Xml\Tests + { + } + public function asDom(): \DOMDocument { } } @@ -15858,104 +15870,113 @@ public function source(): \SebastianBergmann\CodeCoverage\Report\Xml\Source /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -abstract class Node +final class Source { - public function __construct(\DOMElement $context) - { - } - public function dom(): \DOMDocument - { - } - public function totals(): \SebastianBergmann\CodeCoverage\Report\Xml\Totals - { - } - public function addDirectory(string $name): \SebastianBergmann\CodeCoverage\Report\Xml\Directory - { - } - public function addFile(string $name, string $href): \SebastianBergmann\CodeCoverage\Report\Xml\File - { - } - protected function setContextNode(\DOMElement $context): void + public function __construct(\DOMElement $context) { } - protected function contextNode(): \DOMElement + public function setSourceCode(string $source): void { } } /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final class Coverage +final class Tests { - public function __construct(\DOMElement $context, string $line) - { - } - /** - * @throws \SebastianBergmann\CodeCoverage\ReportAlreadyFinalizedException - */ - public function addTest(string $test): void + public function __construct(\DOMElement $context) { } - public function finalize(): void + public function addTest(string $test, array $result): void { } } /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final class Method +final class Totals { - public function __construct(\DOMElement $context, string $name) + public function __construct(\DOMElement $container) { } - public function setSignature(string $signature): void + public function container(): \DOMNode { } - public function setLines(string $start, ?string $end = null): void + public function setNumLines(int $loc, int $cloc, int $ncloc, int $executable, int $executed): void { } - public function setTotals(string $executable, string $executed, string $coverage): void + public function setNumClasses(int $count, int $tested): void { } - public function setCrap(string $crap): void + public function setNumTraits(int $count, int $tested): void + { + } + public function setNumMethods(int $count, int $tested): void + { + } + public function setNumFunctions(int $count, int $tested): void { } } /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final class BuildInformation +final class Unit { - public function __construct(\DOMElement $contextNode) + public function __construct(\DOMElement $context, string $name) { } - public function setRuntimeInformation(\SebastianBergmann\Environment\Runtime $runtime): void + public function setLines(int $start, int $executable, int $executed): void { } - public function setBuildTime(\DateTimeImmutable $date): void + public function setCrap(float $crap): void { } - public function setGeneratorVersions(string $phpUnitVersion, string $coverageVersion): void + public function setNamespace(string $namespace): void + { + } + public function addMethod(string $name): \SebastianBergmann\CodeCoverage\Report\Xml\Method { } } namespace SebastianBergmann\CodeCoverage\StaticAnalysis; +final class CacheWarmer +{ + public function warmCache(string $cacheDirectory, bool $useAnnotationsForIgnoringCode, bool $ignoreDeprecatedCode, \SebastianBergmann\CodeCoverage\Filter $filter): void + { + } +} /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final class ExecutableLinesFindingVisitor extends \PhpParser\NodeVisitorAbstract +final class CachingFileAnalyser implements \SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser { - public function __construct(string $source) + public function __construct(string $directory, \SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser $analyser, bool $useAnnotationsForIgnoringCode, bool $ignoreDeprecatedCode) { } - public function enterNode(\PhpParser\Node $node): void + public function classesIn(string $filename): array { } - public function afterTraverse(array $nodes): void + public function traitsIn(string $filename): array { } - public function executableLinesGroupedByBranch(): array + public function functionsIn(string $filename): array + { + } + /** + * @phan-return array{linesOfCode: int, commentLinesOfCode: int, nonCommentLinesOfCode: int} + */ + public function linesOfCodeFor(string $filename): array + { + } + public function executableLinesIn(string $filename): array + { + } + public function ignoredLinesFor(string $filename): array + { + } + public function process(string $filename): void { } } @@ -15986,6 +16007,24 @@ public function functions(): array { } } +/** + * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage + */ +final class ExecutableLinesFindingVisitor extends \PhpParser\NodeVisitorAbstract +{ + public function __construct(string $source) + { + } + public function enterNode(\PhpParser\Node $node): void + { + } + public function afterTraverse(array $nodes): void + { + } + public function executableLinesGroupedByBranch(): array + { + } +} /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ @@ -16019,12 +16058,6 @@ public function ignoredLines(): array { } } -final class CacheWarmer -{ - public function warmCache(string $cacheDirectory, bool $useAnnotationsForIgnoringCode, bool $ignoreDeprecatedCode, \SebastianBergmann\CodeCoverage\Filter $filter): void - { - } -} /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ @@ -16055,41 +16088,23 @@ public function ignoredLinesFor(string $filename): array { } } +namespace SebastianBergmann\CodeCoverage\Util; + +final class DirectoryCouldNotBeCreatedException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception +{ +} /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final class CachingFileAnalyser implements \SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser +final class Filesystem { - public function __construct(string $directory, \SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser $analyser, bool $useAnnotationsForIgnoringCode, bool $ignoreDeprecatedCode) - { - } - public function classesIn(string $filename): array - { - } - public function traitsIn(string $filename): array - { - } - public function functionsIn(string $filename): array - { - } /** - * @phan-return array{linesOfCode: int, commentLinesOfCode: int, nonCommentLinesOfCode: int} + * @throws DirectoryCouldNotBeCreatedException */ - public function linesOfCodeFor(string $filename): array - { - } - public function executableLinesIn(string $filename): array - { - } - public function ignoredLinesFor(string $filename): array - { - } - public function process(string $filename): void + public static function createDirectory(string $directory): void { } } -namespace SebastianBergmann\CodeCoverage\Util; - /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ @@ -16108,60 +16123,29 @@ public function asFixedWidthString(): string { } } -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class Filesystem -{ - /** - * @throws DirectoryCouldNotBeCreatedException - */ - public static function createDirectory(string $directory): void - { - } -} -final class DirectoryCouldNotBeCreatedException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception -{ -} namespace SebastianBergmann\CodeUnit; -final class Mapper -{ - /** - * @phan-return array> - */ - public function codeUnitsToSourceLines(\SebastianBergmann\CodeUnit\CodeUnitCollection $codeUnits): array - { - } - /** - * @throws InvalidCodeUnitException - * @throws ReflectionException - */ - public function stringToCodeUnits(string $unit): \SebastianBergmann\CodeUnit\CodeUnitCollection - { - } -} /** * @phan-side-effect-free */ -final class FunctionUnit extends \SebastianBergmann\CodeUnit\CodeUnit +final class ClassMethodUnit extends \SebastianBergmann\CodeUnit\CodeUnit { /** - * @psalm-assert-if-true FunctionUnit $this + * @psalm-assert-if-true ClassMethodUnit $this */ - public function isFunction(): bool + public function isClassMethod(): bool { } } /** * @phan-side-effect-free */ -final class TraitUnit extends \SebastianBergmann\CodeUnit\CodeUnit +final class ClassUnit extends \SebastianBergmann\CodeUnit\CodeUnit { /** - * @psalm-assert-if-true TraitUnit $this + * @psalm-assert-if-true ClassUnit $this */ - public function isTrait(): bool + public function isClass(): bool { } } @@ -16267,27 +16251,66 @@ public function isFunction(): bool { } } -/** - * @phan-side-effect-free - */ -final class InterfaceUnit extends \SebastianBergmann\CodeUnit\CodeUnit +final class CodeUnitCollection implements \Countable, \IteratorAggregate { /** - * @psalm-assert-if-true InterfaceUnit $this + * @phan-param list $items */ - public function isInterface(): bool + public static function fromArray(array $items): self + { + } + public static function fromList(\SebastianBergmann\CodeUnit\CodeUnit ...$items): self + { + } + /** + * @phan-return list + */ + public function asArray(): array + { + } + public function getIterator(): \SebastianBergmann\CodeUnit\CodeUnitCollectionIterator + { + } + public function count(): int + { + } + public function isEmpty(): bool + { + } + public function mergeWith(self $other): self + { + } +} +final class CodeUnitCollectionIterator implements \Iterator +{ + public function __construct(\SebastianBergmann\CodeUnit\CodeUnitCollection $collection) + { + } + public function rewind(): void + { + } + public function valid(): bool + { + } + public function key(): int + { + } + public function current(): \SebastianBergmann\CodeUnit\CodeUnit + { + } + public function next(): void { } } /** * @phan-side-effect-free */ -final class ClassUnit extends \SebastianBergmann\CodeUnit\CodeUnit +final class FunctionUnit extends \SebastianBergmann\CodeUnit\CodeUnit { /** - * @psalm-assert-if-true ClassUnit $this + * @psalm-assert-if-true FunctionUnit $this */ - public function isClass(): bool + public function isFunction(): bool { } } @@ -16306,89 +16329,66 @@ public function isInterfaceMethod(): bool /** * @phan-side-effect-free */ -final class TraitMethodUnit extends \SebastianBergmann\CodeUnit\CodeUnit +final class InterfaceUnit extends \SebastianBergmann\CodeUnit\CodeUnit { /** - * @psalm-assert-if-true TraitMethodUnit $this + * @psalm-assert-if-true InterfaceUnit $this */ - public function isTraitMethod(): bool + public function isInterface(): bool { } } -final class CodeUnitCollectionIterator implements \Iterator +final class Mapper { - public function __construct(\SebastianBergmann\CodeUnit\CodeUnitCollection $collection) - { - } - public function rewind(): void - { - } - public function valid(): bool - { - } - public function key(): int + /** + * @phan-return array> + */ + public function codeUnitsToSourceLines(\SebastianBergmann\CodeUnit\CodeUnitCollection $codeUnits): array { } - public function current(): \SebastianBergmann\CodeUnit\CodeUnit + /** + * @throws InvalidCodeUnitException + * @throws ReflectionException + */ + public function stringToCodeUnits(string $unit): \SebastianBergmann\CodeUnit\CodeUnitCollection { } - public function next(): void +} +/** + * @phan-side-effect-free + */ +final class TraitMethodUnit extends \SebastianBergmann\CodeUnit\CodeUnit +{ + /** + * @psalm-assert-if-true TraitMethodUnit $this + */ + public function isTraitMethod(): bool { } } /** * @phan-side-effect-free */ -final class ClassMethodUnit extends \SebastianBergmann\CodeUnit\CodeUnit +final class TraitUnit extends \SebastianBergmann\CodeUnit\CodeUnit { /** - * @psalm-assert-if-true ClassMethodUnit $this + * @psalm-assert-if-true TraitUnit $this */ - public function isClassMethod(): bool + public function isTrait(): bool { } } interface Exception extends \Throwable { } -final class ReflectionException extends \RuntimeException implements \SebastianBergmann\CodeUnit\Exception -{ -} final class InvalidCodeUnitException extends \RuntimeException implements \SebastianBergmann\CodeUnit\Exception { } final class NoTraitException extends \RuntimeException implements \SebastianBergmann\CodeUnit\Exception { } -final class CodeUnitCollection implements \Countable, \IteratorAggregate +final class ReflectionException extends \RuntimeException implements \SebastianBergmann\CodeUnit\Exception { - /** - * @phan-param list $items - */ - public static function fromArray(array $items): self - { - } - public static function fromList(\SebastianBergmann\CodeUnit\CodeUnit ...$items): self - { - } - /** - * @phan-return list - */ - public function asArray(): array - { - } - public function getIterator(): \SebastianBergmann\CodeUnit\CodeUnitCollectionIterator - { - } - public function count(): int - { - } - public function isEmpty(): bool - { - } - public function mergeWith(self $other): self - { - } } namespace SebastianBergmann\CodeUnitReverseLookup; @@ -16410,18 +16410,14 @@ public function lookup($filename, $lineNumber) namespace SebastianBergmann\Comparator; /** - * Compares doubles for equality. + * Compares arrays for equality. * - * @deprecated since v3.0.5 and v4.0.8 + * Arrays are equal if they contain the same key-value pairs. + * The order of the keys does not matter. + * The types of key-value pairs do not matter. */ -class DoubleComparator extends \SebastianBergmann\Comparator\NumericComparator +class ArrayComparator extends \SebastianBergmann\Comparator\Comparator { - /** - * Smallest value available in PHP. - * - * @var float - */ - public const EPSILON = 1.0E-10; /** * Returns whether the comparator can compare two values. * @@ -16434,57 +16430,43 @@ public function accepts($expected, $actual) { } /** - * Asserts that two values are equal. + * Asserts that two arrays are equal. * * @param mixed $expected First value to compare * @param mixed $actual Second value to compare * @param float $delta Allowed numerical distance between two values to consider them equal * @param bool $canonicalize Arrays are sorted before comparison when set to true * @param bool $ignoreCase Case is ignored when set to true + * @param array $processed List of already processed elements (used to prevent infinite recursion) * * @throws ComparisonFailure */ - public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false) + public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false, array &$processed = []) + { + } + protected function indent($lines) { } } /** - * Compares DOMNode instances for equality. + * Abstract base class for comparators which compare values for equality. */ -class DOMNodeComparator extends \SebastianBergmann\Comparator\ObjectComparator +abstract class Comparator { /** - * Returns whether the comparator can compare two values. - * - * @param mixed $expected The first value to compare - * @param mixed $actual The second value to compare - * - * @return bool + * @var Factory */ - public function accepts($expected, $actual) - { - } + protected $factory; /** - * Asserts that two values are equal. - * - * @param mixed $expected First value to compare - * @param mixed $actual Second value to compare - * @param float $delta Allowed numerical distance between two values to consider them equal - * @param bool $canonicalize Arrays are sorted before comparison when set to true - * @param bool $ignoreCase Case is ignored when set to true - * @param array $processed List of already processed elements (used to prevent infinite recursion) - * - * @throws ComparisonFailure + * @var \SebastianBergmann\Exporter\Exporter */ - public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false, array &$processed = []) + protected $exporter; + public function __construct() + { + } + public function setFactory(\SebastianBergmann\Comparator\Factory $factory) { } -} -/** - * Compares \SplObjectStorage instances for equality. - */ -class SplObjectStorageComparator extends \SebastianBergmann\Comparator\Comparator -{ /** * Returns whether the comparator can compare two values. * @@ -16493,9 +16475,7 @@ class SplObjectStorageComparator extends \SebastianBergmann\Comparator\Comparato * * @return bool */ - public function accepts($expected, $actual) - { - } + abstract public function accepts($expected, $actual); /** * Asserts that two values are equal. * @@ -16507,9 +16487,7 @@ public function accepts($expected, $actual) * * @throws ComparisonFailure */ - public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false) - { - } + abstract public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false); } /** * Thrown when an assertion for string equality failed. @@ -16597,9 +16575,9 @@ public function toString() } } /** - * Compares resources for equality. + * Compares DOMNode instances for equality. */ -class ResourceComparator extends \SebastianBergmann\Comparator\Comparator +class DOMNodeComparator extends \SebastianBergmann\Comparator\ObjectComparator { /** * Returns whether the comparator can compare two values. @@ -16620,32 +16598,19 @@ public function accepts($expected, $actual) * @param float $delta Allowed numerical distance between two values to consider them equal * @param bool $canonicalize Arrays are sorted before comparison when set to true * @param bool $ignoreCase Case is ignored when set to true + * @param array $processed List of already processed elements (used to prevent infinite recursion) * * @throws ComparisonFailure */ - public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false) + public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false, array &$processed = []) { } } /** - * Abstract base class for comparators which compare values for equality. + * Compares DateTimeInterface instances for equality. */ -abstract class Comparator +class DateTimeComparator extends \SebastianBergmann\Comparator\ObjectComparator { - /** - * @var Factory - */ - protected $factory; - /** - * @var \SebastianBergmann\Exporter\Exporter - */ - protected $exporter; - public function __construct() - { - } - public function setFactory(\SebastianBergmann\Comparator\Factory $factory) - { - } /** * Returns whether the comparator can compare two values. * @@ -16654,7 +16619,9 @@ public function setFactory(\SebastianBergmann\Comparator\Factory $factory) * * @return bool */ - abstract public function accepts($expected, $actual); + public function accepts($expected, $actual) + { + } /** * Asserts that two values are equal. * @@ -16663,16 +16630,28 @@ abstract public function accepts($expected, $actual); * @param float $delta Allowed numerical distance between two values to consider them equal * @param bool $canonicalize Arrays are sorted before comparison when set to true * @param bool $ignoreCase Case is ignored when set to true + * @param array $processed List of already processed elements (used to prevent infinite recursion) * + * @throws \Exception * @throws ComparisonFailure */ - abstract public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false); + public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false, array &$processed = []) + { + } } /** - * Compares values for type equality. + * Compares doubles for equality. + * + * @deprecated since v3.0.5 and v4.0.8 */ -class TypeComparator extends \SebastianBergmann\Comparator\Comparator +class DoubleComparator extends \SebastianBergmann\Comparator\NumericComparator { + /** + * Smallest value available in PHP. + * + * @var float + */ + public const EPSILON = 1.0E-10; /** * Returns whether the comparator can compare two values. * @@ -16786,13 +16765,9 @@ public function reset() } } /** - * Compares arrays for equality. - * - * Arrays are equal if they contain the same key-value pairs. - * The order of the keys does not matter. - * The types of key-value pairs do not matter. + * Compares PHPUnit\Framework\MockObject\MockObject instances for equality. */ -class ArrayComparator extends \SebastianBergmann\Comparator\Comparator +class MockObjectComparator extends \SebastianBergmann\Comparator\ObjectComparator { /** * Returns whether the comparator can compare two values. @@ -16806,28 +16781,21 @@ public function accepts($expected, $actual) { } /** - * Asserts that two arrays are equal. + * Converts an object to an array containing all of its private, protected + * and public properties. * - * @param mixed $expected First value to compare - * @param mixed $actual Second value to compare - * @param float $delta Allowed numerical distance between two values to consider them equal - * @param bool $canonicalize Arrays are sorted before comparison when set to true - * @param bool $ignoreCase Case is ignored when set to true - * @param array $processed List of already processed elements (used to prevent infinite recursion) + * @param object $object * - * @throws ComparisonFailure + * @return array */ - public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false, array &$processed = []) - { - } - protected function indent($lines) + protected function toArray($object) { } } /** - * Compares PHPUnit\Framework\MockObject\MockObject instances for equality. + * Compares numerical values for equality. */ -class MockObjectComparator extends \SebastianBergmann\Comparator\ObjectComparator +class NumericComparator extends \SebastianBergmann\Comparator\ScalarComparator { /** * Returns whether the comparator can compare two values. @@ -16841,23 +16809,20 @@ public function accepts($expected, $actual) { } /** - * Converts an object to an array containing all of its private, protected - * and public properties. + * Asserts that two values are equal. * - * @param object $object + * @param mixed $expected First value to compare + * @param mixed $actual Second value to compare + * @param float $delta Allowed numerical distance between two values to consider them equal + * @param bool $canonicalize Arrays are sorted before comparison when set to true + * @param bool $ignoreCase Case is ignored when set to true * - * @return array + * @throws ComparisonFailure */ - protected function toArray($object) + public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false) { } } -interface Exception extends \Throwable -{ -} -final class RuntimeException extends \RuntimeException implements \SebastianBergmann\Comparator\Exception -{ -} /** * Compares objects for equality. */ @@ -16902,9 +16867,40 @@ protected function toArray($object) } } /** - * Compares numerical values for equality. + * Compares resources for equality. */ -class NumericComparator extends \SebastianBergmann\Comparator\ScalarComparator +class ResourceComparator extends \SebastianBergmann\Comparator\Comparator +{ + /** + * Returns whether the comparator can compare two values. + * + * @param mixed $expected The first value to compare + * @param mixed $actual The second value to compare + * + * @return bool + */ + public function accepts($expected, $actual) + { + } + /** + * Asserts that two values are equal. + * + * @param mixed $expected First value to compare + * @param mixed $actual Second value to compare + * @param float $delta Allowed numerical distance between two values to consider them equal + * @param bool $canonicalize Arrays are sorted before comparison when set to true + * @param bool $ignoreCase Case is ignored when set to true + * + * @throws ComparisonFailure + */ + public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false) + { + } +} +/** + * Compares scalar or NULL values for equality. + */ +class ScalarComparator extends \SebastianBergmann\Comparator\Comparator { /** * Returns whether the comparator can compare two values. @@ -16913,6 +16909,8 @@ class NumericComparator extends \SebastianBergmann\Comparator\ScalarComparator * @param mixed $actual The second value to compare * * @return bool + * + * @since Method available since Release 3.6.0 */ public function accepts($expected, $actual) { @@ -16933,9 +16931,9 @@ public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = f } } /** - * Compares scalar or NULL values for equality. + * Compares \SplObjectStorage instances for equality. */ -class ScalarComparator extends \SebastianBergmann\Comparator\Comparator +class SplObjectStorageComparator extends \SebastianBergmann\Comparator\Comparator { /** * Returns whether the comparator can compare two values. @@ -16944,8 +16942,6 @@ class ScalarComparator extends \SebastianBergmann\Comparator\Comparator * @param mixed $actual The second value to compare * * @return bool - * - * @since Method available since Release 3.6.0 */ public function accepts($expected, $actual) { @@ -16966,9 +16962,9 @@ public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = f } } /** - * Compares DateTimeInterface instances for equality. + * Compares values for type equality. */ -class DateTimeComparator extends \SebastianBergmann\Comparator\ObjectComparator +class TypeComparator extends \SebastianBergmann\Comparator\Comparator { /** * Returns whether the comparator can compare two values. @@ -16989,15 +16985,19 @@ public function accepts($expected, $actual) * @param float $delta Allowed numerical distance between two values to consider them equal * @param bool $canonicalize Arrays are sorted before comparison when set to true * @param bool $ignoreCase Case is ignored when set to true - * @param array $processed List of already processed elements (used to prevent infinite recursion) * - * @throws \Exception * @throws ComparisonFailure */ - public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false, array &$processed = []) + public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false) { } } +interface Exception extends \Throwable +{ +} +final class RuntimeException extends \RuntimeException implements \SebastianBergmann\Comparator\Exception +{ +} namespace SebastianBergmann\Complexity; final class Calculator @@ -17023,27 +17023,15 @@ public function calculateForAbstractSyntaxTree(array $nodes): \SebastianBergmann { } } -interface Exception extends \Throwable -{ -} -final class RuntimeException extends \RuntimeException implements \SebastianBergmann\Complexity\Exception -{ -} -final class ComplexityCalculatingVisitor extends \PhpParser\NodeVisitorAbstract +/** + * @phan-side-effect-free + */ +final class Complexity { - public function __construct(bool $shortCircuitTraversal) - { - } - public function enterNode(\PhpParser\Node $node): ?int - { - } - public function result(): \SebastianBergmann\Complexity\ComplexityCollection + public function __construct(string $name, int $cyclomaticComplexity) { } -} -final class CyclomaticComplexityCalculatingVisitor extends \PhpParser\NodeVisitorAbstract -{ - public function enterNode(\PhpParser\Node $node): void + public function name(): string { } public function cyclomaticComplexity(): int @@ -17098,15 +17086,27 @@ public function next(): void { } } -/** - * @phan-side-effect-free - */ -final class Complexity +interface Exception extends \Throwable { - public function __construct(string $name, int $cyclomaticComplexity) +} +final class RuntimeException extends \RuntimeException implements \SebastianBergmann\Complexity\Exception +{ +} +final class ComplexityCalculatingVisitor extends \PhpParser\NodeVisitorAbstract +{ + public function __construct(bool $shortCircuitTraversal) { } - public function name(): string + public function enterNode(\PhpParser\Node $node): ?int + { + } + public function result(): \SebastianBergmann\Complexity\ComplexityCollection + { + } +} +final class CyclomaticComplexityCalculatingVisitor extends \PhpParser\NodeVisitorAbstract +{ + public function enterNode(\PhpParser\Node $node): void { } public function cyclomaticComplexity(): int @@ -17115,12 +17115,60 @@ public function cyclomaticComplexity(): int } namespace SebastianBergmann\Diff; -final class TimeEfficientLongestCommonSubsequenceCalculator implements \SebastianBergmann\Diff\LongestCommonSubsequenceCalculator +final class Chunk { + public function __construct(int $start = 0, int $startRange = 1, int $end = 0, int $endRange = 1, array $lines = []) + { + } + public function getStart(): int + { + } + public function getStartRange(): int + { + } + public function getEnd(): int + { + } + public function getEndRange(): int + { + } /** - * {@inheritdoc} + * @return Line[] */ - public function calculate(array $from, array $to): array + public function getLines(): array + { + } + /** + * @param Line[] $lines + */ + public function setLines(array $lines): void + { + } +} +final class Diff +{ + /** + * @param Chunk[] $chunks + */ + public function __construct(string $from, string $to, array $chunks = []) + { + } + public function getFrom(): string + { + } + public function getTo(): string + { + } + /** + * @return Chunk[] + */ + public function getChunks(): array + { + } + /** + * @param Chunk[] $chunks + */ + public function setChunks(array $chunks): void { } } @@ -17167,56 +17215,17 @@ public function diffToArray($from, $to, ?\SebastianBergmann\Diff\LongestCommonSu { } } -class InvalidArgumentException extends \InvalidArgumentException implements \SebastianBergmann\Diff\Exception -{ -} -interface Exception extends \Throwable -{ -} final class ConfigurationException extends \SebastianBergmann\Diff\InvalidArgumentException { public function __construct(string $option, string $expected, $value, int $code = 0, ?\Exception $previous = null) { } } -/** - * Unified diff parser. - */ -final class Parser +interface Exception extends \Throwable { - /** - * @return Diff[] - */ - public function parse(string $string): array - { - } } -final class Diff +class InvalidArgumentException extends \InvalidArgumentException implements \SebastianBergmann\Diff\Exception { - /** - * @param Chunk[] $chunks - */ - public function __construct(string $from, string $to, array $chunks = []) - { - } - public function getFrom(): string - { - } - public function getTo(): string - { - } - /** - * @return Chunk[] - */ - public function getChunks(): array - { - } - /** - * @param Chunk[] $chunks - */ - public function setChunks(array $chunks): void - { - } } final class Line { @@ -17249,33 +17258,24 @@ public function calculate(array $from, array $to): array { } } -final class Chunk +/** + * Unified diff parser. + */ +final class Parser { - public function __construct(int $start = 0, int $startRange = 1, int $end = 0, int $endRange = 1, array $lines = []) - { - } - public function getStart(): int - { - } - public function getStartRange(): int - { - } - public function getEnd(): int - { - } - public function getEndRange(): int - { - } /** - * @return Line[] + * @return Diff[] */ - public function getLines(): array + public function parse(string $string): array { } +} +final class TimeEfficientLongestCommonSubsequenceCalculator implements \SebastianBergmann\Diff\LongestCommonSubsequenceCalculator +{ /** - * @param Line[] $lines + * {@inheritdoc} */ - public function setLines(array $lines): void + public function calculate(array $from, array $to): array { } } @@ -17305,16 +17305,12 @@ public function getDiff(array $diff): string } } /** - * Builds a diff string representation in unified diff format in chunks. + * Defines how an output builder should take a generated + * diff array and return a string representation of that diff. */ -final class UnifiedDiffOutputBuilder extends \SebastianBergmann\Diff\Output\AbstractChunkOutputBuilder +interface DiffOutputBuilderInterface { - public function __construct(string $header = "--- Original\n+++ New\n", bool $addLineNumbers = false) - { - } - public function getDiff(array $diff): string - { - } + public function getDiff(array $diff): string; } /** * Strict Unified diff output builder. @@ -17330,16 +17326,73 @@ public function getDiff(array $diff): string { } } -/** - * Defines how an output builder should take a generated - * diff array and return a string representation of that diff. - */ -interface DiffOutputBuilderInterface +/** + * Builds a diff string representation in unified diff format in chunks. + */ +final class UnifiedDiffOutputBuilder extends \SebastianBergmann\Diff\Output\AbstractChunkOutputBuilder +{ + public function __construct(string $header = "--- Original\n+++ New\n", bool $addLineNumbers = false) + { + } + public function getDiff(array $diff): string + { + } +} +namespace SebastianBergmann\Environment; + +final class Console +{ + /** + * @var int + */ + public const STDIN = 0; + /** + * @var int + */ + public const STDOUT = 1; + /** + * @var int + */ + public const STDERR = 2; + /** + * Returns true if STDOUT supports colorization. + * + * This code has been copied and adapted from + * Symfony\Component\Console\Output\StreamOutput. + */ + public function hasColorSupport(): bool + { + } + /** + * Returns the number of columns of the terminal. + * + * @codeCoverageIgnore + */ + public function getNumberOfColumns(): int + { + } + /** + * Returns if the file descriptor is an interactive terminal or not. + * + * Normally, we want to use a resource as a parameter, yet sadly it's not always awailable, + * eg when running code in interactive console (`php -a`), STDIN/STDOUT/STDERR constants are not defined. + * + * @param int|resource $fileDescriptor + */ + public function isInteractive($fileDescriptor = self::STDOUT): bool + { + } +} +final class OperatingSystem { - public function getDiff(array $diff): string; + /** + * Returns PHP_OS_FAMILY (if defined (which it is on PHP >= 7.2)). + * Returns a string (compatible with PHP_OS_FAMILY) derived from PHP_OS otherwise. + */ + public function getFamily(): string + { + } } -namespace SebastianBergmann\Environment; - /** * Utility class for HHVM/PHP environment handling. */ @@ -17441,59 +17494,6 @@ public function getCurrentSettings(array $values): array { } } -final class Console -{ - /** - * @var int - */ - public const STDIN = 0; - /** - * @var int - */ - public const STDOUT = 1; - /** - * @var int - */ - public const STDERR = 2; - /** - * Returns true if STDOUT supports colorization. - * - * This code has been copied and adapted from - * Symfony\Component\Console\Output\StreamOutput. - */ - public function hasColorSupport(): bool - { - } - /** - * Returns the number of columns of the terminal. - * - * @codeCoverageIgnore - */ - public function getNumberOfColumns(): int - { - } - /** - * Returns if the file descriptor is an interactive terminal or not. - * - * Normally, we want to use a resource as a parameter, yet sadly it's not always awailable, - * eg when running code in interactive console (`php -a`), STDIN/STDOUT/STDERR constants are not defined. - * - * @param int|resource $fileDescriptor - */ - public function isInteractive($fileDescriptor = self::STDOUT): bool - { - } -} -final class OperatingSystem -{ - /** - * Returns PHP_OS_FAMILY (if defined (which it is on PHP >= 7.2)). - * Returns a string (compatible with PHP_OS_FAMILY) derived from PHP_OS otherwise. - */ - public function getFamily(): string - { - } -} namespace SebastianBergmann\Exporter; /** @@ -17636,6 +17636,33 @@ public function iniSettings(\SebastianBergmann\GlobalState\Snapshot $snapshot): { } } +final class ExcludeList +{ + public function addGlobalVariable(string $variableName): void + { + } + public function addClass(string $className): void + { + } + public function addSubclassesOf(string $className): void + { + } + public function addImplementorsOf(string $interfaceName): void + { + } + public function addClassNamePrefix(string $classNamePrefix): void + { + } + public function addStaticAttribute(string $className, string $attributeName): void + { + } + public function isGlobalVariableExcluded(string $variableName): bool + { + } + public function isStaticAttributeExcluded(string $className, string $attributeName): bool + { + } +} /** * Restorer of snapshots of global state. */ @@ -17712,33 +17739,6 @@ public function traits(): array { } } -final class ExcludeList -{ - public function addGlobalVariable(string $variableName): void - { - } - public function addClass(string $className): void - { - } - public function addSubclassesOf(string $className): void - { - } - public function addImplementorsOf(string $interfaceName): void - { - } - public function addClassNamePrefix(string $classNamePrefix): void - { - } - public function addStaticAttribute(string $className, string $attributeName): void - { - } - public function isGlobalVariableExcluded(string $variableName): bool - { - } - public function isStaticAttributeExcluded(string $className, string $attributeName): bool - { - } -} interface Exception extends \Throwable { } @@ -17762,25 +17762,60 @@ public function canInvokeWithTimeout(): bool interface Exception extends \Throwable { } -final class TimeoutException extends \RuntimeException implements \SebastianBergmann\Invoker\Exception +final class ProcessControlExtensionNotLoadedException extends \RuntimeException implements \SebastianBergmann\Invoker\Exception { } -final class ProcessControlExtensionNotLoadedException extends \RuntimeException implements \SebastianBergmann\Invoker\Exception +final class TimeoutException extends \RuntimeException implements \SebastianBergmann\Invoker\Exception { } namespace SebastianBergmann\LinesOfCode; +final class Counter +{ + /** + * @throws RuntimeException + */ + public function countInSourceFile(string $sourceFile): \SebastianBergmann\LinesOfCode\LinesOfCode + { + } + /** + * @throws RuntimeException + */ + public function countInSourceString(string $source): \SebastianBergmann\LinesOfCode\LinesOfCode + { + } + /** + * @param \PhpParser\Node[] $nodes + * + * @throws RuntimeException + */ + public function countInAbstractSyntaxTree(int $linesOfCode, array $nodes): \SebastianBergmann\LinesOfCode\LinesOfCode + { + } +} interface Exception extends \Throwable { } -final class RuntimeException extends \RuntimeException implements \SebastianBergmann\LinesOfCode\Exception +final class IllogicalValuesException extends \LogicException implements \SebastianBergmann\LinesOfCode\Exception { } final class NegativeValueException extends \InvalidArgumentException implements \SebastianBergmann\LinesOfCode\Exception { } -final class IllogicalValuesException extends \LogicException implements \SebastianBergmann\LinesOfCode\Exception +final class RuntimeException extends \RuntimeException implements \SebastianBergmann\LinesOfCode\Exception +{ +} +final class LineCountingVisitor extends \PhpParser\NodeVisitorAbstract { + public function __construct(int $linesOfCode) + { + } + public function enterNode(\PhpParser\Node $node): void + { + } + public function result(): \SebastianBergmann\LinesOfCode\LinesOfCode + { + } } /** * @phan-side-effect-free @@ -17810,49 +17845,8 @@ public function plus(self $other): self { } } -final class LineCountingVisitor extends \PhpParser\NodeVisitorAbstract -{ - public function __construct(int $linesOfCode) - { - } - public function enterNode(\PhpParser\Node $node): void - { - } - public function result(): \SebastianBergmann\LinesOfCode\LinesOfCode - { - } -} -final class Counter -{ - /** - * @throws RuntimeException - */ - public function countInSourceFile(string $sourceFile): \SebastianBergmann\LinesOfCode\LinesOfCode - { - } - /** - * @throws RuntimeException - */ - public function countInSourceString(string $source): \SebastianBergmann\LinesOfCode\LinesOfCode - { - } - /** - * @param \PhpParser\Node[] $nodes - * - * @throws RuntimeException - */ - public function countInAbstractSyntaxTree(int $linesOfCode, array $nodes): \SebastianBergmann\LinesOfCode\LinesOfCode - { - } -} namespace SebastianBergmann\ObjectEnumerator; -class InvalidArgumentException extends \InvalidArgumentException implements \SebastianBergmann\ObjectEnumerator\Exception -{ -} -interface Exception extends \Throwable -{ -} /** * Traverses array structures and object graphs * to enumerate all referenced objects. @@ -17871,12 +17865,18 @@ public function enumerate($variable, ...$func_get_args) { } } +interface Exception extends \Throwable +{ +} +class InvalidArgumentException extends \InvalidArgumentException implements \SebastianBergmann\ObjectEnumerator\Exception +{ +} namespace SebastianBergmann\ObjectReflector; -class InvalidArgumentException extends \InvalidArgumentException implements \SebastianBergmann\ObjectReflector\Exception +interface Exception extends \Throwable { } -interface Exception extends \Throwable +class InvalidArgumentException extends \InvalidArgumentException implements \SebastianBergmann\ObjectReflector\Exception { } class ObjectReflector @@ -17892,12 +17892,6 @@ public function getAttributes($object): array } namespace SebastianBergmann\RecursionContext; -final class InvalidArgumentException extends \InvalidArgumentException implements \SebastianBergmann\RecursionContext\Exception -{ -} -interface Exception extends \Throwable -{ -} /** * A context containing previously processed arrays and objects * when recursively processing a value. @@ -17949,6 +17943,12 @@ public function contains(&$value) { } } +interface Exception extends \Throwable +{ +} +final class InvalidArgumentException extends \InvalidArgumentException implements \SebastianBergmann\RecursionContext\Exception +{ +} namespace SebastianBergmann\ResourceOperations; final class ResourceOperations @@ -17962,15 +17962,6 @@ public static function getFunctions(): array } namespace SebastianBergmann\Template; -final class InvalidArgumentException extends \InvalidArgumentException implements \SebastianBergmann\Template\Exception -{ -} -interface Exception extends \Throwable -{ -} -final class RuntimeException extends \InvalidArgumentException implements \SebastianBergmann\Template\Exception -{ -} final class Template { /** @@ -17988,51 +17979,27 @@ public function setFile(string $file): void public function setVar(array $values, bool $merge = true): void { } - public function render(): string - { - } - /** - * @codeCoverageIgnore - */ - public function renderTo(string $target): void - { - } -} -namespace SebastianBergmann\Timer; - -final class ResourceUsageFormatter -{ - public function resourceUsage(\SebastianBergmann\Timer\Duration $duration): string + public function render(): string { } /** - * @throws TimeSinceStartOfRequestNotAvailableException + * @codeCoverageIgnore */ - public function resourceUsageSinceStartOfRequest(): string + public function renderTo(string $target): void { } } interface Exception extends \Throwable { } -final class TimeSinceStartOfRequestNotAvailableException extends \RuntimeException implements \SebastianBergmann\Timer\Exception -{ -} -final class NoActiveTimerException extends \LogicException implements \SebastianBergmann\Timer\Exception +final class InvalidArgumentException extends \InvalidArgumentException implements \SebastianBergmann\Template\Exception { } -final class Timer +final class RuntimeException extends \InvalidArgumentException implements \SebastianBergmann\Template\Exception { - public function start(): void - { - } - /** - * @throws NoActiveTimerException - */ - public function stop(): \SebastianBergmann\Timer\Duration - { - } } +namespace SebastianBergmann\Timer; + /** * @phan-side-effect-free */ @@ -18060,14 +18027,41 @@ public function asString(): string { } } -namespace SebastianBergmann\Type; - +final class ResourceUsageFormatter +{ + public function resourceUsage(\SebastianBergmann\Timer\Duration $duration): string + { + } + /** + * @throws TimeSinceStartOfRequestNotAvailableException + */ + public function resourceUsageSinceStartOfRequest(): string + { + } +} +final class Timer +{ + public function start(): void + { + } + /** + * @throws NoActiveTimerException + */ + public function stop(): \SebastianBergmann\Timer\Duration + { + } +} interface Exception extends \Throwable { } -final class RuntimeException extends \RuntimeException implements \SebastianBergmann\Type\Exception +final class NoActiveTimerException extends \LogicException implements \SebastianBergmann\Timer\Exception +{ +} +final class TimeSinceStartOfRequestNotAvailableException extends \RuntimeException implements \SebastianBergmann\Timer\Exception { } +namespace SebastianBergmann\Type; + final class Parameter { /** @@ -18119,28 +18113,13 @@ public function isNamespaced(): bool { } } -final class GenericObjectType extends \SebastianBergmann\Type\Type +interface Exception extends \Throwable { - public function __construct(bool $nullable) - { - } - public function isAssignable(\SebastianBergmann\Type\Type $other): bool - { - } - public function name(): string - { - } - public function allowsNull(): bool - { - } - /** - * @psalm-assert-if-true GenericObjectType $this - */ - public function isGenericObject(): bool - { - } } -final class IterableType extends \SebastianBergmann\Type\Type +final class RuntimeException extends \RuntimeException implements \SebastianBergmann\Type\Exception +{ +} +final class CallableType extends \SebastianBergmann\Type\Type { public function __construct(bool $nullable) { @@ -18158,17 +18137,14 @@ public function allowsNull(): bool { } /** - * @psalm-assert-if-true IterableType $this + * @psalm-assert-if-true CallableType $this */ - public function isIterable(): bool + public function isCallable(): bool { } } -final class SimpleType extends \SebastianBergmann\Type\Type +final class FalseType extends \SebastianBergmann\Type\Type { - public function __construct(string $name, bool $nullable, $value = null) - { - } public function isAssignable(\SebastianBergmann\Type\Type $other): bool { } @@ -18178,18 +18154,18 @@ public function name(): string public function allowsNull(): bool { } - public function value() - { - } /** - * @psalm-assert-if-true SimpleType $this + * @psalm-assert-if-true FalseType $this */ - public function isSimple(): bool + public function isFalse(): bool { } } -final class VoidType extends \SebastianBergmann\Type\Type +final class GenericObjectType extends \SebastianBergmann\Type\Type { + public function __construct(bool $nullable) + { + } public function isAssignable(\SebastianBergmann\Type\Type $other): bool { } @@ -18200,9 +18176,9 @@ public function allowsNull(): bool { } /** - * @psalm-assert-if-true VoidType $this + * @psalm-assert-if-true GenericObjectType $this */ - public function isVoid(): bool + public function isGenericObject(): bool { } } @@ -18239,8 +18215,14 @@ public function types(): array { } } -final class TrueType extends \SebastianBergmann\Type\Type +final class IterableType extends \SebastianBergmann\Type\Type { + public function __construct(bool $nullable) + { + } + /** + * @throws RuntimeException + */ public function isAssignable(\SebastianBergmann\Type\Type $other): bool { } @@ -18251,13 +18233,34 @@ public function allowsNull(): bool { } /** - * @psalm-assert-if-true TrueType $this + * @psalm-assert-if-true IterableType $this */ - public function isTrue(): bool + public function isIterable(): bool { } } -final class FalseType extends \SebastianBergmann\Type\Type +final class MixedType extends \SebastianBergmann\Type\Type +{ + public function isAssignable(\SebastianBergmann\Type\Type $other): bool + { + } + public function asString(): string + { + } + public function name(): string + { + } + public function allowsNull(): bool + { + } + /** + * @psalm-assert-if-true MixedType $this + */ + public function isMixed(): bool + { + } +} +final class NeverType extends \SebastianBergmann\Type\Type { public function isAssignable(\SebastianBergmann\Type\Type $other): bool { @@ -18269,9 +18272,9 @@ public function allowsNull(): bool { } /** - * @psalm-assert-if-true FalseType $this + * @psalm-assert-if-true NeverType $this */ - public function isFalse(): bool + public function isNever(): bool { } } @@ -18296,45 +18299,33 @@ public function isNull(): bool { } } -final class UnionType extends \SebastianBergmann\Type\Type +final class ObjectType extends \SebastianBergmann\Type\Type { - /** - * @throws RuntimeException - */ - public function __construct(\SebastianBergmann\Type\Type ...$types) + public function __construct(\SebastianBergmann\Type\TypeName $className, bool $allowsNull) { } public function isAssignable(\SebastianBergmann\Type\Type $other): bool { } - public function asString(): string - { - } public function name(): string { } public function allowsNull(): bool { } - /** - * @psalm-assert-if-true UnionType $this - */ - public function isUnion(): bool - { - } - public function containsIntersectionTypes(): bool + public function className(): \SebastianBergmann\Type\TypeName { } /** - * @phan-return non-empty-list + * @psalm-assert-if-true ObjectType $this */ - public function types(): array + public function isObject(): bool { } } -final class ObjectType extends \SebastianBergmann\Type\Type +final class SimpleType extends \SebastianBergmann\Type\Type { - public function __construct(\SebastianBergmann\Type\TypeName $className, bool $allowsNull) + public function __construct(string $name, bool $nullable, $value = null) { } public function isAssignable(\SebastianBergmann\Type\Type $other): bool @@ -18346,13 +18337,13 @@ public function name(): string public function allowsNull(): bool { } - public function className(): \SebastianBergmann\Type\TypeName + public function value() { } /** - * @psalm-assert-if-true ObjectType $this + * @psalm-assert-if-true SimpleType $this */ - public function isObject(): bool + public function isSimple(): bool { } } @@ -18377,6 +18368,24 @@ public function isStatic(): bool { } } +final class TrueType extends \SebastianBergmann\Type\Type +{ + public function isAssignable(\SebastianBergmann\Type\Type $other): bool + { + } + public function name(): string + { + } + public function allowsNull(): bool + { + } + /** + * @psalm-assert-if-true TrueType $this + */ + public function isTrue(): bool + { + } +} abstract class Type { public static function fromValue($value, bool $allowsNull): self @@ -18482,77 +18491,68 @@ abstract public function isAssignable(self $other): bool; abstract public function name(): string; abstract public function allowsNull(): bool; } -final class UnknownType extends \SebastianBergmann\Type\Type +final class UnionType extends \SebastianBergmann\Type\Type { - public function isAssignable(\SebastianBergmann\Type\Type $other): bool + /** + * @throws RuntimeException + */ + public function __construct(\SebastianBergmann\Type\Type ...$types) { } - public function name(): string + public function isAssignable(\SebastianBergmann\Type\Type $other): bool { } public function asString(): string { } + public function name(): string + { + } public function allowsNull(): bool { } /** - * @psalm-assert-if-true UnknownType $this + * @psalm-assert-if-true UnionType $this */ - public function isUnknown(): bool - { - } -} -final class NeverType extends \SebastianBergmann\Type\Type -{ - public function isAssignable(\SebastianBergmann\Type\Type $other): bool - { - } - public function name(): string + public function isUnion(): bool { } - public function allowsNull(): bool + public function containsIntersectionTypes(): bool { } /** - * @psalm-assert-if-true NeverType $this + * @phan-return non-empty-list */ - public function isNever(): bool + public function types(): array { } } -final class CallableType extends \SebastianBergmann\Type\Type +final class UnknownType extends \SebastianBergmann\Type\Type { - public function __construct(bool $nullable) - { - } - /** - * @throws RuntimeException - */ public function isAssignable(\SebastianBergmann\Type\Type $other): bool { } public function name(): string { } + public function asString(): string + { + } public function allowsNull(): bool { } /** - * @psalm-assert-if-true CallableType $this + * @psalm-assert-if-true UnknownType $this */ - public function isCallable(): bool + public function isUnknown(): bool { } } -final class MixedType extends \SebastianBergmann\Type\Type +final class VoidType extends \SebastianBergmann\Type\Type { public function isAssignable(\SebastianBergmann\Type\Type $other): bool { } - public function asString(): string - { - } public function name(): string { } @@ -18560,9 +18560,9 @@ public function allowsNull(): bool { } /** - * @psalm-assert-if-true MixedType $this + * @psalm-assert-if-true VoidType $this */ - public function isMixed(): bool + public function isVoid(): bool { } } diff --git a/tools/stubs/phpunit-stub-defs.php b/tools/stubs/phpunit-stub-defs.php index c61c9d5acfff2..e2d9c54f7e0e6 100644 --- a/tools/stubs/phpunit-stub-defs.php +++ b/tools/stubs/phpunit-stub-defs.php @@ -46,5 +46,6 @@ $config['files'][ $k ] = '*'; } } +ksort( $config['files'] ); return $config;