Completed
Branch master (8e512a)
by
unknown
17:03 queued 09:20
created
vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/Extension.php 1 patch
Indentation   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -16,58 +16,58 @@
 block discarded – undo
16 16
  */
17 17
 final class Extension
18 18
 {
19
-    /**
20
-     * @var string
21
-     *
22
-     * @psalm-var class-string
23
-     */
24
-    private $className;
19
+	/**
20
+	 * @var string
21
+	 *
22
+	 * @psalm-var class-string
23
+	 */
24
+	private $className;
25 25
 
26
-    /**
27
-     * @var string
28
-     */
29
-    private $sourceFile;
26
+	/**
27
+	 * @var string
28
+	 */
29
+	private $sourceFile;
30 30
 
31
-    /**
32
-     * @var array
33
-     */
34
-    private $arguments;
31
+	/**
32
+	 * @var array
33
+	 */
34
+	private $arguments;
35 35
 
36
-    /**
37
-     * @psalm-param class-string $className
38
-     */
39
-    public function __construct(string $className, string $sourceFile, array $arguments)
40
-    {
41
-        $this->className  = $className;
42
-        $this->sourceFile = $sourceFile;
43
-        $this->arguments  = $arguments;
44
-    }
36
+	/**
37
+	 * @psalm-param class-string $className
38
+	 */
39
+	public function __construct(string $className, string $sourceFile, array $arguments)
40
+	{
41
+		$this->className  = $className;
42
+		$this->sourceFile = $sourceFile;
43
+		$this->arguments  = $arguments;
44
+	}
45 45
 
46
-    /**
47
-     * @psalm-return class-string
48
-     */
49
-    public function className(): string
50
-    {
51
-        return $this->className;
52
-    }
46
+	/**
47
+	 * @psalm-return class-string
48
+	 */
49
+	public function className(): string
50
+	{
51
+		return $this->className;
52
+	}
53 53
 
54
-    public function hasSourceFile(): bool
55
-    {
56
-        return $this->sourceFile !== '';
57
-    }
54
+	public function hasSourceFile(): bool
55
+	{
56
+		return $this->sourceFile !== '';
57
+	}
58 58
 
59
-    public function sourceFile(): string
60
-    {
61
-        return $this->sourceFile;
62
-    }
59
+	public function sourceFile(): string
60
+	{
61
+		return $this->sourceFile;
62
+	}
63 63
 
64
-    public function hasArguments(): bool
65
-    {
66
-        return !empty($this->arguments);
67
-    }
64
+	public function hasArguments(): bool
65
+	{
66
+		return !empty($this->arguments);
67
+	}
68 68
 
69
-    public function arguments(): array
70
-    {
71
-        return $this->arguments;
72
-    }
69
+	public function arguments(): array
70
+	{
71
+		return $this->arguments;
72
+	}
73 73
 }
Please login to merge, or discard this patch.
vendor/phpunit/phpunit/src/Runner/Extension/ExtensionHandler.php 1 patch
Indentation   +79 added lines, -79 removed lines patch added patch discarded remove patch
@@ -24,95 +24,95 @@
 block discarded – undo
24 24
  */
25 25
 final class ExtensionHandler
26 26
 {
27
-    /**
28
-     * @throws Exception
29
-     */
30
-    public function registerExtension(Extension $extensionConfiguration, TestRunner $runner): void
31
-    {
32
-        $extension = $this->createInstance($extensionConfiguration);
27
+	/**
28
+	 * @throws Exception
29
+	 */
30
+	public function registerExtension(Extension $extensionConfiguration, TestRunner $runner): void
31
+	{
32
+		$extension = $this->createInstance($extensionConfiguration);
33 33
 
34
-        if (!$extension instanceof Hook) {
35
-            throw new Exception(
36
-                sprintf(
37
-                    'Class "%s" does not implement a PHPUnit\Runner\Hook interface',
38
-                    $extensionConfiguration->className()
39
-                )
40
-            );
41
-        }
34
+		if (!$extension instanceof Hook) {
35
+			throw new Exception(
36
+				sprintf(
37
+					'Class "%s" does not implement a PHPUnit\Runner\Hook interface',
38
+					$extensionConfiguration->className()
39
+				)
40
+			);
41
+		}
42 42
 
43
-        $runner->addExtension($extension);
44
-    }
43
+		$runner->addExtension($extension);
44
+	}
45 45
 
46
-    /**
47
-     * @throws Exception
48
-     *
49
-     * @deprecated
50
-     */
51
-    public function createTestListenerInstance(Extension $listenerConfiguration): TestListener
52
-    {
53
-        $listener = $this->createInstance($listenerConfiguration);
46
+	/**
47
+	 * @throws Exception
48
+	 *
49
+	 * @deprecated
50
+	 */
51
+	public function createTestListenerInstance(Extension $listenerConfiguration): TestListener
52
+	{
53
+		$listener = $this->createInstance($listenerConfiguration);
54 54
 
55
-        if (!$listener instanceof TestListener) {
56
-            throw new Exception(
57
-                sprintf(
58
-                    'Class "%s" does not implement the PHPUnit\Framework\TestListener interface',
59
-                    $listenerConfiguration->className()
60
-                )
61
-            );
62
-        }
55
+		if (!$listener instanceof TestListener) {
56
+			throw new Exception(
57
+				sprintf(
58
+					'Class "%s" does not implement the PHPUnit\Framework\TestListener interface',
59
+					$listenerConfiguration->className()
60
+				)
61
+			);
62
+		}
63 63
 
64
-        return $listener;
65
-    }
64
+		return $listener;
65
+	}
66 66
 
67
-    /**
68
-     * @throws Exception
69
-     */
70
-    private function createInstance(Extension $extensionConfiguration): object
71
-    {
72
-        $this->ensureClassExists($extensionConfiguration);
67
+	/**
68
+	 * @throws Exception
69
+	 */
70
+	private function createInstance(Extension $extensionConfiguration): object
71
+	{
72
+		$this->ensureClassExists($extensionConfiguration);
73 73
 
74
-        try {
75
-            $reflector = new ReflectionClass($extensionConfiguration->className());
76
-        } catch (ReflectionException $e) {
77
-            throw new Exception(
78
-                $e->getMessage(),
79
-                (int) $e->getCode(),
80
-                $e
81
-            );
82
-        }
74
+		try {
75
+			$reflector = new ReflectionClass($extensionConfiguration->className());
76
+		} catch (ReflectionException $e) {
77
+			throw new Exception(
78
+				$e->getMessage(),
79
+				(int) $e->getCode(),
80
+				$e
81
+			);
82
+		}
83 83
 
84
-        if (!$extensionConfiguration->hasArguments()) {
85
-            return $reflector->newInstance();
86
-        }
84
+		if (!$extensionConfiguration->hasArguments()) {
85
+			return $reflector->newInstance();
86
+		}
87 87
 
88
-        return $reflector->newInstanceArgs($extensionConfiguration->arguments());
89
-    }
88
+		return $reflector->newInstanceArgs($extensionConfiguration->arguments());
89
+	}
90 90
 
91
-    /**
92
-     * @throws Exception
93
-     */
94
-    private function ensureClassExists(Extension $extensionConfiguration): void
95
-    {
96
-        if (class_exists($extensionConfiguration->className(), false)) {
97
-            return;
98
-        }
91
+	/**
92
+	 * @throws Exception
93
+	 */
94
+	private function ensureClassExists(Extension $extensionConfiguration): void
95
+	{
96
+		if (class_exists($extensionConfiguration->className(), false)) {
97
+			return;
98
+		}
99 99
 
100
-        if ($extensionConfiguration->hasSourceFile()) {
101
-            /**
102
-             * @noinspection PhpIncludeInspection
103
-             *
104
-             * @psalm-suppress UnresolvableInclude
105
-             */
106
-            require_once $extensionConfiguration->sourceFile();
107
-        }
100
+		if ($extensionConfiguration->hasSourceFile()) {
101
+			/**
102
+			 * @noinspection PhpIncludeInspection
103
+			 *
104
+			 * @psalm-suppress UnresolvableInclude
105
+			 */
106
+			require_once $extensionConfiguration->sourceFile();
107
+		}
108 108
 
109
-        if (!class_exists($extensionConfiguration->className())) {
110
-            throw new Exception(
111
-                sprintf(
112
-                    'Class "%s" does not exist',
113
-                    $extensionConfiguration->className()
114
-                )
115
-            );
116
-        }
117
-    }
109
+		if (!class_exists($extensionConfiguration->className())) {
110
+			throw new Exception(
111
+				sprintf(
112
+					'Class "%s" does not exist',
113
+					$extensionConfiguration->className()
114
+				)
115
+			);
116
+		}
117
+	}
118 118
 }
Please login to merge, or discard this patch.
vendor/phpunit/phpunit/src/Runner/Extension/PharLoader.php 1 patch
Indentation   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -22,56 +22,56 @@
 block discarded – undo
22 22
  */
23 23
 final class PharLoader
24 24
 {
25
-    /**
26
-     * @psalm-return array{loadedExtensions: list<string>, notLoadedExtensions: list<string>}
27
-     */
28
-    public function loadPharExtensionsInDirectory(string $directory): array
29
-    {
30
-        $loadedExtensions    = [];
31
-        $notLoadedExtensions = [];
25
+	/**
26
+	 * @psalm-return array{loadedExtensions: list<string>, notLoadedExtensions: list<string>}
27
+	 */
28
+	public function loadPharExtensionsInDirectory(string $directory): array
29
+	{
30
+		$loadedExtensions    = [];
31
+		$notLoadedExtensions = [];
32 32
 
33
-        foreach ((new FileIteratorFacade)->getFilesAsArray($directory, '.phar') as $file) {
34
-            if (!is_file('phar://' . $file . '/manifest.xml')) {
35
-                $notLoadedExtensions[] = $file . ' is not an extension for PHPUnit';
33
+		foreach ((new FileIteratorFacade)->getFilesAsArray($directory, '.phar') as $file) {
34
+			if (!is_file('phar://' . $file . '/manifest.xml')) {
35
+				$notLoadedExtensions[] = $file . ' is not an extension for PHPUnit';
36 36
 
37
-                continue;
38
-            }
37
+				continue;
38
+			}
39 39
 
40
-            try {
41
-                $applicationName = new ApplicationName('phpunit/phpunit');
42
-                $version         = new PharIoVersion(Version::series());
43
-                $manifest        = ManifestLoader::fromFile('phar://' . $file . '/manifest.xml');
40
+			try {
41
+				$applicationName = new ApplicationName('phpunit/phpunit');
42
+				$version         = new PharIoVersion(Version::series());
43
+				$manifest        = ManifestLoader::fromFile('phar://' . $file . '/manifest.xml');
44 44
 
45
-                if (!$manifest->isExtensionFor($applicationName)) {
46
-                    $notLoadedExtensions[] = $file . ' is not an extension for PHPUnit';
45
+				if (!$manifest->isExtensionFor($applicationName)) {
46
+					$notLoadedExtensions[] = $file . ' is not an extension for PHPUnit';
47 47
 
48
-                    continue;
49
-                }
48
+					continue;
49
+				}
50 50
 
51
-                if (!$manifest->isExtensionFor($applicationName, $version)) {
52
-                    $notLoadedExtensions[] = $file . ' is not compatible with this version of PHPUnit';
51
+				if (!$manifest->isExtensionFor($applicationName, $version)) {
52
+					$notLoadedExtensions[] = $file . ' is not compatible with this version of PHPUnit';
53 53
 
54
-                    continue;
55
-                }
56
-            } catch (ManifestException $e) {
57
-                $notLoadedExtensions[] = $file . ': ' . $e->getMessage();
54
+					continue;
55
+				}
56
+			} catch (ManifestException $e) {
57
+				$notLoadedExtensions[] = $file . ': ' . $e->getMessage();
58 58
 
59
-                continue;
60
-            }
59
+				continue;
60
+			}
61 61
 
62
-            /**
63
-             * @noinspection PhpIncludeInspection
64
-             *
65
-             * @psalm-suppress UnresolvableInclude
66
-             */
67
-            require $file;
62
+			/**
63
+			 * @noinspection PhpIncludeInspection
64
+			 *
65
+			 * @psalm-suppress UnresolvableInclude
66
+			 */
67
+			require $file;
68 68
 
69
-            $loadedExtensions[] = $manifest->getName()->asString() . ' ' . $manifest->getVersion()->getVersionString();
70
-        }
69
+			$loadedExtensions[] = $manifest->getName()->asString() . ' ' . $manifest->getVersion()->getVersionString();
70
+		}
71 71
 
72
-        return [
73
-            'loadedExtensions'    => $loadedExtensions,
74
-            'notLoadedExtensions' => $notLoadedExtensions,
75
-        ];
76
-    }
72
+		return [
73
+			'loadedExtensions'    => $loadedExtensions,
74
+			'notLoadedExtensions' => $notLoadedExtensions,
75
+		];
76
+	}
77 77
 }
Please login to merge, or discard this patch.
vendor/phpunit/phpunit/src/Runner/Version.php 1 patch
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -21,45 +21,45 @@
 block discarded – undo
21 21
  */
22 22
 final class Version
23 23
 {
24
-    /**
25
-     * @var string
26
-     */
27
-    private static $pharVersion = '';
24
+	/**
25
+	 * @var string
26
+	 */
27
+	private static $pharVersion = '';
28 28
 
29
-    /**
30
-     * @var string
31
-     */
32
-    private static $version = '';
29
+	/**
30
+	 * @var string
31
+	 */
32
+	private static $version = '';
33 33
 
34
-    /**
35
-     * Returns the current version of PHPUnit.
36
-     */
37
-    public static function id(): string
38
-    {
39
-        if (self::$pharVersion !== '') {
40
-            return self::$pharVersion;
41
-        }
34
+	/**
35
+	 * Returns the current version of PHPUnit.
36
+	 */
37
+	public static function id(): string
38
+	{
39
+		if (self::$pharVersion !== '') {
40
+			return self::$pharVersion;
41
+		}
42 42
 
43
-        if (self::$version === '') {
44
-            self::$version = (new VersionId('9.5.25', dirname(__DIR__, 2)))->getVersion();
45
-        }
43
+		if (self::$version === '') {
44
+			self::$version = (new VersionId('9.5.25', dirname(__DIR__, 2)))->getVersion();
45
+		}
46 46
 
47
-        return self::$version;
48
-    }
47
+		return self::$version;
48
+	}
49 49
 
50
-    public static function series(): string
51
-    {
52
-        if (strpos(self::id(), '-')) {
53
-            $version = explode('-', self::id())[0];
54
-        } else {
55
-            $version = self::id();
56
-        }
50
+	public static function series(): string
51
+	{
52
+		if (strpos(self::id(), '-')) {
53
+			$version = explode('-', self::id())[0];
54
+		} else {
55
+			$version = self::id();
56
+		}
57 57
 
58
-        return implode('.', array_slice(explode('.', $version), 0, 2));
59
-    }
58
+		return implode('.', array_slice(explode('.', $version), 0, 2));
59
+	}
60 60
 
61
-    public static function getVersionString(): string
62
-    {
63
-        return 'PHPUnit ' . self::id() . ' #StandWithUkraine';
64
-    }
61
+	public static function getVersionString(): string
62
+	{
63
+		return 'PHPUnit ' . self::id() . ' #StandWithUkraine';
64
+	}
65 65
 }
Please login to merge, or discard this patch.
vendor/phpunit/phpunit/src/Framework/MockObject/Invocation.php 2 patches
Indentation   +266 added lines, -266 removed lines patch added patch discarded remove patch
@@ -32,270 +32,270 @@
 block discarded – undo
32 32
  */
33 33
 final class Invocation implements SelfDescribing
34 34
 {
35
-    /**
36
-     * @var string
37
-     */
38
-    private $className;
39
-
40
-    /**
41
-     * @var string
42
-     */
43
-    private $methodName;
44
-
45
-    /**
46
-     * @var array
47
-     */
48
-    private $parameters;
49
-
50
-    /**
51
-     * @var string
52
-     */
53
-    private $returnType;
54
-
55
-    /**
56
-     * @var bool
57
-     */
58
-    private $isReturnTypeNullable = false;
59
-
60
-    /**
61
-     * @var bool
62
-     */
63
-    private $proxiedCall;
64
-
65
-    /**
66
-     * @var object
67
-     */
68
-    private $object;
69
-
70
-    public function __construct(string $className, string $methodName, array $parameters, string $returnType, object $object, bool $cloneObjects = false, bool $proxiedCall = false)
71
-    {
72
-        $this->className   = $className;
73
-        $this->methodName  = $methodName;
74
-        $this->parameters  = $parameters;
75
-        $this->object      = $object;
76
-        $this->proxiedCall = $proxiedCall;
77
-
78
-        if (strtolower($methodName) === '__tostring') {
79
-            $returnType = 'string';
80
-        }
81
-
82
-        if (strpos($returnType, '?') === 0) {
83
-            $returnType                 = substr($returnType, 1);
84
-            $this->isReturnTypeNullable = true;
85
-        }
86
-
87
-        $this->returnType = $returnType;
88
-
89
-        if (!$cloneObjects) {
90
-            return;
91
-        }
92
-
93
-        foreach ($this->parameters as $key => $value) {
94
-            if (is_object($value)) {
95
-                $this->parameters[$key] = Cloner::clone($value);
96
-            }
97
-        }
98
-    }
99
-
100
-    public function getClassName(): string
101
-    {
102
-        return $this->className;
103
-    }
104
-
105
-    public function getMethodName(): string
106
-    {
107
-        return $this->methodName;
108
-    }
109
-
110
-    public function getParameters(): array
111
-    {
112
-        return $this->parameters;
113
-    }
114
-
115
-    /**
116
-     * @throws RuntimeException
117
-     *
118
-     * @return mixed Mocked return value
119
-     */
120
-    public function generateReturnValue()
121
-    {
122
-        if ($this->isReturnTypeNullable || $this->proxiedCall) {
123
-            return null;
124
-        }
125
-
126
-        $intersection               = false;
127
-        $union                      = false;
128
-        $unionContainsIntersections = false;
129
-
130
-        if (strpos($this->returnType, '|') !== false) {
131
-            $types = explode('|', $this->returnType);
132
-            $union = true;
133
-
134
-            if (strpos($this->returnType, '(') !== false) {
135
-                $unionContainsIntersections = true;
136
-            }
137
-        } elseif (strpos($this->returnType, '&') !== false) {
138
-            $types        = explode('&', $this->returnType);
139
-            $intersection = true;
140
-        } else {
141
-            $types = [$this->returnType];
142
-        }
143
-
144
-        $types = array_map('strtolower', $types);
145
-
146
-        if (!$intersection && !$unionContainsIntersections) {
147
-            if (in_array('', $types, true) ||
148
-                in_array('null', $types, true) ||
149
-                in_array('mixed', $types, true) ||
150
-                in_array('void', $types, true)) {
151
-                return null;
152
-            }
153
-
154
-            if (in_array('true', $types, true)) {
155
-                return true;
156
-            }
157
-
158
-            if (in_array('false', $types, true) ||
159
-                in_array('bool', $types, true)) {
160
-                return false;
161
-            }
162
-
163
-            if (in_array('float', $types, true)) {
164
-                return 0.0;
165
-            }
166
-
167
-            if (in_array('int', $types, true)) {
168
-                return 0;
169
-            }
170
-
171
-            if (in_array('string', $types, true)) {
172
-                return '';
173
-            }
174
-
175
-            if (in_array('array', $types, true)) {
176
-                return [];
177
-            }
178
-
179
-            if (in_array('static', $types, true)) {
180
-                try {
181
-                    return (new Instantiator)->instantiate(get_class($this->object));
182
-                } catch (Throwable $t) {
183
-                    throw new RuntimeException(
184
-                        $t->getMessage(),
185
-                        (int) $t->getCode(),
186
-                        $t
187
-                    );
188
-                }
189
-            }
190
-
191
-            if (in_array('object', $types, true)) {
192
-                return new stdClass;
193
-            }
194
-
195
-            if (in_array('callable', $types, true) ||
196
-                in_array('closure', $types, true)) {
197
-                return static function (): void
198
-                {
199
-                };
200
-            }
201
-
202
-            if (in_array('traversable', $types, true) ||
203
-                in_array('generator', $types, true) ||
204
-                in_array('iterable', $types, true)) {
205
-                $generator = static function (): \Generator
206
-                {
207
-                    yield from [];
208
-                };
209
-
210
-                return $generator();
211
-            }
212
-
213
-            if (!$union) {
214
-                try {
215
-                    return (new Generator)->getMock($this->returnType, [], [], '', false);
216
-                } catch (Throwable $t) {
217
-                    if ($t instanceof Exception) {
218
-                        throw $t;
219
-                    }
220
-
221
-                    throw new RuntimeException(
222
-                        $t->getMessage(),
223
-                        (int) $t->getCode(),
224
-                        $t
225
-                    );
226
-                }
227
-            }
228
-        }
229
-
230
-        if ($intersection && $this->onlyInterfaces($types)) {
231
-            try {
232
-                return (new Generator)->getMockForInterfaces($types);
233
-            } catch (Throwable $t) {
234
-                throw new RuntimeException(
235
-                    sprintf(
236
-                        'Return value for %s::%s() cannot be generated: %s',
237
-                        $this->className,
238
-                        $this->methodName,
239
-                        $t->getMessage(),
240
-                    ),
241
-                    (int) $t->getCode(),
242
-                );
243
-            }
244
-        }
245
-
246
-        $reason = '';
247
-
248
-        if ($union) {
249
-            $reason = ' because the declared return type is a union';
250
-        } elseif ($intersection) {
251
-            $reason = ' because the declared return type is an intersection';
252
-        }
253
-
254
-        throw new RuntimeException(
255
-            sprintf(
256
-                'Return value for %s::%s() cannot be generated%s, please configure a return value for this method',
257
-                $this->className,
258
-                $this->methodName,
259
-                $reason
260
-            )
261
-        );
262
-    }
263
-
264
-    public function toString(): string
265
-    {
266
-        $exporter = new Exporter;
267
-
268
-        return sprintf(
269
-            '%s::%s(%s)%s',
270
-            $this->className,
271
-            $this->methodName,
272
-            implode(
273
-                ', ',
274
-                array_map(
275
-                    [$exporter, 'shortenedExport'],
276
-                    $this->parameters
277
-                )
278
-            ),
279
-            $this->returnType ? sprintf(': %s', $this->returnType) : ''
280
-        );
281
-    }
282
-
283
-    public function getObject(): object
284
-    {
285
-        return $this->object;
286
-    }
287
-
288
-    /**
289
-     * @psalm-param non-empty-list<string> $types
290
-     */
291
-    private function onlyInterfaces(array $types): bool
292
-    {
293
-        foreach ($types as $type) {
294
-            if (!interface_exists($type)) {
295
-                return false;
296
-            }
297
-        }
298
-
299
-        return true;
300
-    }
35
+	/**
36
+	 * @var string
37
+	 */
38
+	private $className;
39
+
40
+	/**
41
+	 * @var string
42
+	 */
43
+	private $methodName;
44
+
45
+	/**
46
+	 * @var array
47
+	 */
48
+	private $parameters;
49
+
50
+	/**
51
+	 * @var string
52
+	 */
53
+	private $returnType;
54
+
55
+	/**
56
+	 * @var bool
57
+	 */
58
+	private $isReturnTypeNullable = false;
59
+
60
+	/**
61
+	 * @var bool
62
+	 */
63
+	private $proxiedCall;
64
+
65
+	/**
66
+	 * @var object
67
+	 */
68
+	private $object;
69
+
70
+	public function __construct(string $className, string $methodName, array $parameters, string $returnType, object $object, bool $cloneObjects = false, bool $proxiedCall = false)
71
+	{
72
+		$this->className   = $className;
73
+		$this->methodName  = $methodName;
74
+		$this->parameters  = $parameters;
75
+		$this->object      = $object;
76
+		$this->proxiedCall = $proxiedCall;
77
+
78
+		if (strtolower($methodName) === '__tostring') {
79
+			$returnType = 'string';
80
+		}
81
+
82
+		if (strpos($returnType, '?') === 0) {
83
+			$returnType                 = substr($returnType, 1);
84
+			$this->isReturnTypeNullable = true;
85
+		}
86
+
87
+		$this->returnType = $returnType;
88
+
89
+		if (!$cloneObjects) {
90
+			return;
91
+		}
92
+
93
+		foreach ($this->parameters as $key => $value) {
94
+			if (is_object($value)) {
95
+				$this->parameters[$key] = Cloner::clone($value);
96
+			}
97
+		}
98
+	}
99
+
100
+	public function getClassName(): string
101
+	{
102
+		return $this->className;
103
+	}
104
+
105
+	public function getMethodName(): string
106
+	{
107
+		return $this->methodName;
108
+	}
109
+
110
+	public function getParameters(): array
111
+	{
112
+		return $this->parameters;
113
+	}
114
+
115
+	/**
116
+	 * @throws RuntimeException
117
+	 *
118
+	 * @return mixed Mocked return value
119
+	 */
120
+	public function generateReturnValue()
121
+	{
122
+		if ($this->isReturnTypeNullable || $this->proxiedCall) {
123
+			return null;
124
+		}
125
+
126
+		$intersection               = false;
127
+		$union                      = false;
128
+		$unionContainsIntersections = false;
129
+
130
+		if (strpos($this->returnType, '|') !== false) {
131
+			$types = explode('|', $this->returnType);
132
+			$union = true;
133
+
134
+			if (strpos($this->returnType, '(') !== false) {
135
+				$unionContainsIntersections = true;
136
+			}
137
+		} elseif (strpos($this->returnType, '&') !== false) {
138
+			$types        = explode('&', $this->returnType);
139
+			$intersection = true;
140
+		} else {
141
+			$types = [$this->returnType];
142
+		}
143
+
144
+		$types = array_map('strtolower', $types);
145
+
146
+		if (!$intersection && !$unionContainsIntersections) {
147
+			if (in_array('', $types, true) ||
148
+				in_array('null', $types, true) ||
149
+				in_array('mixed', $types, true) ||
150
+				in_array('void', $types, true)) {
151
+				return null;
152
+			}
153
+
154
+			if (in_array('true', $types, true)) {
155
+				return true;
156
+			}
157
+
158
+			if (in_array('false', $types, true) ||
159
+				in_array('bool', $types, true)) {
160
+				return false;
161
+			}
162
+
163
+			if (in_array('float', $types, true)) {
164
+				return 0.0;
165
+			}
166
+
167
+			if (in_array('int', $types, true)) {
168
+				return 0;
169
+			}
170
+
171
+			if (in_array('string', $types, true)) {
172
+				return '';
173
+			}
174
+
175
+			if (in_array('array', $types, true)) {
176
+				return [];
177
+			}
178
+
179
+			if (in_array('static', $types, true)) {
180
+				try {
181
+					return (new Instantiator)->instantiate(get_class($this->object));
182
+				} catch (Throwable $t) {
183
+					throw new RuntimeException(
184
+						$t->getMessage(),
185
+						(int) $t->getCode(),
186
+						$t
187
+					);
188
+				}
189
+			}
190
+
191
+			if (in_array('object', $types, true)) {
192
+				return new stdClass;
193
+			}
194
+
195
+			if (in_array('callable', $types, true) ||
196
+				in_array('closure', $types, true)) {
197
+				return static function (): void
198
+				{
199
+				};
200
+			}
201
+
202
+			if (in_array('traversable', $types, true) ||
203
+				in_array('generator', $types, true) ||
204
+				in_array('iterable', $types, true)) {
205
+				$generator = static function (): \Generator
206
+				{
207
+					yield from [];
208
+				};
209
+
210
+				return $generator();
211
+			}
212
+
213
+			if (!$union) {
214
+				try {
215
+					return (new Generator)->getMock($this->returnType, [], [], '', false);
216
+				} catch (Throwable $t) {
217
+					if ($t instanceof Exception) {
218
+						throw $t;
219
+					}
220
+
221
+					throw new RuntimeException(
222
+						$t->getMessage(),
223
+						(int) $t->getCode(),
224
+						$t
225
+					);
226
+				}
227
+			}
228
+		}
229
+
230
+		if ($intersection && $this->onlyInterfaces($types)) {
231
+			try {
232
+				return (new Generator)->getMockForInterfaces($types);
233
+			} catch (Throwable $t) {
234
+				throw new RuntimeException(
235
+					sprintf(
236
+						'Return value for %s::%s() cannot be generated: %s',
237
+						$this->className,
238
+						$this->methodName,
239
+						$t->getMessage(),
240
+					),
241
+					(int) $t->getCode(),
242
+				);
243
+			}
244
+		}
245
+
246
+		$reason = '';
247
+
248
+		if ($union) {
249
+			$reason = ' because the declared return type is a union';
250
+		} elseif ($intersection) {
251
+			$reason = ' because the declared return type is an intersection';
252
+		}
253
+
254
+		throw new RuntimeException(
255
+			sprintf(
256
+				'Return value for %s::%s() cannot be generated%s, please configure a return value for this method',
257
+				$this->className,
258
+				$this->methodName,
259
+				$reason
260
+			)
261
+		);
262
+	}
263
+
264
+	public function toString(): string
265
+	{
266
+		$exporter = new Exporter;
267
+
268
+		return sprintf(
269
+			'%s::%s(%s)%s',
270
+			$this->className,
271
+			$this->methodName,
272
+			implode(
273
+				', ',
274
+				array_map(
275
+					[$exporter, 'shortenedExport'],
276
+					$this->parameters
277
+				)
278
+			),
279
+			$this->returnType ? sprintf(': %s', $this->returnType) : ''
280
+		);
281
+	}
282
+
283
+	public function getObject(): object
284
+	{
285
+		return $this->object;
286
+	}
287
+
288
+	/**
289
+	 * @psalm-param non-empty-list<string> $types
290
+	 */
291
+	private function onlyInterfaces(array $types): bool
292
+	{
293
+		foreach ($types as $type) {
294
+			if (!interface_exists($type)) {
295
+				return false;
296
+			}
297
+		}
298
+
299
+		return true;
300
+	}
301 301
 }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 
87 87
         $this->returnType = $returnType;
88 88
 
89
-        if (!$cloneObjects) {
89
+        if ( ! $cloneObjects) {
90 90
             return;
91 91
         }
92 92
 
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 
144 144
         $types = array_map('strtolower', $types);
145 145
 
146
-        if (!$intersection && !$unionContainsIntersections) {
146
+        if ( ! $intersection && ! $unionContainsIntersections) {
147 147
             if (in_array('', $types, true) ||
148 148
                 in_array('null', $types, true) ||
149 149
                 in_array('mixed', $types, true) ||
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 
195 195
             if (in_array('callable', $types, true) ||
196 196
                 in_array('closure', $types, true)) {
197
-                return static function (): void
197
+                return static function(): void
198 198
                 {
199 199
                 };
200 200
             }
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
             if (in_array('traversable', $types, true) ||
203 203
                 in_array('generator', $types, true) ||
204 204
                 in_array('iterable', $types, true)) {
205
-                $generator = static function (): \Generator
205
+                $generator = static function(): \Generator
206 206
                 {
207 207
                     yield from [];
208 208
                 };
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
                 return $generator();
211 211
             }
212 212
 
213
-            if (!$union) {
213
+            if ( ! $union) {
214 214
                 try {
215 215
                     return (new Generator)->getMock($this->returnType, [], [], '', false);
216 216
                 } catch (Throwable $t) {
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
     private function onlyInterfaces(array $types): bool
292 292
     {
293 293
         foreach ($types as $type) {
294
-            if (!interface_exists($type)) {
294
+            if ( ! interface_exists($type)) {
295 295
                 return false;
296 296
             }
297 297
         }
Please login to merge, or discard this patch.
vendor/phpunit/phpunit/src/Framework/MockObject/Generator.php 1 patch
Indentation   +1042 added lines, -1042 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
  */
61 61
 final class Generator
62 62
 {
63
-    private const MOCKED_CLONE_METHOD_WITH_VOID_RETURN_TYPE_TRAIT = <<<'EOT'
63
+	private const MOCKED_CLONE_METHOD_WITH_VOID_RETURN_TYPE_TRAIT = <<<'EOT'
64 64
 namespace PHPUnit\Framework\MockObject;
65 65
 
66 66
 trait MockedCloneMethodWithVoidReturnType
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 }
73 73
 EOT;
74 74
 
75
-    private const MOCKED_CLONE_METHOD_WITHOUT_RETURN_TYPE_TRAIT = <<<'EOT'
75
+	private const MOCKED_CLONE_METHOD_WITHOUT_RETURN_TYPE_TRAIT = <<<'EOT'
76 76
 namespace PHPUnit\Framework\MockObject;
77 77
 
78 78
 trait MockedCloneMethodWithoutReturnType
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 }
85 85
 EOT;
86 86
 
87
-    private const UNMOCKED_CLONE_METHOD_WITH_VOID_RETURN_TYPE_TRAIT = <<<'EOT'
87
+	private const UNMOCKED_CLONE_METHOD_WITH_VOID_RETURN_TYPE_TRAIT = <<<'EOT'
88 88
 namespace PHPUnit\Framework\MockObject;
89 89
 
90 90
 trait UnmockedCloneMethodWithVoidReturnType
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 }
99 99
 EOT;
100 100
 
101
-    private const UNMOCKED_CLONE_METHOD_WITHOUT_RETURN_TYPE_TRAIT = <<<'EOT'
101
+	private const UNMOCKED_CLONE_METHOD_WITHOUT_RETURN_TYPE_TRAIT = <<<'EOT'
102 102
 namespace PHPUnit\Framework\MockObject;
103 103
 
104 104
 trait UnmockedCloneMethodWithoutReturnType
@@ -112,1042 +112,1042 @@  discard block
 block discarded – undo
112 112
 }
113 113
 EOT;
114 114
 
115
-    /**
116
-     * @var array
117
-     */
118
-    private const EXCLUDED_METHOD_NAMES = [
119
-        '__CLASS__'       => true,
120
-        '__DIR__'         => true,
121
-        '__FILE__'        => true,
122
-        '__FUNCTION__'    => true,
123
-        '__LINE__'        => true,
124
-        '__METHOD__'      => true,
125
-        '__NAMESPACE__'   => true,
126
-        '__TRAIT__'       => true,
127
-        '__clone'         => true,
128
-        '__halt_compiler' => true,
129
-    ];
130
-
131
-    /**
132
-     * @var array
133
-     */
134
-    private static $cache = [];
135
-
136
-    /**
137
-     * @var Template[]
138
-     */
139
-    private static $templates = [];
140
-
141
-    /**
142
-     * Returns a mock object for the specified class.
143
-     *
144
-     * @param null|array $methods
145
-     *
146
-     * @throws \PHPUnit\Framework\InvalidArgumentException
147
-     * @throws ClassAlreadyExistsException
148
-     * @throws ClassIsFinalException
149
-     * @throws DuplicateMethodException
150
-     * @throws InvalidMethodNameException
151
-     * @throws OriginalConstructorInvocationRequiredException
152
-     * @throws ReflectionException
153
-     * @throws RuntimeException
154
-     * @throws UnknownTypeException
155
-     */
156
-    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): MockObject
157
-    {
158
-        if (!is_array($methods) && null !== $methods) {
159
-            throw InvalidArgumentException::create(2, 'array');
160
-        }
161
-
162
-        if ($type === 'Traversable' || $type === '\\Traversable') {
163
-            $type = 'Iterator';
164
-        }
165
-
166
-        if (!$allowMockingUnknownTypes && !class_exists($type, $callAutoload) && !interface_exists($type, $callAutoload)) {
167
-            throw new UnknownTypeException($type);
168
-        }
169
-
170
-        if (null !== $methods) {
171
-            foreach ($methods as $method) {
172
-                if (!preg_match('~[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*~', (string) $method)) {
173
-                    throw new InvalidMethodNameException((string) $method);
174
-                }
175
-            }
176
-
177
-            if ($methods !== array_unique($methods)) {
178
-                throw new DuplicateMethodException($methods);
179
-            }
180
-        }
181
-
182
-        if ($mockClassName !== '' && class_exists($mockClassName, false)) {
183
-            try {
184
-                $reflector = new ReflectionClass($mockClassName);
185
-                // @codeCoverageIgnoreStart
186
-            } catch (\ReflectionException $e) {
187
-                throw new ReflectionException(
188
-                    $e->getMessage(),
189
-                    (int) $e->getCode(),
190
-                    $e
191
-                );
192
-            }
193
-            // @codeCoverageIgnoreEnd
194
-
195
-            if (!$reflector->implementsInterface(MockObject::class)) {
196
-                throw new ClassAlreadyExistsException($mockClassName);
197
-            }
198
-        }
199
-
200
-        if (!$callOriginalConstructor && $callOriginalMethods) {
201
-            throw new OriginalConstructorInvocationRequiredException;
202
-        }
203
-
204
-        $mock = $this->generate(
205
-            $type,
206
-            $methods,
207
-            $mockClassName,
208
-            $callOriginalClone,
209
-            $callAutoload,
210
-            $cloneArguments,
211
-            $callOriginalMethods
212
-        );
213
-
214
-        return $this->getObject(
215
-            $mock,
216
-            $type,
217
-            $callOriginalConstructor,
218
-            $callAutoload,
219
-            $arguments,
220
-            $callOriginalMethods,
221
-            $proxyTarget,
222
-            $returnValueGeneration
223
-        );
224
-    }
225
-
226
-    /**
227
-     * @psalm-param list<class-string> $interfaces
228
-     *
229
-     * @throws RuntimeException
230
-     * @throws UnknownTypeException
231
-     */
232
-    public function getMockForInterfaces(array $interfaces, bool $callAutoload = true): MockObject
233
-    {
234
-        if (count($interfaces) < 2) {
235
-            throw new RuntimeException('At least two interfaces must be specified');
236
-        }
237
-
238
-        foreach ($interfaces as $interface) {
239
-            if (!interface_exists($interface, $callAutoload)) {
240
-                throw new UnknownTypeException($interface);
241
-            }
242
-        }
243
-
244
-        sort($interfaces);
245
-
246
-        $methods = [];
247
-
248
-        foreach ($interfaces as $interface) {
249
-            $methods = array_merge($methods, $this->getClassMethods($interface));
250
-        }
251
-
252
-        if (count(array_unique($methods)) < count($methods)) {
253
-            throw new RuntimeException('Interfaces must not declare the same method');
254
-        }
255
-
256
-        $unqualifiedNames = [];
257
-
258
-        foreach ($interfaces as $interface) {
259
-            $parts              = explode('\\', $interface);
260
-            $unqualifiedNames[] = array_pop($parts);
261
-        }
262
-
263
-        sort($unqualifiedNames);
264
-
265
-        do {
266
-            $intersectionName = sprintf(
267
-                'Intersection_%s_%s',
268
-                implode('_', $unqualifiedNames),
269
-                substr(md5((string) mt_rand()), 0, 8)
270
-            );
271
-        } while (interface_exists($intersectionName, false));
272
-
273
-        $template = $this->getTemplate('intersection.tpl');
274
-
275
-        $template->setVar(
276
-            [
277
-                'intersection' => $intersectionName,
278
-                'interfaces'   => implode(', ', $interfaces),
279
-            ]
280
-        );
281
-
282
-        eval($template->render());
283
-
284
-        return $this->getMock($intersectionName);
285
-    }
286
-
287
-    /**
288
-     * Returns a mock object for the specified abstract class with all abstract
289
-     * methods of the class mocked.
290
-     *
291
-     * Concrete methods to mock can be specified with the $mockedMethods parameter.
292
-     *
293
-     * @psalm-template RealInstanceType of object
294
-     *
295
-     * @psalm-param class-string<RealInstanceType> $originalClassName
296
-     *
297
-     * @psalm-return MockObject&RealInstanceType
298
-     *
299
-     * @throws \PHPUnit\Framework\InvalidArgumentException
300
-     * @throws ClassAlreadyExistsException
301
-     * @throws ClassIsFinalException
302
-     * @throws DuplicateMethodException
303
-     * @throws InvalidMethodNameException
304
-     * @throws OriginalConstructorInvocationRequiredException
305
-     * @throws ReflectionException
306
-     * @throws RuntimeException
307
-     * @throws UnknownClassException
308
-     * @throws UnknownTypeException
309
-     */
310
-    public function getMockForAbstractClass(string $originalClassName, array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, array $mockedMethods = null, bool $cloneArguments = true): MockObject
311
-    {
312
-        if (class_exists($originalClassName, $callAutoload) ||
313
-            interface_exists($originalClassName, $callAutoload)) {
314
-            try {
315
-                $reflector = new ReflectionClass($originalClassName);
316
-                // @codeCoverageIgnoreStart
317
-            } catch (\ReflectionException $e) {
318
-                throw new ReflectionException(
319
-                    $e->getMessage(),
320
-                    (int) $e->getCode(),
321
-                    $e
322
-                );
323
-            }
324
-            // @codeCoverageIgnoreEnd
325
-
326
-            $methods = $mockedMethods;
327
-
328
-            foreach ($reflector->getMethods() as $method) {
329
-                if ($method->isAbstract() && !in_array($method->getName(), $methods ?? [], true)) {
330
-                    $methods[] = $method->getName();
331
-                }
332
-            }
333
-
334
-            if (empty($methods)) {
335
-                $methods = null;
336
-            }
337
-
338
-            return $this->getMock(
339
-                $originalClassName,
340
-                $methods,
341
-                $arguments,
342
-                $mockClassName,
343
-                $callOriginalConstructor,
344
-                $callOriginalClone,
345
-                $callAutoload,
346
-                $cloneArguments
347
-            );
348
-        }
349
-
350
-        throw new UnknownClassException($originalClassName);
351
-    }
352
-
353
-    /**
354
-     * Returns a mock object for the specified trait with all abstract methods
355
-     * of the trait mocked. Concrete methods to mock can be specified with the
356
-     * `$mockedMethods` parameter.
357
-     *
358
-     * @psalm-param trait-string $traitName
359
-     *
360
-     * @throws \PHPUnit\Framework\InvalidArgumentException
361
-     * @throws ClassAlreadyExistsException
362
-     * @throws ClassIsFinalException
363
-     * @throws DuplicateMethodException
364
-     * @throws InvalidMethodNameException
365
-     * @throws OriginalConstructorInvocationRequiredException
366
-     * @throws ReflectionException
367
-     * @throws RuntimeException
368
-     * @throws UnknownClassException
369
-     * @throws UnknownTraitException
370
-     * @throws UnknownTypeException
371
-     */
372
-    public function getMockForTrait(string $traitName, array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, array $mockedMethods = null, bool $cloneArguments = true): MockObject
373
-    {
374
-        if (!trait_exists($traitName, $callAutoload)) {
375
-            throw new UnknownTraitException($traitName);
376
-        }
377
-
378
-        $className = $this->generateClassName(
379
-            $traitName,
380
-            '',
381
-            'Trait_'
382
-        );
383
-
384
-        $classTemplate = $this->getTemplate('trait_class.tpl');
385
-
386
-        $classTemplate->setVar(
387
-            [
388
-                'prologue'   => 'abstract ',
389
-                'class_name' => $className['className'],
390
-                'trait_name' => $traitName,
391
-            ]
392
-        );
393
-
394
-        $mockTrait = new MockTrait($classTemplate->render(), $className['className']);
395
-        $mockTrait->generate();
396
-
397
-        return $this->getMockForAbstractClass($className['className'], $arguments, $mockClassName, $callOriginalConstructor, $callOriginalClone, $callAutoload, $mockedMethods, $cloneArguments);
398
-    }
399
-
400
-    /**
401
-     * Returns an object for the specified trait.
402
-     *
403
-     * @psalm-param trait-string $traitName
404
-     *
405
-     * @throws ReflectionException
406
-     * @throws RuntimeException
407
-     * @throws UnknownTraitException
408
-     */
409
-    public function getObjectForTrait(string $traitName, string $traitClassName = '', bool $callAutoload = true, bool $callOriginalConstructor = false, array $arguments = []): object
410
-    {
411
-        if (!trait_exists($traitName, $callAutoload)) {
412
-            throw new UnknownTraitException($traitName);
413
-        }
414
-
415
-        $className = $this->generateClassName(
416
-            $traitName,
417
-            $traitClassName,
418
-            'Trait_'
419
-        );
420
-
421
-        $classTemplate = $this->getTemplate('trait_class.tpl');
422
-
423
-        $classTemplate->setVar(
424
-            [
425
-                'prologue'   => '',
426
-                'class_name' => $className['className'],
427
-                'trait_name' => $traitName,
428
-            ]
429
-        );
430
-
431
-        return $this->getObject(
432
-            new MockTrait(
433
-                $classTemplate->render(),
434
-                $className['className']
435
-            ),
436
-            '',
437
-            $callOriginalConstructor,
438
-            $callAutoload,
439
-            $arguments
440
-        );
441
-    }
442
-
443
-    /**
444
-     * @throws ClassIsFinalException
445
-     * @throws ReflectionException
446
-     * @throws RuntimeException
447
-     */
448
-    public function generate(string $type, array $methods = null, string $mockClassName = '', bool $callOriginalClone = true, bool $callAutoload = true, bool $cloneArguments = true, bool $callOriginalMethods = false): MockClass
449
-    {
450
-        if ($mockClassName !== '') {
451
-            return $this->generateMock(
452
-                $type,
453
-                $methods,
454
-                $mockClassName,
455
-                $callOriginalClone,
456
-                $callAutoload,
457
-                $cloneArguments,
458
-                $callOriginalMethods
459
-            );
460
-        }
461
-
462
-        $key = md5(
463
-            $type .
464
-            serialize($methods) .
465
-            serialize($callOriginalClone) .
466
-            serialize($cloneArguments) .
467
-            serialize($callOriginalMethods)
468
-        );
469
-
470
-        if (!isset(self::$cache[$key])) {
471
-            self::$cache[$key] = $this->generateMock(
472
-                $type,
473
-                $methods,
474
-                $mockClassName,
475
-                $callOriginalClone,
476
-                $callAutoload,
477
-                $cloneArguments,
478
-                $callOriginalMethods
479
-            );
480
-        }
481
-
482
-        return self::$cache[$key];
483
-    }
484
-
485
-    /**
486
-     * @throws RuntimeException
487
-     * @throws SoapExtensionNotAvailableException
488
-     */
489
-    public function generateClassFromWsdl(string $wsdlFile, string $className, array $methods = [], array $options = []): string
490
-    {
491
-        if (!extension_loaded('soap')) {
492
-            throw new SoapExtensionNotAvailableException;
493
-        }
494
-
495
-        $options = array_merge($options, ['cache_wsdl' => WSDL_CACHE_NONE]);
496
-
497
-        try {
498
-            $client   = new SoapClient($wsdlFile, $options);
499
-            $_methods = array_unique($client->__getFunctions());
500
-            unset($client);
501
-        } catch (SoapFault $e) {
502
-            throw new RuntimeException(
503
-                $e->getMessage(),
504
-                (int) $e->getCode(),
505
-                $e
506
-            );
507
-        }
508
-
509
-        sort($_methods);
510
-
511
-        $methodTemplate = $this->getTemplate('wsdl_method.tpl');
512
-        $methodsBuffer  = '';
513
-
514
-        foreach ($_methods as $method) {
515
-            preg_match_all('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\(/', $method, $matches, PREG_OFFSET_CAPTURE);
516
-            $lastFunction = array_pop($matches[0]);
517
-            $nameStart    = $lastFunction[1];
518
-            $nameEnd      = $nameStart + strlen($lastFunction[0]) - 1;
519
-            $name         = str_replace('(', '', $lastFunction[0]);
520
-
521
-            if (empty($methods) || in_array($name, $methods, true)) {
522
-                $args = explode(
523
-                    ',',
524
-                    str_replace(')', '', substr($method, $nameEnd + 1))
525
-                );
526
-
527
-                foreach (range(0, count($args) - 1) as $i) {
528
-                    $parameterStart = strpos($args[$i], '$');
529
-
530
-                    if (!$parameterStart) {
531
-                        continue;
532
-                    }
533
-
534
-                    $args[$i] = substr($args[$i], $parameterStart);
535
-                }
536
-
537
-                $methodTemplate->setVar(
538
-                    [
539
-                        'method_name' => $name,
540
-                        'arguments'   => implode(', ', $args),
541
-                    ]
542
-                );
543
-
544
-                $methodsBuffer .= $methodTemplate->render();
545
-            }
546
-        }
547
-
548
-        $optionsBuffer = '[';
549
-
550
-        foreach ($options as $key => $value) {
551
-            $optionsBuffer .= $key . ' => ' . $value;
552
-        }
553
-
554
-        $optionsBuffer .= ']';
555
-
556
-        $classTemplate = $this->getTemplate('wsdl_class.tpl');
557
-        $namespace     = '';
558
-
559
-        if (strpos($className, '\\') !== false) {
560
-            $parts     = explode('\\', $className);
561
-            $className = array_pop($parts);
562
-            $namespace = 'namespace ' . implode('\\', $parts) . ';' . "\n\n";
563
-        }
564
-
565
-        $classTemplate->setVar(
566
-            [
567
-                'namespace'  => $namespace,
568
-                'class_name' => $className,
569
-                'wsdl'       => $wsdlFile,
570
-                'options'    => $optionsBuffer,
571
-                'methods'    => $methodsBuffer,
572
-            ]
573
-        );
574
-
575
-        return $classTemplate->render();
576
-    }
577
-
578
-    /**
579
-     * @throws ReflectionException
580
-     *
581
-     * @return string[]
582
-     */
583
-    public function getClassMethods(string $className): array
584
-    {
585
-        try {
586
-            $class = new ReflectionClass($className);
587
-            // @codeCoverageIgnoreStart
588
-        } catch (\ReflectionException $e) {
589
-            throw new ReflectionException(
590
-                $e->getMessage(),
591
-                (int) $e->getCode(),
592
-                $e
593
-            );
594
-        }
595
-        // @codeCoverageIgnoreEnd
596
-
597
-        $methods = [];
598
-
599
-        foreach ($class->getMethods() as $method) {
600
-            if ($method->isPublic() || $method->isAbstract()) {
601
-                $methods[] = $method->getName();
602
-            }
603
-        }
604
-
605
-        return $methods;
606
-    }
607
-
608
-    /**
609
-     * @throws ReflectionException
610
-     *
611
-     * @return MockMethod[]
612
-     */
613
-    public function mockClassMethods(string $className, bool $callOriginalMethods, bool $cloneArguments): array
614
-    {
615
-        try {
616
-            $class = new ReflectionClass($className);
617
-            // @codeCoverageIgnoreStart
618
-        } catch (\ReflectionException $e) {
619
-            throw new ReflectionException(
620
-                $e->getMessage(),
621
-                (int) $e->getCode(),
622
-                $e
623
-            );
624
-        }
625
-        // @codeCoverageIgnoreEnd
626
-
627
-        $methods = [];
628
-
629
-        foreach ($class->getMethods() as $method) {
630
-            if (($method->isPublic() || $method->isAbstract()) && $this->canMockMethod($method)) {
631
-                $methods[] = MockMethod::fromReflection($method, $callOriginalMethods, $cloneArguments);
632
-            }
633
-        }
634
-
635
-        return $methods;
636
-    }
637
-
638
-    /**
639
-     * @throws ReflectionException
640
-     *
641
-     * @return MockMethod[]
642
-     */
643
-    public function mockInterfaceMethods(string $interfaceName, bool $cloneArguments): array
644
-    {
645
-        try {
646
-            $class = new ReflectionClass($interfaceName);
647
-            // @codeCoverageIgnoreStart
648
-        } catch (\ReflectionException $e) {
649
-            throw new ReflectionException(
650
-                $e->getMessage(),
651
-                (int) $e->getCode(),
652
-                $e
653
-            );
654
-        }
655
-        // @codeCoverageIgnoreEnd
656
-
657
-        $methods = [];
658
-
659
-        foreach ($class->getMethods() as $method) {
660
-            $methods[] = MockMethod::fromReflection($method, false, $cloneArguments);
661
-        }
662
-
663
-        return $methods;
664
-    }
665
-
666
-    /**
667
-     * @psalm-param class-string $interfaceName
668
-     *
669
-     * @throws ReflectionException
670
-     *
671
-     * @return ReflectionMethod[]
672
-     */
673
-    private function userDefinedInterfaceMethods(string $interfaceName): array
674
-    {
675
-        try {
676
-            // @codeCoverageIgnoreStart
677
-            $interface = new ReflectionClass($interfaceName);
678
-        } catch (\ReflectionException $e) {
679
-            throw new ReflectionException(
680
-                $e->getMessage(),
681
-                (int) $e->getCode(),
682
-                $e
683
-            );
684
-        }
685
-        // @codeCoverageIgnoreEnd
686
-
687
-        $methods = [];
688
-
689
-        foreach ($interface->getMethods() as $method) {
690
-            if (!$method->isUserDefined()) {
691
-                continue;
692
-            }
693
-
694
-            $methods[] = $method;
695
-        }
696
-
697
-        return $methods;
698
-    }
699
-
700
-    /**
701
-     * @throws ReflectionException
702
-     * @throws RuntimeException
703
-     */
704
-    private function getObject(MockType $mockClass, $type = '', bool $callOriginalConstructor = false, bool $callAutoload = false, array $arguments = [], bool $callOriginalMethods = false, object $proxyTarget = null, bool $returnValueGeneration = true)
705
-    {
706
-        $className = $mockClass->generate();
707
-
708
-        if ($callOriginalConstructor) {
709
-            if (count($arguments) === 0) {
710
-                $object = new $className;
711
-            } else {
712
-                try {
713
-                    $class = new ReflectionClass($className);
714
-                    // @codeCoverageIgnoreStart
715
-                } catch (\ReflectionException $e) {
716
-                    throw new ReflectionException(
717
-                        $e->getMessage(),
718
-                        (int) $e->getCode(),
719
-                        $e
720
-                    );
721
-                }
722
-                // @codeCoverageIgnoreEnd
723
-
724
-                $object = $class->newInstanceArgs($arguments);
725
-            }
726
-        } else {
727
-            try {
728
-                $object = (new Instantiator)->instantiate($className);
729
-            } catch (InstantiatorException $e) {
730
-                throw new RuntimeException($e->getMessage());
731
-            }
732
-        }
733
-
734
-        if ($callOriginalMethods) {
735
-            if (!is_object($proxyTarget)) {
736
-                if (count($arguments) === 0) {
737
-                    $proxyTarget = new $type;
738
-                } else {
739
-                    try {
740
-                        $class = new ReflectionClass($type);
741
-                        // @codeCoverageIgnoreStart
742
-                    } catch (\ReflectionException $e) {
743
-                        throw new ReflectionException(
744
-                            $e->getMessage(),
745
-                            (int) $e->getCode(),
746
-                            $e
747
-                        );
748
-                    }
749
-                    // @codeCoverageIgnoreEnd
750
-
751
-                    $proxyTarget = $class->newInstanceArgs($arguments);
752
-                }
753
-            }
754
-
755
-            $object->__phpunit_setOriginalObject($proxyTarget);
756
-        }
757
-
758
-        if ($object instanceof MockObject) {
759
-            $object->__phpunit_setReturnValueGeneration($returnValueGeneration);
760
-        }
761
-
762
-        return $object;
763
-    }
764
-
765
-    /**
766
-     * @throws ClassIsFinalException
767
-     * @throws ReflectionException
768
-     * @throws RuntimeException
769
-     */
770
-    private function generateMock(string $type, ?array $explicitMethods, string $mockClassName, bool $callOriginalClone, bool $callAutoload, bool $cloneArguments, bool $callOriginalMethods): MockClass
771
-    {
772
-        $classTemplate        = $this->getTemplate('mocked_class.tpl');
773
-        $additionalInterfaces = [];
774
-        $mockedCloneMethod    = false;
775
-        $unmockedCloneMethod  = false;
776
-        $isClass              = false;
777
-        $isInterface          = false;
778
-        $class                = null;
779
-        $mockMethods          = new MockMethodSet;
780
-
781
-        $_mockClassName = $this->generateClassName(
782
-            $type,
783
-            $mockClassName,
784
-            'Mock_'
785
-        );
786
-
787
-        if (class_exists($_mockClassName['fullClassName'], $callAutoload)) {
788
-            $isClass = true;
789
-        } elseif (interface_exists($_mockClassName['fullClassName'], $callAutoload)) {
790
-            $isInterface = true;
791
-        }
792
-
793
-        if (!$isClass && !$isInterface) {
794
-            $prologue = 'class ' . $_mockClassName['originalClassName'] . "\n{\n}\n\n";
795
-
796
-            if (!empty($_mockClassName['namespaceName'])) {
797
-                $prologue = 'namespace ' . $_mockClassName['namespaceName'] .
798
-                            " {\n\n" . $prologue . "}\n\n" .
799
-                            "namespace {\n\n";
800
-
801
-                $epilogue = "\n\n}";
802
-            }
803
-
804
-            $mockedCloneMethod = true;
805
-        } else {
806
-            try {
807
-                $class = new ReflectionClass($_mockClassName['fullClassName']);
808
-                // @codeCoverageIgnoreStart
809
-            } catch (\ReflectionException $e) {
810
-                throw new ReflectionException(
811
-                    $e->getMessage(),
812
-                    (int) $e->getCode(),
813
-                    $e
814
-                );
815
-            }
816
-            // @codeCoverageIgnoreEnd
817
-
818
-            if ($class->isFinal()) {
819
-                throw new ClassIsFinalException($_mockClassName['fullClassName']);
820
-            }
821
-
822
-            // @see https://github.com/sebastianbergmann/phpunit/issues/2995
823
-            if ($isInterface && $class->implementsInterface(Throwable::class)) {
824
-                $actualClassName        = Exception::class;
825
-                $additionalInterfaces[] = $class->getName();
826
-                $isInterface            = false;
827
-
828
-                try {
829
-                    $class = new ReflectionClass($actualClassName);
830
-                    // @codeCoverageIgnoreStart
831
-                } catch (\ReflectionException $e) {
832
-                    throw new ReflectionException(
833
-                        $e->getMessage(),
834
-                        (int) $e->getCode(),
835
-                        $e
836
-                    );
837
-                }
838
-                // @codeCoverageIgnoreEnd
839
-
840
-                foreach ($this->userDefinedInterfaceMethods($_mockClassName['fullClassName']) as $method) {
841
-                    $methodName = $method->getName();
842
-
843
-                    if ($class->hasMethod($methodName)) {
844
-                        try {
845
-                            $classMethod = $class->getMethod($methodName);
846
-                            // @codeCoverageIgnoreStart
847
-                        } catch (\ReflectionException $e) {
848
-                            throw new ReflectionException(
849
-                                $e->getMessage(),
850
-                                (int) $e->getCode(),
851
-                                $e
852
-                            );
853
-                        }
854
-                        // @codeCoverageIgnoreEnd
855
-
856
-                        if (!$this->canMockMethod($classMethod)) {
857
-                            continue;
858
-                        }
859
-                    }
860
-
861
-                    $mockMethods->addMethods(
862
-                        MockMethod::fromReflection($method, $callOriginalMethods, $cloneArguments)
863
-                    );
864
-                }
865
-
866
-                $_mockClassName = $this->generateClassName(
867
-                    $actualClassName,
868
-                    $_mockClassName['className'],
869
-                    'Mock_'
870
-                );
871
-            }
872
-
873
-            // @see https://github.com/sebastianbergmann/phpunit-mock-objects/issues/103
874
-            if ($isInterface && $class->implementsInterface(Traversable::class) &&
875
-                !$class->implementsInterface(Iterator::class) &&
876
-                !$class->implementsInterface(IteratorAggregate::class)) {
877
-                $additionalInterfaces[] = Iterator::class;
878
-
879
-                $mockMethods->addMethods(
880
-                    ...$this->mockClassMethods(Iterator::class, $callOriginalMethods, $cloneArguments)
881
-                );
882
-            }
883
-
884
-            if ($class->hasMethod('__clone')) {
885
-                try {
886
-                    $cloneMethod = $class->getMethod('__clone');
887
-                    // @codeCoverageIgnoreStart
888
-                } catch (\ReflectionException $e) {
889
-                    throw new ReflectionException(
890
-                        $e->getMessage(),
891
-                        (int) $e->getCode(),
892
-                        $e
893
-                    );
894
-                }
895
-                // @codeCoverageIgnoreEnd
896
-
897
-                if (!$cloneMethod->isFinal()) {
898
-                    if ($callOriginalClone && !$isInterface) {
899
-                        $unmockedCloneMethod = true;
900
-                    } else {
901
-                        $mockedCloneMethod = true;
902
-                    }
903
-                }
904
-            } else {
905
-                $mockedCloneMethod = true;
906
-            }
907
-        }
908
-
909
-        if ($isClass && $explicitMethods === []) {
910
-            $mockMethods->addMethods(
911
-                ...$this->mockClassMethods($_mockClassName['fullClassName'], $callOriginalMethods, $cloneArguments)
912
-            );
913
-        }
914
-
915
-        if ($isInterface && ($explicitMethods === [] || $explicitMethods === null)) {
916
-            $mockMethods->addMethods(
917
-                ...$this->mockInterfaceMethods($_mockClassName['fullClassName'], $cloneArguments)
918
-            );
919
-        }
920
-
921
-        if (is_array($explicitMethods)) {
922
-            foreach ($explicitMethods as $methodName) {
923
-                if ($class !== null && $class->hasMethod($methodName)) {
924
-                    try {
925
-                        $method = $class->getMethod($methodName);
926
-                        // @codeCoverageIgnoreStart
927
-                    } catch (\ReflectionException $e) {
928
-                        throw new ReflectionException(
929
-                            $e->getMessage(),
930
-                            (int) $e->getCode(),
931
-                            $e
932
-                        );
933
-                    }
934
-                    // @codeCoverageIgnoreEnd
935
-
936
-                    if ($this->canMockMethod($method)) {
937
-                        $mockMethods->addMethods(
938
-                            MockMethod::fromReflection($method, $callOriginalMethods, $cloneArguments)
939
-                        );
940
-                    }
941
-                } else {
942
-                    $mockMethods->addMethods(
943
-                        MockMethod::fromName(
944
-                            $_mockClassName['fullClassName'],
945
-                            $methodName,
946
-                            $cloneArguments
947
-                        )
948
-                    );
949
-                }
950
-            }
951
-        }
952
-
953
-        $mockedMethods = '';
954
-        $configurable  = [];
955
-
956
-        foreach ($mockMethods->asArray() as $mockMethod) {
957
-            $mockedMethods .= $mockMethod->generateCode();
958
-            $configurable[] = new ConfigurableMethod($mockMethod->getName(), $mockMethod->getReturnType());
959
-        }
960
-
961
-        $method = '';
962
-
963
-        if (!$mockMethods->hasMethod('method') && (!isset($class) || !$class->hasMethod('method'))) {
964
-            $method = PHP_EOL . '    use \PHPUnit\Framework\MockObject\Method;';
965
-        }
966
-
967
-        $cloneTrait = '';
968
-
969
-        if ($mockedCloneMethod) {
970
-            $cloneTrait = $this->mockedCloneMethod();
971
-        }
972
-
973
-        if ($unmockedCloneMethod) {
974
-            $cloneTrait = $this->unmockedCloneMethod();
975
-        }
976
-
977
-        $classTemplate->setVar(
978
-            [
979
-                'prologue'          => $prologue ?? '',
980
-                'epilogue'          => $epilogue ?? '',
981
-                'class_declaration' => $this->generateMockClassDeclaration(
982
-                    $_mockClassName,
983
-                    $isInterface,
984
-                    $additionalInterfaces
985
-                ),
986
-                'clone'           => $cloneTrait,
987
-                'mock_class_name' => $_mockClassName['className'],
988
-                'mocked_methods'  => $mockedMethods,
989
-                'method'          => $method,
990
-            ]
991
-        );
992
-
993
-        return new MockClass(
994
-            $classTemplate->render(),
995
-            $_mockClassName['className'],
996
-            $configurable
997
-        );
998
-    }
999
-
1000
-    private function generateClassName(string $type, string $className, string $prefix): array
1001
-    {
1002
-        if ($type[0] === '\\') {
1003
-            $type = substr($type, 1);
1004
-        }
1005
-
1006
-        $classNameParts = explode('\\', $type);
1007
-
1008
-        if (count($classNameParts) > 1) {
1009
-            $type          = array_pop($classNameParts);
1010
-            $namespaceName = implode('\\', $classNameParts);
1011
-            $fullClassName = $namespaceName . '\\' . $type;
1012
-        } else {
1013
-            $namespaceName = '';
1014
-            $fullClassName = $type;
1015
-        }
1016
-
1017
-        if ($className === '') {
1018
-            do {
1019
-                $className = $prefix . $type . '_' .
1020
-                             substr(md5((string) mt_rand()), 0, 8);
1021
-            } while (class_exists($className, false));
1022
-        }
1023
-
1024
-        return [
1025
-            'className'         => $className,
1026
-            'originalClassName' => $type,
1027
-            'fullClassName'     => $fullClassName,
1028
-            'namespaceName'     => $namespaceName,
1029
-        ];
1030
-    }
1031
-
1032
-    private function generateMockClassDeclaration(array $mockClassName, bool $isInterface, array $additionalInterfaces = []): string
1033
-    {
1034
-        $buffer = 'class ';
1035
-
1036
-        $additionalInterfaces[] = MockObject::class;
1037
-        $interfaces             = implode(', ', $additionalInterfaces);
1038
-
1039
-        if ($isInterface) {
1040
-            $buffer .= sprintf(
1041
-                '%s implements %s',
1042
-                $mockClassName['className'],
1043
-                $interfaces
1044
-            );
1045
-
1046
-            if (!in_array($mockClassName['originalClassName'], $additionalInterfaces, true)) {
1047
-                $buffer .= ', ';
1048
-
1049
-                if (!empty($mockClassName['namespaceName'])) {
1050
-                    $buffer .= $mockClassName['namespaceName'] . '\\';
1051
-                }
1052
-
1053
-                $buffer .= $mockClassName['originalClassName'];
1054
-            }
1055
-        } else {
1056
-            $buffer .= sprintf(
1057
-                '%s extends %s%s implements %s',
1058
-                $mockClassName['className'],
1059
-                !empty($mockClassName['namespaceName']) ? $mockClassName['namespaceName'] . '\\' : '',
1060
-                $mockClassName['originalClassName'],
1061
-                $interfaces
1062
-            );
1063
-        }
1064
-
1065
-        return $buffer;
1066
-    }
1067
-
1068
-    private function canMockMethod(ReflectionMethod $method): bool
1069
-    {
1070
-        return !($this->isConstructor($method) || $method->isFinal() || $method->isPrivate() || $this->isMethodNameExcluded($method->getName()));
1071
-    }
1072
-
1073
-    private function isMethodNameExcluded(string $name): bool
1074
-    {
1075
-        return isset(self::EXCLUDED_METHOD_NAMES[$name]);
1076
-    }
1077
-
1078
-    /**
1079
-     * @throws RuntimeException
1080
-     */
1081
-    private function getTemplate(string $template): Template
1082
-    {
1083
-        $filename = __DIR__ . DIRECTORY_SEPARATOR . 'Generator' . DIRECTORY_SEPARATOR . $template;
1084
-
1085
-        if (!isset(self::$templates[$filename])) {
1086
-            try {
1087
-                self::$templates[$filename] = new Template($filename);
1088
-            } catch (TemplateException $e) {
1089
-                throw new RuntimeException(
1090
-                    $e->getMessage(),
1091
-                    (int) $e->getCode(),
1092
-                    $e
1093
-                );
1094
-            }
1095
-        }
1096
-
1097
-        return self::$templates[$filename];
1098
-    }
1099
-
1100
-    /**
1101
-     * @see https://github.com/sebastianbergmann/phpunit/issues/4139#issuecomment-605409765
1102
-     */
1103
-    private function isConstructor(ReflectionMethod $method): bool
1104
-    {
1105
-        $methodName = strtolower($method->getName());
1106
-
1107
-        if ($methodName === '__construct') {
1108
-            return true;
1109
-        }
1110
-
1111
-        if (PHP_MAJOR_VERSION >= 8) {
1112
-            return false;
1113
-        }
1114
-
1115
-        $className = strtolower($method->getDeclaringClass()->getName());
1116
-
1117
-        return $methodName === $className;
1118
-    }
1119
-
1120
-    private function mockedCloneMethod(): string
1121
-    {
1122
-        if (PHP_MAJOR_VERSION >= 8) {
1123
-            if (!trait_exists('\PHPUnit\Framework\MockObject\MockedCloneMethodWithVoidReturnType')) {
1124
-                eval(self::MOCKED_CLONE_METHOD_WITH_VOID_RETURN_TYPE_TRAIT);
1125
-            }
1126
-
1127
-            return PHP_EOL . '    use \PHPUnit\Framework\MockObject\MockedCloneMethodWithVoidReturnType;';
1128
-        }
1129
-
1130
-        if (!trait_exists('\PHPUnit\Framework\MockObject\MockedCloneMethodWithoutReturnType')) {
1131
-            eval(self::MOCKED_CLONE_METHOD_WITHOUT_RETURN_TYPE_TRAIT);
1132
-        }
1133
-
1134
-        return PHP_EOL . '    use \PHPUnit\Framework\MockObject\MockedCloneMethodWithoutReturnType;';
1135
-    }
1136
-
1137
-    private function unmockedCloneMethod(): string
1138
-    {
1139
-        if (PHP_MAJOR_VERSION >= 8) {
1140
-            if (!trait_exists('\PHPUnit\Framework\MockObject\UnmockedCloneMethodWithVoidReturnType')) {
1141
-                eval(self::UNMOCKED_CLONE_METHOD_WITH_VOID_RETURN_TYPE_TRAIT);
1142
-            }
1143
-
1144
-            return PHP_EOL . '    use \PHPUnit\Framework\MockObject\UnmockedCloneMethodWithVoidReturnType;';
1145
-        }
1146
-
1147
-        if (!trait_exists('\PHPUnit\Framework\MockObject\UnmockedCloneMethodWithoutReturnType')) {
1148
-            eval(self::UNMOCKED_CLONE_METHOD_WITHOUT_RETURN_TYPE_TRAIT);
1149
-        }
1150
-
1151
-        return PHP_EOL . '    use \PHPUnit\Framework\MockObject\UnmockedCloneMethodWithoutReturnType;';
1152
-    }
115
+	/**
116
+	 * @var array
117
+	 */
118
+	private const EXCLUDED_METHOD_NAMES = [
119
+		'__CLASS__'       => true,
120
+		'__DIR__'         => true,
121
+		'__FILE__'        => true,
122
+		'__FUNCTION__'    => true,
123
+		'__LINE__'        => true,
124
+		'__METHOD__'      => true,
125
+		'__NAMESPACE__'   => true,
126
+		'__TRAIT__'       => true,
127
+		'__clone'         => true,
128
+		'__halt_compiler' => true,
129
+	];
130
+
131
+	/**
132
+	 * @var array
133
+	 */
134
+	private static $cache = [];
135
+
136
+	/**
137
+	 * @var Template[]
138
+	 */
139
+	private static $templates = [];
140
+
141
+	/**
142
+	 * Returns a mock object for the specified class.
143
+	 *
144
+	 * @param null|array $methods
145
+	 *
146
+	 * @throws \PHPUnit\Framework\InvalidArgumentException
147
+	 * @throws ClassAlreadyExistsException
148
+	 * @throws ClassIsFinalException
149
+	 * @throws DuplicateMethodException
150
+	 * @throws InvalidMethodNameException
151
+	 * @throws OriginalConstructorInvocationRequiredException
152
+	 * @throws ReflectionException
153
+	 * @throws RuntimeException
154
+	 * @throws UnknownTypeException
155
+	 */
156
+	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): MockObject
157
+	{
158
+		if (!is_array($methods) && null !== $methods) {
159
+			throw InvalidArgumentException::create(2, 'array');
160
+		}
161
+
162
+		if ($type === 'Traversable' || $type === '\\Traversable') {
163
+			$type = 'Iterator';
164
+		}
165
+
166
+		if (!$allowMockingUnknownTypes && !class_exists($type, $callAutoload) && !interface_exists($type, $callAutoload)) {
167
+			throw new UnknownTypeException($type);
168
+		}
169
+
170
+		if (null !== $methods) {
171
+			foreach ($methods as $method) {
172
+				if (!preg_match('~[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*~', (string) $method)) {
173
+					throw new InvalidMethodNameException((string) $method);
174
+				}
175
+			}
176
+
177
+			if ($methods !== array_unique($methods)) {
178
+				throw new DuplicateMethodException($methods);
179
+			}
180
+		}
181
+
182
+		if ($mockClassName !== '' && class_exists($mockClassName, false)) {
183
+			try {
184
+				$reflector = new ReflectionClass($mockClassName);
185
+				// @codeCoverageIgnoreStart
186
+			} catch (\ReflectionException $e) {
187
+				throw new ReflectionException(
188
+					$e->getMessage(),
189
+					(int) $e->getCode(),
190
+					$e
191
+				);
192
+			}
193
+			// @codeCoverageIgnoreEnd
194
+
195
+			if (!$reflector->implementsInterface(MockObject::class)) {
196
+				throw new ClassAlreadyExistsException($mockClassName);
197
+			}
198
+		}
199
+
200
+		if (!$callOriginalConstructor && $callOriginalMethods) {
201
+			throw new OriginalConstructorInvocationRequiredException;
202
+		}
203
+
204
+		$mock = $this->generate(
205
+			$type,
206
+			$methods,
207
+			$mockClassName,
208
+			$callOriginalClone,
209
+			$callAutoload,
210
+			$cloneArguments,
211
+			$callOriginalMethods
212
+		);
213
+
214
+		return $this->getObject(
215
+			$mock,
216
+			$type,
217
+			$callOriginalConstructor,
218
+			$callAutoload,
219
+			$arguments,
220
+			$callOriginalMethods,
221
+			$proxyTarget,
222
+			$returnValueGeneration
223
+		);
224
+	}
225
+
226
+	/**
227
+	 * @psalm-param list<class-string> $interfaces
228
+	 *
229
+	 * @throws RuntimeException
230
+	 * @throws UnknownTypeException
231
+	 */
232
+	public function getMockForInterfaces(array $interfaces, bool $callAutoload = true): MockObject
233
+	{
234
+		if (count($interfaces) < 2) {
235
+			throw new RuntimeException('At least two interfaces must be specified');
236
+		}
237
+
238
+		foreach ($interfaces as $interface) {
239
+			if (!interface_exists($interface, $callAutoload)) {
240
+				throw new UnknownTypeException($interface);
241
+			}
242
+		}
243
+
244
+		sort($interfaces);
245
+
246
+		$methods = [];
247
+
248
+		foreach ($interfaces as $interface) {
249
+			$methods = array_merge($methods, $this->getClassMethods($interface));
250
+		}
251
+
252
+		if (count(array_unique($methods)) < count($methods)) {
253
+			throw new RuntimeException('Interfaces must not declare the same method');
254
+		}
255
+
256
+		$unqualifiedNames = [];
257
+
258
+		foreach ($interfaces as $interface) {
259
+			$parts              = explode('\\', $interface);
260
+			$unqualifiedNames[] = array_pop($parts);
261
+		}
262
+
263
+		sort($unqualifiedNames);
264
+
265
+		do {
266
+			$intersectionName = sprintf(
267
+				'Intersection_%s_%s',
268
+				implode('_', $unqualifiedNames),
269
+				substr(md5((string) mt_rand()), 0, 8)
270
+			);
271
+		} while (interface_exists($intersectionName, false));
272
+
273
+		$template = $this->getTemplate('intersection.tpl');
274
+
275
+		$template->setVar(
276
+			[
277
+				'intersection' => $intersectionName,
278
+				'interfaces'   => implode(', ', $interfaces),
279
+			]
280
+		);
281
+
282
+		eval($template->render());
283
+
284
+		return $this->getMock($intersectionName);
285
+	}
286
+
287
+	/**
288
+	 * Returns a mock object for the specified abstract class with all abstract
289
+	 * methods of the class mocked.
290
+	 *
291
+	 * Concrete methods to mock can be specified with the $mockedMethods parameter.
292
+	 *
293
+	 * @psalm-template RealInstanceType of object
294
+	 *
295
+	 * @psalm-param class-string<RealInstanceType> $originalClassName
296
+	 *
297
+	 * @psalm-return MockObject&RealInstanceType
298
+	 *
299
+	 * @throws \PHPUnit\Framework\InvalidArgumentException
300
+	 * @throws ClassAlreadyExistsException
301
+	 * @throws ClassIsFinalException
302
+	 * @throws DuplicateMethodException
303
+	 * @throws InvalidMethodNameException
304
+	 * @throws OriginalConstructorInvocationRequiredException
305
+	 * @throws ReflectionException
306
+	 * @throws RuntimeException
307
+	 * @throws UnknownClassException
308
+	 * @throws UnknownTypeException
309
+	 */
310
+	public function getMockForAbstractClass(string $originalClassName, array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, array $mockedMethods = null, bool $cloneArguments = true): MockObject
311
+	{
312
+		if (class_exists($originalClassName, $callAutoload) ||
313
+			interface_exists($originalClassName, $callAutoload)) {
314
+			try {
315
+				$reflector = new ReflectionClass($originalClassName);
316
+				// @codeCoverageIgnoreStart
317
+			} catch (\ReflectionException $e) {
318
+				throw new ReflectionException(
319
+					$e->getMessage(),
320
+					(int) $e->getCode(),
321
+					$e
322
+				);
323
+			}
324
+			// @codeCoverageIgnoreEnd
325
+
326
+			$methods = $mockedMethods;
327
+
328
+			foreach ($reflector->getMethods() as $method) {
329
+				if ($method->isAbstract() && !in_array($method->getName(), $methods ?? [], true)) {
330
+					$methods[] = $method->getName();
331
+				}
332
+			}
333
+
334
+			if (empty($methods)) {
335
+				$methods = null;
336
+			}
337
+
338
+			return $this->getMock(
339
+				$originalClassName,
340
+				$methods,
341
+				$arguments,
342
+				$mockClassName,
343
+				$callOriginalConstructor,
344
+				$callOriginalClone,
345
+				$callAutoload,
346
+				$cloneArguments
347
+			);
348
+		}
349
+
350
+		throw new UnknownClassException($originalClassName);
351
+	}
352
+
353
+	/**
354
+	 * Returns a mock object for the specified trait with all abstract methods
355
+	 * of the trait mocked. Concrete methods to mock can be specified with the
356
+	 * `$mockedMethods` parameter.
357
+	 *
358
+	 * @psalm-param trait-string $traitName
359
+	 *
360
+	 * @throws \PHPUnit\Framework\InvalidArgumentException
361
+	 * @throws ClassAlreadyExistsException
362
+	 * @throws ClassIsFinalException
363
+	 * @throws DuplicateMethodException
364
+	 * @throws InvalidMethodNameException
365
+	 * @throws OriginalConstructorInvocationRequiredException
366
+	 * @throws ReflectionException
367
+	 * @throws RuntimeException
368
+	 * @throws UnknownClassException
369
+	 * @throws UnknownTraitException
370
+	 * @throws UnknownTypeException
371
+	 */
372
+	public function getMockForTrait(string $traitName, array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, array $mockedMethods = null, bool $cloneArguments = true): MockObject
373
+	{
374
+		if (!trait_exists($traitName, $callAutoload)) {
375
+			throw new UnknownTraitException($traitName);
376
+		}
377
+
378
+		$className = $this->generateClassName(
379
+			$traitName,
380
+			'',
381
+			'Trait_'
382
+		);
383
+
384
+		$classTemplate = $this->getTemplate('trait_class.tpl');
385
+
386
+		$classTemplate->setVar(
387
+			[
388
+				'prologue'   => 'abstract ',
389
+				'class_name' => $className['className'],
390
+				'trait_name' => $traitName,
391
+			]
392
+		);
393
+
394
+		$mockTrait = new MockTrait($classTemplate->render(), $className['className']);
395
+		$mockTrait->generate();
396
+
397
+		return $this->getMockForAbstractClass($className['className'], $arguments, $mockClassName, $callOriginalConstructor, $callOriginalClone, $callAutoload, $mockedMethods, $cloneArguments);
398
+	}
399
+
400
+	/**
401
+	 * Returns an object for the specified trait.
402
+	 *
403
+	 * @psalm-param trait-string $traitName
404
+	 *
405
+	 * @throws ReflectionException
406
+	 * @throws RuntimeException
407
+	 * @throws UnknownTraitException
408
+	 */
409
+	public function getObjectForTrait(string $traitName, string $traitClassName = '', bool $callAutoload = true, bool $callOriginalConstructor = false, array $arguments = []): object
410
+	{
411
+		if (!trait_exists($traitName, $callAutoload)) {
412
+			throw new UnknownTraitException($traitName);
413
+		}
414
+
415
+		$className = $this->generateClassName(
416
+			$traitName,
417
+			$traitClassName,
418
+			'Trait_'
419
+		);
420
+
421
+		$classTemplate = $this->getTemplate('trait_class.tpl');
422
+
423
+		$classTemplate->setVar(
424
+			[
425
+				'prologue'   => '',
426
+				'class_name' => $className['className'],
427
+				'trait_name' => $traitName,
428
+			]
429
+		);
430
+
431
+		return $this->getObject(
432
+			new MockTrait(
433
+				$classTemplate->render(),
434
+				$className['className']
435
+			),
436
+			'',
437
+			$callOriginalConstructor,
438
+			$callAutoload,
439
+			$arguments
440
+		);
441
+	}
442
+
443
+	/**
444
+	 * @throws ClassIsFinalException
445
+	 * @throws ReflectionException
446
+	 * @throws RuntimeException
447
+	 */
448
+	public function generate(string $type, array $methods = null, string $mockClassName = '', bool $callOriginalClone = true, bool $callAutoload = true, bool $cloneArguments = true, bool $callOriginalMethods = false): MockClass
449
+	{
450
+		if ($mockClassName !== '') {
451
+			return $this->generateMock(
452
+				$type,
453
+				$methods,
454
+				$mockClassName,
455
+				$callOriginalClone,
456
+				$callAutoload,
457
+				$cloneArguments,
458
+				$callOriginalMethods
459
+			);
460
+		}
461
+
462
+		$key = md5(
463
+			$type .
464
+			serialize($methods) .
465
+			serialize($callOriginalClone) .
466
+			serialize($cloneArguments) .
467
+			serialize($callOriginalMethods)
468
+		);
469
+
470
+		if (!isset(self::$cache[$key])) {
471
+			self::$cache[$key] = $this->generateMock(
472
+				$type,
473
+				$methods,
474
+				$mockClassName,
475
+				$callOriginalClone,
476
+				$callAutoload,
477
+				$cloneArguments,
478
+				$callOriginalMethods
479
+			);
480
+		}
481
+
482
+		return self::$cache[$key];
483
+	}
484
+
485
+	/**
486
+	 * @throws RuntimeException
487
+	 * @throws SoapExtensionNotAvailableException
488
+	 */
489
+	public function generateClassFromWsdl(string $wsdlFile, string $className, array $methods = [], array $options = []): string
490
+	{
491
+		if (!extension_loaded('soap')) {
492
+			throw new SoapExtensionNotAvailableException;
493
+		}
494
+
495
+		$options = array_merge($options, ['cache_wsdl' => WSDL_CACHE_NONE]);
496
+
497
+		try {
498
+			$client   = new SoapClient($wsdlFile, $options);
499
+			$_methods = array_unique($client->__getFunctions());
500
+			unset($client);
501
+		} catch (SoapFault $e) {
502
+			throw new RuntimeException(
503
+				$e->getMessage(),
504
+				(int) $e->getCode(),
505
+				$e
506
+			);
507
+		}
508
+
509
+		sort($_methods);
510
+
511
+		$methodTemplate = $this->getTemplate('wsdl_method.tpl');
512
+		$methodsBuffer  = '';
513
+
514
+		foreach ($_methods as $method) {
515
+			preg_match_all('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\(/', $method, $matches, PREG_OFFSET_CAPTURE);
516
+			$lastFunction = array_pop($matches[0]);
517
+			$nameStart    = $lastFunction[1];
518
+			$nameEnd      = $nameStart + strlen($lastFunction[0]) - 1;
519
+			$name         = str_replace('(', '', $lastFunction[0]);
520
+
521
+			if (empty($methods) || in_array($name, $methods, true)) {
522
+				$args = explode(
523
+					',',
524
+					str_replace(')', '', substr($method, $nameEnd + 1))
525
+				);
526
+
527
+				foreach (range(0, count($args) - 1) as $i) {
528
+					$parameterStart = strpos($args[$i], '$');
529
+
530
+					if (!$parameterStart) {
531
+						continue;
532
+					}
533
+
534
+					$args[$i] = substr($args[$i], $parameterStart);
535
+				}
536
+
537
+				$methodTemplate->setVar(
538
+					[
539
+						'method_name' => $name,
540
+						'arguments'   => implode(', ', $args),
541
+					]
542
+				);
543
+
544
+				$methodsBuffer .= $methodTemplate->render();
545
+			}
546
+		}
547
+
548
+		$optionsBuffer = '[';
549
+
550
+		foreach ($options as $key => $value) {
551
+			$optionsBuffer .= $key . ' => ' . $value;
552
+		}
553
+
554
+		$optionsBuffer .= ']';
555
+
556
+		$classTemplate = $this->getTemplate('wsdl_class.tpl');
557
+		$namespace     = '';
558
+
559
+		if (strpos($className, '\\') !== false) {
560
+			$parts     = explode('\\', $className);
561
+			$className = array_pop($parts);
562
+			$namespace = 'namespace ' . implode('\\', $parts) . ';' . "\n\n";
563
+		}
564
+
565
+		$classTemplate->setVar(
566
+			[
567
+				'namespace'  => $namespace,
568
+				'class_name' => $className,
569
+				'wsdl'       => $wsdlFile,
570
+				'options'    => $optionsBuffer,
571
+				'methods'    => $methodsBuffer,
572
+			]
573
+		);
574
+
575
+		return $classTemplate->render();
576
+	}
577
+
578
+	/**
579
+	 * @throws ReflectionException
580
+	 *
581
+	 * @return string[]
582
+	 */
583
+	public function getClassMethods(string $className): array
584
+	{
585
+		try {
586
+			$class = new ReflectionClass($className);
587
+			// @codeCoverageIgnoreStart
588
+		} catch (\ReflectionException $e) {
589
+			throw new ReflectionException(
590
+				$e->getMessage(),
591
+				(int) $e->getCode(),
592
+				$e
593
+			);
594
+		}
595
+		// @codeCoverageIgnoreEnd
596
+
597
+		$methods = [];
598
+
599
+		foreach ($class->getMethods() as $method) {
600
+			if ($method->isPublic() || $method->isAbstract()) {
601
+				$methods[] = $method->getName();
602
+			}
603
+		}
604
+
605
+		return $methods;
606
+	}
607
+
608
+	/**
609
+	 * @throws ReflectionException
610
+	 *
611
+	 * @return MockMethod[]
612
+	 */
613
+	public function mockClassMethods(string $className, bool $callOriginalMethods, bool $cloneArguments): array
614
+	{
615
+		try {
616
+			$class = new ReflectionClass($className);
617
+			// @codeCoverageIgnoreStart
618
+		} catch (\ReflectionException $e) {
619
+			throw new ReflectionException(
620
+				$e->getMessage(),
621
+				(int) $e->getCode(),
622
+				$e
623
+			);
624
+		}
625
+		// @codeCoverageIgnoreEnd
626
+
627
+		$methods = [];
628
+
629
+		foreach ($class->getMethods() as $method) {
630
+			if (($method->isPublic() || $method->isAbstract()) && $this->canMockMethod($method)) {
631
+				$methods[] = MockMethod::fromReflection($method, $callOriginalMethods, $cloneArguments);
632
+			}
633
+		}
634
+
635
+		return $methods;
636
+	}
637
+
638
+	/**
639
+	 * @throws ReflectionException
640
+	 *
641
+	 * @return MockMethod[]
642
+	 */
643
+	public function mockInterfaceMethods(string $interfaceName, bool $cloneArguments): array
644
+	{
645
+		try {
646
+			$class = new ReflectionClass($interfaceName);
647
+			// @codeCoverageIgnoreStart
648
+		} catch (\ReflectionException $e) {
649
+			throw new ReflectionException(
650
+				$e->getMessage(),
651
+				(int) $e->getCode(),
652
+				$e
653
+			);
654
+		}
655
+		// @codeCoverageIgnoreEnd
656
+
657
+		$methods = [];
658
+
659
+		foreach ($class->getMethods() as $method) {
660
+			$methods[] = MockMethod::fromReflection($method, false, $cloneArguments);
661
+		}
662
+
663
+		return $methods;
664
+	}
665
+
666
+	/**
667
+	 * @psalm-param class-string $interfaceName
668
+	 *
669
+	 * @throws ReflectionException
670
+	 *
671
+	 * @return ReflectionMethod[]
672
+	 */
673
+	private function userDefinedInterfaceMethods(string $interfaceName): array
674
+	{
675
+		try {
676
+			// @codeCoverageIgnoreStart
677
+			$interface = new ReflectionClass($interfaceName);
678
+		} catch (\ReflectionException $e) {
679
+			throw new ReflectionException(
680
+				$e->getMessage(),
681
+				(int) $e->getCode(),
682
+				$e
683
+			);
684
+		}
685
+		// @codeCoverageIgnoreEnd
686
+
687
+		$methods = [];
688
+
689
+		foreach ($interface->getMethods() as $method) {
690
+			if (!$method->isUserDefined()) {
691
+				continue;
692
+			}
693
+
694
+			$methods[] = $method;
695
+		}
696
+
697
+		return $methods;
698
+	}
699
+
700
+	/**
701
+	 * @throws ReflectionException
702
+	 * @throws RuntimeException
703
+	 */
704
+	private function getObject(MockType $mockClass, $type = '', bool $callOriginalConstructor = false, bool $callAutoload = false, array $arguments = [], bool $callOriginalMethods = false, object $proxyTarget = null, bool $returnValueGeneration = true)
705
+	{
706
+		$className = $mockClass->generate();
707
+
708
+		if ($callOriginalConstructor) {
709
+			if (count($arguments) === 0) {
710
+				$object = new $className;
711
+			} else {
712
+				try {
713
+					$class = new ReflectionClass($className);
714
+					// @codeCoverageIgnoreStart
715
+				} catch (\ReflectionException $e) {
716
+					throw new ReflectionException(
717
+						$e->getMessage(),
718
+						(int) $e->getCode(),
719
+						$e
720
+					);
721
+				}
722
+				// @codeCoverageIgnoreEnd
723
+
724
+				$object = $class->newInstanceArgs($arguments);
725
+			}
726
+		} else {
727
+			try {
728
+				$object = (new Instantiator)->instantiate($className);
729
+			} catch (InstantiatorException $e) {
730
+				throw new RuntimeException($e->getMessage());
731
+			}
732
+		}
733
+
734
+		if ($callOriginalMethods) {
735
+			if (!is_object($proxyTarget)) {
736
+				if (count($arguments) === 0) {
737
+					$proxyTarget = new $type;
738
+				} else {
739
+					try {
740
+						$class = new ReflectionClass($type);
741
+						// @codeCoverageIgnoreStart
742
+					} catch (\ReflectionException $e) {
743
+						throw new ReflectionException(
744
+							$e->getMessage(),
745
+							(int) $e->getCode(),
746
+							$e
747
+						);
748
+					}
749
+					// @codeCoverageIgnoreEnd
750
+
751
+					$proxyTarget = $class->newInstanceArgs($arguments);
752
+				}
753
+			}
754
+
755
+			$object->__phpunit_setOriginalObject($proxyTarget);
756
+		}
757
+
758
+		if ($object instanceof MockObject) {
759
+			$object->__phpunit_setReturnValueGeneration($returnValueGeneration);
760
+		}
761
+
762
+		return $object;
763
+	}
764
+
765
+	/**
766
+	 * @throws ClassIsFinalException
767
+	 * @throws ReflectionException
768
+	 * @throws RuntimeException
769
+	 */
770
+	private function generateMock(string $type, ?array $explicitMethods, string $mockClassName, bool $callOriginalClone, bool $callAutoload, bool $cloneArguments, bool $callOriginalMethods): MockClass
771
+	{
772
+		$classTemplate        = $this->getTemplate('mocked_class.tpl');
773
+		$additionalInterfaces = [];
774
+		$mockedCloneMethod    = false;
775
+		$unmockedCloneMethod  = false;
776
+		$isClass              = false;
777
+		$isInterface          = false;
778
+		$class                = null;
779
+		$mockMethods          = new MockMethodSet;
780
+
781
+		$_mockClassName = $this->generateClassName(
782
+			$type,
783
+			$mockClassName,
784
+			'Mock_'
785
+		);
786
+
787
+		if (class_exists($_mockClassName['fullClassName'], $callAutoload)) {
788
+			$isClass = true;
789
+		} elseif (interface_exists($_mockClassName['fullClassName'], $callAutoload)) {
790
+			$isInterface = true;
791
+		}
792
+
793
+		if (!$isClass && !$isInterface) {
794
+			$prologue = 'class ' . $_mockClassName['originalClassName'] . "\n{\n}\n\n";
795
+
796
+			if (!empty($_mockClassName['namespaceName'])) {
797
+				$prologue = 'namespace ' . $_mockClassName['namespaceName'] .
798
+							" {\n\n" . $prologue . "}\n\n" .
799
+							"namespace {\n\n";
800
+
801
+				$epilogue = "\n\n}";
802
+			}
803
+
804
+			$mockedCloneMethod = true;
805
+		} else {
806
+			try {
807
+				$class = new ReflectionClass($_mockClassName['fullClassName']);
808
+				// @codeCoverageIgnoreStart
809
+			} catch (\ReflectionException $e) {
810
+				throw new ReflectionException(
811
+					$e->getMessage(),
812
+					(int) $e->getCode(),
813
+					$e
814
+				);
815
+			}
816
+			// @codeCoverageIgnoreEnd
817
+
818
+			if ($class->isFinal()) {
819
+				throw new ClassIsFinalException($_mockClassName['fullClassName']);
820
+			}
821
+
822
+			// @see https://github.com/sebastianbergmann/phpunit/issues/2995
823
+			if ($isInterface && $class->implementsInterface(Throwable::class)) {
824
+				$actualClassName        = Exception::class;
825
+				$additionalInterfaces[] = $class->getName();
826
+				$isInterface            = false;
827
+
828
+				try {
829
+					$class = new ReflectionClass($actualClassName);
830
+					// @codeCoverageIgnoreStart
831
+				} catch (\ReflectionException $e) {
832
+					throw new ReflectionException(
833
+						$e->getMessage(),
834
+						(int) $e->getCode(),
835
+						$e
836
+					);
837
+				}
838
+				// @codeCoverageIgnoreEnd
839
+
840
+				foreach ($this->userDefinedInterfaceMethods($_mockClassName['fullClassName']) as $method) {
841
+					$methodName = $method->getName();
842
+
843
+					if ($class->hasMethod($methodName)) {
844
+						try {
845
+							$classMethod = $class->getMethod($methodName);
846
+							// @codeCoverageIgnoreStart
847
+						} catch (\ReflectionException $e) {
848
+							throw new ReflectionException(
849
+								$e->getMessage(),
850
+								(int) $e->getCode(),
851
+								$e
852
+							);
853
+						}
854
+						// @codeCoverageIgnoreEnd
855
+
856
+						if (!$this->canMockMethod($classMethod)) {
857
+							continue;
858
+						}
859
+					}
860
+
861
+					$mockMethods->addMethods(
862
+						MockMethod::fromReflection($method, $callOriginalMethods, $cloneArguments)
863
+					);
864
+				}
865
+
866
+				$_mockClassName = $this->generateClassName(
867
+					$actualClassName,
868
+					$_mockClassName['className'],
869
+					'Mock_'
870
+				);
871
+			}
872
+
873
+			// @see https://github.com/sebastianbergmann/phpunit-mock-objects/issues/103
874
+			if ($isInterface && $class->implementsInterface(Traversable::class) &&
875
+				!$class->implementsInterface(Iterator::class) &&
876
+				!$class->implementsInterface(IteratorAggregate::class)) {
877
+				$additionalInterfaces[] = Iterator::class;
878
+
879
+				$mockMethods->addMethods(
880
+					...$this->mockClassMethods(Iterator::class, $callOriginalMethods, $cloneArguments)
881
+				);
882
+			}
883
+
884
+			if ($class->hasMethod('__clone')) {
885
+				try {
886
+					$cloneMethod = $class->getMethod('__clone');
887
+					// @codeCoverageIgnoreStart
888
+				} catch (\ReflectionException $e) {
889
+					throw new ReflectionException(
890
+						$e->getMessage(),
891
+						(int) $e->getCode(),
892
+						$e
893
+					);
894
+				}
895
+				// @codeCoverageIgnoreEnd
896
+
897
+				if (!$cloneMethod->isFinal()) {
898
+					if ($callOriginalClone && !$isInterface) {
899
+						$unmockedCloneMethod = true;
900
+					} else {
901
+						$mockedCloneMethod = true;
902
+					}
903
+				}
904
+			} else {
905
+				$mockedCloneMethod = true;
906
+			}
907
+		}
908
+
909
+		if ($isClass && $explicitMethods === []) {
910
+			$mockMethods->addMethods(
911
+				...$this->mockClassMethods($_mockClassName['fullClassName'], $callOriginalMethods, $cloneArguments)
912
+			);
913
+		}
914
+
915
+		if ($isInterface && ($explicitMethods === [] || $explicitMethods === null)) {
916
+			$mockMethods->addMethods(
917
+				...$this->mockInterfaceMethods($_mockClassName['fullClassName'], $cloneArguments)
918
+			);
919
+		}
920
+
921
+		if (is_array($explicitMethods)) {
922
+			foreach ($explicitMethods as $methodName) {
923
+				if ($class !== null && $class->hasMethod($methodName)) {
924
+					try {
925
+						$method = $class->getMethod($methodName);
926
+						// @codeCoverageIgnoreStart
927
+					} catch (\ReflectionException $e) {
928
+						throw new ReflectionException(
929
+							$e->getMessage(),
930
+							(int) $e->getCode(),
931
+							$e
932
+						);
933
+					}
934
+					// @codeCoverageIgnoreEnd
935
+
936
+					if ($this->canMockMethod($method)) {
937
+						$mockMethods->addMethods(
938
+							MockMethod::fromReflection($method, $callOriginalMethods, $cloneArguments)
939
+						);
940
+					}
941
+				} else {
942
+					$mockMethods->addMethods(
943
+						MockMethod::fromName(
944
+							$_mockClassName['fullClassName'],
945
+							$methodName,
946
+							$cloneArguments
947
+						)
948
+					);
949
+				}
950
+			}
951
+		}
952
+
953
+		$mockedMethods = '';
954
+		$configurable  = [];
955
+
956
+		foreach ($mockMethods->asArray() as $mockMethod) {
957
+			$mockedMethods .= $mockMethod->generateCode();
958
+			$configurable[] = new ConfigurableMethod($mockMethod->getName(), $mockMethod->getReturnType());
959
+		}
960
+
961
+		$method = '';
962
+
963
+		if (!$mockMethods->hasMethod('method') && (!isset($class) || !$class->hasMethod('method'))) {
964
+			$method = PHP_EOL . '    use \PHPUnit\Framework\MockObject\Method;';
965
+		}
966
+
967
+		$cloneTrait = '';
968
+
969
+		if ($mockedCloneMethod) {
970
+			$cloneTrait = $this->mockedCloneMethod();
971
+		}
972
+
973
+		if ($unmockedCloneMethod) {
974
+			$cloneTrait = $this->unmockedCloneMethod();
975
+		}
976
+
977
+		$classTemplate->setVar(
978
+			[
979
+				'prologue'          => $prologue ?? '',
980
+				'epilogue'          => $epilogue ?? '',
981
+				'class_declaration' => $this->generateMockClassDeclaration(
982
+					$_mockClassName,
983
+					$isInterface,
984
+					$additionalInterfaces
985
+				),
986
+				'clone'           => $cloneTrait,
987
+				'mock_class_name' => $_mockClassName['className'],
988
+				'mocked_methods'  => $mockedMethods,
989
+				'method'          => $method,
990
+			]
991
+		);
992
+
993
+		return new MockClass(
994
+			$classTemplate->render(),
995
+			$_mockClassName['className'],
996
+			$configurable
997
+		);
998
+	}
999
+
1000
+	private function generateClassName(string $type, string $className, string $prefix): array
1001
+	{
1002
+		if ($type[0] === '\\') {
1003
+			$type = substr($type, 1);
1004
+		}
1005
+
1006
+		$classNameParts = explode('\\', $type);
1007
+
1008
+		if (count($classNameParts) > 1) {
1009
+			$type          = array_pop($classNameParts);
1010
+			$namespaceName = implode('\\', $classNameParts);
1011
+			$fullClassName = $namespaceName . '\\' . $type;
1012
+		} else {
1013
+			$namespaceName = '';
1014
+			$fullClassName = $type;
1015
+		}
1016
+
1017
+		if ($className === '') {
1018
+			do {
1019
+				$className = $prefix . $type . '_' .
1020
+							 substr(md5((string) mt_rand()), 0, 8);
1021
+			} while (class_exists($className, false));
1022
+		}
1023
+
1024
+		return [
1025
+			'className'         => $className,
1026
+			'originalClassName' => $type,
1027
+			'fullClassName'     => $fullClassName,
1028
+			'namespaceName'     => $namespaceName,
1029
+		];
1030
+	}
1031
+
1032
+	private function generateMockClassDeclaration(array $mockClassName, bool $isInterface, array $additionalInterfaces = []): string
1033
+	{
1034
+		$buffer = 'class ';
1035
+
1036
+		$additionalInterfaces[] = MockObject::class;
1037
+		$interfaces             = implode(', ', $additionalInterfaces);
1038
+
1039
+		if ($isInterface) {
1040
+			$buffer .= sprintf(
1041
+				'%s implements %s',
1042
+				$mockClassName['className'],
1043
+				$interfaces
1044
+			);
1045
+
1046
+			if (!in_array($mockClassName['originalClassName'], $additionalInterfaces, true)) {
1047
+				$buffer .= ', ';
1048
+
1049
+				if (!empty($mockClassName['namespaceName'])) {
1050
+					$buffer .= $mockClassName['namespaceName'] . '\\';
1051
+				}
1052
+
1053
+				$buffer .= $mockClassName['originalClassName'];
1054
+			}
1055
+		} else {
1056
+			$buffer .= sprintf(
1057
+				'%s extends %s%s implements %s',
1058
+				$mockClassName['className'],
1059
+				!empty($mockClassName['namespaceName']) ? $mockClassName['namespaceName'] . '\\' : '',
1060
+				$mockClassName['originalClassName'],
1061
+				$interfaces
1062
+			);
1063
+		}
1064
+
1065
+		return $buffer;
1066
+	}
1067
+
1068
+	private function canMockMethod(ReflectionMethod $method): bool
1069
+	{
1070
+		return !($this->isConstructor($method) || $method->isFinal() || $method->isPrivate() || $this->isMethodNameExcluded($method->getName()));
1071
+	}
1072
+
1073
+	private function isMethodNameExcluded(string $name): bool
1074
+	{
1075
+		return isset(self::EXCLUDED_METHOD_NAMES[$name]);
1076
+	}
1077
+
1078
+	/**
1079
+	 * @throws RuntimeException
1080
+	 */
1081
+	private function getTemplate(string $template): Template
1082
+	{
1083
+		$filename = __DIR__ . DIRECTORY_SEPARATOR . 'Generator' . DIRECTORY_SEPARATOR . $template;
1084
+
1085
+		if (!isset(self::$templates[$filename])) {
1086
+			try {
1087
+				self::$templates[$filename] = new Template($filename);
1088
+			} catch (TemplateException $e) {
1089
+				throw new RuntimeException(
1090
+					$e->getMessage(),
1091
+					(int) $e->getCode(),
1092
+					$e
1093
+				);
1094
+			}
1095
+		}
1096
+
1097
+		return self::$templates[$filename];
1098
+	}
1099
+
1100
+	/**
1101
+	 * @see https://github.com/sebastianbergmann/phpunit/issues/4139#issuecomment-605409765
1102
+	 */
1103
+	private function isConstructor(ReflectionMethod $method): bool
1104
+	{
1105
+		$methodName = strtolower($method->getName());
1106
+
1107
+		if ($methodName === '__construct') {
1108
+			return true;
1109
+		}
1110
+
1111
+		if (PHP_MAJOR_VERSION >= 8) {
1112
+			return false;
1113
+		}
1114
+
1115
+		$className = strtolower($method->getDeclaringClass()->getName());
1116
+
1117
+		return $methodName === $className;
1118
+	}
1119
+
1120
+	private function mockedCloneMethod(): string
1121
+	{
1122
+		if (PHP_MAJOR_VERSION >= 8) {
1123
+			if (!trait_exists('\PHPUnit\Framework\MockObject\MockedCloneMethodWithVoidReturnType')) {
1124
+				eval(self::MOCKED_CLONE_METHOD_WITH_VOID_RETURN_TYPE_TRAIT);
1125
+			}
1126
+
1127
+			return PHP_EOL . '    use \PHPUnit\Framework\MockObject\MockedCloneMethodWithVoidReturnType;';
1128
+		}
1129
+
1130
+		if (!trait_exists('\PHPUnit\Framework\MockObject\MockedCloneMethodWithoutReturnType')) {
1131
+			eval(self::MOCKED_CLONE_METHOD_WITHOUT_RETURN_TYPE_TRAIT);
1132
+		}
1133
+
1134
+		return PHP_EOL . '    use \PHPUnit\Framework\MockObject\MockedCloneMethodWithoutReturnType;';
1135
+	}
1136
+
1137
+	private function unmockedCloneMethod(): string
1138
+	{
1139
+		if (PHP_MAJOR_VERSION >= 8) {
1140
+			if (!trait_exists('\PHPUnit\Framework\MockObject\UnmockedCloneMethodWithVoidReturnType')) {
1141
+				eval(self::UNMOCKED_CLONE_METHOD_WITH_VOID_RETURN_TYPE_TRAIT);
1142
+			}
1143
+
1144
+			return PHP_EOL . '    use \PHPUnit\Framework\MockObject\UnmockedCloneMethodWithVoidReturnType;';
1145
+		}
1146
+
1147
+		if (!trait_exists('\PHPUnit\Framework\MockObject\UnmockedCloneMethodWithoutReturnType')) {
1148
+			eval(self::UNMOCKED_CLONE_METHOD_WITHOUT_RETURN_TYPE_TRAIT);
1149
+		}
1150
+
1151
+		return PHP_EOL . '    use \PHPUnit\Framework\MockObject\UnmockedCloneMethodWithoutReturnType;';
1152
+	}
1153 1153
 }
Please login to merge, or discard this patch.
vendor/phpunit/phpunit/src/Framework/MockObject/MockMethod.php 2 patches
Indentation   +337 added lines, -337 removed lines patch added patch discarded remove patch
@@ -36,345 +36,345 @@
 block discarded – undo
36 36
  */
37 37
 final class MockMethod
38 38
 {
39
-    /**
40
-     * @var Template[]
41
-     */
42
-    private static $templates = [];
43
-
44
-    /**
45
-     * @var string
46
-     */
47
-    private $className;
48
-
49
-    /**
50
-     * @var string
51
-     */
52
-    private $methodName;
53
-
54
-    /**
55
-     * @var bool
56
-     */
57
-    private $cloneArguments;
58
-
59
-    /**
60
-     * @var string string
61
-     */
62
-    private $modifier;
63
-
64
-    /**
65
-     * @var string
66
-     */
67
-    private $argumentsForDeclaration;
68
-
69
-    /**
70
-     * @var string
71
-     */
72
-    private $argumentsForCall;
73
-
74
-    /**
75
-     * @var Type
76
-     */
77
-    private $returnType;
78
-
79
-    /**
80
-     * @var string
81
-     */
82
-    private $reference;
83
-
84
-    /**
85
-     * @var bool
86
-     */
87
-    private $callOriginalMethod;
88
-
89
-    /**
90
-     * @var bool
91
-     */
92
-    private $static;
93
-
94
-    /**
95
-     * @var ?string
96
-     */
97
-    private $deprecation;
98
-
99
-    /**
100
-     * @throws ReflectionException
101
-     * @throws RuntimeException
102
-     */
103
-    public static function fromReflection(ReflectionMethod $method, bool $callOriginalMethod, bool $cloneArguments): self
104
-    {
105
-        if ($method->isPrivate()) {
106
-            $modifier = 'private';
107
-        } elseif ($method->isProtected()) {
108
-            $modifier = 'protected';
109
-        } else {
110
-            $modifier = 'public';
111
-        }
112
-
113
-        if ($method->isStatic()) {
114
-            $modifier .= ' static';
115
-        }
116
-
117
-        if ($method->returnsReference()) {
118
-            $reference = '&';
119
-        } else {
120
-            $reference = '';
121
-        }
122
-
123
-        $docComment = $method->getDocComment();
124
-
125
-        if (is_string($docComment) &&
126
-            preg_match('#\*[ \t]*+@deprecated[ \t]*+(.*?)\r?+\n[ \t]*+\*(?:[ \t]*+@|/$)#s', $docComment, $deprecation)) {
127
-            $deprecation = trim(preg_replace('#[ \t]*\r?\n[ \t]*+\*[ \t]*+#', ' ', $deprecation[1]));
128
-        } else {
129
-            $deprecation = null;
130
-        }
131
-
132
-        return new self(
133
-            $method->getDeclaringClass()->getName(),
134
-            $method->getName(),
135
-            $cloneArguments,
136
-            $modifier,
137
-            self::getMethodParametersForDeclaration($method),
138
-            self::getMethodParametersForCall($method),
139
-            (new ReflectionMapper)->fromReturnType($method),
140
-            $reference,
141
-            $callOriginalMethod,
142
-            $method->isStatic(),
143
-            $deprecation
144
-        );
145
-    }
146
-
147
-    public static function fromName(string $fullClassName, string $methodName, bool $cloneArguments): self
148
-    {
149
-        return new self(
150
-            $fullClassName,
151
-            $methodName,
152
-            $cloneArguments,
153
-            'public',
154
-            '',
155
-            '',
156
-            new UnknownType,
157
-            '',
158
-            false,
159
-            false,
160
-            null
161
-        );
162
-    }
163
-
164
-    public function __construct(string $className, string $methodName, bool $cloneArguments, string $modifier, string $argumentsForDeclaration, string $argumentsForCall, Type $returnType, string $reference, bool $callOriginalMethod, bool $static, ?string $deprecation)
165
-    {
166
-        $this->className               = $className;
167
-        $this->methodName              = $methodName;
168
-        $this->cloneArguments          = $cloneArguments;
169
-        $this->modifier                = $modifier;
170
-        $this->argumentsForDeclaration = $argumentsForDeclaration;
171
-        $this->argumentsForCall        = $argumentsForCall;
172
-        $this->returnType              = $returnType;
173
-        $this->reference               = $reference;
174
-        $this->callOriginalMethod      = $callOriginalMethod;
175
-        $this->static                  = $static;
176
-        $this->deprecation             = $deprecation;
177
-    }
178
-
179
-    public function getName(): string
180
-    {
181
-        return $this->methodName;
182
-    }
183
-
184
-    /**
185
-     * @throws RuntimeException
186
-     */
187
-    public function generateCode(): string
188
-    {
189
-        if ($this->static) {
190
-            $templateFile = 'mocked_static_method.tpl';
191
-        } elseif ($this->returnType->isNever() || $this->returnType->isVoid()) {
192
-            $templateFile = sprintf(
193
-                '%s_method_never_or_void.tpl',
194
-                $this->callOriginalMethod ? 'proxied' : 'mocked'
195
-            );
196
-        } else {
197
-            $templateFile = sprintf(
198
-                '%s_method.tpl',
199
-                $this->callOriginalMethod ? 'proxied' : 'mocked'
200
-            );
201
-        }
202
-
203
-        $deprecation = $this->deprecation;
204
-
205
-        if (null !== $this->deprecation) {
206
-            $deprecation         = "The {$this->className}::{$this->methodName} method is deprecated ({$this->deprecation}).";
207
-            $deprecationTemplate = $this->getTemplate('deprecation.tpl');
208
-
209
-            $deprecationTemplate->setVar(
210
-                [
211
-                    'deprecation' => var_export($deprecation, true),
212
-                ]
213
-            );
214
-
215
-            $deprecation = $deprecationTemplate->render();
216
-        }
217
-
218
-        $template = $this->getTemplate($templateFile);
219
-
220
-        $template->setVar(
221
-            [
222
-                'arguments_decl'     => $this->argumentsForDeclaration,
223
-                'arguments_call'     => $this->argumentsForCall,
224
-                'return_declaration' => !empty($this->returnType->asString()) ? (': ' . $this->returnType->asString()) : '',
225
-                'return_type'        => $this->returnType->asString(),
226
-                'arguments_count'    => !empty($this->argumentsForCall) ? substr_count($this->argumentsForCall, ',') + 1 : 0,
227
-                'class_name'         => $this->className,
228
-                'method_name'        => $this->methodName,
229
-                'modifier'           => $this->modifier,
230
-                'reference'          => $this->reference,
231
-                'clone_arguments'    => $this->cloneArguments ? 'true' : 'false',
232
-                'deprecation'        => $deprecation,
233
-            ]
234
-        );
235
-
236
-        return $template->render();
237
-    }
238
-
239
-    public function getReturnType(): Type
240
-    {
241
-        return $this->returnType;
242
-    }
243
-
244
-    /**
245
-     * @throws RuntimeException
246
-     */
247
-    private function getTemplate(string $template): Template
248
-    {
249
-        $filename = __DIR__ . DIRECTORY_SEPARATOR . 'Generator' . DIRECTORY_SEPARATOR . $template;
250
-
251
-        if (!isset(self::$templates[$filename])) {
252
-            try {
253
-                self::$templates[$filename] = new Template($filename);
254
-            } catch (TemplateException $e) {
255
-                throw new RuntimeException(
256
-                    $e->getMessage(),
257
-                    (int) $e->getCode(),
258
-                    $e
259
-                );
260
-            }
261
-        }
262
-
263
-        return self::$templates[$filename];
264
-    }
265
-
266
-    /**
267
-     * Returns the parameters of a function or method.
268
-     *
269
-     * @throws RuntimeException
270
-     */
271
-    private static function getMethodParametersForDeclaration(ReflectionMethod $method): string
272
-    {
273
-        $parameters = [];
274
-        $types      = (new ReflectionMapper)->fromParameterTypes($method);
275
-
276
-        foreach ($method->getParameters() as $i => $parameter) {
277
-            $name = '$' . $parameter->getName();
278
-
279
-            /* Note: PHP extensions may use empty names for reference arguments
39
+	/**
40
+	 * @var Template[]
41
+	 */
42
+	private static $templates = [];
43
+
44
+	/**
45
+	 * @var string
46
+	 */
47
+	private $className;
48
+
49
+	/**
50
+	 * @var string
51
+	 */
52
+	private $methodName;
53
+
54
+	/**
55
+	 * @var bool
56
+	 */
57
+	private $cloneArguments;
58
+
59
+	/**
60
+	 * @var string string
61
+	 */
62
+	private $modifier;
63
+
64
+	/**
65
+	 * @var string
66
+	 */
67
+	private $argumentsForDeclaration;
68
+
69
+	/**
70
+	 * @var string
71
+	 */
72
+	private $argumentsForCall;
73
+
74
+	/**
75
+	 * @var Type
76
+	 */
77
+	private $returnType;
78
+
79
+	/**
80
+	 * @var string
81
+	 */
82
+	private $reference;
83
+
84
+	/**
85
+	 * @var bool
86
+	 */
87
+	private $callOriginalMethod;
88
+
89
+	/**
90
+	 * @var bool
91
+	 */
92
+	private $static;
93
+
94
+	/**
95
+	 * @var ?string
96
+	 */
97
+	private $deprecation;
98
+
99
+	/**
100
+	 * @throws ReflectionException
101
+	 * @throws RuntimeException
102
+	 */
103
+	public static function fromReflection(ReflectionMethod $method, bool $callOriginalMethod, bool $cloneArguments): self
104
+	{
105
+		if ($method->isPrivate()) {
106
+			$modifier = 'private';
107
+		} elseif ($method->isProtected()) {
108
+			$modifier = 'protected';
109
+		} else {
110
+			$modifier = 'public';
111
+		}
112
+
113
+		if ($method->isStatic()) {
114
+			$modifier .= ' static';
115
+		}
116
+
117
+		if ($method->returnsReference()) {
118
+			$reference = '&';
119
+		} else {
120
+			$reference = '';
121
+		}
122
+
123
+		$docComment = $method->getDocComment();
124
+
125
+		if (is_string($docComment) &&
126
+			preg_match('#\*[ \t]*+@deprecated[ \t]*+(.*?)\r?+\n[ \t]*+\*(?:[ \t]*+@|/$)#s', $docComment, $deprecation)) {
127
+			$deprecation = trim(preg_replace('#[ \t]*\r?\n[ \t]*+\*[ \t]*+#', ' ', $deprecation[1]));
128
+		} else {
129
+			$deprecation = null;
130
+		}
131
+
132
+		return new self(
133
+			$method->getDeclaringClass()->getName(),
134
+			$method->getName(),
135
+			$cloneArguments,
136
+			$modifier,
137
+			self::getMethodParametersForDeclaration($method),
138
+			self::getMethodParametersForCall($method),
139
+			(new ReflectionMapper)->fromReturnType($method),
140
+			$reference,
141
+			$callOriginalMethod,
142
+			$method->isStatic(),
143
+			$deprecation
144
+		);
145
+	}
146
+
147
+	public static function fromName(string $fullClassName, string $methodName, bool $cloneArguments): self
148
+	{
149
+		return new self(
150
+			$fullClassName,
151
+			$methodName,
152
+			$cloneArguments,
153
+			'public',
154
+			'',
155
+			'',
156
+			new UnknownType,
157
+			'',
158
+			false,
159
+			false,
160
+			null
161
+		);
162
+	}
163
+
164
+	public function __construct(string $className, string $methodName, bool $cloneArguments, string $modifier, string $argumentsForDeclaration, string $argumentsForCall, Type $returnType, string $reference, bool $callOriginalMethod, bool $static, ?string $deprecation)
165
+	{
166
+		$this->className               = $className;
167
+		$this->methodName              = $methodName;
168
+		$this->cloneArguments          = $cloneArguments;
169
+		$this->modifier                = $modifier;
170
+		$this->argumentsForDeclaration = $argumentsForDeclaration;
171
+		$this->argumentsForCall        = $argumentsForCall;
172
+		$this->returnType              = $returnType;
173
+		$this->reference               = $reference;
174
+		$this->callOriginalMethod      = $callOriginalMethod;
175
+		$this->static                  = $static;
176
+		$this->deprecation             = $deprecation;
177
+	}
178
+
179
+	public function getName(): string
180
+	{
181
+		return $this->methodName;
182
+	}
183
+
184
+	/**
185
+	 * @throws RuntimeException
186
+	 */
187
+	public function generateCode(): string
188
+	{
189
+		if ($this->static) {
190
+			$templateFile = 'mocked_static_method.tpl';
191
+		} elseif ($this->returnType->isNever() || $this->returnType->isVoid()) {
192
+			$templateFile = sprintf(
193
+				'%s_method_never_or_void.tpl',
194
+				$this->callOriginalMethod ? 'proxied' : 'mocked'
195
+			);
196
+		} else {
197
+			$templateFile = sprintf(
198
+				'%s_method.tpl',
199
+				$this->callOriginalMethod ? 'proxied' : 'mocked'
200
+			);
201
+		}
202
+
203
+		$deprecation = $this->deprecation;
204
+
205
+		if (null !== $this->deprecation) {
206
+			$deprecation         = "The {$this->className}::{$this->methodName} method is deprecated ({$this->deprecation}).";
207
+			$deprecationTemplate = $this->getTemplate('deprecation.tpl');
208
+
209
+			$deprecationTemplate->setVar(
210
+				[
211
+					'deprecation' => var_export($deprecation, true),
212
+				]
213
+			);
214
+
215
+			$deprecation = $deprecationTemplate->render();
216
+		}
217
+
218
+		$template = $this->getTemplate($templateFile);
219
+
220
+		$template->setVar(
221
+			[
222
+				'arguments_decl'     => $this->argumentsForDeclaration,
223
+				'arguments_call'     => $this->argumentsForCall,
224
+				'return_declaration' => !empty($this->returnType->asString()) ? (': ' . $this->returnType->asString()) : '',
225
+				'return_type'        => $this->returnType->asString(),
226
+				'arguments_count'    => !empty($this->argumentsForCall) ? substr_count($this->argumentsForCall, ',') + 1 : 0,
227
+				'class_name'         => $this->className,
228
+				'method_name'        => $this->methodName,
229
+				'modifier'           => $this->modifier,
230
+				'reference'          => $this->reference,
231
+				'clone_arguments'    => $this->cloneArguments ? 'true' : 'false',
232
+				'deprecation'        => $deprecation,
233
+			]
234
+		);
235
+
236
+		return $template->render();
237
+	}
238
+
239
+	public function getReturnType(): Type
240
+	{
241
+		return $this->returnType;
242
+	}
243
+
244
+	/**
245
+	 * @throws RuntimeException
246
+	 */
247
+	private function getTemplate(string $template): Template
248
+	{
249
+		$filename = __DIR__ . DIRECTORY_SEPARATOR . 'Generator' . DIRECTORY_SEPARATOR . $template;
250
+
251
+		if (!isset(self::$templates[$filename])) {
252
+			try {
253
+				self::$templates[$filename] = new Template($filename);
254
+			} catch (TemplateException $e) {
255
+				throw new RuntimeException(
256
+					$e->getMessage(),
257
+					(int) $e->getCode(),
258
+					$e
259
+				);
260
+			}
261
+		}
262
+
263
+		return self::$templates[$filename];
264
+	}
265
+
266
+	/**
267
+	 * Returns the parameters of a function or method.
268
+	 *
269
+	 * @throws RuntimeException
270
+	 */
271
+	private static function getMethodParametersForDeclaration(ReflectionMethod $method): string
272
+	{
273
+		$parameters = [];
274
+		$types      = (new ReflectionMapper)->fromParameterTypes($method);
275
+
276
+		foreach ($method->getParameters() as $i => $parameter) {
277
+			$name = '$' . $parameter->getName();
278
+
279
+			/* Note: PHP extensions may use empty names for reference arguments
280 280
              * or "..." for methods taking a variable number of arguments.
281 281
              */
282
-            if ($name === '$' || $name === '$...') {
283
-                $name = '$arg' . $i;
284
-            }
285
-
286
-            $default         = '';
287
-            $reference       = '';
288
-            $typeDeclaration = '';
289
-
290
-            if (!$types[$i]->type()->isUnknown()) {
291
-                $typeDeclaration = $types[$i]->type()->asString() . ' ';
292
-            }
293
-
294
-            if ($parameter->isPassedByReference()) {
295
-                $reference = '&';
296
-            }
297
-
298
-            if ($parameter->isVariadic()) {
299
-                $name = '...' . $name;
300
-            } elseif ($parameter->isDefaultValueAvailable()) {
301
-                $default = ' = ' . self::exportDefaultValue($parameter);
302
-            } elseif ($parameter->isOptional()) {
303
-                $default = ' = null';
304
-            }
305
-
306
-            $parameters[] = $typeDeclaration . $reference . $name . $default;
307
-        }
308
-
309
-        return implode(', ', $parameters);
310
-    }
311
-
312
-    /**
313
-     * Returns the parameters of a function or method.
314
-     *
315
-     * @throws ReflectionException
316
-     */
317
-    private static function getMethodParametersForCall(ReflectionMethod $method): string
318
-    {
319
-        $parameters = [];
320
-
321
-        foreach ($method->getParameters() as $i => $parameter) {
322
-            $name = '$' . $parameter->getName();
323
-
324
-            /* Note: PHP extensions may use empty names for reference arguments
282
+			if ($name === '$' || $name === '$...') {
283
+				$name = '$arg' . $i;
284
+			}
285
+
286
+			$default         = '';
287
+			$reference       = '';
288
+			$typeDeclaration = '';
289
+
290
+			if (!$types[$i]->type()->isUnknown()) {
291
+				$typeDeclaration = $types[$i]->type()->asString() . ' ';
292
+			}
293
+
294
+			if ($parameter->isPassedByReference()) {
295
+				$reference = '&';
296
+			}
297
+
298
+			if ($parameter->isVariadic()) {
299
+				$name = '...' . $name;
300
+			} elseif ($parameter->isDefaultValueAvailable()) {
301
+				$default = ' = ' . self::exportDefaultValue($parameter);
302
+			} elseif ($parameter->isOptional()) {
303
+				$default = ' = null';
304
+			}
305
+
306
+			$parameters[] = $typeDeclaration . $reference . $name . $default;
307
+		}
308
+
309
+		return implode(', ', $parameters);
310
+	}
311
+
312
+	/**
313
+	 * Returns the parameters of a function or method.
314
+	 *
315
+	 * @throws ReflectionException
316
+	 */
317
+	private static function getMethodParametersForCall(ReflectionMethod $method): string
318
+	{
319
+		$parameters = [];
320
+
321
+		foreach ($method->getParameters() as $i => $parameter) {
322
+			$name = '$' . $parameter->getName();
323
+
324
+			/* Note: PHP extensions may use empty names for reference arguments
325 325
              * or "..." for methods taking a variable number of arguments.
326 326
              */
327
-            if ($name === '$' || $name === '$...') {
328
-                $name = '$arg' . $i;
329
-            }
330
-
331
-            if ($parameter->isVariadic()) {
332
-                continue;
333
-            }
334
-
335
-            if ($parameter->isPassedByReference()) {
336
-                $parameters[] = '&' . $name;
337
-            } else {
338
-                $parameters[] = $name;
339
-            }
340
-        }
341
-
342
-        return implode(', ', $parameters);
343
-    }
344
-
345
-    /**
346
-     * @throws ReflectionException
347
-     */
348
-    private static function exportDefaultValue(ReflectionParameter $parameter): string
349
-    {
350
-        try {
351
-            $defaultValue = $parameter->getDefaultValue();
352
-
353
-            if (!is_object($defaultValue)) {
354
-                return (string) var_export($defaultValue, true);
355
-            }
356
-
357
-            $parameterAsString = $parameter->__toString();
358
-
359
-            return (string) explode(
360
-                ' = ',
361
-                substr(
362
-                    substr(
363
-                        $parameterAsString,
364
-                        strpos($parameterAsString, '<optional> ') + strlen('<optional> ')
365
-                    ),
366
-                    0,
367
-                    -2
368
-                )
369
-            )[1];
370
-            // @codeCoverageIgnoreStart
371
-        } catch (\ReflectionException $e) {
372
-            throw new ReflectionException(
373
-                $e->getMessage(),
374
-                (int) $e->getCode(),
375
-                $e
376
-            );
377
-        }
378
-        // @codeCoverageIgnoreEnd
379
-    }
327
+			if ($name === '$' || $name === '$...') {
328
+				$name = '$arg' . $i;
329
+			}
330
+
331
+			if ($parameter->isVariadic()) {
332
+				continue;
333
+			}
334
+
335
+			if ($parameter->isPassedByReference()) {
336
+				$parameters[] = '&' . $name;
337
+			} else {
338
+				$parameters[] = $name;
339
+			}
340
+		}
341
+
342
+		return implode(', ', $parameters);
343
+	}
344
+
345
+	/**
346
+	 * @throws ReflectionException
347
+	 */
348
+	private static function exportDefaultValue(ReflectionParameter $parameter): string
349
+	{
350
+		try {
351
+			$defaultValue = $parameter->getDefaultValue();
352
+
353
+			if (!is_object($defaultValue)) {
354
+				return (string) var_export($defaultValue, true);
355
+			}
356
+
357
+			$parameterAsString = $parameter->__toString();
358
+
359
+			return (string) explode(
360
+				' = ',
361
+				substr(
362
+					substr(
363
+						$parameterAsString,
364
+						strpos($parameterAsString, '<optional> ') + strlen('<optional> ')
365
+					),
366
+					0,
367
+					-2
368
+				)
369
+			)[1];
370
+			// @codeCoverageIgnoreStart
371
+		} catch (\ReflectionException $e) {
372
+			throw new ReflectionException(
373
+				$e->getMessage(),
374
+				(int) $e->getCode(),
375
+				$e
376
+			);
377
+		}
378
+		// @codeCoverageIgnoreEnd
379
+	}
380 380
 }
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -221,9 +221,9 @@  discard block
 block discarded – undo
221 221
             [
222 222
                 'arguments_decl'     => $this->argumentsForDeclaration,
223 223
                 'arguments_call'     => $this->argumentsForCall,
224
-                'return_declaration' => !empty($this->returnType->asString()) ? (': ' . $this->returnType->asString()) : '',
224
+                'return_declaration' => ! empty($this->returnType->asString()) ? (': '.$this->returnType->asString()) : '',
225 225
                 'return_type'        => $this->returnType->asString(),
226
-                'arguments_count'    => !empty($this->argumentsForCall) ? substr_count($this->argumentsForCall, ',') + 1 : 0,
226
+                'arguments_count'    => ! empty($this->argumentsForCall) ? substr_count($this->argumentsForCall, ',') + 1 : 0,
227 227
                 'class_name'         => $this->className,
228 228
                 'method_name'        => $this->methodName,
229 229
                 'modifier'           => $this->modifier,
@@ -246,9 +246,9 @@  discard block
 block discarded – undo
246 246
      */
247 247
     private function getTemplate(string $template): Template
248 248
     {
249
-        $filename = __DIR__ . DIRECTORY_SEPARATOR . 'Generator' . DIRECTORY_SEPARATOR . $template;
249
+        $filename = __DIR__.DIRECTORY_SEPARATOR.'Generator'.DIRECTORY_SEPARATOR.$template;
250 250
 
251
-        if (!isset(self::$templates[$filename])) {
251
+        if ( ! isset(self::$templates[$filename])) {
252 252
             try {
253 253
                 self::$templates[$filename] = new Template($filename);
254 254
             } catch (TemplateException $e) {
@@ -274,21 +274,21 @@  discard block
 block discarded – undo
274 274
         $types      = (new ReflectionMapper)->fromParameterTypes($method);
275 275
 
276 276
         foreach ($method->getParameters() as $i => $parameter) {
277
-            $name = '$' . $parameter->getName();
277
+            $name = '$'.$parameter->getName();
278 278
 
279 279
             /* Note: PHP extensions may use empty names for reference arguments
280 280
              * or "..." for methods taking a variable number of arguments.
281 281
              */
282 282
             if ($name === '$' || $name === '$...') {
283
-                $name = '$arg' . $i;
283
+                $name = '$arg'.$i;
284 284
             }
285 285
 
286 286
             $default         = '';
287 287
             $reference       = '';
288 288
             $typeDeclaration = '';
289 289
 
290
-            if (!$types[$i]->type()->isUnknown()) {
291
-                $typeDeclaration = $types[$i]->type()->asString() . ' ';
290
+            if ( ! $types[$i]->type()->isUnknown()) {
291
+                $typeDeclaration = $types[$i]->type()->asString().' ';
292 292
             }
293 293
 
294 294
             if ($parameter->isPassedByReference()) {
@@ -296,14 +296,14 @@  discard block
 block discarded – undo
296 296
             }
297 297
 
298 298
             if ($parameter->isVariadic()) {
299
-                $name = '...' . $name;
299
+                $name = '...'.$name;
300 300
             } elseif ($parameter->isDefaultValueAvailable()) {
301
-                $default = ' = ' . self::exportDefaultValue($parameter);
301
+                $default = ' = '.self::exportDefaultValue($parameter);
302 302
             } elseif ($parameter->isOptional()) {
303 303
                 $default = ' = null';
304 304
             }
305 305
 
306
-            $parameters[] = $typeDeclaration . $reference . $name . $default;
306
+            $parameters[] = $typeDeclaration.$reference.$name.$default;
307 307
         }
308 308
 
309 309
         return implode(', ', $parameters);
@@ -319,13 +319,13 @@  discard block
 block discarded – undo
319 319
         $parameters = [];
320 320
 
321 321
         foreach ($method->getParameters() as $i => $parameter) {
322
-            $name = '$' . $parameter->getName();
322
+            $name = '$'.$parameter->getName();
323 323
 
324 324
             /* Note: PHP extensions may use empty names for reference arguments
325 325
              * or "..." for methods taking a variable number of arguments.
326 326
              */
327 327
             if ($name === '$' || $name === '$...') {
328
-                $name = '$arg' . $i;
328
+                $name = '$arg'.$i;
329 329
             }
330 330
 
331 331
             if ($parameter->isVariadic()) {
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
             }
334 334
 
335 335
             if ($parameter->isPassedByReference()) {
336
-                $parameters[] = '&' . $name;
336
+                $parameters[] = '&'.$name;
337 337
             } else {
338 338
                 $parameters[] = $name;
339 339
             }
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
         try {
351 351
             $defaultValue = $parameter->getDefaultValue();
352 352
 
353
-            if (!is_object($defaultValue)) {
353
+            if ( ! is_object($defaultValue)) {
354 354
                 return (string) var_export($defaultValue, true);
355 355
             }
356 356
 
Please login to merge, or discard this patch.
vendor/phpunit/phpunit/src/Framework/Assert/Functions.php 1 patch
Indentation   +2377 added lines, -2377 removed lines patch added patch discarded remove patch
@@ -73,2970 +73,2970 @@
 block discarded – undo
73 73
 use Throwable;
74 74
 
75 75
 if (!function_exists('PHPUnit\Framework\assertArrayHasKey')) {
76
-    /**
77
-     * Asserts that an array has a specified key.
78
-     *
79
-     * @param int|string        $key
80
-     * @param array|ArrayAccess $array
81
-     *
82
-     * @throws ExpectationFailedException
83
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
84
-     * @throws Exception
85
-     *
86
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
87
-     *
88
-     * @see Assert::assertArrayHasKey
89
-     */
90
-    function assertArrayHasKey($key, $array, string $message = ''): void
91
-    {
92
-        Assert::assertArrayHasKey(...func_get_args());
93
-    }
76
+	/**
77
+	 * Asserts that an array has a specified key.
78
+	 *
79
+	 * @param int|string        $key
80
+	 * @param array|ArrayAccess $array
81
+	 *
82
+	 * @throws ExpectationFailedException
83
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
84
+	 * @throws Exception
85
+	 *
86
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
87
+	 *
88
+	 * @see Assert::assertArrayHasKey
89
+	 */
90
+	function assertArrayHasKey($key, $array, string $message = ''): void
91
+	{
92
+		Assert::assertArrayHasKey(...func_get_args());
93
+	}
94 94
 }
95 95
 
96 96
 if (!function_exists('PHPUnit\Framework\assertArrayNotHasKey')) {
97
-    /**
98
-     * Asserts that an array does not have a specified key.
99
-     *
100
-     * @param int|string        $key
101
-     * @param array|ArrayAccess $array
102
-     *
103
-     * @throws ExpectationFailedException
104
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
105
-     * @throws Exception
106
-     *
107
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
108
-     *
109
-     * @see Assert::assertArrayNotHasKey
110
-     */
111
-    function assertArrayNotHasKey($key, $array, string $message = ''): void
112
-    {
113
-        Assert::assertArrayNotHasKey(...func_get_args());
114
-    }
97
+	/**
98
+	 * Asserts that an array does not have a specified key.
99
+	 *
100
+	 * @param int|string        $key
101
+	 * @param array|ArrayAccess $array
102
+	 *
103
+	 * @throws ExpectationFailedException
104
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
105
+	 * @throws Exception
106
+	 *
107
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
108
+	 *
109
+	 * @see Assert::assertArrayNotHasKey
110
+	 */
111
+	function assertArrayNotHasKey($key, $array, string $message = ''): void
112
+	{
113
+		Assert::assertArrayNotHasKey(...func_get_args());
114
+	}
115 115
 }
116 116
 
117 117
 if (!function_exists('PHPUnit\Framework\assertContains')) {
118
-    /**
119
-     * Asserts that a haystack contains a needle.
120
-     *
121
-     * @throws ExpectationFailedException
122
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
123
-     * @throws Exception
124
-     *
125
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
126
-     *
127
-     * @see Assert::assertContains
128
-     */
129
-    function assertContains($needle, iterable $haystack, string $message = ''): void
130
-    {
131
-        Assert::assertContains(...func_get_args());
132
-    }
118
+	/**
119
+	 * Asserts that a haystack contains a needle.
120
+	 *
121
+	 * @throws ExpectationFailedException
122
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
123
+	 * @throws Exception
124
+	 *
125
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
126
+	 *
127
+	 * @see Assert::assertContains
128
+	 */
129
+	function assertContains($needle, iterable $haystack, string $message = ''): void
130
+	{
131
+		Assert::assertContains(...func_get_args());
132
+	}
133 133
 }
134 134
 
135 135
 if (!function_exists('PHPUnit\Framework\assertContainsEquals')) {
136
-    function assertContainsEquals($needle, iterable $haystack, string $message = ''): void
137
-    {
138
-        Assert::assertContainsEquals(...func_get_args());
139
-    }
136
+	function assertContainsEquals($needle, iterable $haystack, string $message = ''): void
137
+	{
138
+		Assert::assertContainsEquals(...func_get_args());
139
+	}
140 140
 }
141 141
 
142 142
 if (!function_exists('PHPUnit\Framework\assertNotContains')) {
143
-    /**
144
-     * Asserts that a haystack does not contain a needle.
145
-     *
146
-     * @throws ExpectationFailedException
147
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
148
-     * @throws Exception
149
-     *
150
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
151
-     *
152
-     * @see Assert::assertNotContains
153
-     */
154
-    function assertNotContains($needle, iterable $haystack, string $message = ''): void
155
-    {
156
-        Assert::assertNotContains(...func_get_args());
157
-    }
143
+	/**
144
+	 * Asserts that a haystack does not contain a needle.
145
+	 *
146
+	 * @throws ExpectationFailedException
147
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
148
+	 * @throws Exception
149
+	 *
150
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
151
+	 *
152
+	 * @see Assert::assertNotContains
153
+	 */
154
+	function assertNotContains($needle, iterable $haystack, string $message = ''): void
155
+	{
156
+		Assert::assertNotContains(...func_get_args());
157
+	}
158 158
 }
159 159
 
160 160
 if (!function_exists('PHPUnit\Framework\assertNotContainsEquals')) {
161
-    function assertNotContainsEquals($needle, iterable $haystack, string $message = ''): void
162
-    {
163
-        Assert::assertNotContainsEquals(...func_get_args());
164
-    }
161
+	function assertNotContainsEquals($needle, iterable $haystack, string $message = ''): void
162
+	{
163
+		Assert::assertNotContainsEquals(...func_get_args());
164
+	}
165 165
 }
166 166
 
167 167
 if (!function_exists('PHPUnit\Framework\assertContainsOnly')) {
168
-    /**
169
-     * Asserts that a haystack contains only values of a given type.
170
-     *
171
-     * @throws ExpectationFailedException
172
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
173
-     *
174
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
175
-     *
176
-     * @see Assert::assertContainsOnly
177
-     */
178
-    function assertContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = null, string $message = ''): void
179
-    {
180
-        Assert::assertContainsOnly(...func_get_args());
181
-    }
168
+	/**
169
+	 * Asserts that a haystack contains only values of a given type.
170
+	 *
171
+	 * @throws ExpectationFailedException
172
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
173
+	 *
174
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
175
+	 *
176
+	 * @see Assert::assertContainsOnly
177
+	 */
178
+	function assertContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = null, string $message = ''): void
179
+	{
180
+		Assert::assertContainsOnly(...func_get_args());
181
+	}
182 182
 }
183 183
 
184 184
 if (!function_exists('PHPUnit\Framework\assertContainsOnlyInstancesOf')) {
185
-    /**
186
-     * Asserts that a haystack contains only instances of a given class name.
187
-     *
188
-     * @throws ExpectationFailedException
189
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
190
-     *
191
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
192
-     *
193
-     * @see Assert::assertContainsOnlyInstancesOf
194
-     */
195
-    function assertContainsOnlyInstancesOf(string $className, iterable $haystack, string $message = ''): void
196
-    {
197
-        Assert::assertContainsOnlyInstancesOf(...func_get_args());
198
-    }
185
+	/**
186
+	 * Asserts that a haystack contains only instances of a given class name.
187
+	 *
188
+	 * @throws ExpectationFailedException
189
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
190
+	 *
191
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
192
+	 *
193
+	 * @see Assert::assertContainsOnlyInstancesOf
194
+	 */
195
+	function assertContainsOnlyInstancesOf(string $className, iterable $haystack, string $message = ''): void
196
+	{
197
+		Assert::assertContainsOnlyInstancesOf(...func_get_args());
198
+	}
199 199
 }
200 200
 
201 201
 if (!function_exists('PHPUnit\Framework\assertNotContainsOnly')) {
202
-    /**
203
-     * Asserts that a haystack does not contain only values of a given type.
204
-     *
205
-     * @throws ExpectationFailedException
206
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
207
-     *
208
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
209
-     *
210
-     * @see Assert::assertNotContainsOnly
211
-     */
212
-    function assertNotContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = null, string $message = ''): void
213
-    {
214
-        Assert::assertNotContainsOnly(...func_get_args());
215
-    }
202
+	/**
203
+	 * Asserts that a haystack does not contain only values of a given type.
204
+	 *
205
+	 * @throws ExpectationFailedException
206
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
207
+	 *
208
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
209
+	 *
210
+	 * @see Assert::assertNotContainsOnly
211
+	 */
212
+	function assertNotContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = null, string $message = ''): void
213
+	{
214
+		Assert::assertNotContainsOnly(...func_get_args());
215
+	}
216 216
 }
217 217
 
218 218
 if (!function_exists('PHPUnit\Framework\assertCount')) {
219
-    /**
220
-     * Asserts the number of elements of an array, Countable or Traversable.
221
-     *
222
-     * @param Countable|iterable $haystack
223
-     *
224
-     * @throws ExpectationFailedException
225
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
226
-     * @throws Exception
227
-     *
228
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
229
-     *
230
-     * @see Assert::assertCount
231
-     */
232
-    function assertCount(int $expectedCount, $haystack, string $message = ''): void
233
-    {
234
-        Assert::assertCount(...func_get_args());
235
-    }
219
+	/**
220
+	 * Asserts the number of elements of an array, Countable or Traversable.
221
+	 *
222
+	 * @param Countable|iterable $haystack
223
+	 *
224
+	 * @throws ExpectationFailedException
225
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
226
+	 * @throws Exception
227
+	 *
228
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
229
+	 *
230
+	 * @see Assert::assertCount
231
+	 */
232
+	function assertCount(int $expectedCount, $haystack, string $message = ''): void
233
+	{
234
+		Assert::assertCount(...func_get_args());
235
+	}
236 236
 }
237 237
 
238 238
 if (!function_exists('PHPUnit\Framework\assertNotCount')) {
239
-    /**
240
-     * Asserts the number of elements of an array, Countable or Traversable.
241
-     *
242
-     * @param Countable|iterable $haystack
243
-     *
244
-     * @throws ExpectationFailedException
245
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
246
-     * @throws Exception
247
-     *
248
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
249
-     *
250
-     * @see Assert::assertNotCount
251
-     */
252
-    function assertNotCount(int $expectedCount, $haystack, string $message = ''): void
253
-    {
254
-        Assert::assertNotCount(...func_get_args());
255
-    }
239
+	/**
240
+	 * Asserts the number of elements of an array, Countable or Traversable.
241
+	 *
242
+	 * @param Countable|iterable $haystack
243
+	 *
244
+	 * @throws ExpectationFailedException
245
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
246
+	 * @throws Exception
247
+	 *
248
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
249
+	 *
250
+	 * @see Assert::assertNotCount
251
+	 */
252
+	function assertNotCount(int $expectedCount, $haystack, string $message = ''): void
253
+	{
254
+		Assert::assertNotCount(...func_get_args());
255
+	}
256 256
 }
257 257
 
258 258
 if (!function_exists('PHPUnit\Framework\assertEquals')) {
259
-    /**
260
-     * Asserts that two variables are equal.
261
-     *
262
-     * @throws ExpectationFailedException
263
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
264
-     *
265
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
266
-     *
267
-     * @see Assert::assertEquals
268
-     */
269
-    function assertEquals($expected, $actual, string $message = ''): void
270
-    {
271
-        Assert::assertEquals(...func_get_args());
272
-    }
259
+	/**
260
+	 * Asserts that two variables are equal.
261
+	 *
262
+	 * @throws ExpectationFailedException
263
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
264
+	 *
265
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
266
+	 *
267
+	 * @see Assert::assertEquals
268
+	 */
269
+	function assertEquals($expected, $actual, string $message = ''): void
270
+	{
271
+		Assert::assertEquals(...func_get_args());
272
+	}
273 273
 }
274 274
 
275 275
 if (!function_exists('PHPUnit\Framework\assertEqualsCanonicalizing')) {
276
-    /**
277
-     * Asserts that two variables are equal (canonicalizing).
278
-     *
279
-     * @throws ExpectationFailedException
280
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
281
-     *
282
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
283
-     *
284
-     * @see Assert::assertEqualsCanonicalizing
285
-     */
286
-    function assertEqualsCanonicalizing($expected, $actual, string $message = ''): void
287
-    {
288
-        Assert::assertEqualsCanonicalizing(...func_get_args());
289
-    }
276
+	/**
277
+	 * Asserts that two variables are equal (canonicalizing).
278
+	 *
279
+	 * @throws ExpectationFailedException
280
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
281
+	 *
282
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
283
+	 *
284
+	 * @see Assert::assertEqualsCanonicalizing
285
+	 */
286
+	function assertEqualsCanonicalizing($expected, $actual, string $message = ''): void
287
+	{
288
+		Assert::assertEqualsCanonicalizing(...func_get_args());
289
+	}
290 290
 }
291 291
 
292 292
 if (!function_exists('PHPUnit\Framework\assertEqualsIgnoringCase')) {
293
-    /**
294
-     * Asserts that two variables are equal (ignoring case).
295
-     *
296
-     * @throws ExpectationFailedException
297
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
298
-     *
299
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
300
-     *
301
-     * @see Assert::assertEqualsIgnoringCase
302
-     */
303
-    function assertEqualsIgnoringCase($expected, $actual, string $message = ''): void
304
-    {
305
-        Assert::assertEqualsIgnoringCase(...func_get_args());
306
-    }
293
+	/**
294
+	 * Asserts that two variables are equal (ignoring case).
295
+	 *
296
+	 * @throws ExpectationFailedException
297
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
298
+	 *
299
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
300
+	 *
301
+	 * @see Assert::assertEqualsIgnoringCase
302
+	 */
303
+	function assertEqualsIgnoringCase($expected, $actual, string $message = ''): void
304
+	{
305
+		Assert::assertEqualsIgnoringCase(...func_get_args());
306
+	}
307 307
 }
308 308
 
309 309
 if (!function_exists('PHPUnit\Framework\assertEqualsWithDelta')) {
310
-    /**
311
-     * Asserts that two variables are equal (with delta).
312
-     *
313
-     * @throws ExpectationFailedException
314
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
315
-     *
316
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
317
-     *
318
-     * @see Assert::assertEqualsWithDelta
319
-     */
320
-    function assertEqualsWithDelta($expected, $actual, float $delta, string $message = ''): void
321
-    {
322
-        Assert::assertEqualsWithDelta(...func_get_args());
323
-    }
310
+	/**
311
+	 * Asserts that two variables are equal (with delta).
312
+	 *
313
+	 * @throws ExpectationFailedException
314
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
315
+	 *
316
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
317
+	 *
318
+	 * @see Assert::assertEqualsWithDelta
319
+	 */
320
+	function assertEqualsWithDelta($expected, $actual, float $delta, string $message = ''): void
321
+	{
322
+		Assert::assertEqualsWithDelta(...func_get_args());
323
+	}
324 324
 }
325 325
 
326 326
 if (!function_exists('PHPUnit\Framework\assertNotEquals')) {
327
-    /**
328
-     * Asserts that two variables are not equal.
329
-     *
330
-     * @throws ExpectationFailedException
331
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
332
-     *
333
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
334
-     *
335
-     * @see Assert::assertNotEquals
336
-     */
337
-    function assertNotEquals($expected, $actual, string $message = ''): void
338
-    {
339
-        Assert::assertNotEquals(...func_get_args());
340
-    }
327
+	/**
328
+	 * Asserts that two variables are not equal.
329
+	 *
330
+	 * @throws ExpectationFailedException
331
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
332
+	 *
333
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
334
+	 *
335
+	 * @see Assert::assertNotEquals
336
+	 */
337
+	function assertNotEquals($expected, $actual, string $message = ''): void
338
+	{
339
+		Assert::assertNotEquals(...func_get_args());
340
+	}
341 341
 }
342 342
 
343 343
 if (!function_exists('PHPUnit\Framework\assertNotEqualsCanonicalizing')) {
344
-    /**
345
-     * Asserts that two variables are not equal (canonicalizing).
346
-     *
347
-     * @throws ExpectationFailedException
348
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
349
-     *
350
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
351
-     *
352
-     * @see Assert::assertNotEqualsCanonicalizing
353
-     */
354
-    function assertNotEqualsCanonicalizing($expected, $actual, string $message = ''): void
355
-    {
356
-        Assert::assertNotEqualsCanonicalizing(...func_get_args());
357
-    }
344
+	/**
345
+	 * Asserts that two variables are not equal (canonicalizing).
346
+	 *
347
+	 * @throws ExpectationFailedException
348
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
349
+	 *
350
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
351
+	 *
352
+	 * @see Assert::assertNotEqualsCanonicalizing
353
+	 */
354
+	function assertNotEqualsCanonicalizing($expected, $actual, string $message = ''): void
355
+	{
356
+		Assert::assertNotEqualsCanonicalizing(...func_get_args());
357
+	}
358 358
 }
359 359
 
360 360
 if (!function_exists('PHPUnit\Framework\assertNotEqualsIgnoringCase')) {
361
-    /**
362
-     * Asserts that two variables are not equal (ignoring case).
363
-     *
364
-     * @throws ExpectationFailedException
365
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
366
-     *
367
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
368
-     *
369
-     * @see Assert::assertNotEqualsIgnoringCase
370
-     */
371
-    function assertNotEqualsIgnoringCase($expected, $actual, string $message = ''): void
372
-    {
373
-        Assert::assertNotEqualsIgnoringCase(...func_get_args());
374
-    }
361
+	/**
362
+	 * Asserts that two variables are not equal (ignoring case).
363
+	 *
364
+	 * @throws ExpectationFailedException
365
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
366
+	 *
367
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
368
+	 *
369
+	 * @see Assert::assertNotEqualsIgnoringCase
370
+	 */
371
+	function assertNotEqualsIgnoringCase($expected, $actual, string $message = ''): void
372
+	{
373
+		Assert::assertNotEqualsIgnoringCase(...func_get_args());
374
+	}
375 375
 }
376 376
 
377 377
 if (!function_exists('PHPUnit\Framework\assertNotEqualsWithDelta')) {
378
-    /**
379
-     * Asserts that two variables are not equal (with delta).
380
-     *
381
-     * @throws ExpectationFailedException
382
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
383
-     *
384
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
385
-     *
386
-     * @see Assert::assertNotEqualsWithDelta
387
-     */
388
-    function assertNotEqualsWithDelta($expected, $actual, float $delta, string $message = ''): void
389
-    {
390
-        Assert::assertNotEqualsWithDelta(...func_get_args());
391
-    }
378
+	/**
379
+	 * Asserts that two variables are not equal (with delta).
380
+	 *
381
+	 * @throws ExpectationFailedException
382
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
383
+	 *
384
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
385
+	 *
386
+	 * @see Assert::assertNotEqualsWithDelta
387
+	 */
388
+	function assertNotEqualsWithDelta($expected, $actual, float $delta, string $message = ''): void
389
+	{
390
+		Assert::assertNotEqualsWithDelta(...func_get_args());
391
+	}
392 392
 }
393 393
 
394 394
 if (!function_exists('PHPUnit\Framework\assertObjectEquals')) {
395
-    /**
396
-     * @throws ExpectationFailedException
397
-     *
398
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
399
-     *
400
-     * @see Assert::assertObjectEquals
401
-     */
402
-    function assertObjectEquals(object $expected, object $actual, string $method = 'equals', string $message = ''): void
403
-    {
404
-        Assert::assertObjectEquals(...func_get_args());
405
-    }
395
+	/**
396
+	 * @throws ExpectationFailedException
397
+	 *
398
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
399
+	 *
400
+	 * @see Assert::assertObjectEquals
401
+	 */
402
+	function assertObjectEquals(object $expected, object $actual, string $method = 'equals', string $message = ''): void
403
+	{
404
+		Assert::assertObjectEquals(...func_get_args());
405
+	}
406 406
 }
407 407
 
408 408
 if (!function_exists('PHPUnit\Framework\assertEmpty')) {
409
-    /**
410
-     * Asserts that a variable is empty.
411
-     *
412
-     * @throws ExpectationFailedException
413
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
414
-     *
415
-     * @psalm-assert empty $actual
416
-     *
417
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
418
-     *
419
-     * @see Assert::assertEmpty
420
-     */
421
-    function assertEmpty($actual, string $message = ''): void
422
-    {
423
-        Assert::assertEmpty(...func_get_args());
424
-    }
409
+	/**
410
+	 * Asserts that a variable is empty.
411
+	 *
412
+	 * @throws ExpectationFailedException
413
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
414
+	 *
415
+	 * @psalm-assert empty $actual
416
+	 *
417
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
418
+	 *
419
+	 * @see Assert::assertEmpty
420
+	 */
421
+	function assertEmpty($actual, string $message = ''): void
422
+	{
423
+		Assert::assertEmpty(...func_get_args());
424
+	}
425 425
 }
426 426
 
427 427
 if (!function_exists('PHPUnit\Framework\assertNotEmpty')) {
428
-    /**
429
-     * Asserts that a variable is not empty.
430
-     *
431
-     * @throws ExpectationFailedException
432
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
433
-     *
434
-     * @psalm-assert !empty $actual
435
-     *
436
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
437
-     *
438
-     * @see Assert::assertNotEmpty
439
-     */
440
-    function assertNotEmpty($actual, string $message = ''): void
441
-    {
442
-        Assert::assertNotEmpty(...func_get_args());
443
-    }
428
+	/**
429
+	 * Asserts that a variable is not empty.
430
+	 *
431
+	 * @throws ExpectationFailedException
432
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
433
+	 *
434
+	 * @psalm-assert !empty $actual
435
+	 *
436
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
437
+	 *
438
+	 * @see Assert::assertNotEmpty
439
+	 */
440
+	function assertNotEmpty($actual, string $message = ''): void
441
+	{
442
+		Assert::assertNotEmpty(...func_get_args());
443
+	}
444 444
 }
445 445
 
446 446
 if (!function_exists('PHPUnit\Framework\assertGreaterThan')) {
447
-    /**
448
-     * Asserts that a value is greater than another value.
449
-     *
450
-     * @throws ExpectationFailedException
451
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
452
-     *
453
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
454
-     *
455
-     * @see Assert::assertGreaterThan
456
-     */
457
-    function assertGreaterThan($expected, $actual, string $message = ''): void
458
-    {
459
-        Assert::assertGreaterThan(...func_get_args());
460
-    }
447
+	/**
448
+	 * Asserts that a value is greater than another value.
449
+	 *
450
+	 * @throws ExpectationFailedException
451
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
452
+	 *
453
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
454
+	 *
455
+	 * @see Assert::assertGreaterThan
456
+	 */
457
+	function assertGreaterThan($expected, $actual, string $message = ''): void
458
+	{
459
+		Assert::assertGreaterThan(...func_get_args());
460
+	}
461 461
 }
462 462
 
463 463
 if (!function_exists('PHPUnit\Framework\assertGreaterThanOrEqual')) {
464
-    /**
465
-     * Asserts that a value is greater than or equal to another value.
466
-     *
467
-     * @throws ExpectationFailedException
468
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
469
-     *
470
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
471
-     *
472
-     * @see Assert::assertGreaterThanOrEqual
473
-     */
474
-    function assertGreaterThanOrEqual($expected, $actual, string $message = ''): void
475
-    {
476
-        Assert::assertGreaterThanOrEqual(...func_get_args());
477
-    }
464
+	/**
465
+	 * Asserts that a value is greater than or equal to another value.
466
+	 *
467
+	 * @throws ExpectationFailedException
468
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
469
+	 *
470
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
471
+	 *
472
+	 * @see Assert::assertGreaterThanOrEqual
473
+	 */
474
+	function assertGreaterThanOrEqual($expected, $actual, string $message = ''): void
475
+	{
476
+		Assert::assertGreaterThanOrEqual(...func_get_args());
477
+	}
478 478
 }
479 479
 
480 480
 if (!function_exists('PHPUnit\Framework\assertLessThan')) {
481
-    /**
482
-     * Asserts that a value is smaller than another value.
483
-     *
484
-     * @throws ExpectationFailedException
485
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
486
-     *
487
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
488
-     *
489
-     * @see Assert::assertLessThan
490
-     */
491
-    function assertLessThan($expected, $actual, string $message = ''): void
492
-    {
493
-        Assert::assertLessThan(...func_get_args());
494
-    }
481
+	/**
482
+	 * Asserts that a value is smaller than another value.
483
+	 *
484
+	 * @throws ExpectationFailedException
485
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
486
+	 *
487
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
488
+	 *
489
+	 * @see Assert::assertLessThan
490
+	 */
491
+	function assertLessThan($expected, $actual, string $message = ''): void
492
+	{
493
+		Assert::assertLessThan(...func_get_args());
494
+	}
495 495
 }
496 496
 
497 497
 if (!function_exists('PHPUnit\Framework\assertLessThanOrEqual')) {
498
-    /**
499
-     * Asserts that a value is smaller than or equal to another value.
500
-     *
501
-     * @throws ExpectationFailedException
502
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
503
-     *
504
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
505
-     *
506
-     * @see Assert::assertLessThanOrEqual
507
-     */
508
-    function assertLessThanOrEqual($expected, $actual, string $message = ''): void
509
-    {
510
-        Assert::assertLessThanOrEqual(...func_get_args());
511
-    }
498
+	/**
499
+	 * Asserts that a value is smaller than or equal to another value.
500
+	 *
501
+	 * @throws ExpectationFailedException
502
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
503
+	 *
504
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
505
+	 *
506
+	 * @see Assert::assertLessThanOrEqual
507
+	 */
508
+	function assertLessThanOrEqual($expected, $actual, string $message = ''): void
509
+	{
510
+		Assert::assertLessThanOrEqual(...func_get_args());
511
+	}
512 512
 }
513 513
 
514 514
 if (!function_exists('PHPUnit\Framework\assertFileEquals')) {
515
-    /**
516
-     * Asserts that the contents of one file is equal to the contents of another
517
-     * file.
518
-     *
519
-     * @throws ExpectationFailedException
520
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
521
-     *
522
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
523
-     *
524
-     * @see Assert::assertFileEquals
525
-     */
526
-    function assertFileEquals(string $expected, string $actual, string $message = ''): void
527
-    {
528
-        Assert::assertFileEquals(...func_get_args());
529
-    }
515
+	/**
516
+	 * Asserts that the contents of one file is equal to the contents of another
517
+	 * file.
518
+	 *
519
+	 * @throws ExpectationFailedException
520
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
521
+	 *
522
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
523
+	 *
524
+	 * @see Assert::assertFileEquals
525
+	 */
526
+	function assertFileEquals(string $expected, string $actual, string $message = ''): void
527
+	{
528
+		Assert::assertFileEquals(...func_get_args());
529
+	}
530 530
 }
531 531
 
532 532
 if (!function_exists('PHPUnit\Framework\assertFileEqualsCanonicalizing')) {
533
-    /**
534
-     * Asserts that the contents of one file is equal to the contents of another
535
-     * file (canonicalizing).
536
-     *
537
-     * @throws ExpectationFailedException
538
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
539
-     *
540
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
541
-     *
542
-     * @see Assert::assertFileEqualsCanonicalizing
543
-     */
544
-    function assertFileEqualsCanonicalizing(string $expected, string $actual, string $message = ''): void
545
-    {
546
-        Assert::assertFileEqualsCanonicalizing(...func_get_args());
547
-    }
533
+	/**
534
+	 * Asserts that the contents of one file is equal to the contents of another
535
+	 * file (canonicalizing).
536
+	 *
537
+	 * @throws ExpectationFailedException
538
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
539
+	 *
540
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
541
+	 *
542
+	 * @see Assert::assertFileEqualsCanonicalizing
543
+	 */
544
+	function assertFileEqualsCanonicalizing(string $expected, string $actual, string $message = ''): void
545
+	{
546
+		Assert::assertFileEqualsCanonicalizing(...func_get_args());
547
+	}
548 548
 }
549 549
 
550 550
 if (!function_exists('PHPUnit\Framework\assertFileEqualsIgnoringCase')) {
551
-    /**
552
-     * Asserts that the contents of one file is equal to the contents of another
553
-     * file (ignoring case).
554
-     *
555
-     * @throws ExpectationFailedException
556
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
557
-     *
558
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
559
-     *
560
-     * @see Assert::assertFileEqualsIgnoringCase
561
-     */
562
-    function assertFileEqualsIgnoringCase(string $expected, string $actual, string $message = ''): void
563
-    {
564
-        Assert::assertFileEqualsIgnoringCase(...func_get_args());
565
-    }
551
+	/**
552
+	 * Asserts that the contents of one file is equal to the contents of another
553
+	 * file (ignoring case).
554
+	 *
555
+	 * @throws ExpectationFailedException
556
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
557
+	 *
558
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
559
+	 *
560
+	 * @see Assert::assertFileEqualsIgnoringCase
561
+	 */
562
+	function assertFileEqualsIgnoringCase(string $expected, string $actual, string $message = ''): void
563
+	{
564
+		Assert::assertFileEqualsIgnoringCase(...func_get_args());
565
+	}
566 566
 }
567 567
 
568 568
 if (!function_exists('PHPUnit\Framework\assertFileNotEquals')) {
569
-    /**
570
-     * Asserts that the contents of one file is not equal to the contents of
571
-     * another file.
572
-     *
573
-     * @throws ExpectationFailedException
574
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
575
-     *
576
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
577
-     *
578
-     * @see Assert::assertFileNotEquals
579
-     */
580
-    function assertFileNotEquals(string $expected, string $actual, string $message = ''): void
581
-    {
582
-        Assert::assertFileNotEquals(...func_get_args());
583
-    }
569
+	/**
570
+	 * Asserts that the contents of one file is not equal to the contents of
571
+	 * another file.
572
+	 *
573
+	 * @throws ExpectationFailedException
574
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
575
+	 *
576
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
577
+	 *
578
+	 * @see Assert::assertFileNotEquals
579
+	 */
580
+	function assertFileNotEquals(string $expected, string $actual, string $message = ''): void
581
+	{
582
+		Assert::assertFileNotEquals(...func_get_args());
583
+	}
584 584
 }
585 585
 
586 586
 if (!function_exists('PHPUnit\Framework\assertFileNotEqualsCanonicalizing')) {
587
-    /**
588
-     * Asserts that the contents of one file is not equal to the contents of another
589
-     * file (canonicalizing).
590
-     *
591
-     * @throws ExpectationFailedException
592
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
593
-     *
594
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
595
-     *
596
-     * @see Assert::assertFileNotEqualsCanonicalizing
597
-     */
598
-    function assertFileNotEqualsCanonicalizing(string $expected, string $actual, string $message = ''): void
599
-    {
600
-        Assert::assertFileNotEqualsCanonicalizing(...func_get_args());
601
-    }
587
+	/**
588
+	 * Asserts that the contents of one file is not equal to the contents of another
589
+	 * file (canonicalizing).
590
+	 *
591
+	 * @throws ExpectationFailedException
592
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
593
+	 *
594
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
595
+	 *
596
+	 * @see Assert::assertFileNotEqualsCanonicalizing
597
+	 */
598
+	function assertFileNotEqualsCanonicalizing(string $expected, string $actual, string $message = ''): void
599
+	{
600
+		Assert::assertFileNotEqualsCanonicalizing(...func_get_args());
601
+	}
602 602
 }
603 603
 
604 604
 if (!function_exists('PHPUnit\Framework\assertFileNotEqualsIgnoringCase')) {
605
-    /**
606
-     * Asserts that the contents of one file is not equal to the contents of another
607
-     * file (ignoring case).
608
-     *
609
-     * @throws ExpectationFailedException
610
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
611
-     *
612
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
613
-     *
614
-     * @see Assert::assertFileNotEqualsIgnoringCase
615
-     */
616
-    function assertFileNotEqualsIgnoringCase(string $expected, string $actual, string $message = ''): void
617
-    {
618
-        Assert::assertFileNotEqualsIgnoringCase(...func_get_args());
619
-    }
605
+	/**
606
+	 * Asserts that the contents of one file is not equal to the contents of another
607
+	 * file (ignoring case).
608
+	 *
609
+	 * @throws ExpectationFailedException
610
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
611
+	 *
612
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
613
+	 *
614
+	 * @see Assert::assertFileNotEqualsIgnoringCase
615
+	 */
616
+	function assertFileNotEqualsIgnoringCase(string $expected, string $actual, string $message = ''): void
617
+	{
618
+		Assert::assertFileNotEqualsIgnoringCase(...func_get_args());
619
+	}
620 620
 }
621 621
 
622 622
 if (!function_exists('PHPUnit\Framework\assertStringEqualsFile')) {
623
-    /**
624
-     * Asserts that the contents of a string is equal
625
-     * to the contents of a file.
626
-     *
627
-     * @throws ExpectationFailedException
628
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
629
-     *
630
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
631
-     *
632
-     * @see Assert::assertStringEqualsFile
633
-     */
634
-    function assertStringEqualsFile(string $expectedFile, string $actualString, string $message = ''): void
635
-    {
636
-        Assert::assertStringEqualsFile(...func_get_args());
637
-    }
623
+	/**
624
+	 * Asserts that the contents of a string is equal
625
+	 * to the contents of a file.
626
+	 *
627
+	 * @throws ExpectationFailedException
628
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
629
+	 *
630
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
631
+	 *
632
+	 * @see Assert::assertStringEqualsFile
633
+	 */
634
+	function assertStringEqualsFile(string $expectedFile, string $actualString, string $message = ''): void
635
+	{
636
+		Assert::assertStringEqualsFile(...func_get_args());
637
+	}
638 638
 }
639 639
 
640 640
 if (!function_exists('PHPUnit\Framework\assertStringEqualsFileCanonicalizing')) {
641
-    /**
642
-     * Asserts that the contents of a string is equal
643
-     * to the contents of a file (canonicalizing).
644
-     *
645
-     * @throws ExpectationFailedException
646
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
647
-     *
648
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
649
-     *
650
-     * @see Assert::assertStringEqualsFileCanonicalizing
651
-     */
652
-    function assertStringEqualsFileCanonicalizing(string $expectedFile, string $actualString, string $message = ''): void
653
-    {
654
-        Assert::assertStringEqualsFileCanonicalizing(...func_get_args());
655
-    }
641
+	/**
642
+	 * Asserts that the contents of a string is equal
643
+	 * to the contents of a file (canonicalizing).
644
+	 *
645
+	 * @throws ExpectationFailedException
646
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
647
+	 *
648
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
649
+	 *
650
+	 * @see Assert::assertStringEqualsFileCanonicalizing
651
+	 */
652
+	function assertStringEqualsFileCanonicalizing(string $expectedFile, string $actualString, string $message = ''): void
653
+	{
654
+		Assert::assertStringEqualsFileCanonicalizing(...func_get_args());
655
+	}
656 656
 }
657 657
 
658 658
 if (!function_exists('PHPUnit\Framework\assertStringEqualsFileIgnoringCase')) {
659
-    /**
660
-     * Asserts that the contents of a string is equal
661
-     * to the contents of a file (ignoring case).
662
-     *
663
-     * @throws ExpectationFailedException
664
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
665
-     *
666
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
667
-     *
668
-     * @see Assert::assertStringEqualsFileIgnoringCase
669
-     */
670
-    function assertStringEqualsFileIgnoringCase(string $expectedFile, string $actualString, string $message = ''): void
671
-    {
672
-        Assert::assertStringEqualsFileIgnoringCase(...func_get_args());
673
-    }
659
+	/**
660
+	 * Asserts that the contents of a string is equal
661
+	 * to the contents of a file (ignoring case).
662
+	 *
663
+	 * @throws ExpectationFailedException
664
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
665
+	 *
666
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
667
+	 *
668
+	 * @see Assert::assertStringEqualsFileIgnoringCase
669
+	 */
670
+	function assertStringEqualsFileIgnoringCase(string $expectedFile, string $actualString, string $message = ''): void
671
+	{
672
+		Assert::assertStringEqualsFileIgnoringCase(...func_get_args());
673
+	}
674 674
 }
675 675
 
676 676
 if (!function_exists('PHPUnit\Framework\assertStringNotEqualsFile')) {
677
-    /**
678
-     * Asserts that the contents of a string is not equal
679
-     * to the contents of a file.
680
-     *
681
-     * @throws ExpectationFailedException
682
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
683
-     *
684
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
685
-     *
686
-     * @see Assert::assertStringNotEqualsFile
687
-     */
688
-    function assertStringNotEqualsFile(string $expectedFile, string $actualString, string $message = ''): void
689
-    {
690
-        Assert::assertStringNotEqualsFile(...func_get_args());
691
-    }
677
+	/**
678
+	 * Asserts that the contents of a string is not equal
679
+	 * to the contents of a file.
680
+	 *
681
+	 * @throws ExpectationFailedException
682
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
683
+	 *
684
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
685
+	 *
686
+	 * @see Assert::assertStringNotEqualsFile
687
+	 */
688
+	function assertStringNotEqualsFile(string $expectedFile, string $actualString, string $message = ''): void
689
+	{
690
+		Assert::assertStringNotEqualsFile(...func_get_args());
691
+	}
692 692
 }
693 693
 
694 694
 if (!function_exists('PHPUnit\Framework\assertStringNotEqualsFileCanonicalizing')) {
695
-    /**
696
-     * Asserts that the contents of a string is not equal
697
-     * to the contents of a file (canonicalizing).
698
-     *
699
-     * @throws ExpectationFailedException
700
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
701
-     *
702
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
703
-     *
704
-     * @see Assert::assertStringNotEqualsFileCanonicalizing
705
-     */
706
-    function assertStringNotEqualsFileCanonicalizing(string $expectedFile, string $actualString, string $message = ''): void
707
-    {
708
-        Assert::assertStringNotEqualsFileCanonicalizing(...func_get_args());
709
-    }
695
+	/**
696
+	 * Asserts that the contents of a string is not equal
697
+	 * to the contents of a file (canonicalizing).
698
+	 *
699
+	 * @throws ExpectationFailedException
700
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
701
+	 *
702
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
703
+	 *
704
+	 * @see Assert::assertStringNotEqualsFileCanonicalizing
705
+	 */
706
+	function assertStringNotEqualsFileCanonicalizing(string $expectedFile, string $actualString, string $message = ''): void
707
+	{
708
+		Assert::assertStringNotEqualsFileCanonicalizing(...func_get_args());
709
+	}
710 710
 }
711 711
 
712 712
 if (!function_exists('PHPUnit\Framework\assertStringNotEqualsFileIgnoringCase')) {
713
-    /**
714
-     * Asserts that the contents of a string is not equal
715
-     * to the contents of a file (ignoring case).
716
-     *
717
-     * @throws ExpectationFailedException
718
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
719
-     *
720
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
721
-     *
722
-     * @see Assert::assertStringNotEqualsFileIgnoringCase
723
-     */
724
-    function assertStringNotEqualsFileIgnoringCase(string $expectedFile, string $actualString, string $message = ''): void
725
-    {
726
-        Assert::assertStringNotEqualsFileIgnoringCase(...func_get_args());
727
-    }
713
+	/**
714
+	 * Asserts that the contents of a string is not equal
715
+	 * to the contents of a file (ignoring case).
716
+	 *
717
+	 * @throws ExpectationFailedException
718
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
719
+	 *
720
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
721
+	 *
722
+	 * @see Assert::assertStringNotEqualsFileIgnoringCase
723
+	 */
724
+	function assertStringNotEqualsFileIgnoringCase(string $expectedFile, string $actualString, string $message = ''): void
725
+	{
726
+		Assert::assertStringNotEqualsFileIgnoringCase(...func_get_args());
727
+	}
728 728
 }
729 729
 
730 730
 if (!function_exists('PHPUnit\Framework\assertIsReadable')) {
731
-    /**
732
-     * Asserts that a file/dir is readable.
733
-     *
734
-     * @throws ExpectationFailedException
735
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
736
-     *
737
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
738
-     *
739
-     * @see Assert::assertIsReadable
740
-     */
741
-    function assertIsReadable(string $filename, string $message = ''): void
742
-    {
743
-        Assert::assertIsReadable(...func_get_args());
744
-    }
731
+	/**
732
+	 * Asserts that a file/dir is readable.
733
+	 *
734
+	 * @throws ExpectationFailedException
735
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
736
+	 *
737
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
738
+	 *
739
+	 * @see Assert::assertIsReadable
740
+	 */
741
+	function assertIsReadable(string $filename, string $message = ''): void
742
+	{
743
+		Assert::assertIsReadable(...func_get_args());
744
+	}
745 745
 }
746 746
 
747 747
 if (!function_exists('PHPUnit\Framework\assertIsNotReadable')) {
748
-    /**
749
-     * Asserts that a file/dir exists and is not readable.
750
-     *
751
-     * @throws ExpectationFailedException
752
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
753
-     *
754
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
755
-     *
756
-     * @see Assert::assertIsNotReadable
757
-     */
758
-    function assertIsNotReadable(string $filename, string $message = ''): void
759
-    {
760
-        Assert::assertIsNotReadable(...func_get_args());
761
-    }
748
+	/**
749
+	 * Asserts that a file/dir exists and is not readable.
750
+	 *
751
+	 * @throws ExpectationFailedException
752
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
753
+	 *
754
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
755
+	 *
756
+	 * @see Assert::assertIsNotReadable
757
+	 */
758
+	function assertIsNotReadable(string $filename, string $message = ''): void
759
+	{
760
+		Assert::assertIsNotReadable(...func_get_args());
761
+	}
762 762
 }
763 763
 
764 764
 if (!function_exists('PHPUnit\Framework\assertNotIsReadable')) {
765
-    /**
766
-     * Asserts that a file/dir exists and is not readable.
767
-     *
768
-     * @throws ExpectationFailedException
769
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
770
-     *
771
-     * @codeCoverageIgnore
772
-     *
773
-     * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4062
774
-     *
775
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
776
-     *
777
-     * @see Assert::assertNotIsReadable
778
-     */
779
-    function assertNotIsReadable(string $filename, string $message = ''): void
780
-    {
781
-        Assert::assertNotIsReadable(...func_get_args());
782
-    }
765
+	/**
766
+	 * Asserts that a file/dir exists and is not readable.
767
+	 *
768
+	 * @throws ExpectationFailedException
769
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
770
+	 *
771
+	 * @codeCoverageIgnore
772
+	 *
773
+	 * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4062
774
+	 *
775
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
776
+	 *
777
+	 * @see Assert::assertNotIsReadable
778
+	 */
779
+	function assertNotIsReadable(string $filename, string $message = ''): void
780
+	{
781
+		Assert::assertNotIsReadable(...func_get_args());
782
+	}
783 783
 }
784 784
 
785 785
 if (!function_exists('PHPUnit\Framework\assertIsWritable')) {
786
-    /**
787
-     * Asserts that a file/dir exists and is writable.
788
-     *
789
-     * @throws ExpectationFailedException
790
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
791
-     *
792
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
793
-     *
794
-     * @see Assert::assertIsWritable
795
-     */
796
-    function assertIsWritable(string $filename, string $message = ''): void
797
-    {
798
-        Assert::assertIsWritable(...func_get_args());
799
-    }
786
+	/**
787
+	 * Asserts that a file/dir exists and is writable.
788
+	 *
789
+	 * @throws ExpectationFailedException
790
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
791
+	 *
792
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
793
+	 *
794
+	 * @see Assert::assertIsWritable
795
+	 */
796
+	function assertIsWritable(string $filename, string $message = ''): void
797
+	{
798
+		Assert::assertIsWritable(...func_get_args());
799
+	}
800 800
 }
801 801
 
802 802
 if (!function_exists('PHPUnit\Framework\assertIsNotWritable')) {
803
-    /**
804
-     * Asserts that a file/dir exists and is not writable.
805
-     *
806
-     * @throws ExpectationFailedException
807
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
808
-     *
809
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
810
-     *
811
-     * @see Assert::assertIsNotWritable
812
-     */
813
-    function assertIsNotWritable(string $filename, string $message = ''): void
814
-    {
815
-        Assert::assertIsNotWritable(...func_get_args());
816
-    }
803
+	/**
804
+	 * Asserts that a file/dir exists and is not writable.
805
+	 *
806
+	 * @throws ExpectationFailedException
807
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
808
+	 *
809
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
810
+	 *
811
+	 * @see Assert::assertIsNotWritable
812
+	 */
813
+	function assertIsNotWritable(string $filename, string $message = ''): void
814
+	{
815
+		Assert::assertIsNotWritable(...func_get_args());
816
+	}
817 817
 }
818 818
 
819 819
 if (!function_exists('PHPUnit\Framework\assertNotIsWritable')) {
820
-    /**
821
-     * Asserts that a file/dir exists and is not writable.
822
-     *
823
-     * @throws ExpectationFailedException
824
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
825
-     *
826
-     * @codeCoverageIgnore
827
-     *
828
-     * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4065
829
-     *
830
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
831
-     *
832
-     * @see Assert::assertNotIsWritable
833
-     */
834
-    function assertNotIsWritable(string $filename, string $message = ''): void
835
-    {
836
-        Assert::assertNotIsWritable(...func_get_args());
837
-    }
820
+	/**
821
+	 * Asserts that a file/dir exists and is not writable.
822
+	 *
823
+	 * @throws ExpectationFailedException
824
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
825
+	 *
826
+	 * @codeCoverageIgnore
827
+	 *
828
+	 * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4065
829
+	 *
830
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
831
+	 *
832
+	 * @see Assert::assertNotIsWritable
833
+	 */
834
+	function assertNotIsWritable(string $filename, string $message = ''): void
835
+	{
836
+		Assert::assertNotIsWritable(...func_get_args());
837
+	}
838 838
 }
839 839
 
840 840
 if (!function_exists('PHPUnit\Framework\assertDirectoryExists')) {
841
-    /**
842
-     * Asserts that a directory exists.
843
-     *
844
-     * @throws ExpectationFailedException
845
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
846
-     *
847
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
848
-     *
849
-     * @see Assert::assertDirectoryExists
850
-     */
851
-    function assertDirectoryExists(string $directory, string $message = ''): void
852
-    {
853
-        Assert::assertDirectoryExists(...func_get_args());
854
-    }
841
+	/**
842
+	 * Asserts that a directory exists.
843
+	 *
844
+	 * @throws ExpectationFailedException
845
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
846
+	 *
847
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
848
+	 *
849
+	 * @see Assert::assertDirectoryExists
850
+	 */
851
+	function assertDirectoryExists(string $directory, string $message = ''): void
852
+	{
853
+		Assert::assertDirectoryExists(...func_get_args());
854
+	}
855 855
 }
856 856
 
857 857
 if (!function_exists('PHPUnit\Framework\assertDirectoryDoesNotExist')) {
858
-    /**
859
-     * Asserts that a directory does not exist.
860
-     *
861
-     * @throws ExpectationFailedException
862
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
863
-     *
864
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
865
-     *
866
-     * @see Assert::assertDirectoryDoesNotExist
867
-     */
868
-    function assertDirectoryDoesNotExist(string $directory, string $message = ''): void
869
-    {
870
-        Assert::assertDirectoryDoesNotExist(...func_get_args());
871
-    }
858
+	/**
859
+	 * Asserts that a directory does not exist.
860
+	 *
861
+	 * @throws ExpectationFailedException
862
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
863
+	 *
864
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
865
+	 *
866
+	 * @see Assert::assertDirectoryDoesNotExist
867
+	 */
868
+	function assertDirectoryDoesNotExist(string $directory, string $message = ''): void
869
+	{
870
+		Assert::assertDirectoryDoesNotExist(...func_get_args());
871
+	}
872 872
 }
873 873
 
874 874
 if (!function_exists('PHPUnit\Framework\assertDirectoryNotExists')) {
875
-    /**
876
-     * Asserts that a directory does not exist.
877
-     *
878
-     * @throws ExpectationFailedException
879
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
880
-     *
881
-     * @codeCoverageIgnore
882
-     *
883
-     * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4068
884
-     *
885
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
886
-     *
887
-     * @see Assert::assertDirectoryNotExists
888
-     */
889
-    function assertDirectoryNotExists(string $directory, string $message = ''): void
890
-    {
891
-        Assert::assertDirectoryNotExists(...func_get_args());
892
-    }
875
+	/**
876
+	 * Asserts that a directory does not exist.
877
+	 *
878
+	 * @throws ExpectationFailedException
879
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
880
+	 *
881
+	 * @codeCoverageIgnore
882
+	 *
883
+	 * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4068
884
+	 *
885
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
886
+	 *
887
+	 * @see Assert::assertDirectoryNotExists
888
+	 */
889
+	function assertDirectoryNotExists(string $directory, string $message = ''): void
890
+	{
891
+		Assert::assertDirectoryNotExists(...func_get_args());
892
+	}
893 893
 }
894 894
 
895 895
 if (!function_exists('PHPUnit\Framework\assertDirectoryIsReadable')) {
896
-    /**
897
-     * Asserts that a directory exists and is readable.
898
-     *
899
-     * @throws ExpectationFailedException
900
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
901
-     *
902
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
903
-     *
904
-     * @see Assert::assertDirectoryIsReadable
905
-     */
906
-    function assertDirectoryIsReadable(string $directory, string $message = ''): void
907
-    {
908
-        Assert::assertDirectoryIsReadable(...func_get_args());
909
-    }
896
+	/**
897
+	 * Asserts that a directory exists and is readable.
898
+	 *
899
+	 * @throws ExpectationFailedException
900
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
901
+	 *
902
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
903
+	 *
904
+	 * @see Assert::assertDirectoryIsReadable
905
+	 */
906
+	function assertDirectoryIsReadable(string $directory, string $message = ''): void
907
+	{
908
+		Assert::assertDirectoryIsReadable(...func_get_args());
909
+	}
910 910
 }
911 911
 
912 912
 if (!function_exists('PHPUnit\Framework\assertDirectoryIsNotReadable')) {
913
-    /**
914
-     * Asserts that a directory exists and is not readable.
915
-     *
916
-     * @throws ExpectationFailedException
917
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
918
-     *
919
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
920
-     *
921
-     * @see Assert::assertDirectoryIsNotReadable
922
-     */
923
-    function assertDirectoryIsNotReadable(string $directory, string $message = ''): void
924
-    {
925
-        Assert::assertDirectoryIsNotReadable(...func_get_args());
926
-    }
913
+	/**
914
+	 * Asserts that a directory exists and is not readable.
915
+	 *
916
+	 * @throws ExpectationFailedException
917
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
918
+	 *
919
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
920
+	 *
921
+	 * @see Assert::assertDirectoryIsNotReadable
922
+	 */
923
+	function assertDirectoryIsNotReadable(string $directory, string $message = ''): void
924
+	{
925
+		Assert::assertDirectoryIsNotReadable(...func_get_args());
926
+	}
927 927
 }
928 928
 
929 929
 if (!function_exists('PHPUnit\Framework\assertDirectoryNotIsReadable')) {
930
-    /**
931
-     * Asserts that a directory exists and is not readable.
932
-     *
933
-     * @throws ExpectationFailedException
934
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
935
-     *
936
-     * @codeCoverageIgnore
937
-     *
938
-     * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4071
939
-     *
940
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
941
-     *
942
-     * @see Assert::assertDirectoryNotIsReadable
943
-     */
944
-    function assertDirectoryNotIsReadable(string $directory, string $message = ''): void
945
-    {
946
-        Assert::assertDirectoryNotIsReadable(...func_get_args());
947
-    }
930
+	/**
931
+	 * Asserts that a directory exists and is not readable.
932
+	 *
933
+	 * @throws ExpectationFailedException
934
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
935
+	 *
936
+	 * @codeCoverageIgnore
937
+	 *
938
+	 * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4071
939
+	 *
940
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
941
+	 *
942
+	 * @see Assert::assertDirectoryNotIsReadable
943
+	 */
944
+	function assertDirectoryNotIsReadable(string $directory, string $message = ''): void
945
+	{
946
+		Assert::assertDirectoryNotIsReadable(...func_get_args());
947
+	}
948 948
 }
949 949
 
950 950
 if (!function_exists('PHPUnit\Framework\assertDirectoryIsWritable')) {
951
-    /**
952
-     * Asserts that a directory exists and is writable.
953
-     *
954
-     * @throws ExpectationFailedException
955
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
956
-     *
957
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
958
-     *
959
-     * @see Assert::assertDirectoryIsWritable
960
-     */
961
-    function assertDirectoryIsWritable(string $directory, string $message = ''): void
962
-    {
963
-        Assert::assertDirectoryIsWritable(...func_get_args());
964
-    }
951
+	/**
952
+	 * Asserts that a directory exists and is writable.
953
+	 *
954
+	 * @throws ExpectationFailedException
955
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
956
+	 *
957
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
958
+	 *
959
+	 * @see Assert::assertDirectoryIsWritable
960
+	 */
961
+	function assertDirectoryIsWritable(string $directory, string $message = ''): void
962
+	{
963
+		Assert::assertDirectoryIsWritable(...func_get_args());
964
+	}
965 965
 }
966 966
 
967 967
 if (!function_exists('PHPUnit\Framework\assertDirectoryIsNotWritable')) {
968
-    /**
969
-     * Asserts that a directory exists and is not writable.
970
-     *
971
-     * @throws ExpectationFailedException
972
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
973
-     *
974
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
975
-     *
976
-     * @see Assert::assertDirectoryIsNotWritable
977
-     */
978
-    function assertDirectoryIsNotWritable(string $directory, string $message = ''): void
979
-    {
980
-        Assert::assertDirectoryIsNotWritable(...func_get_args());
981
-    }
968
+	/**
969
+	 * Asserts that a directory exists and is not writable.
970
+	 *
971
+	 * @throws ExpectationFailedException
972
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
973
+	 *
974
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
975
+	 *
976
+	 * @see Assert::assertDirectoryIsNotWritable
977
+	 */
978
+	function assertDirectoryIsNotWritable(string $directory, string $message = ''): void
979
+	{
980
+		Assert::assertDirectoryIsNotWritable(...func_get_args());
981
+	}
982 982
 }
983 983
 
984 984
 if (!function_exists('PHPUnit\Framework\assertDirectoryNotIsWritable')) {
985
-    /**
986
-     * Asserts that a directory exists and is not writable.
987
-     *
988
-     * @throws ExpectationFailedException
989
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
990
-     *
991
-     * @codeCoverageIgnore
992
-     *
993
-     * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4074
994
-     *
995
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
996
-     *
997
-     * @see Assert::assertDirectoryNotIsWritable
998
-     */
999
-    function assertDirectoryNotIsWritable(string $directory, string $message = ''): void
1000
-    {
1001
-        Assert::assertDirectoryNotIsWritable(...func_get_args());
1002
-    }
985
+	/**
986
+	 * Asserts that a directory exists and is not writable.
987
+	 *
988
+	 * @throws ExpectationFailedException
989
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
990
+	 *
991
+	 * @codeCoverageIgnore
992
+	 *
993
+	 * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4074
994
+	 *
995
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
996
+	 *
997
+	 * @see Assert::assertDirectoryNotIsWritable
998
+	 */
999
+	function assertDirectoryNotIsWritable(string $directory, string $message = ''): void
1000
+	{
1001
+		Assert::assertDirectoryNotIsWritable(...func_get_args());
1002
+	}
1003 1003
 }
1004 1004
 
1005 1005
 if (!function_exists('PHPUnit\Framework\assertFileExists')) {
1006
-    /**
1007
-     * Asserts that a file exists.
1008
-     *
1009
-     * @throws ExpectationFailedException
1010
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1011
-     *
1012
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1013
-     *
1014
-     * @see Assert::assertFileExists
1015
-     */
1016
-    function assertFileExists(string $filename, string $message = ''): void
1017
-    {
1018
-        Assert::assertFileExists(...func_get_args());
1019
-    }
1006
+	/**
1007
+	 * Asserts that a file exists.
1008
+	 *
1009
+	 * @throws ExpectationFailedException
1010
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1011
+	 *
1012
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1013
+	 *
1014
+	 * @see Assert::assertFileExists
1015
+	 */
1016
+	function assertFileExists(string $filename, string $message = ''): void
1017
+	{
1018
+		Assert::assertFileExists(...func_get_args());
1019
+	}
1020 1020
 }
1021 1021
 
1022 1022
 if (!function_exists('PHPUnit\Framework\assertFileDoesNotExist')) {
1023
-    /**
1024
-     * Asserts that a file does not exist.
1025
-     *
1026
-     * @throws ExpectationFailedException
1027
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1028
-     *
1029
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1030
-     *
1031
-     * @see Assert::assertFileDoesNotExist
1032
-     */
1033
-    function assertFileDoesNotExist(string $filename, string $message = ''): void
1034
-    {
1035
-        Assert::assertFileDoesNotExist(...func_get_args());
1036
-    }
1023
+	/**
1024
+	 * Asserts that a file does not exist.
1025
+	 *
1026
+	 * @throws ExpectationFailedException
1027
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1028
+	 *
1029
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1030
+	 *
1031
+	 * @see Assert::assertFileDoesNotExist
1032
+	 */
1033
+	function assertFileDoesNotExist(string $filename, string $message = ''): void
1034
+	{
1035
+		Assert::assertFileDoesNotExist(...func_get_args());
1036
+	}
1037 1037
 }
1038 1038
 
1039 1039
 if (!function_exists('PHPUnit\Framework\assertFileNotExists')) {
1040
-    /**
1041
-     * Asserts that a file does not exist.
1042
-     *
1043
-     * @throws ExpectationFailedException
1044
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1045
-     *
1046
-     * @codeCoverageIgnore
1047
-     *
1048
-     * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4077
1049
-     *
1050
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1051
-     *
1052
-     * @see Assert::assertFileNotExists
1053
-     */
1054
-    function assertFileNotExists(string $filename, string $message = ''): void
1055
-    {
1056
-        Assert::assertFileNotExists(...func_get_args());
1057
-    }
1040
+	/**
1041
+	 * Asserts that a file does not exist.
1042
+	 *
1043
+	 * @throws ExpectationFailedException
1044
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1045
+	 *
1046
+	 * @codeCoverageIgnore
1047
+	 *
1048
+	 * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4077
1049
+	 *
1050
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1051
+	 *
1052
+	 * @see Assert::assertFileNotExists
1053
+	 */
1054
+	function assertFileNotExists(string $filename, string $message = ''): void
1055
+	{
1056
+		Assert::assertFileNotExists(...func_get_args());
1057
+	}
1058 1058
 }
1059 1059
 
1060 1060
 if (!function_exists('PHPUnit\Framework\assertFileIsReadable')) {
1061
-    /**
1062
-     * Asserts that a file exists and is readable.
1063
-     *
1064
-     * @throws ExpectationFailedException
1065
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1066
-     *
1067
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1068
-     *
1069
-     * @see Assert::assertFileIsReadable
1070
-     */
1071
-    function assertFileIsReadable(string $file, string $message = ''): void
1072
-    {
1073
-        Assert::assertFileIsReadable(...func_get_args());
1074
-    }
1061
+	/**
1062
+	 * Asserts that a file exists and is readable.
1063
+	 *
1064
+	 * @throws ExpectationFailedException
1065
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1066
+	 *
1067
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1068
+	 *
1069
+	 * @see Assert::assertFileIsReadable
1070
+	 */
1071
+	function assertFileIsReadable(string $file, string $message = ''): void
1072
+	{
1073
+		Assert::assertFileIsReadable(...func_get_args());
1074
+	}
1075 1075
 }
1076 1076
 
1077 1077
 if (!function_exists('PHPUnit\Framework\assertFileIsNotReadable')) {
1078
-    /**
1079
-     * Asserts that a file exists and is not readable.
1080
-     *
1081
-     * @throws ExpectationFailedException
1082
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1083
-     *
1084
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1085
-     *
1086
-     * @see Assert::assertFileIsNotReadable
1087
-     */
1088
-    function assertFileIsNotReadable(string $file, string $message = ''): void
1089
-    {
1090
-        Assert::assertFileIsNotReadable(...func_get_args());
1091
-    }
1078
+	/**
1079
+	 * Asserts that a file exists and is not readable.
1080
+	 *
1081
+	 * @throws ExpectationFailedException
1082
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1083
+	 *
1084
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1085
+	 *
1086
+	 * @see Assert::assertFileIsNotReadable
1087
+	 */
1088
+	function assertFileIsNotReadable(string $file, string $message = ''): void
1089
+	{
1090
+		Assert::assertFileIsNotReadable(...func_get_args());
1091
+	}
1092 1092
 }
1093 1093
 
1094 1094
 if (!function_exists('PHPUnit\Framework\assertFileNotIsReadable')) {
1095
-    /**
1096
-     * Asserts that a file exists and is not readable.
1097
-     *
1098
-     * @throws ExpectationFailedException
1099
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1100
-     *
1101
-     * @codeCoverageIgnore
1102
-     *
1103
-     * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4080
1104
-     *
1105
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1106
-     *
1107
-     * @see Assert::assertFileNotIsReadable
1108
-     */
1109
-    function assertFileNotIsReadable(string $file, string $message = ''): void
1110
-    {
1111
-        Assert::assertFileNotIsReadable(...func_get_args());
1112
-    }
1095
+	/**
1096
+	 * Asserts that a file exists and is not readable.
1097
+	 *
1098
+	 * @throws ExpectationFailedException
1099
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1100
+	 *
1101
+	 * @codeCoverageIgnore
1102
+	 *
1103
+	 * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4080
1104
+	 *
1105
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1106
+	 *
1107
+	 * @see Assert::assertFileNotIsReadable
1108
+	 */
1109
+	function assertFileNotIsReadable(string $file, string $message = ''): void
1110
+	{
1111
+		Assert::assertFileNotIsReadable(...func_get_args());
1112
+	}
1113 1113
 }
1114 1114
 
1115 1115
 if (!function_exists('PHPUnit\Framework\assertFileIsWritable')) {
1116
-    /**
1117
-     * Asserts that a file exists and is writable.
1118
-     *
1119
-     * @throws ExpectationFailedException
1120
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1121
-     *
1122
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1123
-     *
1124
-     * @see Assert::assertFileIsWritable
1125
-     */
1126
-    function assertFileIsWritable(string $file, string $message = ''): void
1127
-    {
1128
-        Assert::assertFileIsWritable(...func_get_args());
1129
-    }
1116
+	/**
1117
+	 * Asserts that a file exists and is writable.
1118
+	 *
1119
+	 * @throws ExpectationFailedException
1120
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1121
+	 *
1122
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1123
+	 *
1124
+	 * @see Assert::assertFileIsWritable
1125
+	 */
1126
+	function assertFileIsWritable(string $file, string $message = ''): void
1127
+	{
1128
+		Assert::assertFileIsWritable(...func_get_args());
1129
+	}
1130 1130
 }
1131 1131
 
1132 1132
 if (!function_exists('PHPUnit\Framework\assertFileIsNotWritable')) {
1133
-    /**
1134
-     * Asserts that a file exists and is not writable.
1135
-     *
1136
-     * @throws ExpectationFailedException
1137
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1138
-     *
1139
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1140
-     *
1141
-     * @see Assert::assertFileIsNotWritable
1142
-     */
1143
-    function assertFileIsNotWritable(string $file, string $message = ''): void
1144
-    {
1145
-        Assert::assertFileIsNotWritable(...func_get_args());
1146
-    }
1133
+	/**
1134
+	 * Asserts that a file exists and is not writable.
1135
+	 *
1136
+	 * @throws ExpectationFailedException
1137
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1138
+	 *
1139
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1140
+	 *
1141
+	 * @see Assert::assertFileIsNotWritable
1142
+	 */
1143
+	function assertFileIsNotWritable(string $file, string $message = ''): void
1144
+	{
1145
+		Assert::assertFileIsNotWritable(...func_get_args());
1146
+	}
1147 1147
 }
1148 1148
 
1149 1149
 if (!function_exists('PHPUnit\Framework\assertFileNotIsWritable')) {
1150
-    /**
1151
-     * Asserts that a file exists and is not writable.
1152
-     *
1153
-     * @throws ExpectationFailedException
1154
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1155
-     *
1156
-     * @codeCoverageIgnore
1157
-     *
1158
-     * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4083
1159
-     *
1160
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1161
-     *
1162
-     * @see Assert::assertFileNotIsWritable
1163
-     */
1164
-    function assertFileNotIsWritable(string $file, string $message = ''): void
1165
-    {
1166
-        Assert::assertFileNotIsWritable(...func_get_args());
1167
-    }
1150
+	/**
1151
+	 * Asserts that a file exists and is not writable.
1152
+	 *
1153
+	 * @throws ExpectationFailedException
1154
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1155
+	 *
1156
+	 * @codeCoverageIgnore
1157
+	 *
1158
+	 * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4083
1159
+	 *
1160
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1161
+	 *
1162
+	 * @see Assert::assertFileNotIsWritable
1163
+	 */
1164
+	function assertFileNotIsWritable(string $file, string $message = ''): void
1165
+	{
1166
+		Assert::assertFileNotIsWritable(...func_get_args());
1167
+	}
1168 1168
 }
1169 1169
 
1170 1170
 if (!function_exists('PHPUnit\Framework\assertTrue')) {
1171
-    /**
1172
-     * Asserts that a condition is true.
1173
-     *
1174
-     * @throws ExpectationFailedException
1175
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1176
-     *
1177
-     * @psalm-assert true $condition
1178
-     *
1179
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1180
-     *
1181
-     * @see Assert::assertTrue
1182
-     */
1183
-    function assertTrue($condition, string $message = ''): void
1184
-    {
1185
-        Assert::assertTrue(...func_get_args());
1186
-    }
1171
+	/**
1172
+	 * Asserts that a condition is true.
1173
+	 *
1174
+	 * @throws ExpectationFailedException
1175
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1176
+	 *
1177
+	 * @psalm-assert true $condition
1178
+	 *
1179
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1180
+	 *
1181
+	 * @see Assert::assertTrue
1182
+	 */
1183
+	function assertTrue($condition, string $message = ''): void
1184
+	{
1185
+		Assert::assertTrue(...func_get_args());
1186
+	}
1187 1187
 }
1188 1188
 
1189 1189
 if (!function_exists('PHPUnit\Framework\assertNotTrue')) {
1190
-    /**
1191
-     * Asserts that a condition is not true.
1192
-     *
1193
-     * @throws ExpectationFailedException
1194
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1195
-     *
1196
-     * @psalm-assert !true $condition
1197
-     *
1198
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1199
-     *
1200
-     * @see Assert::assertNotTrue
1201
-     */
1202
-    function assertNotTrue($condition, string $message = ''): void
1203
-    {
1204
-        Assert::assertNotTrue(...func_get_args());
1205
-    }
1190
+	/**
1191
+	 * Asserts that a condition is not true.
1192
+	 *
1193
+	 * @throws ExpectationFailedException
1194
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1195
+	 *
1196
+	 * @psalm-assert !true $condition
1197
+	 *
1198
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1199
+	 *
1200
+	 * @see Assert::assertNotTrue
1201
+	 */
1202
+	function assertNotTrue($condition, string $message = ''): void
1203
+	{
1204
+		Assert::assertNotTrue(...func_get_args());
1205
+	}
1206 1206
 }
1207 1207
 
1208 1208
 if (!function_exists('PHPUnit\Framework\assertFalse')) {
1209
-    /**
1210
-     * Asserts that a condition is false.
1211
-     *
1212
-     * @throws ExpectationFailedException
1213
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1214
-     *
1215
-     * @psalm-assert false $condition
1216
-     *
1217
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1218
-     *
1219
-     * @see Assert::assertFalse
1220
-     */
1221
-    function assertFalse($condition, string $message = ''): void
1222
-    {
1223
-        Assert::assertFalse(...func_get_args());
1224
-    }
1209
+	/**
1210
+	 * Asserts that a condition is false.
1211
+	 *
1212
+	 * @throws ExpectationFailedException
1213
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1214
+	 *
1215
+	 * @psalm-assert false $condition
1216
+	 *
1217
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1218
+	 *
1219
+	 * @see Assert::assertFalse
1220
+	 */
1221
+	function assertFalse($condition, string $message = ''): void
1222
+	{
1223
+		Assert::assertFalse(...func_get_args());
1224
+	}
1225 1225
 }
1226 1226
 
1227 1227
 if (!function_exists('PHPUnit\Framework\assertNotFalse')) {
1228
-    /**
1229
-     * Asserts that a condition is not false.
1230
-     *
1231
-     * @throws ExpectationFailedException
1232
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1233
-     *
1234
-     * @psalm-assert !false $condition
1235
-     *
1236
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1237
-     *
1238
-     * @see Assert::assertNotFalse
1239
-     */
1240
-    function assertNotFalse($condition, string $message = ''): void
1241
-    {
1242
-        Assert::assertNotFalse(...func_get_args());
1243
-    }
1228
+	/**
1229
+	 * Asserts that a condition is not false.
1230
+	 *
1231
+	 * @throws ExpectationFailedException
1232
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1233
+	 *
1234
+	 * @psalm-assert !false $condition
1235
+	 *
1236
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1237
+	 *
1238
+	 * @see Assert::assertNotFalse
1239
+	 */
1240
+	function assertNotFalse($condition, string $message = ''): void
1241
+	{
1242
+		Assert::assertNotFalse(...func_get_args());
1243
+	}
1244 1244
 }
1245 1245
 
1246 1246
 if (!function_exists('PHPUnit\Framework\assertNull')) {
1247
-    /**
1248
-     * Asserts that a variable is null.
1249
-     *
1250
-     * @throws ExpectationFailedException
1251
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1252
-     *
1253
-     * @psalm-assert null $actual
1254
-     *
1255
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1256
-     *
1257
-     * @see Assert::assertNull
1258
-     */
1259
-    function assertNull($actual, string $message = ''): void
1260
-    {
1261
-        Assert::assertNull(...func_get_args());
1262
-    }
1247
+	/**
1248
+	 * Asserts that a variable is null.
1249
+	 *
1250
+	 * @throws ExpectationFailedException
1251
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1252
+	 *
1253
+	 * @psalm-assert null $actual
1254
+	 *
1255
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1256
+	 *
1257
+	 * @see Assert::assertNull
1258
+	 */
1259
+	function assertNull($actual, string $message = ''): void
1260
+	{
1261
+		Assert::assertNull(...func_get_args());
1262
+	}
1263 1263
 }
1264 1264
 
1265 1265
 if (!function_exists('PHPUnit\Framework\assertNotNull')) {
1266
-    /**
1267
-     * Asserts that a variable is not null.
1268
-     *
1269
-     * @throws ExpectationFailedException
1270
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1271
-     *
1272
-     * @psalm-assert !null $actual
1273
-     *
1274
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1275
-     *
1276
-     * @see Assert::assertNotNull
1277
-     */
1278
-    function assertNotNull($actual, string $message = ''): void
1279
-    {
1280
-        Assert::assertNotNull(...func_get_args());
1281
-    }
1266
+	/**
1267
+	 * Asserts that a variable is not null.
1268
+	 *
1269
+	 * @throws ExpectationFailedException
1270
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1271
+	 *
1272
+	 * @psalm-assert !null $actual
1273
+	 *
1274
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1275
+	 *
1276
+	 * @see Assert::assertNotNull
1277
+	 */
1278
+	function assertNotNull($actual, string $message = ''): void
1279
+	{
1280
+		Assert::assertNotNull(...func_get_args());
1281
+	}
1282 1282
 }
1283 1283
 
1284 1284
 if (!function_exists('PHPUnit\Framework\assertFinite')) {
1285
-    /**
1286
-     * Asserts that a variable is finite.
1287
-     *
1288
-     * @throws ExpectationFailedException
1289
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1290
-     *
1291
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1292
-     *
1293
-     * @see Assert::assertFinite
1294
-     */
1295
-    function assertFinite($actual, string $message = ''): void
1296
-    {
1297
-        Assert::assertFinite(...func_get_args());
1298
-    }
1285
+	/**
1286
+	 * Asserts that a variable is finite.
1287
+	 *
1288
+	 * @throws ExpectationFailedException
1289
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1290
+	 *
1291
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1292
+	 *
1293
+	 * @see Assert::assertFinite
1294
+	 */
1295
+	function assertFinite($actual, string $message = ''): void
1296
+	{
1297
+		Assert::assertFinite(...func_get_args());
1298
+	}
1299 1299
 }
1300 1300
 
1301 1301
 if (!function_exists('PHPUnit\Framework\assertInfinite')) {
1302
-    /**
1303
-     * Asserts that a variable is infinite.
1304
-     *
1305
-     * @throws ExpectationFailedException
1306
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1307
-     *
1308
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1309
-     *
1310
-     * @see Assert::assertInfinite
1311
-     */
1312
-    function assertInfinite($actual, string $message = ''): void
1313
-    {
1314
-        Assert::assertInfinite(...func_get_args());
1315
-    }
1302
+	/**
1303
+	 * Asserts that a variable is infinite.
1304
+	 *
1305
+	 * @throws ExpectationFailedException
1306
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1307
+	 *
1308
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1309
+	 *
1310
+	 * @see Assert::assertInfinite
1311
+	 */
1312
+	function assertInfinite($actual, string $message = ''): void
1313
+	{
1314
+		Assert::assertInfinite(...func_get_args());
1315
+	}
1316 1316
 }
1317 1317
 
1318 1318
 if (!function_exists('PHPUnit\Framework\assertNan')) {
1319
-    /**
1320
-     * Asserts that a variable is nan.
1321
-     *
1322
-     * @throws ExpectationFailedException
1323
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1324
-     *
1325
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1326
-     *
1327
-     * @see Assert::assertNan
1328
-     */
1329
-    function assertNan($actual, string $message = ''): void
1330
-    {
1331
-        Assert::assertNan(...func_get_args());
1332
-    }
1319
+	/**
1320
+	 * Asserts that a variable is nan.
1321
+	 *
1322
+	 * @throws ExpectationFailedException
1323
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1324
+	 *
1325
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1326
+	 *
1327
+	 * @see Assert::assertNan
1328
+	 */
1329
+	function assertNan($actual, string $message = ''): void
1330
+	{
1331
+		Assert::assertNan(...func_get_args());
1332
+	}
1333 1333
 }
1334 1334
 
1335 1335
 if (!function_exists('PHPUnit\Framework\assertClassHasAttribute')) {
1336
-    /**
1337
-     * Asserts that a class has a specified attribute.
1338
-     *
1339
-     * @throws ExpectationFailedException
1340
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1341
-     * @throws Exception
1342
-     *
1343
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1344
-     *
1345
-     * @see Assert::assertClassHasAttribute
1346
-     */
1347
-    function assertClassHasAttribute(string $attributeName, string $className, string $message = ''): void
1348
-    {
1349
-        Assert::assertClassHasAttribute(...func_get_args());
1350
-    }
1336
+	/**
1337
+	 * Asserts that a class has a specified attribute.
1338
+	 *
1339
+	 * @throws ExpectationFailedException
1340
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1341
+	 * @throws Exception
1342
+	 *
1343
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1344
+	 *
1345
+	 * @see Assert::assertClassHasAttribute
1346
+	 */
1347
+	function assertClassHasAttribute(string $attributeName, string $className, string $message = ''): void
1348
+	{
1349
+		Assert::assertClassHasAttribute(...func_get_args());
1350
+	}
1351 1351
 }
1352 1352
 
1353 1353
 if (!function_exists('PHPUnit\Framework\assertClassNotHasAttribute')) {
1354
-    /**
1355
-     * Asserts that a class does not have a specified attribute.
1356
-     *
1357
-     * @throws ExpectationFailedException
1358
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1359
-     * @throws Exception
1360
-     *
1361
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1362
-     *
1363
-     * @see Assert::assertClassNotHasAttribute
1364
-     */
1365
-    function assertClassNotHasAttribute(string $attributeName, string $className, string $message = ''): void
1366
-    {
1367
-        Assert::assertClassNotHasAttribute(...func_get_args());
1368
-    }
1354
+	/**
1355
+	 * Asserts that a class does not have a specified attribute.
1356
+	 *
1357
+	 * @throws ExpectationFailedException
1358
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1359
+	 * @throws Exception
1360
+	 *
1361
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1362
+	 *
1363
+	 * @see Assert::assertClassNotHasAttribute
1364
+	 */
1365
+	function assertClassNotHasAttribute(string $attributeName, string $className, string $message = ''): void
1366
+	{
1367
+		Assert::assertClassNotHasAttribute(...func_get_args());
1368
+	}
1369 1369
 }
1370 1370
 
1371 1371
 if (!function_exists('PHPUnit\Framework\assertClassHasStaticAttribute')) {
1372
-    /**
1373
-     * Asserts that a class has a specified static attribute.
1374
-     *
1375
-     * @throws ExpectationFailedException
1376
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1377
-     * @throws Exception
1378
-     *
1379
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1380
-     *
1381
-     * @see Assert::assertClassHasStaticAttribute
1382
-     */
1383
-    function assertClassHasStaticAttribute(string $attributeName, string $className, string $message = ''): void
1384
-    {
1385
-        Assert::assertClassHasStaticAttribute(...func_get_args());
1386
-    }
1372
+	/**
1373
+	 * Asserts that a class has a specified static attribute.
1374
+	 *
1375
+	 * @throws ExpectationFailedException
1376
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1377
+	 * @throws Exception
1378
+	 *
1379
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1380
+	 *
1381
+	 * @see Assert::assertClassHasStaticAttribute
1382
+	 */
1383
+	function assertClassHasStaticAttribute(string $attributeName, string $className, string $message = ''): void
1384
+	{
1385
+		Assert::assertClassHasStaticAttribute(...func_get_args());
1386
+	}
1387 1387
 }
1388 1388
 
1389 1389
 if (!function_exists('PHPUnit\Framework\assertClassNotHasStaticAttribute')) {
1390
-    /**
1391
-     * Asserts that a class does not have a specified static attribute.
1392
-     *
1393
-     * @throws ExpectationFailedException
1394
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1395
-     * @throws Exception
1396
-     *
1397
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1398
-     *
1399
-     * @see Assert::assertClassNotHasStaticAttribute
1400
-     */
1401
-    function assertClassNotHasStaticAttribute(string $attributeName, string $className, string $message = ''): void
1402
-    {
1403
-        Assert::assertClassNotHasStaticAttribute(...func_get_args());
1404
-    }
1390
+	/**
1391
+	 * Asserts that a class does not have a specified static attribute.
1392
+	 *
1393
+	 * @throws ExpectationFailedException
1394
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1395
+	 * @throws Exception
1396
+	 *
1397
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1398
+	 *
1399
+	 * @see Assert::assertClassNotHasStaticAttribute
1400
+	 */
1401
+	function assertClassNotHasStaticAttribute(string $attributeName, string $className, string $message = ''): void
1402
+	{
1403
+		Assert::assertClassNotHasStaticAttribute(...func_get_args());
1404
+	}
1405 1405
 }
1406 1406
 
1407 1407
 if (!function_exists('PHPUnit\Framework\assertObjectHasAttribute')) {
1408
-    /**
1409
-     * Asserts that an object has a specified attribute.
1410
-     *
1411
-     * @param object $object
1412
-     *
1413
-     * @throws ExpectationFailedException
1414
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1415
-     * @throws Exception
1416
-     *
1417
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1418
-     *
1419
-     * @see Assert::assertObjectHasAttribute
1420
-     */
1421
-    function assertObjectHasAttribute(string $attributeName, $object, string $message = ''): void
1422
-    {
1423
-        Assert::assertObjectHasAttribute(...func_get_args());
1424
-    }
1408
+	/**
1409
+	 * Asserts that an object has a specified attribute.
1410
+	 *
1411
+	 * @param object $object
1412
+	 *
1413
+	 * @throws ExpectationFailedException
1414
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1415
+	 * @throws Exception
1416
+	 *
1417
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1418
+	 *
1419
+	 * @see Assert::assertObjectHasAttribute
1420
+	 */
1421
+	function assertObjectHasAttribute(string $attributeName, $object, string $message = ''): void
1422
+	{
1423
+		Assert::assertObjectHasAttribute(...func_get_args());
1424
+	}
1425 1425
 }
1426 1426
 
1427 1427
 if (!function_exists('PHPUnit\Framework\assertObjectNotHasAttribute')) {
1428
-    /**
1429
-     * Asserts that an object does not have a specified attribute.
1430
-     *
1431
-     * @param object $object
1432
-     *
1433
-     * @throws ExpectationFailedException
1434
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1435
-     * @throws Exception
1436
-     *
1437
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1438
-     *
1439
-     * @see Assert::assertObjectNotHasAttribute
1440
-     */
1441
-    function assertObjectNotHasAttribute(string $attributeName, $object, string $message = ''): void
1442
-    {
1443
-        Assert::assertObjectNotHasAttribute(...func_get_args());
1444
-    }
1428
+	/**
1429
+	 * Asserts that an object does not have a specified attribute.
1430
+	 *
1431
+	 * @param object $object
1432
+	 *
1433
+	 * @throws ExpectationFailedException
1434
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1435
+	 * @throws Exception
1436
+	 *
1437
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1438
+	 *
1439
+	 * @see Assert::assertObjectNotHasAttribute
1440
+	 */
1441
+	function assertObjectNotHasAttribute(string $attributeName, $object, string $message = ''): void
1442
+	{
1443
+		Assert::assertObjectNotHasAttribute(...func_get_args());
1444
+	}
1445 1445
 }
1446 1446
 
1447 1447
 if (!function_exists('PHPUnit\Framework\assertSame')) {
1448
-    /**
1449
-     * Asserts that two variables have the same type and value.
1450
-     * Used on objects, it asserts that two variables reference
1451
-     * the same object.
1452
-     *
1453
-     * @throws ExpectationFailedException
1454
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1455
-     *
1456
-     * @psalm-template ExpectedType
1457
-     *
1458
-     * @psalm-param ExpectedType $expected
1459
-     *
1460
-     * @psalm-assert =ExpectedType $actual
1461
-     *
1462
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1463
-     *
1464
-     * @see Assert::assertSame
1465
-     */
1466
-    function assertSame($expected, $actual, string $message = ''): void
1467
-    {
1468
-        Assert::assertSame(...func_get_args());
1469
-    }
1448
+	/**
1449
+	 * Asserts that two variables have the same type and value.
1450
+	 * Used on objects, it asserts that two variables reference
1451
+	 * the same object.
1452
+	 *
1453
+	 * @throws ExpectationFailedException
1454
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1455
+	 *
1456
+	 * @psalm-template ExpectedType
1457
+	 *
1458
+	 * @psalm-param ExpectedType $expected
1459
+	 *
1460
+	 * @psalm-assert =ExpectedType $actual
1461
+	 *
1462
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1463
+	 *
1464
+	 * @see Assert::assertSame
1465
+	 */
1466
+	function assertSame($expected, $actual, string $message = ''): void
1467
+	{
1468
+		Assert::assertSame(...func_get_args());
1469
+	}
1470 1470
 }
1471 1471
 
1472 1472
 if (!function_exists('PHPUnit\Framework\assertNotSame')) {
1473
-    /**
1474
-     * Asserts that two variables do not have the same type and value.
1475
-     * Used on objects, it asserts that two variables do not reference
1476
-     * the same object.
1477
-     *
1478
-     * @throws ExpectationFailedException
1479
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1480
-     *
1481
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1482
-     *
1483
-     * @see Assert::assertNotSame
1484
-     */
1485
-    function assertNotSame($expected, $actual, string $message = ''): void
1486
-    {
1487
-        Assert::assertNotSame(...func_get_args());
1488
-    }
1473
+	/**
1474
+	 * Asserts that two variables do not have the same type and value.
1475
+	 * Used on objects, it asserts that two variables do not reference
1476
+	 * the same object.
1477
+	 *
1478
+	 * @throws ExpectationFailedException
1479
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1480
+	 *
1481
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1482
+	 *
1483
+	 * @see Assert::assertNotSame
1484
+	 */
1485
+	function assertNotSame($expected, $actual, string $message = ''): void
1486
+	{
1487
+		Assert::assertNotSame(...func_get_args());
1488
+	}
1489 1489
 }
1490 1490
 
1491 1491
 if (!function_exists('PHPUnit\Framework\assertInstanceOf')) {
1492
-    /**
1493
-     * Asserts that a variable is of a given type.
1494
-     *
1495
-     * @throws ExpectationFailedException
1496
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1497
-     * @throws Exception
1498
-     *
1499
-     * @psalm-template ExpectedType of object
1500
-     *
1501
-     * @psalm-param class-string<ExpectedType> $expected
1502
-     *
1503
-     * @psalm-assert =ExpectedType $actual
1504
-     *
1505
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1506
-     *
1507
-     * @see Assert::assertInstanceOf
1508
-     */
1509
-    function assertInstanceOf(string $expected, $actual, string $message = ''): void
1510
-    {
1511
-        Assert::assertInstanceOf(...func_get_args());
1512
-    }
1492
+	/**
1493
+	 * Asserts that a variable is of a given type.
1494
+	 *
1495
+	 * @throws ExpectationFailedException
1496
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1497
+	 * @throws Exception
1498
+	 *
1499
+	 * @psalm-template ExpectedType of object
1500
+	 *
1501
+	 * @psalm-param class-string<ExpectedType> $expected
1502
+	 *
1503
+	 * @psalm-assert =ExpectedType $actual
1504
+	 *
1505
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1506
+	 *
1507
+	 * @see Assert::assertInstanceOf
1508
+	 */
1509
+	function assertInstanceOf(string $expected, $actual, string $message = ''): void
1510
+	{
1511
+		Assert::assertInstanceOf(...func_get_args());
1512
+	}
1513 1513
 }
1514 1514
 
1515 1515
 if (!function_exists('PHPUnit\Framework\assertNotInstanceOf')) {
1516
-    /**
1517
-     * Asserts that a variable is not of a given type.
1518
-     *
1519
-     * @throws ExpectationFailedException
1520
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1521
-     * @throws Exception
1522
-     *
1523
-     * @psalm-template ExpectedType of object
1524
-     *
1525
-     * @psalm-param class-string<ExpectedType> $expected
1526
-     *
1527
-     * @psalm-assert !ExpectedType $actual
1528
-     *
1529
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1530
-     *
1531
-     * @see Assert::assertNotInstanceOf
1532
-     */
1533
-    function assertNotInstanceOf(string $expected, $actual, string $message = ''): void
1534
-    {
1535
-        Assert::assertNotInstanceOf(...func_get_args());
1536
-    }
1516
+	/**
1517
+	 * Asserts that a variable is not of a given type.
1518
+	 *
1519
+	 * @throws ExpectationFailedException
1520
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1521
+	 * @throws Exception
1522
+	 *
1523
+	 * @psalm-template ExpectedType of object
1524
+	 *
1525
+	 * @psalm-param class-string<ExpectedType> $expected
1526
+	 *
1527
+	 * @psalm-assert !ExpectedType $actual
1528
+	 *
1529
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1530
+	 *
1531
+	 * @see Assert::assertNotInstanceOf
1532
+	 */
1533
+	function assertNotInstanceOf(string $expected, $actual, string $message = ''): void
1534
+	{
1535
+		Assert::assertNotInstanceOf(...func_get_args());
1536
+	}
1537 1537
 }
1538 1538
 
1539 1539
 if (!function_exists('PHPUnit\Framework\assertIsArray')) {
1540
-    /**
1541
-     * Asserts that a variable is of type array.
1542
-     *
1543
-     * @throws ExpectationFailedException
1544
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1545
-     *
1546
-     * @psalm-assert array $actual
1547
-     *
1548
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1549
-     *
1550
-     * @see Assert::assertIsArray
1551
-     */
1552
-    function assertIsArray($actual, string $message = ''): void
1553
-    {
1554
-        Assert::assertIsArray(...func_get_args());
1555
-    }
1540
+	/**
1541
+	 * Asserts that a variable is of type array.
1542
+	 *
1543
+	 * @throws ExpectationFailedException
1544
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1545
+	 *
1546
+	 * @psalm-assert array $actual
1547
+	 *
1548
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1549
+	 *
1550
+	 * @see Assert::assertIsArray
1551
+	 */
1552
+	function assertIsArray($actual, string $message = ''): void
1553
+	{
1554
+		Assert::assertIsArray(...func_get_args());
1555
+	}
1556 1556
 }
1557 1557
 
1558 1558
 if (!function_exists('PHPUnit\Framework\assertIsBool')) {
1559
-    /**
1560
-     * Asserts that a variable is of type bool.
1561
-     *
1562
-     * @throws ExpectationFailedException
1563
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1564
-     *
1565
-     * @psalm-assert bool $actual
1566
-     *
1567
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1568
-     *
1569
-     * @see Assert::assertIsBool
1570
-     */
1571
-    function assertIsBool($actual, string $message = ''): void
1572
-    {
1573
-        Assert::assertIsBool(...func_get_args());
1574
-    }
1559
+	/**
1560
+	 * Asserts that a variable is of type bool.
1561
+	 *
1562
+	 * @throws ExpectationFailedException
1563
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1564
+	 *
1565
+	 * @psalm-assert bool $actual
1566
+	 *
1567
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1568
+	 *
1569
+	 * @see Assert::assertIsBool
1570
+	 */
1571
+	function assertIsBool($actual, string $message = ''): void
1572
+	{
1573
+		Assert::assertIsBool(...func_get_args());
1574
+	}
1575 1575
 }
1576 1576
 
1577 1577
 if (!function_exists('PHPUnit\Framework\assertIsFloat')) {
1578
-    /**
1579
-     * Asserts that a variable is of type float.
1580
-     *
1581
-     * @throws ExpectationFailedException
1582
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1583
-     *
1584
-     * @psalm-assert float $actual
1585
-     *
1586
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1587
-     *
1588
-     * @see Assert::assertIsFloat
1589
-     */
1590
-    function assertIsFloat($actual, string $message = ''): void
1591
-    {
1592
-        Assert::assertIsFloat(...func_get_args());
1593
-    }
1578
+	/**
1579
+	 * Asserts that a variable is of type float.
1580
+	 *
1581
+	 * @throws ExpectationFailedException
1582
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1583
+	 *
1584
+	 * @psalm-assert float $actual
1585
+	 *
1586
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1587
+	 *
1588
+	 * @see Assert::assertIsFloat
1589
+	 */
1590
+	function assertIsFloat($actual, string $message = ''): void
1591
+	{
1592
+		Assert::assertIsFloat(...func_get_args());
1593
+	}
1594 1594
 }
1595 1595
 
1596 1596
 if (!function_exists('PHPUnit\Framework\assertIsInt')) {
1597
-    /**
1598
-     * Asserts that a variable is of type int.
1599
-     *
1600
-     * @throws ExpectationFailedException
1601
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1602
-     *
1603
-     * @psalm-assert int $actual
1604
-     *
1605
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1606
-     *
1607
-     * @see Assert::assertIsInt
1608
-     */
1609
-    function assertIsInt($actual, string $message = ''): void
1610
-    {
1611
-        Assert::assertIsInt(...func_get_args());
1612
-    }
1597
+	/**
1598
+	 * Asserts that a variable is of type int.
1599
+	 *
1600
+	 * @throws ExpectationFailedException
1601
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1602
+	 *
1603
+	 * @psalm-assert int $actual
1604
+	 *
1605
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1606
+	 *
1607
+	 * @see Assert::assertIsInt
1608
+	 */
1609
+	function assertIsInt($actual, string $message = ''): void
1610
+	{
1611
+		Assert::assertIsInt(...func_get_args());
1612
+	}
1613 1613
 }
1614 1614
 
1615 1615
 if (!function_exists('PHPUnit\Framework\assertIsNumeric')) {
1616
-    /**
1617
-     * Asserts that a variable is of type numeric.
1618
-     *
1619
-     * @throws ExpectationFailedException
1620
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1621
-     *
1622
-     * @psalm-assert numeric $actual
1623
-     *
1624
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1625
-     *
1626
-     * @see Assert::assertIsNumeric
1627
-     */
1628
-    function assertIsNumeric($actual, string $message = ''): void
1629
-    {
1630
-        Assert::assertIsNumeric(...func_get_args());
1631
-    }
1616
+	/**
1617
+	 * Asserts that a variable is of type numeric.
1618
+	 *
1619
+	 * @throws ExpectationFailedException
1620
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1621
+	 *
1622
+	 * @psalm-assert numeric $actual
1623
+	 *
1624
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1625
+	 *
1626
+	 * @see Assert::assertIsNumeric
1627
+	 */
1628
+	function assertIsNumeric($actual, string $message = ''): void
1629
+	{
1630
+		Assert::assertIsNumeric(...func_get_args());
1631
+	}
1632 1632
 }
1633 1633
 
1634 1634
 if (!function_exists('PHPUnit\Framework\assertIsObject')) {
1635
-    /**
1636
-     * Asserts that a variable is of type object.
1637
-     *
1638
-     * @throws ExpectationFailedException
1639
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1640
-     *
1641
-     * @psalm-assert object $actual
1642
-     *
1643
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1644
-     *
1645
-     * @see Assert::assertIsObject
1646
-     */
1647
-    function assertIsObject($actual, string $message = ''): void
1648
-    {
1649
-        Assert::assertIsObject(...func_get_args());
1650
-    }
1635
+	/**
1636
+	 * Asserts that a variable is of type object.
1637
+	 *
1638
+	 * @throws ExpectationFailedException
1639
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1640
+	 *
1641
+	 * @psalm-assert object $actual
1642
+	 *
1643
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1644
+	 *
1645
+	 * @see Assert::assertIsObject
1646
+	 */
1647
+	function assertIsObject($actual, string $message = ''): void
1648
+	{
1649
+		Assert::assertIsObject(...func_get_args());
1650
+	}
1651 1651
 }
1652 1652
 
1653 1653
 if (!function_exists('PHPUnit\Framework\assertIsResource')) {
1654
-    /**
1655
-     * Asserts that a variable is of type resource.
1656
-     *
1657
-     * @throws ExpectationFailedException
1658
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1659
-     *
1660
-     * @psalm-assert resource $actual
1661
-     *
1662
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1663
-     *
1664
-     * @see Assert::assertIsResource
1665
-     */
1666
-    function assertIsResource($actual, string $message = ''): void
1667
-    {
1668
-        Assert::assertIsResource(...func_get_args());
1669
-    }
1654
+	/**
1655
+	 * Asserts that a variable is of type resource.
1656
+	 *
1657
+	 * @throws ExpectationFailedException
1658
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1659
+	 *
1660
+	 * @psalm-assert resource $actual
1661
+	 *
1662
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1663
+	 *
1664
+	 * @see Assert::assertIsResource
1665
+	 */
1666
+	function assertIsResource($actual, string $message = ''): void
1667
+	{
1668
+		Assert::assertIsResource(...func_get_args());
1669
+	}
1670 1670
 }
1671 1671
 
1672 1672
 if (!function_exists('PHPUnit\Framework\assertIsClosedResource')) {
1673
-    /**
1674
-     * Asserts that a variable is of type resource and is closed.
1675
-     *
1676
-     * @throws ExpectationFailedException
1677
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1678
-     *
1679
-     * @psalm-assert resource $actual
1680
-     *
1681
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1682
-     *
1683
-     * @see Assert::assertIsClosedResource
1684
-     */
1685
-    function assertIsClosedResource($actual, string $message = ''): void
1686
-    {
1687
-        Assert::assertIsClosedResource(...func_get_args());
1688
-    }
1673
+	/**
1674
+	 * Asserts that a variable is of type resource and is closed.
1675
+	 *
1676
+	 * @throws ExpectationFailedException
1677
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1678
+	 *
1679
+	 * @psalm-assert resource $actual
1680
+	 *
1681
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1682
+	 *
1683
+	 * @see Assert::assertIsClosedResource
1684
+	 */
1685
+	function assertIsClosedResource($actual, string $message = ''): void
1686
+	{
1687
+		Assert::assertIsClosedResource(...func_get_args());
1688
+	}
1689 1689
 }
1690 1690
 
1691 1691
 if (!function_exists('PHPUnit\Framework\assertIsString')) {
1692
-    /**
1693
-     * Asserts that a variable is of type string.
1694
-     *
1695
-     * @throws ExpectationFailedException
1696
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1697
-     *
1698
-     * @psalm-assert string $actual
1699
-     *
1700
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1701
-     *
1702
-     * @see Assert::assertIsString
1703
-     */
1704
-    function assertIsString($actual, string $message = ''): void
1705
-    {
1706
-        Assert::assertIsString(...func_get_args());
1707
-    }
1692
+	/**
1693
+	 * Asserts that a variable is of type string.
1694
+	 *
1695
+	 * @throws ExpectationFailedException
1696
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1697
+	 *
1698
+	 * @psalm-assert string $actual
1699
+	 *
1700
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1701
+	 *
1702
+	 * @see Assert::assertIsString
1703
+	 */
1704
+	function assertIsString($actual, string $message = ''): void
1705
+	{
1706
+		Assert::assertIsString(...func_get_args());
1707
+	}
1708 1708
 }
1709 1709
 
1710 1710
 if (!function_exists('PHPUnit\Framework\assertIsScalar')) {
1711
-    /**
1712
-     * Asserts that a variable is of type scalar.
1713
-     *
1714
-     * @throws ExpectationFailedException
1715
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1716
-     *
1717
-     * @psalm-assert scalar $actual
1718
-     *
1719
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1720
-     *
1721
-     * @see Assert::assertIsScalar
1722
-     */
1723
-    function assertIsScalar($actual, string $message = ''): void
1724
-    {
1725
-        Assert::assertIsScalar(...func_get_args());
1726
-    }
1711
+	/**
1712
+	 * Asserts that a variable is of type scalar.
1713
+	 *
1714
+	 * @throws ExpectationFailedException
1715
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1716
+	 *
1717
+	 * @psalm-assert scalar $actual
1718
+	 *
1719
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1720
+	 *
1721
+	 * @see Assert::assertIsScalar
1722
+	 */
1723
+	function assertIsScalar($actual, string $message = ''): void
1724
+	{
1725
+		Assert::assertIsScalar(...func_get_args());
1726
+	}
1727 1727
 }
1728 1728
 
1729 1729
 if (!function_exists('PHPUnit\Framework\assertIsCallable')) {
1730
-    /**
1731
-     * Asserts that a variable is of type callable.
1732
-     *
1733
-     * @throws ExpectationFailedException
1734
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1735
-     *
1736
-     * @psalm-assert callable $actual
1737
-     *
1738
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1739
-     *
1740
-     * @see Assert::assertIsCallable
1741
-     */
1742
-    function assertIsCallable($actual, string $message = ''): void
1743
-    {
1744
-        Assert::assertIsCallable(...func_get_args());
1745
-    }
1730
+	/**
1731
+	 * Asserts that a variable is of type callable.
1732
+	 *
1733
+	 * @throws ExpectationFailedException
1734
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1735
+	 *
1736
+	 * @psalm-assert callable $actual
1737
+	 *
1738
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1739
+	 *
1740
+	 * @see Assert::assertIsCallable
1741
+	 */
1742
+	function assertIsCallable($actual, string $message = ''): void
1743
+	{
1744
+		Assert::assertIsCallable(...func_get_args());
1745
+	}
1746 1746
 }
1747 1747
 
1748 1748
 if (!function_exists('PHPUnit\Framework\assertIsIterable')) {
1749
-    /**
1750
-     * Asserts that a variable is of type iterable.
1751
-     *
1752
-     * @throws ExpectationFailedException
1753
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1754
-     *
1755
-     * @psalm-assert iterable $actual
1756
-     *
1757
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1758
-     *
1759
-     * @see Assert::assertIsIterable
1760
-     */
1761
-    function assertIsIterable($actual, string $message = ''): void
1762
-    {
1763
-        Assert::assertIsIterable(...func_get_args());
1764
-    }
1749
+	/**
1750
+	 * Asserts that a variable is of type iterable.
1751
+	 *
1752
+	 * @throws ExpectationFailedException
1753
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1754
+	 *
1755
+	 * @psalm-assert iterable $actual
1756
+	 *
1757
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1758
+	 *
1759
+	 * @see Assert::assertIsIterable
1760
+	 */
1761
+	function assertIsIterable($actual, string $message = ''): void
1762
+	{
1763
+		Assert::assertIsIterable(...func_get_args());
1764
+	}
1765 1765
 }
1766 1766
 
1767 1767
 if (!function_exists('PHPUnit\Framework\assertIsNotArray')) {
1768
-    /**
1769
-     * Asserts that a variable is not of type array.
1770
-     *
1771
-     * @throws ExpectationFailedException
1772
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1773
-     *
1774
-     * @psalm-assert !array $actual
1775
-     *
1776
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1777
-     *
1778
-     * @see Assert::assertIsNotArray
1779
-     */
1780
-    function assertIsNotArray($actual, string $message = ''): void
1781
-    {
1782
-        Assert::assertIsNotArray(...func_get_args());
1783
-    }
1768
+	/**
1769
+	 * Asserts that a variable is not of type array.
1770
+	 *
1771
+	 * @throws ExpectationFailedException
1772
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1773
+	 *
1774
+	 * @psalm-assert !array $actual
1775
+	 *
1776
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1777
+	 *
1778
+	 * @see Assert::assertIsNotArray
1779
+	 */
1780
+	function assertIsNotArray($actual, string $message = ''): void
1781
+	{
1782
+		Assert::assertIsNotArray(...func_get_args());
1783
+	}
1784 1784
 }
1785 1785
 
1786 1786
 if (!function_exists('PHPUnit\Framework\assertIsNotBool')) {
1787
-    /**
1788
-     * Asserts that a variable is not of type bool.
1789
-     *
1790
-     * @throws ExpectationFailedException
1791
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1792
-     *
1793
-     * @psalm-assert !bool $actual
1794
-     *
1795
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1796
-     *
1797
-     * @see Assert::assertIsNotBool
1798
-     */
1799
-    function assertIsNotBool($actual, string $message = ''): void
1800
-    {
1801
-        Assert::assertIsNotBool(...func_get_args());
1802
-    }
1787
+	/**
1788
+	 * Asserts that a variable is not of type bool.
1789
+	 *
1790
+	 * @throws ExpectationFailedException
1791
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1792
+	 *
1793
+	 * @psalm-assert !bool $actual
1794
+	 *
1795
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1796
+	 *
1797
+	 * @see Assert::assertIsNotBool
1798
+	 */
1799
+	function assertIsNotBool($actual, string $message = ''): void
1800
+	{
1801
+		Assert::assertIsNotBool(...func_get_args());
1802
+	}
1803 1803
 }
1804 1804
 
1805 1805
 if (!function_exists('PHPUnit\Framework\assertIsNotFloat')) {
1806
-    /**
1807
-     * Asserts that a variable is not of type float.
1808
-     *
1809
-     * @throws ExpectationFailedException
1810
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1811
-     *
1812
-     * @psalm-assert !float $actual
1813
-     *
1814
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1815
-     *
1816
-     * @see Assert::assertIsNotFloat
1817
-     */
1818
-    function assertIsNotFloat($actual, string $message = ''): void
1819
-    {
1820
-        Assert::assertIsNotFloat(...func_get_args());
1821
-    }
1806
+	/**
1807
+	 * Asserts that a variable is not of type float.
1808
+	 *
1809
+	 * @throws ExpectationFailedException
1810
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1811
+	 *
1812
+	 * @psalm-assert !float $actual
1813
+	 *
1814
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1815
+	 *
1816
+	 * @see Assert::assertIsNotFloat
1817
+	 */
1818
+	function assertIsNotFloat($actual, string $message = ''): void
1819
+	{
1820
+		Assert::assertIsNotFloat(...func_get_args());
1821
+	}
1822 1822
 }
1823 1823
 
1824 1824
 if (!function_exists('PHPUnit\Framework\assertIsNotInt')) {
1825
-    /**
1826
-     * Asserts that a variable is not of type int.
1827
-     *
1828
-     * @throws ExpectationFailedException
1829
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1830
-     *
1831
-     * @psalm-assert !int $actual
1832
-     *
1833
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1834
-     *
1835
-     * @see Assert::assertIsNotInt
1836
-     */
1837
-    function assertIsNotInt($actual, string $message = ''): void
1838
-    {
1839
-        Assert::assertIsNotInt(...func_get_args());
1840
-    }
1825
+	/**
1826
+	 * Asserts that a variable is not of type int.
1827
+	 *
1828
+	 * @throws ExpectationFailedException
1829
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1830
+	 *
1831
+	 * @psalm-assert !int $actual
1832
+	 *
1833
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1834
+	 *
1835
+	 * @see Assert::assertIsNotInt
1836
+	 */
1837
+	function assertIsNotInt($actual, string $message = ''): void
1838
+	{
1839
+		Assert::assertIsNotInt(...func_get_args());
1840
+	}
1841 1841
 }
1842 1842
 
1843 1843
 if (!function_exists('PHPUnit\Framework\assertIsNotNumeric')) {
1844
-    /**
1845
-     * Asserts that a variable is not of type numeric.
1846
-     *
1847
-     * @throws ExpectationFailedException
1848
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1849
-     *
1850
-     * @psalm-assert !numeric $actual
1851
-     *
1852
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1853
-     *
1854
-     * @see Assert::assertIsNotNumeric
1855
-     */
1856
-    function assertIsNotNumeric($actual, string $message = ''): void
1857
-    {
1858
-        Assert::assertIsNotNumeric(...func_get_args());
1859
-    }
1844
+	/**
1845
+	 * Asserts that a variable is not of type numeric.
1846
+	 *
1847
+	 * @throws ExpectationFailedException
1848
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1849
+	 *
1850
+	 * @psalm-assert !numeric $actual
1851
+	 *
1852
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1853
+	 *
1854
+	 * @see Assert::assertIsNotNumeric
1855
+	 */
1856
+	function assertIsNotNumeric($actual, string $message = ''): void
1857
+	{
1858
+		Assert::assertIsNotNumeric(...func_get_args());
1859
+	}
1860 1860
 }
1861 1861
 
1862 1862
 if (!function_exists('PHPUnit\Framework\assertIsNotObject')) {
1863
-    /**
1864
-     * Asserts that a variable is not of type object.
1865
-     *
1866
-     * @throws ExpectationFailedException
1867
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1868
-     *
1869
-     * @psalm-assert !object $actual
1870
-     *
1871
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1872
-     *
1873
-     * @see Assert::assertIsNotObject
1874
-     */
1875
-    function assertIsNotObject($actual, string $message = ''): void
1876
-    {
1877
-        Assert::assertIsNotObject(...func_get_args());
1878
-    }
1863
+	/**
1864
+	 * Asserts that a variable is not of type object.
1865
+	 *
1866
+	 * @throws ExpectationFailedException
1867
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1868
+	 *
1869
+	 * @psalm-assert !object $actual
1870
+	 *
1871
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1872
+	 *
1873
+	 * @see Assert::assertIsNotObject
1874
+	 */
1875
+	function assertIsNotObject($actual, string $message = ''): void
1876
+	{
1877
+		Assert::assertIsNotObject(...func_get_args());
1878
+	}
1879 1879
 }
1880 1880
 
1881 1881
 if (!function_exists('PHPUnit\Framework\assertIsNotResource')) {
1882
-    /**
1883
-     * Asserts that a variable is not of type resource.
1884
-     *
1885
-     * @throws ExpectationFailedException
1886
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1887
-     *
1888
-     * @psalm-assert !resource $actual
1889
-     *
1890
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1891
-     *
1892
-     * @see Assert::assertIsNotResource
1893
-     */
1894
-    function assertIsNotResource($actual, string $message = ''): void
1895
-    {
1896
-        Assert::assertIsNotResource(...func_get_args());
1897
-    }
1882
+	/**
1883
+	 * Asserts that a variable is not of type resource.
1884
+	 *
1885
+	 * @throws ExpectationFailedException
1886
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1887
+	 *
1888
+	 * @psalm-assert !resource $actual
1889
+	 *
1890
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1891
+	 *
1892
+	 * @see Assert::assertIsNotResource
1893
+	 */
1894
+	function assertIsNotResource($actual, string $message = ''): void
1895
+	{
1896
+		Assert::assertIsNotResource(...func_get_args());
1897
+	}
1898 1898
 }
1899 1899
 
1900 1900
 if (!function_exists('PHPUnit\Framework\assertIsNotClosedResource')) {
1901
-    /**
1902
-     * Asserts that a variable is not of type resource.
1903
-     *
1904
-     * @throws ExpectationFailedException
1905
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1906
-     *
1907
-     * @psalm-assert !resource $actual
1908
-     *
1909
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1910
-     *
1911
-     * @see Assert::assertIsNotClosedResource
1912
-     */
1913
-    function assertIsNotClosedResource($actual, string $message = ''): void
1914
-    {
1915
-        Assert::assertIsNotClosedResource(...func_get_args());
1916
-    }
1901
+	/**
1902
+	 * Asserts that a variable is not of type resource.
1903
+	 *
1904
+	 * @throws ExpectationFailedException
1905
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1906
+	 *
1907
+	 * @psalm-assert !resource $actual
1908
+	 *
1909
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1910
+	 *
1911
+	 * @see Assert::assertIsNotClosedResource
1912
+	 */
1913
+	function assertIsNotClosedResource($actual, string $message = ''): void
1914
+	{
1915
+		Assert::assertIsNotClosedResource(...func_get_args());
1916
+	}
1917 1917
 }
1918 1918
 
1919 1919
 if (!function_exists('PHPUnit\Framework\assertIsNotString')) {
1920
-    /**
1921
-     * Asserts that a variable is not of type string.
1922
-     *
1923
-     * @throws ExpectationFailedException
1924
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1925
-     *
1926
-     * @psalm-assert !string $actual
1927
-     *
1928
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1929
-     *
1930
-     * @see Assert::assertIsNotString
1931
-     */
1932
-    function assertIsNotString($actual, string $message = ''): void
1933
-    {
1934
-        Assert::assertIsNotString(...func_get_args());
1935
-    }
1920
+	/**
1921
+	 * Asserts that a variable is not of type string.
1922
+	 *
1923
+	 * @throws ExpectationFailedException
1924
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1925
+	 *
1926
+	 * @psalm-assert !string $actual
1927
+	 *
1928
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1929
+	 *
1930
+	 * @see Assert::assertIsNotString
1931
+	 */
1932
+	function assertIsNotString($actual, string $message = ''): void
1933
+	{
1934
+		Assert::assertIsNotString(...func_get_args());
1935
+	}
1936 1936
 }
1937 1937
 
1938 1938
 if (!function_exists('PHPUnit\Framework\assertIsNotScalar')) {
1939
-    /**
1940
-     * Asserts that a variable is not of type scalar.
1941
-     *
1942
-     * @throws ExpectationFailedException
1943
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1944
-     *
1945
-     * @psalm-assert !scalar $actual
1946
-     *
1947
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1948
-     *
1949
-     * @see Assert::assertIsNotScalar
1950
-     */
1951
-    function assertIsNotScalar($actual, string $message = ''): void
1952
-    {
1953
-        Assert::assertIsNotScalar(...func_get_args());
1954
-    }
1939
+	/**
1940
+	 * Asserts that a variable is not of type scalar.
1941
+	 *
1942
+	 * @throws ExpectationFailedException
1943
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1944
+	 *
1945
+	 * @psalm-assert !scalar $actual
1946
+	 *
1947
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1948
+	 *
1949
+	 * @see Assert::assertIsNotScalar
1950
+	 */
1951
+	function assertIsNotScalar($actual, string $message = ''): void
1952
+	{
1953
+		Assert::assertIsNotScalar(...func_get_args());
1954
+	}
1955 1955
 }
1956 1956
 
1957 1957
 if (!function_exists('PHPUnit\Framework\assertIsNotCallable')) {
1958
-    /**
1959
-     * Asserts that a variable is not of type callable.
1960
-     *
1961
-     * @throws ExpectationFailedException
1962
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1963
-     *
1964
-     * @psalm-assert !callable $actual
1965
-     *
1966
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1967
-     *
1968
-     * @see Assert::assertIsNotCallable
1969
-     */
1970
-    function assertIsNotCallable($actual, string $message = ''): void
1971
-    {
1972
-        Assert::assertIsNotCallable(...func_get_args());
1973
-    }
1958
+	/**
1959
+	 * Asserts that a variable is not of type callable.
1960
+	 *
1961
+	 * @throws ExpectationFailedException
1962
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1963
+	 *
1964
+	 * @psalm-assert !callable $actual
1965
+	 *
1966
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1967
+	 *
1968
+	 * @see Assert::assertIsNotCallable
1969
+	 */
1970
+	function assertIsNotCallable($actual, string $message = ''): void
1971
+	{
1972
+		Assert::assertIsNotCallable(...func_get_args());
1973
+	}
1974 1974
 }
1975 1975
 
1976 1976
 if (!function_exists('PHPUnit\Framework\assertIsNotIterable')) {
1977
-    /**
1978
-     * Asserts that a variable is not of type iterable.
1979
-     *
1980
-     * @throws ExpectationFailedException
1981
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1982
-     *
1983
-     * @psalm-assert !iterable $actual
1984
-     *
1985
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1986
-     *
1987
-     * @see Assert::assertIsNotIterable
1988
-     */
1989
-    function assertIsNotIterable($actual, string $message = ''): void
1990
-    {
1991
-        Assert::assertIsNotIterable(...func_get_args());
1992
-    }
1977
+	/**
1978
+	 * Asserts that a variable is not of type iterable.
1979
+	 *
1980
+	 * @throws ExpectationFailedException
1981
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1982
+	 *
1983
+	 * @psalm-assert !iterable $actual
1984
+	 *
1985
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1986
+	 *
1987
+	 * @see Assert::assertIsNotIterable
1988
+	 */
1989
+	function assertIsNotIterable($actual, string $message = ''): void
1990
+	{
1991
+		Assert::assertIsNotIterable(...func_get_args());
1992
+	}
1993 1993
 }
1994 1994
 
1995 1995
 if (!function_exists('PHPUnit\Framework\assertMatchesRegularExpression')) {
1996
-    /**
1997
-     * Asserts that a string matches a given regular expression.
1998
-     *
1999
-     * @throws ExpectationFailedException
2000
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2001
-     *
2002
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2003
-     *
2004
-     * @see Assert::assertMatchesRegularExpression
2005
-     */
2006
-    function assertMatchesRegularExpression(string $pattern, string $string, string $message = ''): void
2007
-    {
2008
-        Assert::assertMatchesRegularExpression(...func_get_args());
2009
-    }
1996
+	/**
1997
+	 * Asserts that a string matches a given regular expression.
1998
+	 *
1999
+	 * @throws ExpectationFailedException
2000
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2001
+	 *
2002
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2003
+	 *
2004
+	 * @see Assert::assertMatchesRegularExpression
2005
+	 */
2006
+	function assertMatchesRegularExpression(string $pattern, string $string, string $message = ''): void
2007
+	{
2008
+		Assert::assertMatchesRegularExpression(...func_get_args());
2009
+	}
2010 2010
 }
2011 2011
 
2012 2012
 if (!function_exists('PHPUnit\Framework\assertRegExp')) {
2013
-    /**
2014
-     * Asserts that a string matches a given regular expression.
2015
-     *
2016
-     * @throws ExpectationFailedException
2017
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2018
-     *
2019
-     * @codeCoverageIgnore
2020
-     *
2021
-     * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4086
2022
-     *
2023
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2024
-     *
2025
-     * @see Assert::assertRegExp
2026
-     */
2027
-    function assertRegExp(string $pattern, string $string, string $message = ''): void
2028
-    {
2029
-        Assert::assertRegExp(...func_get_args());
2030
-    }
2013
+	/**
2014
+	 * Asserts that a string matches a given regular expression.
2015
+	 *
2016
+	 * @throws ExpectationFailedException
2017
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2018
+	 *
2019
+	 * @codeCoverageIgnore
2020
+	 *
2021
+	 * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4086
2022
+	 *
2023
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2024
+	 *
2025
+	 * @see Assert::assertRegExp
2026
+	 */
2027
+	function assertRegExp(string $pattern, string $string, string $message = ''): void
2028
+	{
2029
+		Assert::assertRegExp(...func_get_args());
2030
+	}
2031 2031
 }
2032 2032
 
2033 2033
 if (!function_exists('PHPUnit\Framework\assertDoesNotMatchRegularExpression')) {
2034
-    /**
2035
-     * Asserts that a string does not match a given regular expression.
2036
-     *
2037
-     * @throws ExpectationFailedException
2038
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2039
-     *
2040
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2041
-     *
2042
-     * @see Assert::assertDoesNotMatchRegularExpression
2043
-     */
2044
-    function assertDoesNotMatchRegularExpression(string $pattern, string $string, string $message = ''): void
2045
-    {
2046
-        Assert::assertDoesNotMatchRegularExpression(...func_get_args());
2047
-    }
2034
+	/**
2035
+	 * Asserts that a string does not match a given regular expression.
2036
+	 *
2037
+	 * @throws ExpectationFailedException
2038
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2039
+	 *
2040
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2041
+	 *
2042
+	 * @see Assert::assertDoesNotMatchRegularExpression
2043
+	 */
2044
+	function assertDoesNotMatchRegularExpression(string $pattern, string $string, string $message = ''): void
2045
+	{
2046
+		Assert::assertDoesNotMatchRegularExpression(...func_get_args());
2047
+	}
2048 2048
 }
2049 2049
 
2050 2050
 if (!function_exists('PHPUnit\Framework\assertNotRegExp')) {
2051
-    /**
2052
-     * Asserts that a string does not match a given regular expression.
2053
-     *
2054
-     * @throws ExpectationFailedException
2055
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2056
-     *
2057
-     * @codeCoverageIgnore
2058
-     *
2059
-     * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4089
2060
-     *
2061
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2062
-     *
2063
-     * @see Assert::assertNotRegExp
2064
-     */
2065
-    function assertNotRegExp(string $pattern, string $string, string $message = ''): void
2066
-    {
2067
-        Assert::assertNotRegExp(...func_get_args());
2068
-    }
2051
+	/**
2052
+	 * Asserts that a string does not match a given regular expression.
2053
+	 *
2054
+	 * @throws ExpectationFailedException
2055
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2056
+	 *
2057
+	 * @codeCoverageIgnore
2058
+	 *
2059
+	 * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4089
2060
+	 *
2061
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2062
+	 *
2063
+	 * @see Assert::assertNotRegExp
2064
+	 */
2065
+	function assertNotRegExp(string $pattern, string $string, string $message = ''): void
2066
+	{
2067
+		Assert::assertNotRegExp(...func_get_args());
2068
+	}
2069 2069
 }
2070 2070
 
2071 2071
 if (!function_exists('PHPUnit\Framework\assertSameSize')) {
2072
-    /**
2073
-     * Assert that the size of two arrays (or `Countable` or `Traversable` objects)
2074
-     * is the same.
2075
-     *
2076
-     * @param Countable|iterable $expected
2077
-     * @param Countable|iterable $actual
2078
-     *
2079
-     * @throws ExpectationFailedException
2080
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2081
-     * @throws Exception
2082
-     *
2083
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2084
-     *
2085
-     * @see Assert::assertSameSize
2086
-     */
2087
-    function assertSameSize($expected, $actual, string $message = ''): void
2088
-    {
2089
-        Assert::assertSameSize(...func_get_args());
2090
-    }
2072
+	/**
2073
+	 * Assert that the size of two arrays (or `Countable` or `Traversable` objects)
2074
+	 * is the same.
2075
+	 *
2076
+	 * @param Countable|iterable $expected
2077
+	 * @param Countable|iterable $actual
2078
+	 *
2079
+	 * @throws ExpectationFailedException
2080
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2081
+	 * @throws Exception
2082
+	 *
2083
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2084
+	 *
2085
+	 * @see Assert::assertSameSize
2086
+	 */
2087
+	function assertSameSize($expected, $actual, string $message = ''): void
2088
+	{
2089
+		Assert::assertSameSize(...func_get_args());
2090
+	}
2091 2091
 }
2092 2092
 
2093 2093
 if (!function_exists('PHPUnit\Framework\assertNotSameSize')) {
2094
-    /**
2095
-     * Assert that the size of two arrays (or `Countable` or `Traversable` objects)
2096
-     * is not the same.
2097
-     *
2098
-     * @param Countable|iterable $expected
2099
-     * @param Countable|iterable $actual
2100
-     *
2101
-     * @throws ExpectationFailedException
2102
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2103
-     * @throws Exception
2104
-     *
2105
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2106
-     *
2107
-     * @see Assert::assertNotSameSize
2108
-     */
2109
-    function assertNotSameSize($expected, $actual, string $message = ''): void
2110
-    {
2111
-        Assert::assertNotSameSize(...func_get_args());
2112
-    }
2094
+	/**
2095
+	 * Assert that the size of two arrays (or `Countable` or `Traversable` objects)
2096
+	 * is not the same.
2097
+	 *
2098
+	 * @param Countable|iterable $expected
2099
+	 * @param Countable|iterable $actual
2100
+	 *
2101
+	 * @throws ExpectationFailedException
2102
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2103
+	 * @throws Exception
2104
+	 *
2105
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2106
+	 *
2107
+	 * @see Assert::assertNotSameSize
2108
+	 */
2109
+	function assertNotSameSize($expected, $actual, string $message = ''): void
2110
+	{
2111
+		Assert::assertNotSameSize(...func_get_args());
2112
+	}
2113 2113
 }
2114 2114
 
2115 2115
 if (!function_exists('PHPUnit\Framework\assertStringMatchesFormat')) {
2116
-    /**
2117
-     * Asserts that a string matches a given format string.
2118
-     *
2119
-     * @throws ExpectationFailedException
2120
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2121
-     *
2122
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2123
-     *
2124
-     * @see Assert::assertStringMatchesFormat
2125
-     */
2126
-    function assertStringMatchesFormat(string $format, string $string, string $message = ''): void
2127
-    {
2128
-        Assert::assertStringMatchesFormat(...func_get_args());
2129
-    }
2116
+	/**
2117
+	 * Asserts that a string matches a given format string.
2118
+	 *
2119
+	 * @throws ExpectationFailedException
2120
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2121
+	 *
2122
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2123
+	 *
2124
+	 * @see Assert::assertStringMatchesFormat
2125
+	 */
2126
+	function assertStringMatchesFormat(string $format, string $string, string $message = ''): void
2127
+	{
2128
+		Assert::assertStringMatchesFormat(...func_get_args());
2129
+	}
2130 2130
 }
2131 2131
 
2132 2132
 if (!function_exists('PHPUnit\Framework\assertStringNotMatchesFormat')) {
2133
-    /**
2134
-     * Asserts that a string does not match a given format string.
2135
-     *
2136
-     * @throws ExpectationFailedException
2137
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2138
-     *
2139
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2140
-     *
2141
-     * @see Assert::assertStringNotMatchesFormat
2142
-     */
2143
-    function assertStringNotMatchesFormat(string $format, string $string, string $message = ''): void
2144
-    {
2145
-        Assert::assertStringNotMatchesFormat(...func_get_args());
2146
-    }
2133
+	/**
2134
+	 * Asserts that a string does not match a given format string.
2135
+	 *
2136
+	 * @throws ExpectationFailedException
2137
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2138
+	 *
2139
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2140
+	 *
2141
+	 * @see Assert::assertStringNotMatchesFormat
2142
+	 */
2143
+	function assertStringNotMatchesFormat(string $format, string $string, string $message = ''): void
2144
+	{
2145
+		Assert::assertStringNotMatchesFormat(...func_get_args());
2146
+	}
2147 2147
 }
2148 2148
 
2149 2149
 if (!function_exists('PHPUnit\Framework\assertStringMatchesFormatFile')) {
2150
-    /**
2151
-     * Asserts that a string matches a given format file.
2152
-     *
2153
-     * @throws ExpectationFailedException
2154
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2155
-     *
2156
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2157
-     *
2158
-     * @see Assert::assertStringMatchesFormatFile
2159
-     */
2160
-    function assertStringMatchesFormatFile(string $formatFile, string $string, string $message = ''): void
2161
-    {
2162
-        Assert::assertStringMatchesFormatFile(...func_get_args());
2163
-    }
2150
+	/**
2151
+	 * Asserts that a string matches a given format file.
2152
+	 *
2153
+	 * @throws ExpectationFailedException
2154
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2155
+	 *
2156
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2157
+	 *
2158
+	 * @see Assert::assertStringMatchesFormatFile
2159
+	 */
2160
+	function assertStringMatchesFormatFile(string $formatFile, string $string, string $message = ''): void
2161
+	{
2162
+		Assert::assertStringMatchesFormatFile(...func_get_args());
2163
+	}
2164 2164
 }
2165 2165
 
2166 2166
 if (!function_exists('PHPUnit\Framework\assertStringNotMatchesFormatFile')) {
2167
-    /**
2168
-     * Asserts that a string does not match a given format string.
2169
-     *
2170
-     * @throws ExpectationFailedException
2171
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2172
-     *
2173
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2174
-     *
2175
-     * @see Assert::assertStringNotMatchesFormatFile
2176
-     */
2177
-    function assertStringNotMatchesFormatFile(string $formatFile, string $string, string $message = ''): void
2178
-    {
2179
-        Assert::assertStringNotMatchesFormatFile(...func_get_args());
2180
-    }
2167
+	/**
2168
+	 * Asserts that a string does not match a given format string.
2169
+	 *
2170
+	 * @throws ExpectationFailedException
2171
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2172
+	 *
2173
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2174
+	 *
2175
+	 * @see Assert::assertStringNotMatchesFormatFile
2176
+	 */
2177
+	function assertStringNotMatchesFormatFile(string $formatFile, string $string, string $message = ''): void
2178
+	{
2179
+		Assert::assertStringNotMatchesFormatFile(...func_get_args());
2180
+	}
2181 2181
 }
2182 2182
 
2183 2183
 if (!function_exists('PHPUnit\Framework\assertStringStartsWith')) {
2184
-    /**
2185
-     * Asserts that a string starts with a given prefix.
2186
-     *
2187
-     * @throws ExpectationFailedException
2188
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2189
-     *
2190
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2191
-     *
2192
-     * @see Assert::assertStringStartsWith
2193
-     */
2194
-    function assertStringStartsWith(string $prefix, string $string, string $message = ''): void
2195
-    {
2196
-        Assert::assertStringStartsWith(...func_get_args());
2197
-    }
2184
+	/**
2185
+	 * Asserts that a string starts with a given prefix.
2186
+	 *
2187
+	 * @throws ExpectationFailedException
2188
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2189
+	 *
2190
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2191
+	 *
2192
+	 * @see Assert::assertStringStartsWith
2193
+	 */
2194
+	function assertStringStartsWith(string $prefix, string $string, string $message = ''): void
2195
+	{
2196
+		Assert::assertStringStartsWith(...func_get_args());
2197
+	}
2198 2198
 }
2199 2199
 
2200 2200
 if (!function_exists('PHPUnit\Framework\assertStringStartsNotWith')) {
2201
-    /**
2202
-     * Asserts that a string starts not with a given prefix.
2203
-     *
2204
-     * @param string $prefix
2205
-     * @param string $string
2206
-     *
2207
-     * @throws ExpectationFailedException
2208
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2209
-     *
2210
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2211
-     *
2212
-     * @see Assert::assertStringStartsNotWith
2213
-     */
2214
-    function assertStringStartsNotWith($prefix, $string, string $message = ''): void
2215
-    {
2216
-        Assert::assertStringStartsNotWith(...func_get_args());
2217
-    }
2201
+	/**
2202
+	 * Asserts that a string starts not with a given prefix.
2203
+	 *
2204
+	 * @param string $prefix
2205
+	 * @param string $string
2206
+	 *
2207
+	 * @throws ExpectationFailedException
2208
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2209
+	 *
2210
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2211
+	 *
2212
+	 * @see Assert::assertStringStartsNotWith
2213
+	 */
2214
+	function assertStringStartsNotWith($prefix, $string, string $message = ''): void
2215
+	{
2216
+		Assert::assertStringStartsNotWith(...func_get_args());
2217
+	}
2218 2218
 }
2219 2219
 
2220 2220
 if (!function_exists('PHPUnit\Framework\assertStringContainsString')) {
2221
-    /**
2222
-     * @throws ExpectationFailedException
2223
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2224
-     *
2225
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2226
-     *
2227
-     * @see Assert::assertStringContainsString
2228
-     */
2229
-    function assertStringContainsString(string $needle, string $haystack, string $message = ''): void
2230
-    {
2231
-        Assert::assertStringContainsString(...func_get_args());
2232
-    }
2221
+	/**
2222
+	 * @throws ExpectationFailedException
2223
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2224
+	 *
2225
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2226
+	 *
2227
+	 * @see Assert::assertStringContainsString
2228
+	 */
2229
+	function assertStringContainsString(string $needle, string $haystack, string $message = ''): void
2230
+	{
2231
+		Assert::assertStringContainsString(...func_get_args());
2232
+	}
2233 2233
 }
2234 2234
 
2235 2235
 if (!function_exists('PHPUnit\Framework\assertStringContainsStringIgnoringCase')) {
2236
-    /**
2237
-     * @throws ExpectationFailedException
2238
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2239
-     *
2240
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2241
-     *
2242
-     * @see Assert::assertStringContainsStringIgnoringCase
2243
-     */
2244
-    function assertStringContainsStringIgnoringCase(string $needle, string $haystack, string $message = ''): void
2245
-    {
2246
-        Assert::assertStringContainsStringIgnoringCase(...func_get_args());
2247
-    }
2236
+	/**
2237
+	 * @throws ExpectationFailedException
2238
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2239
+	 *
2240
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2241
+	 *
2242
+	 * @see Assert::assertStringContainsStringIgnoringCase
2243
+	 */
2244
+	function assertStringContainsStringIgnoringCase(string $needle, string $haystack, string $message = ''): void
2245
+	{
2246
+		Assert::assertStringContainsStringIgnoringCase(...func_get_args());
2247
+	}
2248 2248
 }
2249 2249
 
2250 2250
 if (!function_exists('PHPUnit\Framework\assertStringNotContainsString')) {
2251
-    /**
2252
-     * @throws ExpectationFailedException
2253
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2254
-     *
2255
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2256
-     *
2257
-     * @see Assert::assertStringNotContainsString
2258
-     */
2259
-    function assertStringNotContainsString(string $needle, string $haystack, string $message = ''): void
2260
-    {
2261
-        Assert::assertStringNotContainsString(...func_get_args());
2262
-    }
2251
+	/**
2252
+	 * @throws ExpectationFailedException
2253
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2254
+	 *
2255
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2256
+	 *
2257
+	 * @see Assert::assertStringNotContainsString
2258
+	 */
2259
+	function assertStringNotContainsString(string $needle, string $haystack, string $message = ''): void
2260
+	{
2261
+		Assert::assertStringNotContainsString(...func_get_args());
2262
+	}
2263 2263
 }
2264 2264
 
2265 2265
 if (!function_exists('PHPUnit\Framework\assertStringNotContainsStringIgnoringCase')) {
2266
-    /**
2267
-     * @throws ExpectationFailedException
2268
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2269
-     *
2270
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2271
-     *
2272
-     * @see Assert::assertStringNotContainsStringIgnoringCase
2273
-     */
2274
-    function assertStringNotContainsStringIgnoringCase(string $needle, string $haystack, string $message = ''): void
2275
-    {
2276
-        Assert::assertStringNotContainsStringIgnoringCase(...func_get_args());
2277
-    }
2266
+	/**
2267
+	 * @throws ExpectationFailedException
2268
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2269
+	 *
2270
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2271
+	 *
2272
+	 * @see Assert::assertStringNotContainsStringIgnoringCase
2273
+	 */
2274
+	function assertStringNotContainsStringIgnoringCase(string $needle, string $haystack, string $message = ''): void
2275
+	{
2276
+		Assert::assertStringNotContainsStringIgnoringCase(...func_get_args());
2277
+	}
2278 2278
 }
2279 2279
 
2280 2280
 if (!function_exists('PHPUnit\Framework\assertStringEndsWith')) {
2281
-    /**
2282
-     * Asserts that a string ends with a given suffix.
2283
-     *
2284
-     * @throws ExpectationFailedException
2285
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2286
-     *
2287
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2288
-     *
2289
-     * @see Assert::assertStringEndsWith
2290
-     */
2291
-    function assertStringEndsWith(string $suffix, string $string, string $message = ''): void
2292
-    {
2293
-        Assert::assertStringEndsWith(...func_get_args());
2294
-    }
2281
+	/**
2282
+	 * Asserts that a string ends with a given suffix.
2283
+	 *
2284
+	 * @throws ExpectationFailedException
2285
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2286
+	 *
2287
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2288
+	 *
2289
+	 * @see Assert::assertStringEndsWith
2290
+	 */
2291
+	function assertStringEndsWith(string $suffix, string $string, string $message = ''): void
2292
+	{
2293
+		Assert::assertStringEndsWith(...func_get_args());
2294
+	}
2295 2295
 }
2296 2296
 
2297 2297
 if (!function_exists('PHPUnit\Framework\assertStringEndsNotWith')) {
2298
-    /**
2299
-     * Asserts that a string ends not with a given suffix.
2300
-     *
2301
-     * @throws ExpectationFailedException
2302
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2303
-     *
2304
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2305
-     *
2306
-     * @see Assert::assertStringEndsNotWith
2307
-     */
2308
-    function assertStringEndsNotWith(string $suffix, string $string, string $message = ''): void
2309
-    {
2310
-        Assert::assertStringEndsNotWith(...func_get_args());
2311
-    }
2298
+	/**
2299
+	 * Asserts that a string ends not with a given suffix.
2300
+	 *
2301
+	 * @throws ExpectationFailedException
2302
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2303
+	 *
2304
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2305
+	 *
2306
+	 * @see Assert::assertStringEndsNotWith
2307
+	 */
2308
+	function assertStringEndsNotWith(string $suffix, string $string, string $message = ''): void
2309
+	{
2310
+		Assert::assertStringEndsNotWith(...func_get_args());
2311
+	}
2312 2312
 }
2313 2313
 
2314 2314
 if (!function_exists('PHPUnit\Framework\assertXmlFileEqualsXmlFile')) {
2315
-    /**
2316
-     * Asserts that two XML files are equal.
2317
-     *
2318
-     * @throws ExpectationFailedException
2319
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2320
-     * @throws Exception
2321
-     *
2322
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2323
-     *
2324
-     * @see Assert::assertXmlFileEqualsXmlFile
2325
-     */
2326
-    function assertXmlFileEqualsXmlFile(string $expectedFile, string $actualFile, string $message = ''): void
2327
-    {
2328
-        Assert::assertXmlFileEqualsXmlFile(...func_get_args());
2329
-    }
2315
+	/**
2316
+	 * Asserts that two XML files are equal.
2317
+	 *
2318
+	 * @throws ExpectationFailedException
2319
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2320
+	 * @throws Exception
2321
+	 *
2322
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2323
+	 *
2324
+	 * @see Assert::assertXmlFileEqualsXmlFile
2325
+	 */
2326
+	function assertXmlFileEqualsXmlFile(string $expectedFile, string $actualFile, string $message = ''): void
2327
+	{
2328
+		Assert::assertXmlFileEqualsXmlFile(...func_get_args());
2329
+	}
2330 2330
 }
2331 2331
 
2332 2332
 if (!function_exists('PHPUnit\Framework\assertXmlFileNotEqualsXmlFile')) {
2333
-    /**
2334
-     * Asserts that two XML files are not equal.
2335
-     *
2336
-     * @throws ExpectationFailedException
2337
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2338
-     * @throws \PHPUnit\Util\Exception
2339
-     *
2340
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2341
-     *
2342
-     * @see Assert::assertXmlFileNotEqualsXmlFile
2343
-     */
2344
-    function assertXmlFileNotEqualsXmlFile(string $expectedFile, string $actualFile, string $message = ''): void
2345
-    {
2346
-        Assert::assertXmlFileNotEqualsXmlFile(...func_get_args());
2347
-    }
2333
+	/**
2334
+	 * Asserts that two XML files are not equal.
2335
+	 *
2336
+	 * @throws ExpectationFailedException
2337
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2338
+	 * @throws \PHPUnit\Util\Exception
2339
+	 *
2340
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2341
+	 *
2342
+	 * @see Assert::assertXmlFileNotEqualsXmlFile
2343
+	 */
2344
+	function assertXmlFileNotEqualsXmlFile(string $expectedFile, string $actualFile, string $message = ''): void
2345
+	{
2346
+		Assert::assertXmlFileNotEqualsXmlFile(...func_get_args());
2347
+	}
2348 2348
 }
2349 2349
 
2350 2350
 if (!function_exists('PHPUnit\Framework\assertXmlStringEqualsXmlFile')) {
2351
-    /**
2352
-     * Asserts that two XML documents are equal.
2353
-     *
2354
-     * @param DOMDocument|string $actualXml
2355
-     *
2356
-     * @throws ExpectationFailedException
2357
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2358
-     * @throws \PHPUnit\Util\Xml\Exception
2359
-     *
2360
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2361
-     *
2362
-     * @see Assert::assertXmlStringEqualsXmlFile
2363
-     */
2364
-    function assertXmlStringEqualsXmlFile(string $expectedFile, $actualXml, string $message = ''): void
2365
-    {
2366
-        Assert::assertXmlStringEqualsXmlFile(...func_get_args());
2367
-    }
2351
+	/**
2352
+	 * Asserts that two XML documents are equal.
2353
+	 *
2354
+	 * @param DOMDocument|string $actualXml
2355
+	 *
2356
+	 * @throws ExpectationFailedException
2357
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2358
+	 * @throws \PHPUnit\Util\Xml\Exception
2359
+	 *
2360
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2361
+	 *
2362
+	 * @see Assert::assertXmlStringEqualsXmlFile
2363
+	 */
2364
+	function assertXmlStringEqualsXmlFile(string $expectedFile, $actualXml, string $message = ''): void
2365
+	{
2366
+		Assert::assertXmlStringEqualsXmlFile(...func_get_args());
2367
+	}
2368 2368
 }
2369 2369
 
2370 2370
 if (!function_exists('PHPUnit\Framework\assertXmlStringNotEqualsXmlFile')) {
2371
-    /**
2372
-     * Asserts that two XML documents are not equal.
2373
-     *
2374
-     * @param DOMDocument|string $actualXml
2375
-     *
2376
-     * @throws ExpectationFailedException
2377
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2378
-     * @throws \PHPUnit\Util\Xml\Exception
2379
-     *
2380
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2381
-     *
2382
-     * @see Assert::assertXmlStringNotEqualsXmlFile
2383
-     */
2384
-    function assertXmlStringNotEqualsXmlFile(string $expectedFile, $actualXml, string $message = ''): void
2385
-    {
2386
-        Assert::assertXmlStringNotEqualsXmlFile(...func_get_args());
2387
-    }
2371
+	/**
2372
+	 * Asserts that two XML documents are not equal.
2373
+	 *
2374
+	 * @param DOMDocument|string $actualXml
2375
+	 *
2376
+	 * @throws ExpectationFailedException
2377
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2378
+	 * @throws \PHPUnit\Util\Xml\Exception
2379
+	 *
2380
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2381
+	 *
2382
+	 * @see Assert::assertXmlStringNotEqualsXmlFile
2383
+	 */
2384
+	function assertXmlStringNotEqualsXmlFile(string $expectedFile, $actualXml, string $message = ''): void
2385
+	{
2386
+		Assert::assertXmlStringNotEqualsXmlFile(...func_get_args());
2387
+	}
2388 2388
 }
2389 2389
 
2390 2390
 if (!function_exists('PHPUnit\Framework\assertXmlStringEqualsXmlString')) {
2391
-    /**
2392
-     * Asserts that two XML documents are equal.
2393
-     *
2394
-     * @param DOMDocument|string $expectedXml
2395
-     * @param DOMDocument|string $actualXml
2396
-     *
2397
-     * @throws ExpectationFailedException
2398
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2399
-     * @throws \PHPUnit\Util\Xml\Exception
2400
-     *
2401
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2402
-     *
2403
-     * @see Assert::assertXmlStringEqualsXmlString
2404
-     */
2405
-    function assertXmlStringEqualsXmlString($expectedXml, $actualXml, string $message = ''): void
2406
-    {
2407
-        Assert::assertXmlStringEqualsXmlString(...func_get_args());
2408
-    }
2391
+	/**
2392
+	 * Asserts that two XML documents are equal.
2393
+	 *
2394
+	 * @param DOMDocument|string $expectedXml
2395
+	 * @param DOMDocument|string $actualXml
2396
+	 *
2397
+	 * @throws ExpectationFailedException
2398
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2399
+	 * @throws \PHPUnit\Util\Xml\Exception
2400
+	 *
2401
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2402
+	 *
2403
+	 * @see Assert::assertXmlStringEqualsXmlString
2404
+	 */
2405
+	function assertXmlStringEqualsXmlString($expectedXml, $actualXml, string $message = ''): void
2406
+	{
2407
+		Assert::assertXmlStringEqualsXmlString(...func_get_args());
2408
+	}
2409 2409
 }
2410 2410
 
2411 2411
 if (!function_exists('PHPUnit\Framework\assertXmlStringNotEqualsXmlString')) {
2412
-    /**
2413
-     * Asserts that two XML documents are not equal.
2414
-     *
2415
-     * @param DOMDocument|string $expectedXml
2416
-     * @param DOMDocument|string $actualXml
2417
-     *
2418
-     * @throws ExpectationFailedException
2419
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2420
-     * @throws \PHPUnit\Util\Xml\Exception
2421
-     *
2422
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2423
-     *
2424
-     * @see Assert::assertXmlStringNotEqualsXmlString
2425
-     */
2426
-    function assertXmlStringNotEqualsXmlString($expectedXml, $actualXml, string $message = ''): void
2427
-    {
2428
-        Assert::assertXmlStringNotEqualsXmlString(...func_get_args());
2429
-    }
2412
+	/**
2413
+	 * Asserts that two XML documents are not equal.
2414
+	 *
2415
+	 * @param DOMDocument|string $expectedXml
2416
+	 * @param DOMDocument|string $actualXml
2417
+	 *
2418
+	 * @throws ExpectationFailedException
2419
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2420
+	 * @throws \PHPUnit\Util\Xml\Exception
2421
+	 *
2422
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2423
+	 *
2424
+	 * @see Assert::assertXmlStringNotEqualsXmlString
2425
+	 */
2426
+	function assertXmlStringNotEqualsXmlString($expectedXml, $actualXml, string $message = ''): void
2427
+	{
2428
+		Assert::assertXmlStringNotEqualsXmlString(...func_get_args());
2429
+	}
2430 2430
 }
2431 2431
 
2432 2432
 if (!function_exists('PHPUnit\Framework\assertEqualXMLStructure')) {
2433
-    /**
2434
-     * Asserts that a hierarchy of DOMElements matches.
2435
-     *
2436
-     * @throws AssertionFailedError
2437
-     * @throws ExpectationFailedException
2438
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2439
-     *
2440
-     * @codeCoverageIgnore
2441
-     *
2442
-     * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4091
2443
-     *
2444
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2445
-     *
2446
-     * @see Assert::assertEqualXMLStructure
2447
-     */
2448
-    function assertEqualXMLStructure(DOMElement $expectedElement, DOMElement $actualElement, bool $checkAttributes = false, string $message = ''): void
2449
-    {
2450
-        Assert::assertEqualXMLStructure(...func_get_args());
2451
-    }
2433
+	/**
2434
+	 * Asserts that a hierarchy of DOMElements matches.
2435
+	 *
2436
+	 * @throws AssertionFailedError
2437
+	 * @throws ExpectationFailedException
2438
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2439
+	 *
2440
+	 * @codeCoverageIgnore
2441
+	 *
2442
+	 * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4091
2443
+	 *
2444
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2445
+	 *
2446
+	 * @see Assert::assertEqualXMLStructure
2447
+	 */
2448
+	function assertEqualXMLStructure(DOMElement $expectedElement, DOMElement $actualElement, bool $checkAttributes = false, string $message = ''): void
2449
+	{
2450
+		Assert::assertEqualXMLStructure(...func_get_args());
2451
+	}
2452 2452
 }
2453 2453
 
2454 2454
 if (!function_exists('PHPUnit\Framework\assertThat')) {
2455
-    /**
2456
-     * Evaluates a PHPUnit\Framework\Constraint matcher object.
2457
-     *
2458
-     * @throws ExpectationFailedException
2459
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2460
-     *
2461
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2462
-     *
2463
-     * @see Assert::assertThat
2464
-     */
2465
-    function assertThat($value, Constraint $constraint, string $message = ''): void
2466
-    {
2467
-        Assert::assertThat(...func_get_args());
2468
-    }
2455
+	/**
2456
+	 * Evaluates a PHPUnit\Framework\Constraint matcher object.
2457
+	 *
2458
+	 * @throws ExpectationFailedException
2459
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2460
+	 *
2461
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2462
+	 *
2463
+	 * @see Assert::assertThat
2464
+	 */
2465
+	function assertThat($value, Constraint $constraint, string $message = ''): void
2466
+	{
2467
+		Assert::assertThat(...func_get_args());
2468
+	}
2469 2469
 }
2470 2470
 
2471 2471
 if (!function_exists('PHPUnit\Framework\assertJson')) {
2472
-    /**
2473
-     * Asserts that a string is a valid JSON string.
2474
-     *
2475
-     * @throws ExpectationFailedException
2476
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2477
-     *
2478
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2479
-     *
2480
-     * @see Assert::assertJson
2481
-     */
2482
-    function assertJson(string $actualJson, string $message = ''): void
2483
-    {
2484
-        Assert::assertJson(...func_get_args());
2485
-    }
2472
+	/**
2473
+	 * Asserts that a string is a valid JSON string.
2474
+	 *
2475
+	 * @throws ExpectationFailedException
2476
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2477
+	 *
2478
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2479
+	 *
2480
+	 * @see Assert::assertJson
2481
+	 */
2482
+	function assertJson(string $actualJson, string $message = ''): void
2483
+	{
2484
+		Assert::assertJson(...func_get_args());
2485
+	}
2486 2486
 }
2487 2487
 
2488 2488
 if (!function_exists('PHPUnit\Framework\assertJsonStringEqualsJsonString')) {
2489
-    /**
2490
-     * Asserts that two given JSON encoded objects or arrays are equal.
2491
-     *
2492
-     * @throws ExpectationFailedException
2493
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2494
-     *
2495
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2496
-     *
2497
-     * @see Assert::assertJsonStringEqualsJsonString
2498
-     */
2499
-    function assertJsonStringEqualsJsonString(string $expectedJson, string $actualJson, string $message = ''): void
2500
-    {
2501
-        Assert::assertJsonStringEqualsJsonString(...func_get_args());
2502
-    }
2489
+	/**
2490
+	 * Asserts that two given JSON encoded objects or arrays are equal.
2491
+	 *
2492
+	 * @throws ExpectationFailedException
2493
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2494
+	 *
2495
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2496
+	 *
2497
+	 * @see Assert::assertJsonStringEqualsJsonString
2498
+	 */
2499
+	function assertJsonStringEqualsJsonString(string $expectedJson, string $actualJson, string $message = ''): void
2500
+	{
2501
+		Assert::assertJsonStringEqualsJsonString(...func_get_args());
2502
+	}
2503 2503
 }
2504 2504
 
2505 2505
 if (!function_exists('PHPUnit\Framework\assertJsonStringNotEqualsJsonString')) {
2506
-    /**
2507
-     * Asserts that two given JSON encoded objects or arrays are not equal.
2508
-     *
2509
-     * @param string $expectedJson
2510
-     * @param string $actualJson
2511
-     *
2512
-     * @throws ExpectationFailedException
2513
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2514
-     *
2515
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2516
-     *
2517
-     * @see Assert::assertJsonStringNotEqualsJsonString
2518
-     */
2519
-    function assertJsonStringNotEqualsJsonString($expectedJson, $actualJson, string $message = ''): void
2520
-    {
2521
-        Assert::assertJsonStringNotEqualsJsonString(...func_get_args());
2522
-    }
2506
+	/**
2507
+	 * Asserts that two given JSON encoded objects or arrays are not equal.
2508
+	 *
2509
+	 * @param string $expectedJson
2510
+	 * @param string $actualJson
2511
+	 *
2512
+	 * @throws ExpectationFailedException
2513
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2514
+	 *
2515
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2516
+	 *
2517
+	 * @see Assert::assertJsonStringNotEqualsJsonString
2518
+	 */
2519
+	function assertJsonStringNotEqualsJsonString($expectedJson, $actualJson, string $message = ''): void
2520
+	{
2521
+		Assert::assertJsonStringNotEqualsJsonString(...func_get_args());
2522
+	}
2523 2523
 }
2524 2524
 
2525 2525
 if (!function_exists('PHPUnit\Framework\assertJsonStringEqualsJsonFile')) {
2526
-    /**
2527
-     * Asserts that the generated JSON encoded object and the content of the given file are equal.
2528
-     *
2529
-     * @throws ExpectationFailedException
2530
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2531
-     *
2532
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2533
-     *
2534
-     * @see Assert::assertJsonStringEqualsJsonFile
2535
-     */
2536
-    function assertJsonStringEqualsJsonFile(string $expectedFile, string $actualJson, string $message = ''): void
2537
-    {
2538
-        Assert::assertJsonStringEqualsJsonFile(...func_get_args());
2539
-    }
2526
+	/**
2527
+	 * Asserts that the generated JSON encoded object and the content of the given file are equal.
2528
+	 *
2529
+	 * @throws ExpectationFailedException
2530
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2531
+	 *
2532
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2533
+	 *
2534
+	 * @see Assert::assertJsonStringEqualsJsonFile
2535
+	 */
2536
+	function assertJsonStringEqualsJsonFile(string $expectedFile, string $actualJson, string $message = ''): void
2537
+	{
2538
+		Assert::assertJsonStringEqualsJsonFile(...func_get_args());
2539
+	}
2540 2540
 }
2541 2541
 
2542 2542
 if (!function_exists('PHPUnit\Framework\assertJsonStringNotEqualsJsonFile')) {
2543
-    /**
2544
-     * Asserts that the generated JSON encoded object and the content of the given file are not equal.
2545
-     *
2546
-     * @throws ExpectationFailedException
2547
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2548
-     *
2549
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2550
-     *
2551
-     * @see Assert::assertJsonStringNotEqualsJsonFile
2552
-     */
2553
-    function assertJsonStringNotEqualsJsonFile(string $expectedFile, string $actualJson, string $message = ''): void
2554
-    {
2555
-        Assert::assertJsonStringNotEqualsJsonFile(...func_get_args());
2556
-    }
2543
+	/**
2544
+	 * Asserts that the generated JSON encoded object and the content of the given file are not equal.
2545
+	 *
2546
+	 * @throws ExpectationFailedException
2547
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2548
+	 *
2549
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2550
+	 *
2551
+	 * @see Assert::assertJsonStringNotEqualsJsonFile
2552
+	 */
2553
+	function assertJsonStringNotEqualsJsonFile(string $expectedFile, string $actualJson, string $message = ''): void
2554
+	{
2555
+		Assert::assertJsonStringNotEqualsJsonFile(...func_get_args());
2556
+	}
2557 2557
 }
2558 2558
 
2559 2559
 if (!function_exists('PHPUnit\Framework\assertJsonFileEqualsJsonFile')) {
2560
-    /**
2561
-     * Asserts that two JSON files are equal.
2562
-     *
2563
-     * @throws ExpectationFailedException
2564
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2565
-     *
2566
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2567
-     *
2568
-     * @see Assert::assertJsonFileEqualsJsonFile
2569
-     */
2570
-    function assertJsonFileEqualsJsonFile(string $expectedFile, string $actualFile, string $message = ''): void
2571
-    {
2572
-        Assert::assertJsonFileEqualsJsonFile(...func_get_args());
2573
-    }
2560
+	/**
2561
+	 * Asserts that two JSON files are equal.
2562
+	 *
2563
+	 * @throws ExpectationFailedException
2564
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2565
+	 *
2566
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2567
+	 *
2568
+	 * @see Assert::assertJsonFileEqualsJsonFile
2569
+	 */
2570
+	function assertJsonFileEqualsJsonFile(string $expectedFile, string $actualFile, string $message = ''): void
2571
+	{
2572
+		Assert::assertJsonFileEqualsJsonFile(...func_get_args());
2573
+	}
2574 2574
 }
2575 2575
 
2576 2576
 if (!function_exists('PHPUnit\Framework\assertJsonFileNotEqualsJsonFile')) {
2577
-    /**
2578
-     * Asserts that two JSON files are not equal.
2579
-     *
2580
-     * @throws ExpectationFailedException
2581
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2582
-     *
2583
-     * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2584
-     *
2585
-     * @see Assert::assertJsonFileNotEqualsJsonFile
2586
-     */
2587
-    function assertJsonFileNotEqualsJsonFile(string $expectedFile, string $actualFile, string $message = ''): void
2588
-    {
2589
-        Assert::assertJsonFileNotEqualsJsonFile(...func_get_args());
2590
-    }
2577
+	/**
2578
+	 * Asserts that two JSON files are not equal.
2579
+	 *
2580
+	 * @throws ExpectationFailedException
2581
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2582
+	 *
2583
+	 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
2584
+	 *
2585
+	 * @see Assert::assertJsonFileNotEqualsJsonFile
2586
+	 */
2587
+	function assertJsonFileNotEqualsJsonFile(string $expectedFile, string $actualFile, string $message = ''): void
2588
+	{
2589
+		Assert::assertJsonFileNotEqualsJsonFile(...func_get_args());
2590
+	}
2591 2591
 }
2592 2592
 
2593 2593
 if (!function_exists('PHPUnit\Framework\logicalAnd')) {
2594
-    function logicalAnd(): LogicalAnd
2595
-    {
2596
-        return Assert::logicalAnd(...func_get_args());
2597
-    }
2594
+	function logicalAnd(): LogicalAnd
2595
+	{
2596
+		return Assert::logicalAnd(...func_get_args());
2597
+	}
2598 2598
 }
2599 2599
 
2600 2600
 if (!function_exists('PHPUnit\Framework\logicalOr')) {
2601
-    function logicalOr(): LogicalOr
2602
-    {
2603
-        return Assert::logicalOr(...func_get_args());
2604
-    }
2601
+	function logicalOr(): LogicalOr
2602
+	{
2603
+		return Assert::logicalOr(...func_get_args());
2604
+	}
2605 2605
 }
2606 2606
 
2607 2607
 if (!function_exists('PHPUnit\Framework\logicalNot')) {
2608
-    function logicalNot(Constraint $constraint): LogicalNot
2609
-    {
2610
-        return Assert::logicalNot(...func_get_args());
2611
-    }
2608
+	function logicalNot(Constraint $constraint): LogicalNot
2609
+	{
2610
+		return Assert::logicalNot(...func_get_args());
2611
+	}
2612 2612
 }
2613 2613
 
2614 2614
 if (!function_exists('PHPUnit\Framework\logicalXor')) {
2615
-    function logicalXor(): LogicalXor
2616
-    {
2617
-        return Assert::logicalXor(...func_get_args());
2618
-    }
2615
+	function logicalXor(): LogicalXor
2616
+	{
2617
+		return Assert::logicalXor(...func_get_args());
2618
+	}
2619 2619
 }
2620 2620
 
2621 2621
 if (!function_exists('PHPUnit\Framework\anything')) {
2622
-    function anything(): IsAnything
2623
-    {
2624
-        return Assert::anything(...func_get_args());
2625
-    }
2622
+	function anything(): IsAnything
2623
+	{
2624
+		return Assert::anything(...func_get_args());
2625
+	}
2626 2626
 }
2627 2627
 
2628 2628
 if (!function_exists('PHPUnit\Framework\isTrue')) {
2629
-    function isTrue(): IsTrue
2630
-    {
2631
-        return Assert::isTrue(...func_get_args());
2632
-    }
2629
+	function isTrue(): IsTrue
2630
+	{
2631
+		return Assert::isTrue(...func_get_args());
2632
+	}
2633 2633
 }
2634 2634
 
2635 2635
 if (!function_exists('PHPUnit\Framework\callback')) {
2636
-    function callback(callable $callback): Callback
2637
-    {
2638
-        return Assert::callback(...func_get_args());
2639
-    }
2636
+	function callback(callable $callback): Callback
2637
+	{
2638
+		return Assert::callback(...func_get_args());
2639
+	}
2640 2640
 }
2641 2641
 
2642 2642
 if (!function_exists('PHPUnit\Framework\isFalse')) {
2643
-    function isFalse(): IsFalse
2644
-    {
2645
-        return Assert::isFalse(...func_get_args());
2646
-    }
2643
+	function isFalse(): IsFalse
2644
+	{
2645
+		return Assert::isFalse(...func_get_args());
2646
+	}
2647 2647
 }
2648 2648
 
2649 2649
 if (!function_exists('PHPUnit\Framework\isJson')) {
2650
-    function isJson(): IsJson
2651
-    {
2652
-        return Assert::isJson(...func_get_args());
2653
-    }
2650
+	function isJson(): IsJson
2651
+	{
2652
+		return Assert::isJson(...func_get_args());
2653
+	}
2654 2654
 }
2655 2655
 
2656 2656
 if (!function_exists('PHPUnit\Framework\isNull')) {
2657
-    function isNull(): IsNull
2658
-    {
2659
-        return Assert::isNull(...func_get_args());
2660
-    }
2657
+	function isNull(): IsNull
2658
+	{
2659
+		return Assert::isNull(...func_get_args());
2660
+	}
2661 2661
 }
2662 2662
 
2663 2663
 if (!function_exists('PHPUnit\Framework\isFinite')) {
2664
-    function isFinite(): IsFinite
2665
-    {
2666
-        return Assert::isFinite(...func_get_args());
2667
-    }
2664
+	function isFinite(): IsFinite
2665
+	{
2666
+		return Assert::isFinite(...func_get_args());
2667
+	}
2668 2668
 }
2669 2669
 
2670 2670
 if (!function_exists('PHPUnit\Framework\isInfinite')) {
2671
-    function isInfinite(): IsInfinite
2672
-    {
2673
-        return Assert::isInfinite(...func_get_args());
2674
-    }
2671
+	function isInfinite(): IsInfinite
2672
+	{
2673
+		return Assert::isInfinite(...func_get_args());
2674
+	}
2675 2675
 }
2676 2676
 
2677 2677
 if (!function_exists('PHPUnit\Framework\isNan')) {
2678
-    function isNan(): IsNan
2679
-    {
2680
-        return Assert::isNan(...func_get_args());
2681
-    }
2678
+	function isNan(): IsNan
2679
+	{
2680
+		return Assert::isNan(...func_get_args());
2681
+	}
2682 2682
 }
2683 2683
 
2684 2684
 if (!function_exists('PHPUnit\Framework\containsEqual')) {
2685
-    function containsEqual($value): TraversableContainsEqual
2686
-    {
2687
-        return Assert::containsEqual(...func_get_args());
2688
-    }
2685
+	function containsEqual($value): TraversableContainsEqual
2686
+	{
2687
+		return Assert::containsEqual(...func_get_args());
2688
+	}
2689 2689
 }
2690 2690
 
2691 2691
 if (!function_exists('PHPUnit\Framework\containsIdentical')) {
2692
-    function containsIdentical($value): TraversableContainsIdentical
2693
-    {
2694
-        return Assert::containsIdentical(...func_get_args());
2695
-    }
2692
+	function containsIdentical($value): TraversableContainsIdentical
2693
+	{
2694
+		return Assert::containsIdentical(...func_get_args());
2695
+	}
2696 2696
 }
2697 2697
 
2698 2698
 if (!function_exists('PHPUnit\Framework\containsOnly')) {
2699
-    function containsOnly(string $type): TraversableContainsOnly
2700
-    {
2701
-        return Assert::containsOnly(...func_get_args());
2702
-    }
2699
+	function containsOnly(string $type): TraversableContainsOnly
2700
+	{
2701
+		return Assert::containsOnly(...func_get_args());
2702
+	}
2703 2703
 }
2704 2704
 
2705 2705
 if (!function_exists('PHPUnit\Framework\containsOnlyInstancesOf')) {
2706
-    function containsOnlyInstancesOf(string $className): TraversableContainsOnly
2707
-    {
2708
-        return Assert::containsOnlyInstancesOf(...func_get_args());
2709
-    }
2706
+	function containsOnlyInstancesOf(string $className): TraversableContainsOnly
2707
+	{
2708
+		return Assert::containsOnlyInstancesOf(...func_get_args());
2709
+	}
2710 2710
 }
2711 2711
 
2712 2712
 if (!function_exists('PHPUnit\Framework\arrayHasKey')) {
2713
-    function arrayHasKey($key): ArrayHasKey
2714
-    {
2715
-        return Assert::arrayHasKey(...func_get_args());
2716
-    }
2713
+	function arrayHasKey($key): ArrayHasKey
2714
+	{
2715
+		return Assert::arrayHasKey(...func_get_args());
2716
+	}
2717 2717
 }
2718 2718
 
2719 2719
 if (!function_exists('PHPUnit\Framework\equalTo')) {
2720
-    function equalTo($value): IsEqual
2721
-    {
2722
-        return Assert::equalTo(...func_get_args());
2723
-    }
2720
+	function equalTo($value): IsEqual
2721
+	{
2722
+		return Assert::equalTo(...func_get_args());
2723
+	}
2724 2724
 }
2725 2725
 
2726 2726
 if (!function_exists('PHPUnit\Framework\equalToCanonicalizing')) {
2727
-    function equalToCanonicalizing($value): IsEqualCanonicalizing
2728
-    {
2729
-        return Assert::equalToCanonicalizing(...func_get_args());
2730
-    }
2727
+	function equalToCanonicalizing($value): IsEqualCanonicalizing
2728
+	{
2729
+		return Assert::equalToCanonicalizing(...func_get_args());
2730
+	}
2731 2731
 }
2732 2732
 
2733 2733
 if (!function_exists('PHPUnit\Framework\equalToIgnoringCase')) {
2734
-    function equalToIgnoringCase($value): IsEqualIgnoringCase
2735
-    {
2736
-        return Assert::equalToIgnoringCase(...func_get_args());
2737
-    }
2734
+	function equalToIgnoringCase($value): IsEqualIgnoringCase
2735
+	{
2736
+		return Assert::equalToIgnoringCase(...func_get_args());
2737
+	}
2738 2738
 }
2739 2739
 
2740 2740
 if (!function_exists('PHPUnit\Framework\equalToWithDelta')) {
2741
-    function equalToWithDelta($value, float $delta): IsEqualWithDelta
2742
-    {
2743
-        return Assert::equalToWithDelta(...func_get_args());
2744
-    }
2741
+	function equalToWithDelta($value, float $delta): IsEqualWithDelta
2742
+	{
2743
+		return Assert::equalToWithDelta(...func_get_args());
2744
+	}
2745 2745
 }
2746 2746
 
2747 2747
 if (!function_exists('PHPUnit\Framework\isEmpty')) {
2748
-    function isEmpty(): IsEmpty
2749
-    {
2750
-        return Assert::isEmpty(...func_get_args());
2751
-    }
2748
+	function isEmpty(): IsEmpty
2749
+	{
2750
+		return Assert::isEmpty(...func_get_args());
2751
+	}
2752 2752
 }
2753 2753
 
2754 2754
 if (!function_exists('PHPUnit\Framework\isWritable')) {
2755
-    function isWritable(): IsWritable
2756
-    {
2757
-        return Assert::isWritable(...func_get_args());
2758
-    }
2755
+	function isWritable(): IsWritable
2756
+	{
2757
+		return Assert::isWritable(...func_get_args());
2758
+	}
2759 2759
 }
2760 2760
 
2761 2761
 if (!function_exists('PHPUnit\Framework\isReadable')) {
2762
-    function isReadable(): IsReadable
2763
-    {
2764
-        return Assert::isReadable(...func_get_args());
2765
-    }
2762
+	function isReadable(): IsReadable
2763
+	{
2764
+		return Assert::isReadable(...func_get_args());
2765
+	}
2766 2766
 }
2767 2767
 
2768 2768
 if (!function_exists('PHPUnit\Framework\directoryExists')) {
2769
-    function directoryExists(): DirectoryExists
2770
-    {
2771
-        return Assert::directoryExists(...func_get_args());
2772
-    }
2769
+	function directoryExists(): DirectoryExists
2770
+	{
2771
+		return Assert::directoryExists(...func_get_args());
2772
+	}
2773 2773
 }
2774 2774
 
2775 2775
 if (!function_exists('PHPUnit\Framework\fileExists')) {
2776
-    function fileExists(): FileExists
2777
-    {
2778
-        return Assert::fileExists(...func_get_args());
2779
-    }
2776
+	function fileExists(): FileExists
2777
+	{
2778
+		return Assert::fileExists(...func_get_args());
2779
+	}
2780 2780
 }
2781 2781
 
2782 2782
 if (!function_exists('PHPUnit\Framework\greaterThan')) {
2783
-    function greaterThan($value): GreaterThan
2784
-    {
2785
-        return Assert::greaterThan(...func_get_args());
2786
-    }
2783
+	function greaterThan($value): GreaterThan
2784
+	{
2785
+		return Assert::greaterThan(...func_get_args());
2786
+	}
2787 2787
 }
2788 2788
 
2789 2789
 if (!function_exists('PHPUnit\Framework\greaterThanOrEqual')) {
2790
-    function greaterThanOrEqual($value): LogicalOr
2791
-    {
2792
-        return Assert::greaterThanOrEqual(...func_get_args());
2793
-    }
2790
+	function greaterThanOrEqual($value): LogicalOr
2791
+	{
2792
+		return Assert::greaterThanOrEqual(...func_get_args());
2793
+	}
2794 2794
 }
2795 2795
 
2796 2796
 if (!function_exists('PHPUnit\Framework\classHasAttribute')) {
2797
-    function classHasAttribute(string $attributeName): ClassHasAttribute
2798
-    {
2799
-        return Assert::classHasAttribute(...func_get_args());
2800
-    }
2797
+	function classHasAttribute(string $attributeName): ClassHasAttribute
2798
+	{
2799
+		return Assert::classHasAttribute(...func_get_args());
2800
+	}
2801 2801
 }
2802 2802
 
2803 2803
 if (!function_exists('PHPUnit\Framework\classHasStaticAttribute')) {
2804
-    function classHasStaticAttribute(string $attributeName): ClassHasStaticAttribute
2805
-    {
2806
-        return Assert::classHasStaticAttribute(...func_get_args());
2807
-    }
2804
+	function classHasStaticAttribute(string $attributeName): ClassHasStaticAttribute
2805
+	{
2806
+		return Assert::classHasStaticAttribute(...func_get_args());
2807
+	}
2808 2808
 }
2809 2809
 
2810 2810
 if (!function_exists('PHPUnit\Framework\objectHasAttribute')) {
2811
-    function objectHasAttribute($attributeName): ObjectHasAttribute
2812
-    {
2813
-        return Assert::objectHasAttribute(...func_get_args());
2814
-    }
2811
+	function objectHasAttribute($attributeName): ObjectHasAttribute
2812
+	{
2813
+		return Assert::objectHasAttribute(...func_get_args());
2814
+	}
2815 2815
 }
2816 2816
 
2817 2817
 if (!function_exists('PHPUnit\Framework\identicalTo')) {
2818
-    function identicalTo($value): IsIdentical
2819
-    {
2820
-        return Assert::identicalTo(...func_get_args());
2821
-    }
2818
+	function identicalTo($value): IsIdentical
2819
+	{
2820
+		return Assert::identicalTo(...func_get_args());
2821
+	}
2822 2822
 }
2823 2823
 
2824 2824
 if (!function_exists('PHPUnit\Framework\isInstanceOf')) {
2825
-    function isInstanceOf(string $className): IsInstanceOf
2826
-    {
2827
-        return Assert::isInstanceOf(...func_get_args());
2828
-    }
2825
+	function isInstanceOf(string $className): IsInstanceOf
2826
+	{
2827
+		return Assert::isInstanceOf(...func_get_args());
2828
+	}
2829 2829
 }
2830 2830
 
2831 2831
 if (!function_exists('PHPUnit\Framework\isType')) {
2832
-    function isType(string $type): IsType
2833
-    {
2834
-        return Assert::isType(...func_get_args());
2835
-    }
2832
+	function isType(string $type): IsType
2833
+	{
2834
+		return Assert::isType(...func_get_args());
2835
+	}
2836 2836
 }
2837 2837
 
2838 2838
 if (!function_exists('PHPUnit\Framework\lessThan')) {
2839
-    function lessThan($value): LessThan
2840
-    {
2841
-        return Assert::lessThan(...func_get_args());
2842
-    }
2839
+	function lessThan($value): LessThan
2840
+	{
2841
+		return Assert::lessThan(...func_get_args());
2842
+	}
2843 2843
 }
2844 2844
 
2845 2845
 if (!function_exists('PHPUnit\Framework\lessThanOrEqual')) {
2846
-    function lessThanOrEqual($value): LogicalOr
2847
-    {
2848
-        return Assert::lessThanOrEqual(...func_get_args());
2849
-    }
2846
+	function lessThanOrEqual($value): LogicalOr
2847
+	{
2848
+		return Assert::lessThanOrEqual(...func_get_args());
2849
+	}
2850 2850
 }
2851 2851
 
2852 2852
 if (!function_exists('PHPUnit\Framework\matchesRegularExpression')) {
2853
-    function matchesRegularExpression(string $pattern): RegularExpression
2854
-    {
2855
-        return Assert::matchesRegularExpression(...func_get_args());
2856
-    }
2853
+	function matchesRegularExpression(string $pattern): RegularExpression
2854
+	{
2855
+		return Assert::matchesRegularExpression(...func_get_args());
2856
+	}
2857 2857
 }
2858 2858
 
2859 2859
 if (!function_exists('PHPUnit\Framework\matches')) {
2860
-    function matches(string $string): StringMatchesFormatDescription
2861
-    {
2862
-        return Assert::matches(...func_get_args());
2863
-    }
2860
+	function matches(string $string): StringMatchesFormatDescription
2861
+	{
2862
+		return Assert::matches(...func_get_args());
2863
+	}
2864 2864
 }
2865 2865
 
2866 2866
 if (!function_exists('PHPUnit\Framework\stringStartsWith')) {
2867
-    function stringStartsWith($prefix): StringStartsWith
2868
-    {
2869
-        return Assert::stringStartsWith(...func_get_args());
2870
-    }
2867
+	function stringStartsWith($prefix): StringStartsWith
2868
+	{
2869
+		return Assert::stringStartsWith(...func_get_args());
2870
+	}
2871 2871
 }
2872 2872
 
2873 2873
 if (!function_exists('PHPUnit\Framework\stringContains')) {
2874
-    function stringContains(string $string, bool $case = true): StringContains
2875
-    {
2876
-        return Assert::stringContains(...func_get_args());
2877
-    }
2874
+	function stringContains(string $string, bool $case = true): StringContains
2875
+	{
2876
+		return Assert::stringContains(...func_get_args());
2877
+	}
2878 2878
 }
2879 2879
 
2880 2880
 if (!function_exists('PHPUnit\Framework\stringEndsWith')) {
2881
-    function stringEndsWith(string $suffix): StringEndsWith
2882
-    {
2883
-        return Assert::stringEndsWith(...func_get_args());
2884
-    }
2881
+	function stringEndsWith(string $suffix): StringEndsWith
2882
+	{
2883
+		return Assert::stringEndsWith(...func_get_args());
2884
+	}
2885 2885
 }
2886 2886
 
2887 2887
 if (!function_exists('PHPUnit\Framework\countOf')) {
2888
-    function countOf(int $count): Count
2889
-    {
2890
-        return Assert::countOf(...func_get_args());
2891
-    }
2888
+	function countOf(int $count): Count
2889
+	{
2890
+		return Assert::countOf(...func_get_args());
2891
+	}
2892 2892
 }
2893 2893
 
2894 2894
 if (!function_exists('PHPUnit\Framework\objectEquals')) {
2895
-    function objectEquals(object $object, string $method = 'equals'): ObjectEquals
2896
-    {
2897
-        return Assert::objectEquals(...func_get_args());
2898
-    }
2895
+	function objectEquals(object $object, string $method = 'equals'): ObjectEquals
2896
+	{
2897
+		return Assert::objectEquals(...func_get_args());
2898
+	}
2899 2899
 }
2900 2900
 
2901 2901
 if (!function_exists('PHPUnit\Framework\any')) {
2902
-    /**
2903
-     * Returns a matcher that matches when the method is executed
2904
-     * zero or more times.
2905
-     */
2906
-    function any(): AnyInvokedCountMatcher
2907
-    {
2908
-        return new AnyInvokedCountMatcher;
2909
-    }
2902
+	/**
2903
+	 * Returns a matcher that matches when the method is executed
2904
+	 * zero or more times.
2905
+	 */
2906
+	function any(): AnyInvokedCountMatcher
2907
+	{
2908
+		return new AnyInvokedCountMatcher;
2909
+	}
2910 2910
 }
2911 2911
 
2912 2912
 if (!function_exists('PHPUnit\Framework\never')) {
2913
-    /**
2914
-     * Returns a matcher that matches when the method is never executed.
2915
-     */
2916
-    function never(): InvokedCountMatcher
2917
-    {
2918
-        return new InvokedCountMatcher(0);
2919
-    }
2913
+	/**
2914
+	 * Returns a matcher that matches when the method is never executed.
2915
+	 */
2916
+	function never(): InvokedCountMatcher
2917
+	{
2918
+		return new InvokedCountMatcher(0);
2919
+	}
2920 2920
 }
2921 2921
 
2922 2922
 if (!function_exists('PHPUnit\Framework\atLeast')) {
2923
-    /**
2924
-     * Returns a matcher that matches when the method is executed
2925
-     * at least N times.
2926
-     */
2927
-    function atLeast(int $requiredInvocations): InvokedAtLeastCountMatcher
2928
-    {
2929
-        return new InvokedAtLeastCountMatcher(
2930
-            $requiredInvocations
2931
-        );
2932
-    }
2923
+	/**
2924
+	 * Returns a matcher that matches when the method is executed
2925
+	 * at least N times.
2926
+	 */
2927
+	function atLeast(int $requiredInvocations): InvokedAtLeastCountMatcher
2928
+	{
2929
+		return new InvokedAtLeastCountMatcher(
2930
+			$requiredInvocations
2931
+		);
2932
+	}
2933 2933
 }
2934 2934
 
2935 2935
 if (!function_exists('PHPUnit\Framework\atLeastOnce')) {
2936
-    /**
2937
-     * Returns a matcher that matches when the method is executed at least once.
2938
-     */
2939
-    function atLeastOnce(): InvokedAtLeastOnceMatcher
2940
-    {
2941
-        return new InvokedAtLeastOnceMatcher;
2942
-    }
2936
+	/**
2937
+	 * Returns a matcher that matches when the method is executed at least once.
2938
+	 */
2939
+	function atLeastOnce(): InvokedAtLeastOnceMatcher
2940
+	{
2941
+		return new InvokedAtLeastOnceMatcher;
2942
+	}
2943 2943
 }
2944 2944
 
2945 2945
 if (!function_exists('PHPUnit\Framework\once')) {
2946
-    /**
2947
-     * Returns a matcher that matches when the method is executed exactly once.
2948
-     */
2949
-    function once(): InvokedCountMatcher
2950
-    {
2951
-        return new InvokedCountMatcher(1);
2952
-    }
2946
+	/**
2947
+	 * Returns a matcher that matches when the method is executed exactly once.
2948
+	 */
2949
+	function once(): InvokedCountMatcher
2950
+	{
2951
+		return new InvokedCountMatcher(1);
2952
+	}
2953 2953
 }
2954 2954
 
2955 2955
 if (!function_exists('PHPUnit\Framework\exactly')) {
2956
-    /**
2957
-     * Returns a matcher that matches when the method is executed
2958
-     * exactly $count times.
2959
-     */
2960
-    function exactly(int $count): InvokedCountMatcher
2961
-    {
2962
-        return new InvokedCountMatcher($count);
2963
-    }
2956
+	/**
2957
+	 * Returns a matcher that matches when the method is executed
2958
+	 * exactly $count times.
2959
+	 */
2960
+	function exactly(int $count): InvokedCountMatcher
2961
+	{
2962
+		return new InvokedCountMatcher($count);
2963
+	}
2964 2964
 }
2965 2965
 
2966 2966
 if (!function_exists('PHPUnit\Framework\atMost')) {
2967
-    /**
2968
-     * Returns a matcher that matches when the method is executed
2969
-     * at most N times.
2970
-     */
2971
-    function atMost(int $allowedInvocations): InvokedAtMostCountMatcher
2972
-    {
2973
-        return new InvokedAtMostCountMatcher($allowedInvocations);
2974
-    }
2967
+	/**
2968
+	 * Returns a matcher that matches when the method is executed
2969
+	 * at most N times.
2970
+	 */
2971
+	function atMost(int $allowedInvocations): InvokedAtMostCountMatcher
2972
+	{
2973
+		return new InvokedAtMostCountMatcher($allowedInvocations);
2974
+	}
2975 2975
 }
2976 2976
 
2977 2977
 if (!function_exists('PHPUnit\Framework\at')) {
2978
-    /**
2979
-     * Returns a matcher that matches when the method is executed
2980
-     * at the given index.
2981
-     */
2982
-    function at(int $index): InvokedAtIndexMatcher
2983
-    {
2984
-        return new InvokedAtIndexMatcher($index);
2985
-    }
2978
+	/**
2979
+	 * Returns a matcher that matches when the method is executed
2980
+	 * at the given index.
2981
+	 */
2982
+	function at(int $index): InvokedAtIndexMatcher
2983
+	{
2984
+		return new InvokedAtIndexMatcher($index);
2985
+	}
2986 2986
 }
2987 2987
 
2988 2988
 if (!function_exists('PHPUnit\Framework\returnValue')) {
2989
-    function returnValue($value): ReturnStub
2990
-    {
2991
-        return new ReturnStub($value);
2992
-    }
2989
+	function returnValue($value): ReturnStub
2990
+	{
2991
+		return new ReturnStub($value);
2992
+	}
2993 2993
 }
2994 2994
 
2995 2995
 if (!function_exists('PHPUnit\Framework\returnValueMap')) {
2996
-    function returnValueMap(array $valueMap): ReturnValueMapStub
2997
-    {
2998
-        return new ReturnValueMapStub($valueMap);
2999
-    }
2996
+	function returnValueMap(array $valueMap): ReturnValueMapStub
2997
+	{
2998
+		return new ReturnValueMapStub($valueMap);
2999
+	}
3000 3000
 }
3001 3001
 
3002 3002
 if (!function_exists('PHPUnit\Framework\returnArgument')) {
3003
-    function returnArgument(int $argumentIndex): ReturnArgumentStub
3004
-    {
3005
-        return new ReturnArgumentStub($argumentIndex);
3006
-    }
3003
+	function returnArgument(int $argumentIndex): ReturnArgumentStub
3004
+	{
3005
+		return new ReturnArgumentStub($argumentIndex);
3006
+	}
3007 3007
 }
3008 3008
 
3009 3009
 if (!function_exists('PHPUnit\Framework\returnCallback')) {
3010
-    function returnCallback($callback): ReturnCallbackStub
3011
-    {
3012
-        return new ReturnCallbackStub($callback);
3013
-    }
3010
+	function returnCallback($callback): ReturnCallbackStub
3011
+	{
3012
+		return new ReturnCallbackStub($callback);
3013
+	}
3014 3014
 }
3015 3015
 
3016 3016
 if (!function_exists('PHPUnit\Framework\returnSelf')) {
3017
-    /**
3018
-     * Returns the current object.
3019
-     *
3020
-     * This method is useful when mocking a fluent interface.
3021
-     */
3022
-    function returnSelf(): ReturnSelfStub
3023
-    {
3024
-        return new ReturnSelfStub;
3025
-    }
3017
+	/**
3018
+	 * Returns the current object.
3019
+	 *
3020
+	 * This method is useful when mocking a fluent interface.
3021
+	 */
3022
+	function returnSelf(): ReturnSelfStub
3023
+	{
3024
+		return new ReturnSelfStub;
3025
+	}
3026 3026
 }
3027 3027
 
3028 3028
 if (!function_exists('PHPUnit\Framework\throwException')) {
3029
-    function throwException(Throwable $exception): ExceptionStub
3030
-    {
3031
-        return new ExceptionStub($exception);
3032
-    }
3029
+	function throwException(Throwable $exception): ExceptionStub
3030
+	{
3031
+		return new ExceptionStub($exception);
3032
+	}
3033 3033
 }
3034 3034
 
3035 3035
 if (!function_exists('PHPUnit\Framework\onConsecutiveCalls')) {
3036
-    function onConsecutiveCalls(): ConsecutiveCallsStub
3037
-    {
3038
-        $args = func_get_args();
3036
+	function onConsecutiveCalls(): ConsecutiveCallsStub
3037
+	{
3038
+		$args = func_get_args();
3039 3039
 
3040
-        return new ConsecutiveCallsStub($args);
3041
-    }
3040
+		return new ConsecutiveCallsStub($args);
3041
+	}
3042 3042
 }
Please login to merge, or discard this patch.
vendor/phpunit/phpunit/src/Framework/Assert.php 1 patch
Indentation   +2767 added lines, -2767 removed lines patch added patch discarded remove patch
@@ -90,2771 +90,2771 @@
 block discarded – undo
90 90
  */
91 91
 abstract class Assert
92 92
 {
93
-    /**
94
-     * @var int
95
-     */
96
-    private static $count = 0;
97
-
98
-    /**
99
-     * Asserts that an array has a specified key.
100
-     *
101
-     * @param int|string        $key
102
-     * @param array|ArrayAccess $array
103
-     *
104
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
105
-     * @throws Exception
106
-     * @throws ExpectationFailedException
107
-     */
108
-    public static function assertArrayHasKey($key, $array, string $message = ''): void
109
-    {
110
-        if (!(is_int($key) || is_string($key))) {
111
-            throw InvalidArgumentException::create(
112
-                1,
113
-                'integer or string'
114
-            );
115
-        }
116
-
117
-        if (!(is_array($array) || $array instanceof ArrayAccess)) {
118
-            throw InvalidArgumentException::create(
119
-                2,
120
-                'array or ArrayAccess'
121
-            );
122
-        }
123
-
124
-        $constraint = new ArrayHasKey($key);
125
-
126
-        static::assertThat($array, $constraint, $message);
127
-    }
128
-
129
-    /**
130
-     * Asserts that an array does not have a specified key.
131
-     *
132
-     * @param int|string        $key
133
-     * @param array|ArrayAccess $array
134
-     *
135
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
136
-     * @throws Exception
137
-     * @throws ExpectationFailedException
138
-     */
139
-    public static function assertArrayNotHasKey($key, $array, string $message = ''): void
140
-    {
141
-        if (!(is_int($key) || is_string($key))) {
142
-            throw InvalidArgumentException::create(
143
-                1,
144
-                'integer or string'
145
-            );
146
-        }
147
-
148
-        if (!(is_array($array) || $array instanceof ArrayAccess)) {
149
-            throw InvalidArgumentException::create(
150
-                2,
151
-                'array or ArrayAccess'
152
-            );
153
-        }
154
-
155
-        $constraint = new LogicalNot(
156
-            new ArrayHasKey($key)
157
-        );
158
-
159
-        static::assertThat($array, $constraint, $message);
160
-    }
161
-
162
-    /**
163
-     * Asserts that a haystack contains a needle.
164
-     *
165
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
166
-     * @throws Exception
167
-     * @throws ExpectationFailedException
168
-     */
169
-    public static function assertContains($needle, iterable $haystack, string $message = ''): void
170
-    {
171
-        $constraint = new TraversableContainsIdentical($needle);
172
-
173
-        static::assertThat($haystack, $constraint, $message);
174
-    }
175
-
176
-    public static function assertContainsEquals($needle, iterable $haystack, string $message = ''): void
177
-    {
178
-        $constraint = new TraversableContainsEqual($needle);
179
-
180
-        static::assertThat($haystack, $constraint, $message);
181
-    }
182
-
183
-    /**
184
-     * Asserts that a haystack does not contain a needle.
185
-     *
186
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
187
-     * @throws Exception
188
-     * @throws ExpectationFailedException
189
-     */
190
-    public static function assertNotContains($needle, iterable $haystack, string $message = ''): void
191
-    {
192
-        $constraint = new LogicalNot(
193
-            new TraversableContainsIdentical($needle)
194
-        );
195
-
196
-        static::assertThat($haystack, $constraint, $message);
197
-    }
198
-
199
-    public static function assertNotContainsEquals($needle, iterable $haystack, string $message = ''): void
200
-    {
201
-        $constraint = new LogicalNot(new TraversableContainsEqual($needle));
202
-
203
-        static::assertThat($haystack, $constraint, $message);
204
-    }
205
-
206
-    /**
207
-     * Asserts that a haystack contains only values of a given type.
208
-     *
209
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
210
-     * @throws ExpectationFailedException
211
-     */
212
-    public static function assertContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = null, string $message = ''): void
213
-    {
214
-        if ($isNativeType === null) {
215
-            $isNativeType = Type::isType($type);
216
-        }
217
-
218
-        static::assertThat(
219
-            $haystack,
220
-            new TraversableContainsOnly(
221
-                $type,
222
-                $isNativeType
223
-            ),
224
-            $message
225
-        );
226
-    }
227
-
228
-    /**
229
-     * Asserts that a haystack contains only instances of a given class name.
230
-     *
231
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
232
-     * @throws ExpectationFailedException
233
-     */
234
-    public static function assertContainsOnlyInstancesOf(string $className, iterable $haystack, string $message = ''): void
235
-    {
236
-        static::assertThat(
237
-            $haystack,
238
-            new TraversableContainsOnly(
239
-                $className,
240
-                false
241
-            ),
242
-            $message
243
-        );
244
-    }
245
-
246
-    /**
247
-     * Asserts that a haystack does not contain only values of a given type.
248
-     *
249
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
250
-     * @throws ExpectationFailedException
251
-     */
252
-    public static function assertNotContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = null, string $message = ''): void
253
-    {
254
-        if ($isNativeType === null) {
255
-            $isNativeType = Type::isType($type);
256
-        }
257
-
258
-        static::assertThat(
259
-            $haystack,
260
-            new LogicalNot(
261
-                new TraversableContainsOnly(
262
-                    $type,
263
-                    $isNativeType
264
-                )
265
-            ),
266
-            $message
267
-        );
268
-    }
269
-
270
-    /**
271
-     * Asserts the number of elements of an array, Countable or Traversable.
272
-     *
273
-     * @param Countable|iterable $haystack
274
-     *
275
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
276
-     * @throws Exception
277
-     * @throws ExpectationFailedException
278
-     */
279
-    public static function assertCount(int $expectedCount, $haystack, string $message = ''): void
280
-    {
281
-        if (!$haystack instanceof Countable && !is_iterable($haystack)) {
282
-            throw InvalidArgumentException::create(2, 'countable or iterable');
283
-        }
284
-
285
-        static::assertThat(
286
-            $haystack,
287
-            new Count($expectedCount),
288
-            $message
289
-        );
290
-    }
291
-
292
-    /**
293
-     * Asserts the number of elements of an array, Countable or Traversable.
294
-     *
295
-     * @param Countable|iterable $haystack
296
-     *
297
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
298
-     * @throws Exception
299
-     * @throws ExpectationFailedException
300
-     */
301
-    public static function assertNotCount(int $expectedCount, $haystack, string $message = ''): void
302
-    {
303
-        if (!$haystack instanceof Countable && !is_iterable($haystack)) {
304
-            throw InvalidArgumentException::create(2, 'countable or iterable');
305
-        }
306
-
307
-        $constraint = new LogicalNot(
308
-            new Count($expectedCount)
309
-        );
310
-
311
-        static::assertThat($haystack, $constraint, $message);
312
-    }
313
-
314
-    /**
315
-     * Asserts that two variables are equal.
316
-     *
317
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
318
-     * @throws ExpectationFailedException
319
-     */
320
-    public static function assertEquals($expected, $actual, string $message = ''): void
321
-    {
322
-        $constraint = new IsEqual($expected);
323
-
324
-        static::assertThat($actual, $constraint, $message);
325
-    }
326
-
327
-    /**
328
-     * Asserts that two variables are equal (canonicalizing).
329
-     *
330
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
331
-     * @throws ExpectationFailedException
332
-     */
333
-    public static function assertEqualsCanonicalizing($expected, $actual, string $message = ''): void
334
-    {
335
-        $constraint = new IsEqualCanonicalizing($expected);
336
-
337
-        static::assertThat($actual, $constraint, $message);
338
-    }
339
-
340
-    /**
341
-     * Asserts that two variables are equal (ignoring case).
342
-     *
343
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
344
-     * @throws ExpectationFailedException
345
-     */
346
-    public static function assertEqualsIgnoringCase($expected, $actual, string $message = ''): void
347
-    {
348
-        $constraint = new IsEqualIgnoringCase($expected);
349
-
350
-        static::assertThat($actual, $constraint, $message);
351
-    }
352
-
353
-    /**
354
-     * Asserts that two variables are equal (with delta).
355
-     *
356
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
357
-     * @throws ExpectationFailedException
358
-     */
359
-    public static function assertEqualsWithDelta($expected, $actual, float $delta, string $message = ''): void
360
-    {
361
-        $constraint = new IsEqualWithDelta(
362
-            $expected,
363
-            $delta
364
-        );
365
-
366
-        static::assertThat($actual, $constraint, $message);
367
-    }
368
-
369
-    /**
370
-     * Asserts that two variables are not equal.
371
-     *
372
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
373
-     * @throws ExpectationFailedException
374
-     */
375
-    public static function assertNotEquals($expected, $actual, string $message = ''): void
376
-    {
377
-        $constraint = new LogicalNot(
378
-            new IsEqual($expected)
379
-        );
380
-
381
-        static::assertThat($actual, $constraint, $message);
382
-    }
383
-
384
-    /**
385
-     * Asserts that two variables are not equal (canonicalizing).
386
-     *
387
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
388
-     * @throws ExpectationFailedException
389
-     */
390
-    public static function assertNotEqualsCanonicalizing($expected, $actual, string $message = ''): void
391
-    {
392
-        $constraint = new LogicalNot(
393
-            new IsEqualCanonicalizing($expected)
394
-        );
395
-
396
-        static::assertThat($actual, $constraint, $message);
397
-    }
398
-
399
-    /**
400
-     * Asserts that two variables are not equal (ignoring case).
401
-     *
402
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
403
-     * @throws ExpectationFailedException
404
-     */
405
-    public static function assertNotEqualsIgnoringCase($expected, $actual, string $message = ''): void
406
-    {
407
-        $constraint = new LogicalNot(
408
-            new IsEqualIgnoringCase($expected)
409
-        );
410
-
411
-        static::assertThat($actual, $constraint, $message);
412
-    }
413
-
414
-    /**
415
-     * Asserts that two variables are not equal (with delta).
416
-     *
417
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
418
-     * @throws ExpectationFailedException
419
-     */
420
-    public static function assertNotEqualsWithDelta($expected, $actual, float $delta, string $message = ''): void
421
-    {
422
-        $constraint = new LogicalNot(
423
-            new IsEqualWithDelta(
424
-                $expected,
425
-                $delta
426
-            )
427
-        );
428
-
429
-        static::assertThat($actual, $constraint, $message);
430
-    }
431
-
432
-    /**
433
-     * @throws ExpectationFailedException
434
-     */
435
-    public static function assertObjectEquals(object $expected, object $actual, string $method = 'equals', string $message = ''): void
436
-    {
437
-        static::assertThat(
438
-            $actual,
439
-            static::objectEquals($expected, $method),
440
-            $message
441
-        );
442
-    }
443
-
444
-    /**
445
-     * Asserts that a variable is empty.
446
-     *
447
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
448
-     * @throws ExpectationFailedException
449
-     *
450
-     * @psalm-assert empty $actual
451
-     */
452
-    public static function assertEmpty($actual, string $message = ''): void
453
-    {
454
-        static::assertThat($actual, static::isEmpty(), $message);
455
-    }
456
-
457
-    /**
458
-     * Asserts that a variable is not empty.
459
-     *
460
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
461
-     * @throws ExpectationFailedException
462
-     *
463
-     * @psalm-assert !empty $actual
464
-     */
465
-    public static function assertNotEmpty($actual, string $message = ''): void
466
-    {
467
-        static::assertThat($actual, static::logicalNot(static::isEmpty()), $message);
468
-    }
469
-
470
-    /**
471
-     * Asserts that a value is greater than another value.
472
-     *
473
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
474
-     * @throws ExpectationFailedException
475
-     */
476
-    public static function assertGreaterThan($expected, $actual, string $message = ''): void
477
-    {
478
-        static::assertThat($actual, static::greaterThan($expected), $message);
479
-    }
480
-
481
-    /**
482
-     * Asserts that a value is greater than or equal to another value.
483
-     *
484
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
485
-     * @throws ExpectationFailedException
486
-     */
487
-    public static function assertGreaterThanOrEqual($expected, $actual, string $message = ''): void
488
-    {
489
-        static::assertThat(
490
-            $actual,
491
-            static::greaterThanOrEqual($expected),
492
-            $message
493
-        );
494
-    }
495
-
496
-    /**
497
-     * Asserts that a value is smaller than another value.
498
-     *
499
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
500
-     * @throws ExpectationFailedException
501
-     */
502
-    public static function assertLessThan($expected, $actual, string $message = ''): void
503
-    {
504
-        static::assertThat($actual, static::lessThan($expected), $message);
505
-    }
506
-
507
-    /**
508
-     * Asserts that a value is smaller than or equal to another value.
509
-     *
510
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
511
-     * @throws ExpectationFailedException
512
-     */
513
-    public static function assertLessThanOrEqual($expected, $actual, string $message = ''): void
514
-    {
515
-        static::assertThat($actual, static::lessThanOrEqual($expected), $message);
516
-    }
517
-
518
-    /**
519
-     * Asserts that the contents of one file is equal to the contents of another
520
-     * file.
521
-     *
522
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
523
-     * @throws ExpectationFailedException
524
-     */
525
-    public static function assertFileEquals(string $expected, string $actual, string $message = ''): void
526
-    {
527
-        static::assertFileExists($expected, $message);
528
-        static::assertFileExists($actual, $message);
529
-
530
-        $constraint = new IsEqual(file_get_contents($expected));
531
-
532
-        static::assertThat(file_get_contents($actual), $constraint, $message);
533
-    }
534
-
535
-    /**
536
-     * Asserts that the contents of one file is equal to the contents of another
537
-     * file (canonicalizing).
538
-     *
539
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
540
-     * @throws ExpectationFailedException
541
-     */
542
-    public static function assertFileEqualsCanonicalizing(string $expected, string $actual, string $message = ''): void
543
-    {
544
-        static::assertFileExists($expected, $message);
545
-        static::assertFileExists($actual, $message);
546
-
547
-        $constraint = new IsEqualCanonicalizing(
548
-            file_get_contents($expected)
549
-        );
550
-
551
-        static::assertThat(file_get_contents($actual), $constraint, $message);
552
-    }
553
-
554
-    /**
555
-     * Asserts that the contents of one file is equal to the contents of another
556
-     * file (ignoring case).
557
-     *
558
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
559
-     * @throws ExpectationFailedException
560
-     */
561
-    public static function assertFileEqualsIgnoringCase(string $expected, string $actual, string $message = ''): void
562
-    {
563
-        static::assertFileExists($expected, $message);
564
-        static::assertFileExists($actual, $message);
565
-
566
-        $constraint = new IsEqualIgnoringCase(file_get_contents($expected));
567
-
568
-        static::assertThat(file_get_contents($actual), $constraint, $message);
569
-    }
570
-
571
-    /**
572
-     * Asserts that the contents of one file is not equal to the contents of
573
-     * another file.
574
-     *
575
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
576
-     * @throws ExpectationFailedException
577
-     */
578
-    public static function assertFileNotEquals(string $expected, string $actual, string $message = ''): void
579
-    {
580
-        static::assertFileExists($expected, $message);
581
-        static::assertFileExists($actual, $message);
582
-
583
-        $constraint = new LogicalNot(
584
-            new IsEqual(file_get_contents($expected))
585
-        );
586
-
587
-        static::assertThat(file_get_contents($actual), $constraint, $message);
588
-    }
589
-
590
-    /**
591
-     * Asserts that the contents of one file is not equal to the contents of another
592
-     * file (canonicalizing).
593
-     *
594
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
595
-     * @throws ExpectationFailedException
596
-     */
597
-    public static function assertFileNotEqualsCanonicalizing(string $expected, string $actual, string $message = ''): void
598
-    {
599
-        static::assertFileExists($expected, $message);
600
-        static::assertFileExists($actual, $message);
601
-
602
-        $constraint = new LogicalNot(
603
-            new IsEqualCanonicalizing(file_get_contents($expected))
604
-        );
605
-
606
-        static::assertThat(file_get_contents($actual), $constraint, $message);
607
-    }
608
-
609
-    /**
610
-     * Asserts that the contents of one file is not equal to the contents of another
611
-     * file (ignoring case).
612
-     *
613
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
614
-     * @throws ExpectationFailedException
615
-     */
616
-    public static function assertFileNotEqualsIgnoringCase(string $expected, string $actual, string $message = ''): void
617
-    {
618
-        static::assertFileExists($expected, $message);
619
-        static::assertFileExists($actual, $message);
620
-
621
-        $constraint = new LogicalNot(
622
-            new IsEqualIgnoringCase(file_get_contents($expected))
623
-        );
624
-
625
-        static::assertThat(file_get_contents($actual), $constraint, $message);
626
-    }
627
-
628
-    /**
629
-     * Asserts that the contents of a string is equal
630
-     * to the contents of a file.
631
-     *
632
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
633
-     * @throws ExpectationFailedException
634
-     */
635
-    public static function assertStringEqualsFile(string $expectedFile, string $actualString, string $message = ''): void
636
-    {
637
-        static::assertFileExists($expectedFile, $message);
638
-
639
-        $constraint = new IsEqual(file_get_contents($expectedFile));
640
-
641
-        static::assertThat($actualString, $constraint, $message);
642
-    }
643
-
644
-    /**
645
-     * Asserts that the contents of a string is equal
646
-     * to the contents of a file (canonicalizing).
647
-     *
648
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
649
-     * @throws ExpectationFailedException
650
-     */
651
-    public static function assertStringEqualsFileCanonicalizing(string $expectedFile, string $actualString, string $message = ''): void
652
-    {
653
-        static::assertFileExists($expectedFile, $message);
654
-
655
-        $constraint = new IsEqualCanonicalizing(file_get_contents($expectedFile));
656
-
657
-        static::assertThat($actualString, $constraint, $message);
658
-    }
659
-
660
-    /**
661
-     * Asserts that the contents of a string is equal
662
-     * to the contents of a file (ignoring case).
663
-     *
664
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
665
-     * @throws ExpectationFailedException
666
-     */
667
-    public static function assertStringEqualsFileIgnoringCase(string $expectedFile, string $actualString, string $message = ''): void
668
-    {
669
-        static::assertFileExists($expectedFile, $message);
670
-
671
-        $constraint = new IsEqualIgnoringCase(file_get_contents($expectedFile));
672
-
673
-        static::assertThat($actualString, $constraint, $message);
674
-    }
675
-
676
-    /**
677
-     * Asserts that the contents of a string is not equal
678
-     * to the contents of a file.
679
-     *
680
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
681
-     * @throws ExpectationFailedException
682
-     */
683
-    public static function assertStringNotEqualsFile(string $expectedFile, string $actualString, string $message = ''): void
684
-    {
685
-        static::assertFileExists($expectedFile, $message);
686
-
687
-        $constraint = new LogicalNot(
688
-            new IsEqual(file_get_contents($expectedFile))
689
-        );
690
-
691
-        static::assertThat($actualString, $constraint, $message);
692
-    }
693
-
694
-    /**
695
-     * Asserts that the contents of a string is not equal
696
-     * to the contents of a file (canonicalizing).
697
-     *
698
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
699
-     * @throws ExpectationFailedException
700
-     */
701
-    public static function assertStringNotEqualsFileCanonicalizing(string $expectedFile, string $actualString, string $message = ''): void
702
-    {
703
-        static::assertFileExists($expectedFile, $message);
704
-
705
-        $constraint = new LogicalNot(
706
-            new IsEqualCanonicalizing(file_get_contents($expectedFile))
707
-        );
708
-
709
-        static::assertThat($actualString, $constraint, $message);
710
-    }
711
-
712
-    /**
713
-     * Asserts that the contents of a string is not equal
714
-     * to the contents of a file (ignoring case).
715
-     *
716
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
717
-     * @throws ExpectationFailedException
718
-     */
719
-    public static function assertStringNotEqualsFileIgnoringCase(string $expectedFile, string $actualString, string $message = ''): void
720
-    {
721
-        static::assertFileExists($expectedFile, $message);
722
-
723
-        $constraint = new LogicalNot(
724
-            new IsEqualIgnoringCase(file_get_contents($expectedFile))
725
-        );
726
-
727
-        static::assertThat($actualString, $constraint, $message);
728
-    }
729
-
730
-    /**
731
-     * Asserts that a file/dir is readable.
732
-     *
733
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
734
-     * @throws ExpectationFailedException
735
-     */
736
-    public static function assertIsReadable(string $filename, string $message = ''): void
737
-    {
738
-        static::assertThat($filename, new IsReadable, $message);
739
-    }
740
-
741
-    /**
742
-     * Asserts that a file/dir exists and is not readable.
743
-     *
744
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
745
-     * @throws ExpectationFailedException
746
-     */
747
-    public static function assertIsNotReadable(string $filename, string $message = ''): void
748
-    {
749
-        static::assertThat($filename, new LogicalNot(new IsReadable), $message);
750
-    }
751
-
752
-    /**
753
-     * Asserts that a file/dir exists and is not readable.
754
-     *
755
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
756
-     * @throws ExpectationFailedException
757
-     *
758
-     * @codeCoverageIgnore
759
-     *
760
-     * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4062
761
-     */
762
-    public static function assertNotIsReadable(string $filename, string $message = ''): void
763
-    {
764
-        self::createWarning('assertNotIsReadable() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertIsNotReadable() instead.');
765
-
766
-        static::assertThat($filename, new LogicalNot(new IsReadable), $message);
767
-    }
768
-
769
-    /**
770
-     * Asserts that a file/dir exists and is writable.
771
-     *
772
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
773
-     * @throws ExpectationFailedException
774
-     */
775
-    public static function assertIsWritable(string $filename, string $message = ''): void
776
-    {
777
-        static::assertThat($filename, new IsWritable, $message);
778
-    }
779
-
780
-    /**
781
-     * Asserts that a file/dir exists and is not writable.
782
-     *
783
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
784
-     * @throws ExpectationFailedException
785
-     */
786
-    public static function assertIsNotWritable(string $filename, string $message = ''): void
787
-    {
788
-        static::assertThat($filename, new LogicalNot(new IsWritable), $message);
789
-    }
790
-
791
-    /**
792
-     * Asserts that a file/dir exists and is not writable.
793
-     *
794
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
795
-     * @throws ExpectationFailedException
796
-     *
797
-     * @codeCoverageIgnore
798
-     *
799
-     * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4065
800
-     */
801
-    public static function assertNotIsWritable(string $filename, string $message = ''): void
802
-    {
803
-        self::createWarning('assertNotIsWritable() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertIsNotWritable() instead.');
804
-
805
-        static::assertThat($filename, new LogicalNot(new IsWritable), $message);
806
-    }
807
-
808
-    /**
809
-     * Asserts that a directory exists.
810
-     *
811
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
812
-     * @throws ExpectationFailedException
813
-     */
814
-    public static function assertDirectoryExists(string $directory, string $message = ''): void
815
-    {
816
-        static::assertThat($directory, new DirectoryExists, $message);
817
-    }
818
-
819
-    /**
820
-     * Asserts that a directory does not exist.
821
-     *
822
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
823
-     * @throws ExpectationFailedException
824
-     */
825
-    public static function assertDirectoryDoesNotExist(string $directory, string $message = ''): void
826
-    {
827
-        static::assertThat($directory, new LogicalNot(new DirectoryExists), $message);
828
-    }
829
-
830
-    /**
831
-     * Asserts that a directory does not exist.
832
-     *
833
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
834
-     * @throws ExpectationFailedException
835
-     *
836
-     * @codeCoverageIgnore
837
-     *
838
-     * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4068
839
-     */
840
-    public static function assertDirectoryNotExists(string $directory, string $message = ''): void
841
-    {
842
-        self::createWarning('assertDirectoryNotExists() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertDirectoryDoesNotExist() instead.');
843
-
844
-        static::assertThat($directory, new LogicalNot(new DirectoryExists), $message);
845
-    }
846
-
847
-    /**
848
-     * Asserts that a directory exists and is readable.
849
-     *
850
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
851
-     * @throws ExpectationFailedException
852
-     */
853
-    public static function assertDirectoryIsReadable(string $directory, string $message = ''): void
854
-    {
855
-        self::assertDirectoryExists($directory, $message);
856
-        self::assertIsReadable($directory, $message);
857
-    }
858
-
859
-    /**
860
-     * Asserts that a directory exists and is not readable.
861
-     *
862
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
863
-     * @throws ExpectationFailedException
864
-     */
865
-    public static function assertDirectoryIsNotReadable(string $directory, string $message = ''): void
866
-    {
867
-        self::assertDirectoryExists($directory, $message);
868
-        self::assertIsNotReadable($directory, $message);
869
-    }
870
-
871
-    /**
872
-     * Asserts that a directory exists and is not readable.
873
-     *
874
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
875
-     * @throws ExpectationFailedException
876
-     *
877
-     * @codeCoverageIgnore
878
-     *
879
-     * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4071
880
-     */
881
-    public static function assertDirectoryNotIsReadable(string $directory, string $message = ''): void
882
-    {
883
-        self::createWarning('assertDirectoryNotIsReadable() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertDirectoryIsNotReadable() instead.');
884
-
885
-        self::assertDirectoryExists($directory, $message);
886
-        self::assertIsNotReadable($directory, $message);
887
-    }
888
-
889
-    /**
890
-     * Asserts that a directory exists and is writable.
891
-     *
892
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
893
-     * @throws ExpectationFailedException
894
-     */
895
-    public static function assertDirectoryIsWritable(string $directory, string $message = ''): void
896
-    {
897
-        self::assertDirectoryExists($directory, $message);
898
-        self::assertIsWritable($directory, $message);
899
-    }
900
-
901
-    /**
902
-     * Asserts that a directory exists and is not writable.
903
-     *
904
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
905
-     * @throws ExpectationFailedException
906
-     */
907
-    public static function assertDirectoryIsNotWritable(string $directory, string $message = ''): void
908
-    {
909
-        self::assertDirectoryExists($directory, $message);
910
-        self::assertIsNotWritable($directory, $message);
911
-    }
912
-
913
-    /**
914
-     * Asserts that a directory exists and is not writable.
915
-     *
916
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
917
-     * @throws ExpectationFailedException
918
-     *
919
-     * @codeCoverageIgnore
920
-     *
921
-     * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4074
922
-     */
923
-    public static function assertDirectoryNotIsWritable(string $directory, string $message = ''): void
924
-    {
925
-        self::createWarning('assertDirectoryNotIsWritable() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertDirectoryIsNotWritable() instead.');
926
-
927
-        self::assertDirectoryExists($directory, $message);
928
-        self::assertIsNotWritable($directory, $message);
929
-    }
930
-
931
-    /**
932
-     * Asserts that a file exists.
933
-     *
934
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
935
-     * @throws ExpectationFailedException
936
-     */
937
-    public static function assertFileExists(string $filename, string $message = ''): void
938
-    {
939
-        static::assertThat($filename, new FileExists, $message);
940
-    }
941
-
942
-    /**
943
-     * Asserts that a file does not exist.
944
-     *
945
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
946
-     * @throws ExpectationFailedException
947
-     */
948
-    public static function assertFileDoesNotExist(string $filename, string $message = ''): void
949
-    {
950
-        static::assertThat($filename, new LogicalNot(new FileExists), $message);
951
-    }
952
-
953
-    /**
954
-     * Asserts that a file does not exist.
955
-     *
956
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
957
-     * @throws ExpectationFailedException
958
-     *
959
-     * @codeCoverageIgnore
960
-     *
961
-     * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4077
962
-     */
963
-    public static function assertFileNotExists(string $filename, string $message = ''): void
964
-    {
965
-        self::createWarning('assertFileNotExists() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertFileDoesNotExist() instead.');
966
-
967
-        static::assertThat($filename, new LogicalNot(new FileExists), $message);
968
-    }
969
-
970
-    /**
971
-     * Asserts that a file exists and is readable.
972
-     *
973
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
974
-     * @throws ExpectationFailedException
975
-     */
976
-    public static function assertFileIsReadable(string $file, string $message = ''): void
977
-    {
978
-        self::assertFileExists($file, $message);
979
-        self::assertIsReadable($file, $message);
980
-    }
981
-
982
-    /**
983
-     * Asserts that a file exists and is not readable.
984
-     *
985
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
986
-     * @throws ExpectationFailedException
987
-     */
988
-    public static function assertFileIsNotReadable(string $file, string $message = ''): void
989
-    {
990
-        self::assertFileExists($file, $message);
991
-        self::assertIsNotReadable($file, $message);
992
-    }
993
-
994
-    /**
995
-     * Asserts that a file exists and is not readable.
996
-     *
997
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
998
-     * @throws ExpectationFailedException
999
-     *
1000
-     * @codeCoverageIgnore
1001
-     *
1002
-     * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4080
1003
-     */
1004
-    public static function assertFileNotIsReadable(string $file, string $message = ''): void
1005
-    {
1006
-        self::createWarning('assertFileNotIsReadable() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertFileIsNotReadable() instead.');
1007
-
1008
-        self::assertFileExists($file, $message);
1009
-        self::assertIsNotReadable($file, $message);
1010
-    }
1011
-
1012
-    /**
1013
-     * Asserts that a file exists and is writable.
1014
-     *
1015
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1016
-     * @throws ExpectationFailedException
1017
-     */
1018
-    public static function assertFileIsWritable(string $file, string $message = ''): void
1019
-    {
1020
-        self::assertFileExists($file, $message);
1021
-        self::assertIsWritable($file, $message);
1022
-    }
1023
-
1024
-    /**
1025
-     * Asserts that a file exists and is not writable.
1026
-     *
1027
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1028
-     * @throws ExpectationFailedException
1029
-     */
1030
-    public static function assertFileIsNotWritable(string $file, string $message = ''): void
1031
-    {
1032
-        self::assertFileExists($file, $message);
1033
-        self::assertIsNotWritable($file, $message);
1034
-    }
1035
-
1036
-    /**
1037
-     * Asserts that a file exists and is not writable.
1038
-     *
1039
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1040
-     * @throws ExpectationFailedException
1041
-     *
1042
-     * @codeCoverageIgnore
1043
-     *
1044
-     * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4083
1045
-     */
1046
-    public static function assertFileNotIsWritable(string $file, string $message = ''): void
1047
-    {
1048
-        self::createWarning('assertFileNotIsWritable() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertFileIsNotWritable() instead.');
1049
-
1050
-        self::assertFileExists($file, $message);
1051
-        self::assertIsNotWritable($file, $message);
1052
-    }
1053
-
1054
-    /**
1055
-     * Asserts that a condition is true.
1056
-     *
1057
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1058
-     * @throws ExpectationFailedException
1059
-     *
1060
-     * @psalm-assert true $condition
1061
-     */
1062
-    public static function assertTrue($condition, string $message = ''): void
1063
-    {
1064
-        static::assertThat($condition, static::isTrue(), $message);
1065
-    }
1066
-
1067
-    /**
1068
-     * Asserts that a condition is not true.
1069
-     *
1070
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1071
-     * @throws ExpectationFailedException
1072
-     *
1073
-     * @psalm-assert !true $condition
1074
-     */
1075
-    public static function assertNotTrue($condition, string $message = ''): void
1076
-    {
1077
-        static::assertThat($condition, static::logicalNot(static::isTrue()), $message);
1078
-    }
1079
-
1080
-    /**
1081
-     * Asserts that a condition is false.
1082
-     *
1083
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1084
-     * @throws ExpectationFailedException
1085
-     *
1086
-     * @psalm-assert false $condition
1087
-     */
1088
-    public static function assertFalse($condition, string $message = ''): void
1089
-    {
1090
-        static::assertThat($condition, static::isFalse(), $message);
1091
-    }
1092
-
1093
-    /**
1094
-     * Asserts that a condition is not false.
1095
-     *
1096
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1097
-     * @throws ExpectationFailedException
1098
-     *
1099
-     * @psalm-assert !false $condition
1100
-     */
1101
-    public static function assertNotFalse($condition, string $message = ''): void
1102
-    {
1103
-        static::assertThat($condition, static::logicalNot(static::isFalse()), $message);
1104
-    }
1105
-
1106
-    /**
1107
-     * Asserts that a variable is null.
1108
-     *
1109
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1110
-     * @throws ExpectationFailedException
1111
-     *
1112
-     * @psalm-assert null $actual
1113
-     */
1114
-    public static function assertNull($actual, string $message = ''): void
1115
-    {
1116
-        static::assertThat($actual, static::isNull(), $message);
1117
-    }
1118
-
1119
-    /**
1120
-     * Asserts that a variable is not null.
1121
-     *
1122
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1123
-     * @throws ExpectationFailedException
1124
-     *
1125
-     * @psalm-assert !null $actual
1126
-     */
1127
-    public static function assertNotNull($actual, string $message = ''): void
1128
-    {
1129
-        static::assertThat($actual, static::logicalNot(static::isNull()), $message);
1130
-    }
1131
-
1132
-    /**
1133
-     * Asserts that a variable is finite.
1134
-     *
1135
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1136
-     * @throws ExpectationFailedException
1137
-     */
1138
-    public static function assertFinite($actual, string $message = ''): void
1139
-    {
1140
-        static::assertThat($actual, static::isFinite(), $message);
1141
-    }
1142
-
1143
-    /**
1144
-     * Asserts that a variable is infinite.
1145
-     *
1146
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1147
-     * @throws ExpectationFailedException
1148
-     */
1149
-    public static function assertInfinite($actual, string $message = ''): void
1150
-    {
1151
-        static::assertThat($actual, static::isInfinite(), $message);
1152
-    }
1153
-
1154
-    /**
1155
-     * Asserts that a variable is nan.
1156
-     *
1157
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1158
-     * @throws ExpectationFailedException
1159
-     */
1160
-    public static function assertNan($actual, string $message = ''): void
1161
-    {
1162
-        static::assertThat($actual, static::isNan(), $message);
1163
-    }
1164
-
1165
-    /**
1166
-     * Asserts that a class has a specified attribute.
1167
-     *
1168
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1169
-     * @throws Exception
1170
-     * @throws ExpectationFailedException
1171
-     */
1172
-    public static function assertClassHasAttribute(string $attributeName, string $className, string $message = ''): void
1173
-    {
1174
-        if (!self::isValidClassAttributeName($attributeName)) {
1175
-            throw InvalidArgumentException::create(1, 'valid attribute name');
1176
-        }
1177
-
1178
-        if (!class_exists($className)) {
1179
-            throw InvalidArgumentException::create(2, 'class name');
1180
-        }
1181
-
1182
-        static::assertThat($className, new ClassHasAttribute($attributeName), $message);
1183
-    }
1184
-
1185
-    /**
1186
-     * Asserts that a class does not have a specified attribute.
1187
-     *
1188
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1189
-     * @throws Exception
1190
-     * @throws ExpectationFailedException
1191
-     */
1192
-    public static function assertClassNotHasAttribute(string $attributeName, string $className, string $message = ''): void
1193
-    {
1194
-        if (!self::isValidClassAttributeName($attributeName)) {
1195
-            throw InvalidArgumentException::create(1, 'valid attribute name');
1196
-        }
1197
-
1198
-        if (!class_exists($className)) {
1199
-            throw InvalidArgumentException::create(2, 'class name');
1200
-        }
1201
-
1202
-        static::assertThat(
1203
-            $className,
1204
-            new LogicalNot(
1205
-                new ClassHasAttribute($attributeName)
1206
-            ),
1207
-            $message
1208
-        );
1209
-    }
1210
-
1211
-    /**
1212
-     * Asserts that a class has a specified static attribute.
1213
-     *
1214
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1215
-     * @throws Exception
1216
-     * @throws ExpectationFailedException
1217
-     */
1218
-    public static function assertClassHasStaticAttribute(string $attributeName, string $className, string $message = ''): void
1219
-    {
1220
-        if (!self::isValidClassAttributeName($attributeName)) {
1221
-            throw InvalidArgumentException::create(1, 'valid attribute name');
1222
-        }
1223
-
1224
-        if (!class_exists($className)) {
1225
-            throw InvalidArgumentException::create(2, 'class name');
1226
-        }
1227
-
1228
-        static::assertThat(
1229
-            $className,
1230
-            new ClassHasStaticAttribute($attributeName),
1231
-            $message
1232
-        );
1233
-    }
1234
-
1235
-    /**
1236
-     * Asserts that a class does not have a specified static attribute.
1237
-     *
1238
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1239
-     * @throws Exception
1240
-     * @throws ExpectationFailedException
1241
-     */
1242
-    public static function assertClassNotHasStaticAttribute(string $attributeName, string $className, string $message = ''): void
1243
-    {
1244
-        if (!self::isValidClassAttributeName($attributeName)) {
1245
-            throw InvalidArgumentException::create(1, 'valid attribute name');
1246
-        }
1247
-
1248
-        if (!class_exists($className)) {
1249
-            throw InvalidArgumentException::create(2, 'class name');
1250
-        }
1251
-
1252
-        static::assertThat(
1253
-            $className,
1254
-            new LogicalNot(
1255
-                new ClassHasStaticAttribute($attributeName)
1256
-            ),
1257
-            $message
1258
-        );
1259
-    }
1260
-
1261
-    /**
1262
-     * Asserts that an object has a specified attribute.
1263
-     *
1264
-     * @param object $object
1265
-     *
1266
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1267
-     * @throws Exception
1268
-     * @throws ExpectationFailedException
1269
-     */
1270
-    public static function assertObjectHasAttribute(string $attributeName, $object, string $message = ''): void
1271
-    {
1272
-        if (!self::isValidObjectAttributeName($attributeName)) {
1273
-            throw InvalidArgumentException::create(1, 'valid attribute name');
1274
-        }
1275
-
1276
-        if (!is_object($object)) {
1277
-            throw InvalidArgumentException::create(2, 'object');
1278
-        }
1279
-
1280
-        static::assertThat(
1281
-            $object,
1282
-            new ObjectHasAttribute($attributeName),
1283
-            $message
1284
-        );
1285
-    }
1286
-
1287
-    /**
1288
-     * Asserts that an object does not have a specified attribute.
1289
-     *
1290
-     * @param object $object
1291
-     *
1292
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1293
-     * @throws Exception
1294
-     * @throws ExpectationFailedException
1295
-     */
1296
-    public static function assertObjectNotHasAttribute(string $attributeName, $object, string $message = ''): void
1297
-    {
1298
-        if (!self::isValidObjectAttributeName($attributeName)) {
1299
-            throw InvalidArgumentException::create(1, 'valid attribute name');
1300
-        }
1301
-
1302
-        if (!is_object($object)) {
1303
-            throw InvalidArgumentException::create(2, 'object');
1304
-        }
1305
-
1306
-        static::assertThat(
1307
-            $object,
1308
-            new LogicalNot(
1309
-                new ObjectHasAttribute($attributeName)
1310
-            ),
1311
-            $message
1312
-        );
1313
-    }
1314
-
1315
-    /**
1316
-     * Asserts that two variables have the same type and value.
1317
-     * Used on objects, it asserts that two variables reference
1318
-     * the same object.
1319
-     *
1320
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1321
-     * @throws ExpectationFailedException
1322
-     *
1323
-     * @psalm-template ExpectedType
1324
-     *
1325
-     * @psalm-param ExpectedType $expected
1326
-     *
1327
-     * @psalm-assert =ExpectedType $actual
1328
-     */
1329
-    public static function assertSame($expected, $actual, string $message = ''): void
1330
-    {
1331
-        static::assertThat(
1332
-            $actual,
1333
-            new IsIdentical($expected),
1334
-            $message
1335
-        );
1336
-    }
1337
-
1338
-    /**
1339
-     * Asserts that two variables do not have the same type and value.
1340
-     * Used on objects, it asserts that two variables do not reference
1341
-     * the same object.
1342
-     *
1343
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1344
-     * @throws ExpectationFailedException
1345
-     */
1346
-    public static function assertNotSame($expected, $actual, string $message = ''): void
1347
-    {
1348
-        if (is_bool($expected) && is_bool($actual)) {
1349
-            static::assertNotEquals($expected, $actual, $message);
1350
-        }
1351
-
1352
-        static::assertThat(
1353
-            $actual,
1354
-            new LogicalNot(
1355
-                new IsIdentical($expected)
1356
-            ),
1357
-            $message
1358
-        );
1359
-    }
1360
-
1361
-    /**
1362
-     * Asserts that a variable is of a given type.
1363
-     *
1364
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1365
-     * @throws Exception
1366
-     * @throws ExpectationFailedException
1367
-     *
1368
-     * @psalm-template ExpectedType of object
1369
-     *
1370
-     * @psalm-param class-string<ExpectedType> $expected
1371
-     *
1372
-     * @psalm-assert =ExpectedType $actual
1373
-     */
1374
-    public static function assertInstanceOf(string $expected, $actual, string $message = ''): void
1375
-    {
1376
-        if (!class_exists($expected) && !interface_exists($expected)) {
1377
-            throw InvalidArgumentException::create(1, 'class or interface name');
1378
-        }
1379
-
1380
-        static::assertThat(
1381
-            $actual,
1382
-            new IsInstanceOf($expected),
1383
-            $message
1384
-        );
1385
-    }
1386
-
1387
-    /**
1388
-     * Asserts that a variable is not of a given type.
1389
-     *
1390
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1391
-     * @throws Exception
1392
-     * @throws ExpectationFailedException
1393
-     *
1394
-     * @psalm-template ExpectedType of object
1395
-     *
1396
-     * @psalm-param class-string<ExpectedType> $expected
1397
-     *
1398
-     * @psalm-assert !ExpectedType $actual
1399
-     */
1400
-    public static function assertNotInstanceOf(string $expected, $actual, string $message = ''): void
1401
-    {
1402
-        if (!class_exists($expected) && !interface_exists($expected)) {
1403
-            throw InvalidArgumentException::create(1, 'class or interface name');
1404
-        }
1405
-
1406
-        static::assertThat(
1407
-            $actual,
1408
-            new LogicalNot(
1409
-                new IsInstanceOf($expected)
1410
-            ),
1411
-            $message
1412
-        );
1413
-    }
1414
-
1415
-    /**
1416
-     * Asserts that a variable is of type array.
1417
-     *
1418
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1419
-     * @throws ExpectationFailedException
1420
-     *
1421
-     * @psalm-assert array $actual
1422
-     */
1423
-    public static function assertIsArray($actual, string $message = ''): void
1424
-    {
1425
-        static::assertThat(
1426
-            $actual,
1427
-            new IsType(IsType::TYPE_ARRAY),
1428
-            $message
1429
-        );
1430
-    }
1431
-
1432
-    /**
1433
-     * Asserts that a variable is of type bool.
1434
-     *
1435
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1436
-     * @throws ExpectationFailedException
1437
-     *
1438
-     * @psalm-assert bool $actual
1439
-     */
1440
-    public static function assertIsBool($actual, string $message = ''): void
1441
-    {
1442
-        static::assertThat(
1443
-            $actual,
1444
-            new IsType(IsType::TYPE_BOOL),
1445
-            $message
1446
-        );
1447
-    }
1448
-
1449
-    /**
1450
-     * Asserts that a variable is of type float.
1451
-     *
1452
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1453
-     * @throws ExpectationFailedException
1454
-     *
1455
-     * @psalm-assert float $actual
1456
-     */
1457
-    public static function assertIsFloat($actual, string $message = ''): void
1458
-    {
1459
-        static::assertThat(
1460
-            $actual,
1461
-            new IsType(IsType::TYPE_FLOAT),
1462
-            $message
1463
-        );
1464
-    }
1465
-
1466
-    /**
1467
-     * Asserts that a variable is of type int.
1468
-     *
1469
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1470
-     * @throws ExpectationFailedException
1471
-     *
1472
-     * @psalm-assert int $actual
1473
-     */
1474
-    public static function assertIsInt($actual, string $message = ''): void
1475
-    {
1476
-        static::assertThat(
1477
-            $actual,
1478
-            new IsType(IsType::TYPE_INT),
1479
-            $message
1480
-        );
1481
-    }
1482
-
1483
-    /**
1484
-     * Asserts that a variable is of type numeric.
1485
-     *
1486
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1487
-     * @throws ExpectationFailedException
1488
-     *
1489
-     * @psalm-assert numeric $actual
1490
-     */
1491
-    public static function assertIsNumeric($actual, string $message = ''): void
1492
-    {
1493
-        static::assertThat(
1494
-            $actual,
1495
-            new IsType(IsType::TYPE_NUMERIC),
1496
-            $message
1497
-        );
1498
-    }
1499
-
1500
-    /**
1501
-     * Asserts that a variable is of type object.
1502
-     *
1503
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1504
-     * @throws ExpectationFailedException
1505
-     *
1506
-     * @psalm-assert object $actual
1507
-     */
1508
-    public static function assertIsObject($actual, string $message = ''): void
1509
-    {
1510
-        static::assertThat(
1511
-            $actual,
1512
-            new IsType(IsType::TYPE_OBJECT),
1513
-            $message
1514
-        );
1515
-    }
1516
-
1517
-    /**
1518
-     * Asserts that a variable is of type resource.
1519
-     *
1520
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1521
-     * @throws ExpectationFailedException
1522
-     *
1523
-     * @psalm-assert resource $actual
1524
-     */
1525
-    public static function assertIsResource($actual, string $message = ''): void
1526
-    {
1527
-        static::assertThat(
1528
-            $actual,
1529
-            new IsType(IsType::TYPE_RESOURCE),
1530
-            $message
1531
-        );
1532
-    }
1533
-
1534
-    /**
1535
-     * Asserts that a variable is of type resource and is closed.
1536
-     *
1537
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1538
-     * @throws ExpectationFailedException
1539
-     *
1540
-     * @psalm-assert resource $actual
1541
-     */
1542
-    public static function assertIsClosedResource($actual, string $message = ''): void
1543
-    {
1544
-        static::assertThat(
1545
-            $actual,
1546
-            new IsType(IsType::TYPE_CLOSED_RESOURCE),
1547
-            $message
1548
-        );
1549
-    }
1550
-
1551
-    /**
1552
-     * Asserts that a variable is of type string.
1553
-     *
1554
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1555
-     * @throws ExpectationFailedException
1556
-     *
1557
-     * @psalm-assert string $actual
1558
-     */
1559
-    public static function assertIsString($actual, string $message = ''): void
1560
-    {
1561
-        static::assertThat(
1562
-            $actual,
1563
-            new IsType(IsType::TYPE_STRING),
1564
-            $message
1565
-        );
1566
-    }
1567
-
1568
-    /**
1569
-     * Asserts that a variable is of type scalar.
1570
-     *
1571
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1572
-     * @throws ExpectationFailedException
1573
-     *
1574
-     * @psalm-assert scalar $actual
1575
-     */
1576
-    public static function assertIsScalar($actual, string $message = ''): void
1577
-    {
1578
-        static::assertThat(
1579
-            $actual,
1580
-            new IsType(IsType::TYPE_SCALAR),
1581
-            $message
1582
-        );
1583
-    }
1584
-
1585
-    /**
1586
-     * Asserts that a variable is of type callable.
1587
-     *
1588
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1589
-     * @throws ExpectationFailedException
1590
-     *
1591
-     * @psalm-assert callable $actual
1592
-     */
1593
-    public static function assertIsCallable($actual, string $message = ''): void
1594
-    {
1595
-        static::assertThat(
1596
-            $actual,
1597
-            new IsType(IsType::TYPE_CALLABLE),
1598
-            $message
1599
-        );
1600
-    }
1601
-
1602
-    /**
1603
-     * Asserts that a variable is of type iterable.
1604
-     *
1605
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1606
-     * @throws ExpectationFailedException
1607
-     *
1608
-     * @psalm-assert iterable $actual
1609
-     */
1610
-    public static function assertIsIterable($actual, string $message = ''): void
1611
-    {
1612
-        static::assertThat(
1613
-            $actual,
1614
-            new IsType(IsType::TYPE_ITERABLE),
1615
-            $message
1616
-        );
1617
-    }
1618
-
1619
-    /**
1620
-     * Asserts that a variable is not of type array.
1621
-     *
1622
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1623
-     * @throws ExpectationFailedException
1624
-     *
1625
-     * @psalm-assert !array $actual
1626
-     */
1627
-    public static function assertIsNotArray($actual, string $message = ''): void
1628
-    {
1629
-        static::assertThat(
1630
-            $actual,
1631
-            new LogicalNot(new IsType(IsType::TYPE_ARRAY)),
1632
-            $message
1633
-        );
1634
-    }
1635
-
1636
-    /**
1637
-     * Asserts that a variable is not of type bool.
1638
-     *
1639
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1640
-     * @throws ExpectationFailedException
1641
-     *
1642
-     * @psalm-assert !bool $actual
1643
-     */
1644
-    public static function assertIsNotBool($actual, string $message = ''): void
1645
-    {
1646
-        static::assertThat(
1647
-            $actual,
1648
-            new LogicalNot(new IsType(IsType::TYPE_BOOL)),
1649
-            $message
1650
-        );
1651
-    }
1652
-
1653
-    /**
1654
-     * Asserts that a variable is not of type float.
1655
-     *
1656
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1657
-     * @throws ExpectationFailedException
1658
-     *
1659
-     * @psalm-assert !float $actual
1660
-     */
1661
-    public static function assertIsNotFloat($actual, string $message = ''): void
1662
-    {
1663
-        static::assertThat(
1664
-            $actual,
1665
-            new LogicalNot(new IsType(IsType::TYPE_FLOAT)),
1666
-            $message
1667
-        );
1668
-    }
1669
-
1670
-    /**
1671
-     * Asserts that a variable is not of type int.
1672
-     *
1673
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1674
-     * @throws ExpectationFailedException
1675
-     *
1676
-     * @psalm-assert !int $actual
1677
-     */
1678
-    public static function assertIsNotInt($actual, string $message = ''): void
1679
-    {
1680
-        static::assertThat(
1681
-            $actual,
1682
-            new LogicalNot(new IsType(IsType::TYPE_INT)),
1683
-            $message
1684
-        );
1685
-    }
1686
-
1687
-    /**
1688
-     * Asserts that a variable is not of type numeric.
1689
-     *
1690
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1691
-     * @throws ExpectationFailedException
1692
-     *
1693
-     * @psalm-assert !numeric $actual
1694
-     */
1695
-    public static function assertIsNotNumeric($actual, string $message = ''): void
1696
-    {
1697
-        static::assertThat(
1698
-            $actual,
1699
-            new LogicalNot(new IsType(IsType::TYPE_NUMERIC)),
1700
-            $message
1701
-        );
1702
-    }
1703
-
1704
-    /**
1705
-     * Asserts that a variable is not of type object.
1706
-     *
1707
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1708
-     * @throws ExpectationFailedException
1709
-     *
1710
-     * @psalm-assert !object $actual
1711
-     */
1712
-    public static function assertIsNotObject($actual, string $message = ''): void
1713
-    {
1714
-        static::assertThat(
1715
-            $actual,
1716
-            new LogicalNot(new IsType(IsType::TYPE_OBJECT)),
1717
-            $message
1718
-        );
1719
-    }
1720
-
1721
-    /**
1722
-     * Asserts that a variable is not of type resource.
1723
-     *
1724
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1725
-     * @throws ExpectationFailedException
1726
-     *
1727
-     * @psalm-assert !resource $actual
1728
-     */
1729
-    public static function assertIsNotResource($actual, string $message = ''): void
1730
-    {
1731
-        static::assertThat(
1732
-            $actual,
1733
-            new LogicalNot(new IsType(IsType::TYPE_RESOURCE)),
1734
-            $message
1735
-        );
1736
-    }
1737
-
1738
-    /**
1739
-     * Asserts that a variable is not of type resource.
1740
-     *
1741
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1742
-     * @throws ExpectationFailedException
1743
-     *
1744
-     * @psalm-assert !resource $actual
1745
-     */
1746
-    public static function assertIsNotClosedResource($actual, string $message = ''): void
1747
-    {
1748
-        static::assertThat(
1749
-            $actual,
1750
-            new LogicalNot(new IsType(IsType::TYPE_CLOSED_RESOURCE)),
1751
-            $message
1752
-        );
1753
-    }
1754
-
1755
-    /**
1756
-     * Asserts that a variable is not of type string.
1757
-     *
1758
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1759
-     * @throws ExpectationFailedException
1760
-     *
1761
-     * @psalm-assert !string $actual
1762
-     */
1763
-    public static function assertIsNotString($actual, string $message = ''): void
1764
-    {
1765
-        static::assertThat(
1766
-            $actual,
1767
-            new LogicalNot(new IsType(IsType::TYPE_STRING)),
1768
-            $message
1769
-        );
1770
-    }
1771
-
1772
-    /**
1773
-     * Asserts that a variable is not of type scalar.
1774
-     *
1775
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1776
-     * @throws ExpectationFailedException
1777
-     *
1778
-     * @psalm-assert !scalar $actual
1779
-     */
1780
-    public static function assertIsNotScalar($actual, string $message = ''): void
1781
-    {
1782
-        static::assertThat(
1783
-            $actual,
1784
-            new LogicalNot(new IsType(IsType::TYPE_SCALAR)),
1785
-            $message
1786
-        );
1787
-    }
1788
-
1789
-    /**
1790
-     * Asserts that a variable is not of type callable.
1791
-     *
1792
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1793
-     * @throws ExpectationFailedException
1794
-     *
1795
-     * @psalm-assert !callable $actual
1796
-     */
1797
-    public static function assertIsNotCallable($actual, string $message = ''): void
1798
-    {
1799
-        static::assertThat(
1800
-            $actual,
1801
-            new LogicalNot(new IsType(IsType::TYPE_CALLABLE)),
1802
-            $message
1803
-        );
1804
-    }
1805
-
1806
-    /**
1807
-     * Asserts that a variable is not of type iterable.
1808
-     *
1809
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1810
-     * @throws ExpectationFailedException
1811
-     *
1812
-     * @psalm-assert !iterable $actual
1813
-     */
1814
-    public static function assertIsNotIterable($actual, string $message = ''): void
1815
-    {
1816
-        static::assertThat(
1817
-            $actual,
1818
-            new LogicalNot(new IsType(IsType::TYPE_ITERABLE)),
1819
-            $message
1820
-        );
1821
-    }
1822
-
1823
-    /**
1824
-     * Asserts that a string matches a given regular expression.
1825
-     *
1826
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1827
-     * @throws ExpectationFailedException
1828
-     */
1829
-    public static function assertMatchesRegularExpression(string $pattern, string $string, string $message = ''): void
1830
-    {
1831
-        static::assertThat($string, new RegularExpression($pattern), $message);
1832
-    }
1833
-
1834
-    /**
1835
-     * Asserts that a string matches a given regular expression.
1836
-     *
1837
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1838
-     * @throws ExpectationFailedException
1839
-     *
1840
-     * @codeCoverageIgnore
1841
-     *
1842
-     * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4086
1843
-     */
1844
-    public static function assertRegExp(string $pattern, string $string, string $message = ''): void
1845
-    {
1846
-        self::createWarning('assertRegExp() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertMatchesRegularExpression() instead.');
1847
-
1848
-        static::assertThat($string, new RegularExpression($pattern), $message);
1849
-    }
1850
-
1851
-    /**
1852
-     * Asserts that a string does not match a given regular expression.
1853
-     *
1854
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1855
-     * @throws ExpectationFailedException
1856
-     */
1857
-    public static function assertDoesNotMatchRegularExpression(string $pattern, string $string, string $message = ''): void
1858
-    {
1859
-        static::assertThat(
1860
-            $string,
1861
-            new LogicalNot(
1862
-                new RegularExpression($pattern)
1863
-            ),
1864
-            $message
1865
-        );
1866
-    }
1867
-
1868
-    /**
1869
-     * Asserts that a string does not match a given regular expression.
1870
-     *
1871
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1872
-     * @throws ExpectationFailedException
1873
-     *
1874
-     * @codeCoverageIgnore
1875
-     *
1876
-     * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4089
1877
-     */
1878
-    public static function assertNotRegExp(string $pattern, string $string, string $message = ''): void
1879
-    {
1880
-        self::createWarning('assertNotRegExp() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertDoesNotMatchRegularExpression() instead.');
1881
-
1882
-        static::assertThat(
1883
-            $string,
1884
-            new LogicalNot(
1885
-                new RegularExpression($pattern)
1886
-            ),
1887
-            $message
1888
-        );
1889
-    }
1890
-
1891
-    /**
1892
-     * Assert that the size of two arrays (or `Countable` or `Traversable` objects)
1893
-     * is the same.
1894
-     *
1895
-     * @param Countable|iterable $expected
1896
-     * @param Countable|iterable $actual
1897
-     *
1898
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1899
-     * @throws Exception
1900
-     * @throws ExpectationFailedException
1901
-     */
1902
-    public static function assertSameSize($expected, $actual, string $message = ''): void
1903
-    {
1904
-        if (!$expected instanceof Countable && !is_iterable($expected)) {
1905
-            throw InvalidArgumentException::create(1, 'countable or iterable');
1906
-        }
1907
-
1908
-        if (!$actual instanceof Countable && !is_iterable($actual)) {
1909
-            throw InvalidArgumentException::create(2, 'countable or iterable');
1910
-        }
1911
-
1912
-        static::assertThat(
1913
-            $actual,
1914
-            new SameSize($expected),
1915
-            $message
1916
-        );
1917
-    }
1918
-
1919
-    /**
1920
-     * Assert that the size of two arrays (or `Countable` or `Traversable` objects)
1921
-     * is not the same.
1922
-     *
1923
-     * @param Countable|iterable $expected
1924
-     * @param Countable|iterable $actual
1925
-     *
1926
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1927
-     * @throws Exception
1928
-     * @throws ExpectationFailedException
1929
-     */
1930
-    public static function assertNotSameSize($expected, $actual, string $message = ''): void
1931
-    {
1932
-        if (!$expected instanceof Countable && !is_iterable($expected)) {
1933
-            throw InvalidArgumentException::create(1, 'countable or iterable');
1934
-        }
1935
-
1936
-        if (!$actual instanceof Countable && !is_iterable($actual)) {
1937
-            throw InvalidArgumentException::create(2, 'countable or iterable');
1938
-        }
1939
-
1940
-        static::assertThat(
1941
-            $actual,
1942
-            new LogicalNot(
1943
-                new SameSize($expected)
1944
-            ),
1945
-            $message
1946
-        );
1947
-    }
1948
-
1949
-    /**
1950
-     * Asserts that a string matches a given format string.
1951
-     *
1952
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1953
-     * @throws ExpectationFailedException
1954
-     */
1955
-    public static function assertStringMatchesFormat(string $format, string $string, string $message = ''): void
1956
-    {
1957
-        static::assertThat($string, new StringMatchesFormatDescription($format), $message);
1958
-    }
1959
-
1960
-    /**
1961
-     * Asserts that a string does not match a given format string.
1962
-     *
1963
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1964
-     * @throws ExpectationFailedException
1965
-     */
1966
-    public static function assertStringNotMatchesFormat(string $format, string $string, string $message = ''): void
1967
-    {
1968
-        static::assertThat(
1969
-            $string,
1970
-            new LogicalNot(
1971
-                new StringMatchesFormatDescription($format)
1972
-            ),
1973
-            $message
1974
-        );
1975
-    }
1976
-
1977
-    /**
1978
-     * Asserts that a string matches a given format file.
1979
-     *
1980
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1981
-     * @throws ExpectationFailedException
1982
-     */
1983
-    public static function assertStringMatchesFormatFile(string $formatFile, string $string, string $message = ''): void
1984
-    {
1985
-        static::assertFileExists($formatFile, $message);
1986
-
1987
-        static::assertThat(
1988
-            $string,
1989
-            new StringMatchesFormatDescription(
1990
-                file_get_contents($formatFile)
1991
-            ),
1992
-            $message
1993
-        );
1994
-    }
1995
-
1996
-    /**
1997
-     * Asserts that a string does not match a given format string.
1998
-     *
1999
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2000
-     * @throws ExpectationFailedException
2001
-     */
2002
-    public static function assertStringNotMatchesFormatFile(string $formatFile, string $string, string $message = ''): void
2003
-    {
2004
-        static::assertFileExists($formatFile, $message);
2005
-
2006
-        static::assertThat(
2007
-            $string,
2008
-            new LogicalNot(
2009
-                new StringMatchesFormatDescription(
2010
-                    file_get_contents($formatFile)
2011
-                )
2012
-            ),
2013
-            $message
2014
-        );
2015
-    }
2016
-
2017
-    /**
2018
-     * Asserts that a string starts with a given prefix.
2019
-     *
2020
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2021
-     * @throws ExpectationFailedException
2022
-     */
2023
-    public static function assertStringStartsWith(string $prefix, string $string, string $message = ''): void
2024
-    {
2025
-        static::assertThat($string, new StringStartsWith($prefix), $message);
2026
-    }
2027
-
2028
-    /**
2029
-     * Asserts that a string starts not with a given prefix.
2030
-     *
2031
-     * @param string $prefix
2032
-     * @param string $string
2033
-     *
2034
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2035
-     * @throws ExpectationFailedException
2036
-     */
2037
-    public static function assertStringStartsNotWith($prefix, $string, string $message = ''): void
2038
-    {
2039
-        static::assertThat(
2040
-            $string,
2041
-            new LogicalNot(
2042
-                new StringStartsWith($prefix)
2043
-            ),
2044
-            $message
2045
-        );
2046
-    }
2047
-
2048
-    /**
2049
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2050
-     * @throws ExpectationFailedException
2051
-     */
2052
-    public static function assertStringContainsString(string $needle, string $haystack, string $message = ''): void
2053
-    {
2054
-        $constraint = new StringContains($needle, false);
2055
-
2056
-        static::assertThat($haystack, $constraint, $message);
2057
-    }
2058
-
2059
-    /**
2060
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2061
-     * @throws ExpectationFailedException
2062
-     */
2063
-    public static function assertStringContainsStringIgnoringCase(string $needle, string $haystack, string $message = ''): void
2064
-    {
2065
-        $constraint = new StringContains($needle, true);
2066
-
2067
-        static::assertThat($haystack, $constraint, $message);
2068
-    }
2069
-
2070
-    /**
2071
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2072
-     * @throws ExpectationFailedException
2073
-     */
2074
-    public static function assertStringNotContainsString(string $needle, string $haystack, string $message = ''): void
2075
-    {
2076
-        $constraint = new LogicalNot(new StringContains($needle));
2077
-
2078
-        static::assertThat($haystack, $constraint, $message);
2079
-    }
2080
-
2081
-    /**
2082
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2083
-     * @throws ExpectationFailedException
2084
-     */
2085
-    public static function assertStringNotContainsStringIgnoringCase(string $needle, string $haystack, string $message = ''): void
2086
-    {
2087
-        $constraint = new LogicalNot(new StringContains($needle, true));
2088
-
2089
-        static::assertThat($haystack, $constraint, $message);
2090
-    }
2091
-
2092
-    /**
2093
-     * Asserts that a string ends with a given suffix.
2094
-     *
2095
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2096
-     * @throws ExpectationFailedException
2097
-     */
2098
-    public static function assertStringEndsWith(string $suffix, string $string, string $message = ''): void
2099
-    {
2100
-        static::assertThat($string, new StringEndsWith($suffix), $message);
2101
-    }
2102
-
2103
-    /**
2104
-     * Asserts that a string ends not with a given suffix.
2105
-     *
2106
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2107
-     * @throws ExpectationFailedException
2108
-     */
2109
-    public static function assertStringEndsNotWith(string $suffix, string $string, string $message = ''): void
2110
-    {
2111
-        static::assertThat(
2112
-            $string,
2113
-            new LogicalNot(
2114
-                new StringEndsWith($suffix)
2115
-            ),
2116
-            $message
2117
-        );
2118
-    }
2119
-
2120
-    /**
2121
-     * Asserts that two XML files are equal.
2122
-     *
2123
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2124
-     * @throws Exception
2125
-     * @throws ExpectationFailedException
2126
-     */
2127
-    public static function assertXmlFileEqualsXmlFile(string $expectedFile, string $actualFile, string $message = ''): void
2128
-    {
2129
-        $expected = (new XmlLoader)->loadFile($expectedFile);
2130
-        $actual   = (new XmlLoader)->loadFile($actualFile);
2131
-
2132
-        static::assertEquals($expected, $actual, $message);
2133
-    }
2134
-
2135
-    /**
2136
-     * Asserts that two XML files are not equal.
2137
-     *
2138
-     * @throws \PHPUnit\Util\Exception
2139
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2140
-     * @throws ExpectationFailedException
2141
-     */
2142
-    public static function assertXmlFileNotEqualsXmlFile(string $expectedFile, string $actualFile, string $message = ''): void
2143
-    {
2144
-        $expected = (new XmlLoader)->loadFile($expectedFile);
2145
-        $actual   = (new XmlLoader)->loadFile($actualFile);
2146
-
2147
-        static::assertNotEquals($expected, $actual, $message);
2148
-    }
2149
-
2150
-    /**
2151
-     * Asserts that two XML documents are equal.
2152
-     *
2153
-     * @param DOMDocument|string $actualXml
2154
-     *
2155
-     * @throws \PHPUnit\Util\Xml\Exception
2156
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2157
-     * @throws ExpectationFailedException
2158
-     */
2159
-    public static function assertXmlStringEqualsXmlFile(string $expectedFile, $actualXml, string $message = ''): void
2160
-    {
2161
-        if (!is_string($actualXml)) {
2162
-            self::createWarning('Passing an argument of type DOMDocument for the $actualXml parameter is deprecated. Support for this will be removed in PHPUnit 10.');
2163
-
2164
-            $actual = $actualXml;
2165
-        } else {
2166
-            $actual = (new XmlLoader)->load($actualXml);
2167
-        }
2168
-
2169
-        $expected = (new XmlLoader)->loadFile($expectedFile);
2170
-
2171
-        static::assertEquals($expected, $actual, $message);
2172
-    }
2173
-
2174
-    /**
2175
-     * Asserts that two XML documents are not equal.
2176
-     *
2177
-     * @param DOMDocument|string $actualXml
2178
-     *
2179
-     * @throws \PHPUnit\Util\Xml\Exception
2180
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2181
-     * @throws ExpectationFailedException
2182
-     */
2183
-    public static function assertXmlStringNotEqualsXmlFile(string $expectedFile, $actualXml, string $message = ''): void
2184
-    {
2185
-        if (!is_string($actualXml)) {
2186
-            self::createWarning('Passing an argument of type DOMDocument for the $actualXml parameter is deprecated. Support for this will be removed in PHPUnit 10.');
2187
-
2188
-            $actual = $actualXml;
2189
-        } else {
2190
-            $actual = (new XmlLoader)->load($actualXml);
2191
-        }
2192
-
2193
-        $expected = (new XmlLoader)->loadFile($expectedFile);
2194
-
2195
-        static::assertNotEquals($expected, $actual, $message);
2196
-    }
2197
-
2198
-    /**
2199
-     * Asserts that two XML documents are equal.
2200
-     *
2201
-     * @param DOMDocument|string $expectedXml
2202
-     * @param DOMDocument|string $actualXml
2203
-     *
2204
-     * @throws \PHPUnit\Util\Xml\Exception
2205
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2206
-     * @throws ExpectationFailedException
2207
-     */
2208
-    public static function assertXmlStringEqualsXmlString($expectedXml, $actualXml, string $message = ''): void
2209
-    {
2210
-        if (!is_string($expectedXml)) {
2211
-            self::createWarning('Passing an argument of type DOMDocument for the $expectedXml parameter is deprecated. Support for this will be removed in PHPUnit 10.');
2212
-
2213
-            $expected = $expectedXml;
2214
-        } else {
2215
-            $expected = (new XmlLoader)->load($expectedXml);
2216
-        }
2217
-
2218
-        if (!is_string($actualXml)) {
2219
-            self::createWarning('Passing an argument of type DOMDocument for the $actualXml parameter is deprecated. Support for this will be removed in PHPUnit 10.');
2220
-
2221
-            $actual = $actualXml;
2222
-        } else {
2223
-            $actual = (new XmlLoader)->load($actualXml);
2224
-        }
2225
-
2226
-        static::assertEquals($expected, $actual, $message);
2227
-    }
2228
-
2229
-    /**
2230
-     * Asserts that two XML documents are not equal.
2231
-     *
2232
-     * @param DOMDocument|string $expectedXml
2233
-     * @param DOMDocument|string $actualXml
2234
-     *
2235
-     * @throws \PHPUnit\Util\Xml\Exception
2236
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2237
-     * @throws ExpectationFailedException
2238
-     */
2239
-    public static function assertXmlStringNotEqualsXmlString($expectedXml, $actualXml, string $message = ''): void
2240
-    {
2241
-        if (!is_string($expectedXml)) {
2242
-            self::createWarning('Passing an argument of type DOMDocument for the $expectedXml parameter is deprecated. Support for this will be removed in PHPUnit 10.');
2243
-
2244
-            $expected = $expectedXml;
2245
-        } else {
2246
-            $expected = (new XmlLoader)->load($expectedXml);
2247
-        }
2248
-
2249
-        if (!is_string($actualXml)) {
2250
-            self::createWarning('Passing an argument of type DOMDocument for the $actualXml parameter is deprecated. Support for this will be removed in PHPUnit 10.');
2251
-
2252
-            $actual = $actualXml;
2253
-        } else {
2254
-            $actual = (new XmlLoader)->load($actualXml);
2255
-        }
2256
-
2257
-        static::assertNotEquals($expected, $actual, $message);
2258
-    }
2259
-
2260
-    /**
2261
-     * Asserts that a hierarchy of DOMElements matches.
2262
-     *
2263
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2264
-     * @throws AssertionFailedError
2265
-     * @throws ExpectationFailedException
2266
-     *
2267
-     * @codeCoverageIgnore
2268
-     *
2269
-     * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4091
2270
-     */
2271
-    public static function assertEqualXMLStructure(DOMElement $expectedElement, DOMElement $actualElement, bool $checkAttributes = false, string $message = ''): void
2272
-    {
2273
-        self::createWarning('assertEqualXMLStructure() is deprecated and will be removed in PHPUnit 10.');
2274
-
2275
-        $expectedElement = Xml::import($expectedElement);
2276
-        $actualElement   = Xml::import($actualElement);
2277
-
2278
-        static::assertSame(
2279
-            $expectedElement->tagName,
2280
-            $actualElement->tagName,
2281
-            $message
2282
-        );
2283
-
2284
-        if ($checkAttributes) {
2285
-            static::assertSame(
2286
-                $expectedElement->attributes->length,
2287
-                $actualElement->attributes->length,
2288
-                sprintf(
2289
-                    '%s%sNumber of attributes on node "%s" does not match',
2290
-                    $message,
2291
-                    !empty($message) ? "\n" : '',
2292
-                    $expectedElement->tagName
2293
-                )
2294
-            );
2295
-
2296
-            for ($i = 0; $i < $expectedElement->attributes->length; $i++) {
2297
-                $expectedAttribute = $expectedElement->attributes->item($i);
2298
-                $actualAttribute   = $actualElement->attributes->getNamedItem($expectedAttribute->name);
2299
-
2300
-                assert($expectedAttribute instanceof DOMAttr);
2301
-
2302
-                if (!$actualAttribute) {
2303
-                    static::fail(
2304
-                        sprintf(
2305
-                            '%s%sCould not find attribute "%s" on node "%s"',
2306
-                            $message,
2307
-                            !empty($message) ? "\n" : '',
2308
-                            $expectedAttribute->name,
2309
-                            $expectedElement->tagName
2310
-                        )
2311
-                    );
2312
-                }
2313
-            }
2314
-        }
2315
-
2316
-        Xml::removeCharacterDataNodes($expectedElement);
2317
-        Xml::removeCharacterDataNodes($actualElement);
2318
-
2319
-        static::assertSame(
2320
-            $expectedElement->childNodes->length,
2321
-            $actualElement->childNodes->length,
2322
-            sprintf(
2323
-                '%s%sNumber of child nodes of "%s" differs',
2324
-                $message,
2325
-                !empty($message) ? "\n" : '',
2326
-                $expectedElement->tagName
2327
-            )
2328
-        );
2329
-
2330
-        for ($i = 0; $i < $expectedElement->childNodes->length; $i++) {
2331
-            static::assertEqualXMLStructure(
2332
-                $expectedElement->childNodes->item($i),
2333
-                $actualElement->childNodes->item($i),
2334
-                $checkAttributes,
2335
-                $message
2336
-            );
2337
-        }
2338
-    }
2339
-
2340
-    /**
2341
-     * Evaluates a PHPUnit\Framework\Constraint matcher object.
2342
-     *
2343
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2344
-     * @throws ExpectationFailedException
2345
-     */
2346
-    public static function assertThat($value, Constraint $constraint, string $message = ''): void
2347
-    {
2348
-        self::$count += count($constraint);
2349
-
2350
-        $constraint->evaluate($value, $message);
2351
-    }
2352
-
2353
-    /**
2354
-     * Asserts that a string is a valid JSON string.
2355
-     *
2356
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2357
-     * @throws ExpectationFailedException
2358
-     */
2359
-    public static function assertJson(string $actualJson, string $message = ''): void
2360
-    {
2361
-        static::assertThat($actualJson, static::isJson(), $message);
2362
-    }
2363
-
2364
-    /**
2365
-     * Asserts that two given JSON encoded objects or arrays are equal.
2366
-     *
2367
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2368
-     * @throws ExpectationFailedException
2369
-     */
2370
-    public static function assertJsonStringEqualsJsonString(string $expectedJson, string $actualJson, string $message = ''): void
2371
-    {
2372
-        static::assertJson($expectedJson, $message);
2373
-        static::assertJson($actualJson, $message);
2374
-
2375
-        static::assertThat($actualJson, new JsonMatches($expectedJson), $message);
2376
-    }
2377
-
2378
-    /**
2379
-     * Asserts that two given JSON encoded objects or arrays are not equal.
2380
-     *
2381
-     * @param string $expectedJson
2382
-     * @param string $actualJson
2383
-     *
2384
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2385
-     * @throws ExpectationFailedException
2386
-     */
2387
-    public static function assertJsonStringNotEqualsJsonString($expectedJson, $actualJson, string $message = ''): void
2388
-    {
2389
-        static::assertJson($expectedJson, $message);
2390
-        static::assertJson($actualJson, $message);
2391
-
2392
-        static::assertThat(
2393
-            $actualJson,
2394
-            new LogicalNot(
2395
-                new JsonMatches($expectedJson)
2396
-            ),
2397
-            $message
2398
-        );
2399
-    }
2400
-
2401
-    /**
2402
-     * Asserts that the generated JSON encoded object and the content of the given file are equal.
2403
-     *
2404
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2405
-     * @throws ExpectationFailedException
2406
-     */
2407
-    public static function assertJsonStringEqualsJsonFile(string $expectedFile, string $actualJson, string $message = ''): void
2408
-    {
2409
-        static::assertFileExists($expectedFile, $message);
2410
-        $expectedJson = file_get_contents($expectedFile);
2411
-
2412
-        static::assertJson($expectedJson, $message);
2413
-        static::assertJson($actualJson, $message);
2414
-
2415
-        static::assertThat($actualJson, new JsonMatches($expectedJson), $message);
2416
-    }
2417
-
2418
-    /**
2419
-     * Asserts that the generated JSON encoded object and the content of the given file are not equal.
2420
-     *
2421
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2422
-     * @throws ExpectationFailedException
2423
-     */
2424
-    public static function assertJsonStringNotEqualsJsonFile(string $expectedFile, string $actualJson, string $message = ''): void
2425
-    {
2426
-        static::assertFileExists($expectedFile, $message);
2427
-        $expectedJson = file_get_contents($expectedFile);
2428
-
2429
-        static::assertJson($expectedJson, $message);
2430
-        static::assertJson($actualJson, $message);
2431
-
2432
-        static::assertThat(
2433
-            $actualJson,
2434
-            new LogicalNot(
2435
-                new JsonMatches($expectedJson)
2436
-            ),
2437
-            $message
2438
-        );
2439
-    }
2440
-
2441
-    /**
2442
-     * Asserts that two JSON files are equal.
2443
-     *
2444
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2445
-     * @throws ExpectationFailedException
2446
-     */
2447
-    public static function assertJsonFileEqualsJsonFile(string $expectedFile, string $actualFile, string $message = ''): void
2448
-    {
2449
-        static::assertFileExists($expectedFile, $message);
2450
-        static::assertFileExists($actualFile, $message);
2451
-
2452
-        $actualJson   = file_get_contents($actualFile);
2453
-        $expectedJson = file_get_contents($expectedFile);
2454
-
2455
-        static::assertJson($expectedJson, $message);
2456
-        static::assertJson($actualJson, $message);
2457
-
2458
-        $constraintExpected = new JsonMatches(
2459
-            $expectedJson
2460
-        );
2461
-
2462
-        $constraintActual = new JsonMatches($actualJson);
2463
-
2464
-        static::assertThat($expectedJson, $constraintActual, $message);
2465
-        static::assertThat($actualJson, $constraintExpected, $message);
2466
-    }
2467
-
2468
-    /**
2469
-     * Asserts that two JSON files are not equal.
2470
-     *
2471
-     * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2472
-     * @throws ExpectationFailedException
2473
-     */
2474
-    public static function assertJsonFileNotEqualsJsonFile(string $expectedFile, string $actualFile, string $message = ''): void
2475
-    {
2476
-        static::assertFileExists($expectedFile, $message);
2477
-        static::assertFileExists($actualFile, $message);
2478
-
2479
-        $actualJson   = file_get_contents($actualFile);
2480
-        $expectedJson = file_get_contents($expectedFile);
2481
-
2482
-        static::assertJson($expectedJson, $message);
2483
-        static::assertJson($actualJson, $message);
2484
-
2485
-        $constraintExpected = new JsonMatches(
2486
-            $expectedJson
2487
-        );
2488
-
2489
-        $constraintActual = new JsonMatches($actualJson);
2490
-
2491
-        static::assertThat($expectedJson, new LogicalNot($constraintActual), $message);
2492
-        static::assertThat($actualJson, new LogicalNot($constraintExpected), $message);
2493
-    }
2494
-
2495
-    /**
2496
-     * @throws Exception
2497
-     */
2498
-    public static function logicalAnd(): LogicalAnd
2499
-    {
2500
-        $constraints = func_get_args();
2501
-
2502
-        $constraint = new LogicalAnd;
2503
-        $constraint->setConstraints($constraints);
2504
-
2505
-        return $constraint;
2506
-    }
2507
-
2508
-    public static function logicalOr(): LogicalOr
2509
-    {
2510
-        $constraints = func_get_args();
2511
-
2512
-        $constraint = new LogicalOr;
2513
-        $constraint->setConstraints($constraints);
2514
-
2515
-        return $constraint;
2516
-    }
2517
-
2518
-    public static function logicalNot(Constraint $constraint): LogicalNot
2519
-    {
2520
-        return new LogicalNot($constraint);
2521
-    }
2522
-
2523
-    public static function logicalXor(): LogicalXor
2524
-    {
2525
-        $constraints = func_get_args();
2526
-
2527
-        $constraint = new LogicalXor;
2528
-        $constraint->setConstraints($constraints);
2529
-
2530
-        return $constraint;
2531
-    }
2532
-
2533
-    public static function anything(): IsAnything
2534
-    {
2535
-        return new IsAnything;
2536
-    }
2537
-
2538
-    public static function isTrue(): IsTrue
2539
-    {
2540
-        return new IsTrue;
2541
-    }
2542
-
2543
-    /**
2544
-     * @psalm-template CallbackInput of mixed
2545
-     *
2546
-     * @psalm-param callable(CallbackInput $callback): bool $callback
2547
-     *
2548
-     * @psalm-return Callback<CallbackInput>
2549
-     */
2550
-    public static function callback(callable $callback): Callback
2551
-    {
2552
-        return new Callback($callback);
2553
-    }
2554
-
2555
-    public static function isFalse(): IsFalse
2556
-    {
2557
-        return new IsFalse;
2558
-    }
2559
-
2560
-    public static function isJson(): IsJson
2561
-    {
2562
-        return new IsJson;
2563
-    }
2564
-
2565
-    public static function isNull(): IsNull
2566
-    {
2567
-        return new IsNull;
2568
-    }
2569
-
2570
-    public static function isFinite(): IsFinite
2571
-    {
2572
-        return new IsFinite;
2573
-    }
2574
-
2575
-    public static function isInfinite(): IsInfinite
2576
-    {
2577
-        return new IsInfinite;
2578
-    }
2579
-
2580
-    public static function isNan(): IsNan
2581
-    {
2582
-        return new IsNan;
2583
-    }
2584
-
2585
-    public static function containsEqual($value): TraversableContainsEqual
2586
-    {
2587
-        return new TraversableContainsEqual($value);
2588
-    }
2589
-
2590
-    public static function containsIdentical($value): TraversableContainsIdentical
2591
-    {
2592
-        return new TraversableContainsIdentical($value);
2593
-    }
2594
-
2595
-    public static function containsOnly(string $type): TraversableContainsOnly
2596
-    {
2597
-        return new TraversableContainsOnly($type);
2598
-    }
2599
-
2600
-    public static function containsOnlyInstancesOf(string $className): TraversableContainsOnly
2601
-    {
2602
-        return new TraversableContainsOnly($className, false);
2603
-    }
2604
-
2605
-    /**
2606
-     * @param int|string $key
2607
-     */
2608
-    public static function arrayHasKey($key): ArrayHasKey
2609
-    {
2610
-        return new ArrayHasKey($key);
2611
-    }
2612
-
2613
-    public static function equalTo($value): IsEqual
2614
-    {
2615
-        return new IsEqual($value, 0.0, false, false);
2616
-    }
2617
-
2618
-    public static function equalToCanonicalizing($value): IsEqualCanonicalizing
2619
-    {
2620
-        return new IsEqualCanonicalizing($value);
2621
-    }
2622
-
2623
-    public static function equalToIgnoringCase($value): IsEqualIgnoringCase
2624
-    {
2625
-        return new IsEqualIgnoringCase($value);
2626
-    }
2627
-
2628
-    public static function equalToWithDelta($value, float $delta): IsEqualWithDelta
2629
-    {
2630
-        return new IsEqualWithDelta($value, $delta);
2631
-    }
2632
-
2633
-    public static function isEmpty(): IsEmpty
2634
-    {
2635
-        return new IsEmpty;
2636
-    }
2637
-
2638
-    public static function isWritable(): IsWritable
2639
-    {
2640
-        return new IsWritable;
2641
-    }
2642
-
2643
-    public static function isReadable(): IsReadable
2644
-    {
2645
-        return new IsReadable;
2646
-    }
2647
-
2648
-    public static function directoryExists(): DirectoryExists
2649
-    {
2650
-        return new DirectoryExists;
2651
-    }
2652
-
2653
-    public static function fileExists(): FileExists
2654
-    {
2655
-        return new FileExists;
2656
-    }
2657
-
2658
-    public static function greaterThan($value): GreaterThan
2659
-    {
2660
-        return new GreaterThan($value);
2661
-    }
2662
-
2663
-    public static function greaterThanOrEqual($value): LogicalOr
2664
-    {
2665
-        return static::logicalOr(
2666
-            new IsEqual($value),
2667
-            new GreaterThan($value)
2668
-        );
2669
-    }
2670
-
2671
-    public static function classHasAttribute(string $attributeName): ClassHasAttribute
2672
-    {
2673
-        return new ClassHasAttribute($attributeName);
2674
-    }
2675
-
2676
-    public static function classHasStaticAttribute(string $attributeName): ClassHasStaticAttribute
2677
-    {
2678
-        return new ClassHasStaticAttribute($attributeName);
2679
-    }
2680
-
2681
-    public static function objectHasAttribute($attributeName): ObjectHasAttribute
2682
-    {
2683
-        return new ObjectHasAttribute($attributeName);
2684
-    }
2685
-
2686
-    public static function identicalTo($value): IsIdentical
2687
-    {
2688
-        return new IsIdentical($value);
2689
-    }
2690
-
2691
-    public static function isInstanceOf(string $className): IsInstanceOf
2692
-    {
2693
-        return new IsInstanceOf($className);
2694
-    }
2695
-
2696
-    public static function isType(string $type): IsType
2697
-    {
2698
-        return new IsType($type);
2699
-    }
2700
-
2701
-    public static function lessThan($value): LessThan
2702
-    {
2703
-        return new LessThan($value);
2704
-    }
2705
-
2706
-    public static function lessThanOrEqual($value): LogicalOr
2707
-    {
2708
-        return static::logicalOr(
2709
-            new IsEqual($value),
2710
-            new LessThan($value)
2711
-        );
2712
-    }
2713
-
2714
-    public static function matchesRegularExpression(string $pattern): RegularExpression
2715
-    {
2716
-        return new RegularExpression($pattern);
2717
-    }
2718
-
2719
-    public static function matches(string $string): StringMatchesFormatDescription
2720
-    {
2721
-        return new StringMatchesFormatDescription($string);
2722
-    }
2723
-
2724
-    public static function stringStartsWith($prefix): StringStartsWith
2725
-    {
2726
-        return new StringStartsWith($prefix);
2727
-    }
2728
-
2729
-    public static function stringContains(string $string, bool $case = true): StringContains
2730
-    {
2731
-        return new StringContains($string, $case);
2732
-    }
2733
-
2734
-    public static function stringEndsWith(string $suffix): StringEndsWith
2735
-    {
2736
-        return new StringEndsWith($suffix);
2737
-    }
2738
-
2739
-    public static function countOf(int $count): Count
2740
-    {
2741
-        return new Count($count);
2742
-    }
2743
-
2744
-    public static function objectEquals(object $object, string $method = 'equals'): ObjectEquals
2745
-    {
2746
-        return new ObjectEquals($object, $method);
2747
-    }
2748
-
2749
-    /**
2750
-     * Fails a test with the given message.
2751
-     *
2752
-     * @throws AssertionFailedError
2753
-     *
2754
-     * @psalm-return never-return
2755
-     */
2756
-    public static function fail(string $message = ''): void
2757
-    {
2758
-        self::$count++;
2759
-
2760
-        throw new AssertionFailedError($message);
2761
-    }
2762
-
2763
-    /**
2764
-     * Mark the test as incomplete.
2765
-     *
2766
-     * @throws IncompleteTestError
2767
-     *
2768
-     * @psalm-return never-return
2769
-     */
2770
-    public static function markTestIncomplete(string $message = ''): void
2771
-    {
2772
-        throw new IncompleteTestError($message);
2773
-    }
2774
-
2775
-    /**
2776
-     * Mark the test as skipped.
2777
-     *
2778
-     * @throws SkippedTestError
2779
-     * @throws SyntheticSkippedError
2780
-     *
2781
-     * @psalm-return never-return
2782
-     */
2783
-    public static function markTestSkipped(string $message = ''): void
2784
-    {
2785
-        if ($hint = self::detectLocationHint($message)) {
2786
-            $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
2787
-            array_unshift($trace, $hint);
2788
-
2789
-            throw new SyntheticSkippedError($hint['message'], 0, $hint['file'], (int) $hint['line'], $trace);
2790
-        }
2791
-
2792
-        throw new SkippedTestError($message);
2793
-    }
2794
-
2795
-    /**
2796
-     * Return the current assertion count.
2797
-     */
2798
-    public static function getCount(): int
2799
-    {
2800
-        return self::$count;
2801
-    }
2802
-
2803
-    /**
2804
-     * Reset the assertion counter.
2805
-     */
2806
-    public static function resetCount(): void
2807
-    {
2808
-        self::$count = 0;
2809
-    }
2810
-
2811
-    private static function detectLocationHint(string $message): ?array
2812
-    {
2813
-        $hint  = null;
2814
-        $lines = preg_split('/\r\n|\r|\n/', $message);
2815
-
2816
-        while (strpos($lines[0], '__OFFSET') !== false) {
2817
-            $offset = explode('=', array_shift($lines));
2818
-
2819
-            if ($offset[0] === '__OFFSET_FILE') {
2820
-                $hint['file'] = $offset[1];
2821
-            }
2822
-
2823
-            if ($offset[0] === '__OFFSET_LINE') {
2824
-                $hint['line'] = $offset[1];
2825
-            }
2826
-        }
2827
-
2828
-        if ($hint) {
2829
-            $hint['message'] = implode(PHP_EOL, $lines);
2830
-        }
2831
-
2832
-        return $hint;
2833
-    }
2834
-
2835
-    private static function isValidObjectAttributeName(string $attributeName): bool
2836
-    {
2837
-        return (bool) preg_match('/[^\x00-\x1f\x7f-\x9f]+/', $attributeName);
2838
-    }
2839
-
2840
-    private static function isValidClassAttributeName(string $attributeName): bool
2841
-    {
2842
-        return (bool) preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/', $attributeName);
2843
-    }
2844
-
2845
-    /**
2846
-     * @codeCoverageIgnore
2847
-     */
2848
-    private static function createWarning(string $warning): void
2849
-    {
2850
-        foreach (debug_backtrace() as $step) {
2851
-            if (isset($step['object']) && $step['object'] instanceof TestCase) {
2852
-                assert($step['object'] instanceof TestCase);
2853
-
2854
-                $step['object']->addWarning($warning);
2855
-
2856
-                break;
2857
-            }
2858
-        }
2859
-    }
93
+	/**
94
+	 * @var int
95
+	 */
96
+	private static $count = 0;
97
+
98
+	/**
99
+	 * Asserts that an array has a specified key.
100
+	 *
101
+	 * @param int|string        $key
102
+	 * @param array|ArrayAccess $array
103
+	 *
104
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
105
+	 * @throws Exception
106
+	 * @throws ExpectationFailedException
107
+	 */
108
+	public static function assertArrayHasKey($key, $array, string $message = ''): void
109
+	{
110
+		if (!(is_int($key) || is_string($key))) {
111
+			throw InvalidArgumentException::create(
112
+				1,
113
+				'integer or string'
114
+			);
115
+		}
116
+
117
+		if (!(is_array($array) || $array instanceof ArrayAccess)) {
118
+			throw InvalidArgumentException::create(
119
+				2,
120
+				'array or ArrayAccess'
121
+			);
122
+		}
123
+
124
+		$constraint = new ArrayHasKey($key);
125
+
126
+		static::assertThat($array, $constraint, $message);
127
+	}
128
+
129
+	/**
130
+	 * Asserts that an array does not have a specified key.
131
+	 *
132
+	 * @param int|string        $key
133
+	 * @param array|ArrayAccess $array
134
+	 *
135
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
136
+	 * @throws Exception
137
+	 * @throws ExpectationFailedException
138
+	 */
139
+	public static function assertArrayNotHasKey($key, $array, string $message = ''): void
140
+	{
141
+		if (!(is_int($key) || is_string($key))) {
142
+			throw InvalidArgumentException::create(
143
+				1,
144
+				'integer or string'
145
+			);
146
+		}
147
+
148
+		if (!(is_array($array) || $array instanceof ArrayAccess)) {
149
+			throw InvalidArgumentException::create(
150
+				2,
151
+				'array or ArrayAccess'
152
+			);
153
+		}
154
+
155
+		$constraint = new LogicalNot(
156
+			new ArrayHasKey($key)
157
+		);
158
+
159
+		static::assertThat($array, $constraint, $message);
160
+	}
161
+
162
+	/**
163
+	 * Asserts that a haystack contains a needle.
164
+	 *
165
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
166
+	 * @throws Exception
167
+	 * @throws ExpectationFailedException
168
+	 */
169
+	public static function assertContains($needle, iterable $haystack, string $message = ''): void
170
+	{
171
+		$constraint = new TraversableContainsIdentical($needle);
172
+
173
+		static::assertThat($haystack, $constraint, $message);
174
+	}
175
+
176
+	public static function assertContainsEquals($needle, iterable $haystack, string $message = ''): void
177
+	{
178
+		$constraint = new TraversableContainsEqual($needle);
179
+
180
+		static::assertThat($haystack, $constraint, $message);
181
+	}
182
+
183
+	/**
184
+	 * Asserts that a haystack does not contain a needle.
185
+	 *
186
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
187
+	 * @throws Exception
188
+	 * @throws ExpectationFailedException
189
+	 */
190
+	public static function assertNotContains($needle, iterable $haystack, string $message = ''): void
191
+	{
192
+		$constraint = new LogicalNot(
193
+			new TraversableContainsIdentical($needle)
194
+		);
195
+
196
+		static::assertThat($haystack, $constraint, $message);
197
+	}
198
+
199
+	public static function assertNotContainsEquals($needle, iterable $haystack, string $message = ''): void
200
+	{
201
+		$constraint = new LogicalNot(new TraversableContainsEqual($needle));
202
+
203
+		static::assertThat($haystack, $constraint, $message);
204
+	}
205
+
206
+	/**
207
+	 * Asserts that a haystack contains only values of a given type.
208
+	 *
209
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
210
+	 * @throws ExpectationFailedException
211
+	 */
212
+	public static function assertContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = null, string $message = ''): void
213
+	{
214
+		if ($isNativeType === null) {
215
+			$isNativeType = Type::isType($type);
216
+		}
217
+
218
+		static::assertThat(
219
+			$haystack,
220
+			new TraversableContainsOnly(
221
+				$type,
222
+				$isNativeType
223
+			),
224
+			$message
225
+		);
226
+	}
227
+
228
+	/**
229
+	 * Asserts that a haystack contains only instances of a given class name.
230
+	 *
231
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
232
+	 * @throws ExpectationFailedException
233
+	 */
234
+	public static function assertContainsOnlyInstancesOf(string $className, iterable $haystack, string $message = ''): void
235
+	{
236
+		static::assertThat(
237
+			$haystack,
238
+			new TraversableContainsOnly(
239
+				$className,
240
+				false
241
+			),
242
+			$message
243
+		);
244
+	}
245
+
246
+	/**
247
+	 * Asserts that a haystack does not contain only values of a given type.
248
+	 *
249
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
250
+	 * @throws ExpectationFailedException
251
+	 */
252
+	public static function assertNotContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = null, string $message = ''): void
253
+	{
254
+		if ($isNativeType === null) {
255
+			$isNativeType = Type::isType($type);
256
+		}
257
+
258
+		static::assertThat(
259
+			$haystack,
260
+			new LogicalNot(
261
+				new TraversableContainsOnly(
262
+					$type,
263
+					$isNativeType
264
+				)
265
+			),
266
+			$message
267
+		);
268
+	}
269
+
270
+	/**
271
+	 * Asserts the number of elements of an array, Countable or Traversable.
272
+	 *
273
+	 * @param Countable|iterable $haystack
274
+	 *
275
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
276
+	 * @throws Exception
277
+	 * @throws ExpectationFailedException
278
+	 */
279
+	public static function assertCount(int $expectedCount, $haystack, string $message = ''): void
280
+	{
281
+		if (!$haystack instanceof Countable && !is_iterable($haystack)) {
282
+			throw InvalidArgumentException::create(2, 'countable or iterable');
283
+		}
284
+
285
+		static::assertThat(
286
+			$haystack,
287
+			new Count($expectedCount),
288
+			$message
289
+		);
290
+	}
291
+
292
+	/**
293
+	 * Asserts the number of elements of an array, Countable or Traversable.
294
+	 *
295
+	 * @param Countable|iterable $haystack
296
+	 *
297
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
298
+	 * @throws Exception
299
+	 * @throws ExpectationFailedException
300
+	 */
301
+	public static function assertNotCount(int $expectedCount, $haystack, string $message = ''): void
302
+	{
303
+		if (!$haystack instanceof Countable && !is_iterable($haystack)) {
304
+			throw InvalidArgumentException::create(2, 'countable or iterable');
305
+		}
306
+
307
+		$constraint = new LogicalNot(
308
+			new Count($expectedCount)
309
+		);
310
+
311
+		static::assertThat($haystack, $constraint, $message);
312
+	}
313
+
314
+	/**
315
+	 * Asserts that two variables are equal.
316
+	 *
317
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
318
+	 * @throws ExpectationFailedException
319
+	 */
320
+	public static function assertEquals($expected, $actual, string $message = ''): void
321
+	{
322
+		$constraint = new IsEqual($expected);
323
+
324
+		static::assertThat($actual, $constraint, $message);
325
+	}
326
+
327
+	/**
328
+	 * Asserts that two variables are equal (canonicalizing).
329
+	 *
330
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
331
+	 * @throws ExpectationFailedException
332
+	 */
333
+	public static function assertEqualsCanonicalizing($expected, $actual, string $message = ''): void
334
+	{
335
+		$constraint = new IsEqualCanonicalizing($expected);
336
+
337
+		static::assertThat($actual, $constraint, $message);
338
+	}
339
+
340
+	/**
341
+	 * Asserts that two variables are equal (ignoring case).
342
+	 *
343
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
344
+	 * @throws ExpectationFailedException
345
+	 */
346
+	public static function assertEqualsIgnoringCase($expected, $actual, string $message = ''): void
347
+	{
348
+		$constraint = new IsEqualIgnoringCase($expected);
349
+
350
+		static::assertThat($actual, $constraint, $message);
351
+	}
352
+
353
+	/**
354
+	 * Asserts that two variables are equal (with delta).
355
+	 *
356
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
357
+	 * @throws ExpectationFailedException
358
+	 */
359
+	public static function assertEqualsWithDelta($expected, $actual, float $delta, string $message = ''): void
360
+	{
361
+		$constraint = new IsEqualWithDelta(
362
+			$expected,
363
+			$delta
364
+		);
365
+
366
+		static::assertThat($actual, $constraint, $message);
367
+	}
368
+
369
+	/**
370
+	 * Asserts that two variables are not equal.
371
+	 *
372
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
373
+	 * @throws ExpectationFailedException
374
+	 */
375
+	public static function assertNotEquals($expected, $actual, string $message = ''): void
376
+	{
377
+		$constraint = new LogicalNot(
378
+			new IsEqual($expected)
379
+		);
380
+
381
+		static::assertThat($actual, $constraint, $message);
382
+	}
383
+
384
+	/**
385
+	 * Asserts that two variables are not equal (canonicalizing).
386
+	 *
387
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
388
+	 * @throws ExpectationFailedException
389
+	 */
390
+	public static function assertNotEqualsCanonicalizing($expected, $actual, string $message = ''): void
391
+	{
392
+		$constraint = new LogicalNot(
393
+			new IsEqualCanonicalizing($expected)
394
+		);
395
+
396
+		static::assertThat($actual, $constraint, $message);
397
+	}
398
+
399
+	/**
400
+	 * Asserts that two variables are not equal (ignoring case).
401
+	 *
402
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
403
+	 * @throws ExpectationFailedException
404
+	 */
405
+	public static function assertNotEqualsIgnoringCase($expected, $actual, string $message = ''): void
406
+	{
407
+		$constraint = new LogicalNot(
408
+			new IsEqualIgnoringCase($expected)
409
+		);
410
+
411
+		static::assertThat($actual, $constraint, $message);
412
+	}
413
+
414
+	/**
415
+	 * Asserts that two variables are not equal (with delta).
416
+	 *
417
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
418
+	 * @throws ExpectationFailedException
419
+	 */
420
+	public static function assertNotEqualsWithDelta($expected, $actual, float $delta, string $message = ''): void
421
+	{
422
+		$constraint = new LogicalNot(
423
+			new IsEqualWithDelta(
424
+				$expected,
425
+				$delta
426
+			)
427
+		);
428
+
429
+		static::assertThat($actual, $constraint, $message);
430
+	}
431
+
432
+	/**
433
+	 * @throws ExpectationFailedException
434
+	 */
435
+	public static function assertObjectEquals(object $expected, object $actual, string $method = 'equals', string $message = ''): void
436
+	{
437
+		static::assertThat(
438
+			$actual,
439
+			static::objectEquals($expected, $method),
440
+			$message
441
+		);
442
+	}
443
+
444
+	/**
445
+	 * Asserts that a variable is empty.
446
+	 *
447
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
448
+	 * @throws ExpectationFailedException
449
+	 *
450
+	 * @psalm-assert empty $actual
451
+	 */
452
+	public static function assertEmpty($actual, string $message = ''): void
453
+	{
454
+		static::assertThat($actual, static::isEmpty(), $message);
455
+	}
456
+
457
+	/**
458
+	 * Asserts that a variable is not empty.
459
+	 *
460
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
461
+	 * @throws ExpectationFailedException
462
+	 *
463
+	 * @psalm-assert !empty $actual
464
+	 */
465
+	public static function assertNotEmpty($actual, string $message = ''): void
466
+	{
467
+		static::assertThat($actual, static::logicalNot(static::isEmpty()), $message);
468
+	}
469
+
470
+	/**
471
+	 * Asserts that a value is greater than another value.
472
+	 *
473
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
474
+	 * @throws ExpectationFailedException
475
+	 */
476
+	public static function assertGreaterThan($expected, $actual, string $message = ''): void
477
+	{
478
+		static::assertThat($actual, static::greaterThan($expected), $message);
479
+	}
480
+
481
+	/**
482
+	 * Asserts that a value is greater than or equal to another value.
483
+	 *
484
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
485
+	 * @throws ExpectationFailedException
486
+	 */
487
+	public static function assertGreaterThanOrEqual($expected, $actual, string $message = ''): void
488
+	{
489
+		static::assertThat(
490
+			$actual,
491
+			static::greaterThanOrEqual($expected),
492
+			$message
493
+		);
494
+	}
495
+
496
+	/**
497
+	 * Asserts that a value is smaller than another value.
498
+	 *
499
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
500
+	 * @throws ExpectationFailedException
501
+	 */
502
+	public static function assertLessThan($expected, $actual, string $message = ''): void
503
+	{
504
+		static::assertThat($actual, static::lessThan($expected), $message);
505
+	}
506
+
507
+	/**
508
+	 * Asserts that a value is smaller than or equal to another value.
509
+	 *
510
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
511
+	 * @throws ExpectationFailedException
512
+	 */
513
+	public static function assertLessThanOrEqual($expected, $actual, string $message = ''): void
514
+	{
515
+		static::assertThat($actual, static::lessThanOrEqual($expected), $message);
516
+	}
517
+
518
+	/**
519
+	 * Asserts that the contents of one file is equal to the contents of another
520
+	 * file.
521
+	 *
522
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
523
+	 * @throws ExpectationFailedException
524
+	 */
525
+	public static function assertFileEquals(string $expected, string $actual, string $message = ''): void
526
+	{
527
+		static::assertFileExists($expected, $message);
528
+		static::assertFileExists($actual, $message);
529
+
530
+		$constraint = new IsEqual(file_get_contents($expected));
531
+
532
+		static::assertThat(file_get_contents($actual), $constraint, $message);
533
+	}
534
+
535
+	/**
536
+	 * Asserts that the contents of one file is equal to the contents of another
537
+	 * file (canonicalizing).
538
+	 *
539
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
540
+	 * @throws ExpectationFailedException
541
+	 */
542
+	public static function assertFileEqualsCanonicalizing(string $expected, string $actual, string $message = ''): void
543
+	{
544
+		static::assertFileExists($expected, $message);
545
+		static::assertFileExists($actual, $message);
546
+
547
+		$constraint = new IsEqualCanonicalizing(
548
+			file_get_contents($expected)
549
+		);
550
+
551
+		static::assertThat(file_get_contents($actual), $constraint, $message);
552
+	}
553
+
554
+	/**
555
+	 * Asserts that the contents of one file is equal to the contents of another
556
+	 * file (ignoring case).
557
+	 *
558
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
559
+	 * @throws ExpectationFailedException
560
+	 */
561
+	public static function assertFileEqualsIgnoringCase(string $expected, string $actual, string $message = ''): void
562
+	{
563
+		static::assertFileExists($expected, $message);
564
+		static::assertFileExists($actual, $message);
565
+
566
+		$constraint = new IsEqualIgnoringCase(file_get_contents($expected));
567
+
568
+		static::assertThat(file_get_contents($actual), $constraint, $message);
569
+	}
570
+
571
+	/**
572
+	 * Asserts that the contents of one file is not equal to the contents of
573
+	 * another file.
574
+	 *
575
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
576
+	 * @throws ExpectationFailedException
577
+	 */
578
+	public static function assertFileNotEquals(string $expected, string $actual, string $message = ''): void
579
+	{
580
+		static::assertFileExists($expected, $message);
581
+		static::assertFileExists($actual, $message);
582
+
583
+		$constraint = new LogicalNot(
584
+			new IsEqual(file_get_contents($expected))
585
+		);
586
+
587
+		static::assertThat(file_get_contents($actual), $constraint, $message);
588
+	}
589
+
590
+	/**
591
+	 * Asserts that the contents of one file is not equal to the contents of another
592
+	 * file (canonicalizing).
593
+	 *
594
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
595
+	 * @throws ExpectationFailedException
596
+	 */
597
+	public static function assertFileNotEqualsCanonicalizing(string $expected, string $actual, string $message = ''): void
598
+	{
599
+		static::assertFileExists($expected, $message);
600
+		static::assertFileExists($actual, $message);
601
+
602
+		$constraint = new LogicalNot(
603
+			new IsEqualCanonicalizing(file_get_contents($expected))
604
+		);
605
+
606
+		static::assertThat(file_get_contents($actual), $constraint, $message);
607
+	}
608
+
609
+	/**
610
+	 * Asserts that the contents of one file is not equal to the contents of another
611
+	 * file (ignoring case).
612
+	 *
613
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
614
+	 * @throws ExpectationFailedException
615
+	 */
616
+	public static function assertFileNotEqualsIgnoringCase(string $expected, string $actual, string $message = ''): void
617
+	{
618
+		static::assertFileExists($expected, $message);
619
+		static::assertFileExists($actual, $message);
620
+
621
+		$constraint = new LogicalNot(
622
+			new IsEqualIgnoringCase(file_get_contents($expected))
623
+		);
624
+
625
+		static::assertThat(file_get_contents($actual), $constraint, $message);
626
+	}
627
+
628
+	/**
629
+	 * Asserts that the contents of a string is equal
630
+	 * to the contents of a file.
631
+	 *
632
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
633
+	 * @throws ExpectationFailedException
634
+	 */
635
+	public static function assertStringEqualsFile(string $expectedFile, string $actualString, string $message = ''): void
636
+	{
637
+		static::assertFileExists($expectedFile, $message);
638
+
639
+		$constraint = new IsEqual(file_get_contents($expectedFile));
640
+
641
+		static::assertThat($actualString, $constraint, $message);
642
+	}
643
+
644
+	/**
645
+	 * Asserts that the contents of a string is equal
646
+	 * to the contents of a file (canonicalizing).
647
+	 *
648
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
649
+	 * @throws ExpectationFailedException
650
+	 */
651
+	public static function assertStringEqualsFileCanonicalizing(string $expectedFile, string $actualString, string $message = ''): void
652
+	{
653
+		static::assertFileExists($expectedFile, $message);
654
+
655
+		$constraint = new IsEqualCanonicalizing(file_get_contents($expectedFile));
656
+
657
+		static::assertThat($actualString, $constraint, $message);
658
+	}
659
+
660
+	/**
661
+	 * Asserts that the contents of a string is equal
662
+	 * to the contents of a file (ignoring case).
663
+	 *
664
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
665
+	 * @throws ExpectationFailedException
666
+	 */
667
+	public static function assertStringEqualsFileIgnoringCase(string $expectedFile, string $actualString, string $message = ''): void
668
+	{
669
+		static::assertFileExists($expectedFile, $message);
670
+
671
+		$constraint = new IsEqualIgnoringCase(file_get_contents($expectedFile));
672
+
673
+		static::assertThat($actualString, $constraint, $message);
674
+	}
675
+
676
+	/**
677
+	 * Asserts that the contents of a string is not equal
678
+	 * to the contents of a file.
679
+	 *
680
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
681
+	 * @throws ExpectationFailedException
682
+	 */
683
+	public static function assertStringNotEqualsFile(string $expectedFile, string $actualString, string $message = ''): void
684
+	{
685
+		static::assertFileExists($expectedFile, $message);
686
+
687
+		$constraint = new LogicalNot(
688
+			new IsEqual(file_get_contents($expectedFile))
689
+		);
690
+
691
+		static::assertThat($actualString, $constraint, $message);
692
+	}
693
+
694
+	/**
695
+	 * Asserts that the contents of a string is not equal
696
+	 * to the contents of a file (canonicalizing).
697
+	 *
698
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
699
+	 * @throws ExpectationFailedException
700
+	 */
701
+	public static function assertStringNotEqualsFileCanonicalizing(string $expectedFile, string $actualString, string $message = ''): void
702
+	{
703
+		static::assertFileExists($expectedFile, $message);
704
+
705
+		$constraint = new LogicalNot(
706
+			new IsEqualCanonicalizing(file_get_contents($expectedFile))
707
+		);
708
+
709
+		static::assertThat($actualString, $constraint, $message);
710
+	}
711
+
712
+	/**
713
+	 * Asserts that the contents of a string is not equal
714
+	 * to the contents of a file (ignoring case).
715
+	 *
716
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
717
+	 * @throws ExpectationFailedException
718
+	 */
719
+	public static function assertStringNotEqualsFileIgnoringCase(string $expectedFile, string $actualString, string $message = ''): void
720
+	{
721
+		static::assertFileExists($expectedFile, $message);
722
+
723
+		$constraint = new LogicalNot(
724
+			new IsEqualIgnoringCase(file_get_contents($expectedFile))
725
+		);
726
+
727
+		static::assertThat($actualString, $constraint, $message);
728
+	}
729
+
730
+	/**
731
+	 * Asserts that a file/dir is readable.
732
+	 *
733
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
734
+	 * @throws ExpectationFailedException
735
+	 */
736
+	public static function assertIsReadable(string $filename, string $message = ''): void
737
+	{
738
+		static::assertThat($filename, new IsReadable, $message);
739
+	}
740
+
741
+	/**
742
+	 * Asserts that a file/dir exists and is not readable.
743
+	 *
744
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
745
+	 * @throws ExpectationFailedException
746
+	 */
747
+	public static function assertIsNotReadable(string $filename, string $message = ''): void
748
+	{
749
+		static::assertThat($filename, new LogicalNot(new IsReadable), $message);
750
+	}
751
+
752
+	/**
753
+	 * Asserts that a file/dir exists and is not readable.
754
+	 *
755
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
756
+	 * @throws ExpectationFailedException
757
+	 *
758
+	 * @codeCoverageIgnore
759
+	 *
760
+	 * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4062
761
+	 */
762
+	public static function assertNotIsReadable(string $filename, string $message = ''): void
763
+	{
764
+		self::createWarning('assertNotIsReadable() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertIsNotReadable() instead.');
765
+
766
+		static::assertThat($filename, new LogicalNot(new IsReadable), $message);
767
+	}
768
+
769
+	/**
770
+	 * Asserts that a file/dir exists and is writable.
771
+	 *
772
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
773
+	 * @throws ExpectationFailedException
774
+	 */
775
+	public static function assertIsWritable(string $filename, string $message = ''): void
776
+	{
777
+		static::assertThat($filename, new IsWritable, $message);
778
+	}
779
+
780
+	/**
781
+	 * Asserts that a file/dir exists and is not writable.
782
+	 *
783
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
784
+	 * @throws ExpectationFailedException
785
+	 */
786
+	public static function assertIsNotWritable(string $filename, string $message = ''): void
787
+	{
788
+		static::assertThat($filename, new LogicalNot(new IsWritable), $message);
789
+	}
790
+
791
+	/**
792
+	 * Asserts that a file/dir exists and is not writable.
793
+	 *
794
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
795
+	 * @throws ExpectationFailedException
796
+	 *
797
+	 * @codeCoverageIgnore
798
+	 *
799
+	 * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4065
800
+	 */
801
+	public static function assertNotIsWritable(string $filename, string $message = ''): void
802
+	{
803
+		self::createWarning('assertNotIsWritable() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertIsNotWritable() instead.');
804
+
805
+		static::assertThat($filename, new LogicalNot(new IsWritable), $message);
806
+	}
807
+
808
+	/**
809
+	 * Asserts that a directory exists.
810
+	 *
811
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
812
+	 * @throws ExpectationFailedException
813
+	 */
814
+	public static function assertDirectoryExists(string $directory, string $message = ''): void
815
+	{
816
+		static::assertThat($directory, new DirectoryExists, $message);
817
+	}
818
+
819
+	/**
820
+	 * Asserts that a directory does not exist.
821
+	 *
822
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
823
+	 * @throws ExpectationFailedException
824
+	 */
825
+	public static function assertDirectoryDoesNotExist(string $directory, string $message = ''): void
826
+	{
827
+		static::assertThat($directory, new LogicalNot(new DirectoryExists), $message);
828
+	}
829
+
830
+	/**
831
+	 * Asserts that a directory does not exist.
832
+	 *
833
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
834
+	 * @throws ExpectationFailedException
835
+	 *
836
+	 * @codeCoverageIgnore
837
+	 *
838
+	 * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4068
839
+	 */
840
+	public static function assertDirectoryNotExists(string $directory, string $message = ''): void
841
+	{
842
+		self::createWarning('assertDirectoryNotExists() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertDirectoryDoesNotExist() instead.');
843
+
844
+		static::assertThat($directory, new LogicalNot(new DirectoryExists), $message);
845
+	}
846
+
847
+	/**
848
+	 * Asserts that a directory exists and is readable.
849
+	 *
850
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
851
+	 * @throws ExpectationFailedException
852
+	 */
853
+	public static function assertDirectoryIsReadable(string $directory, string $message = ''): void
854
+	{
855
+		self::assertDirectoryExists($directory, $message);
856
+		self::assertIsReadable($directory, $message);
857
+	}
858
+
859
+	/**
860
+	 * Asserts that a directory exists and is not readable.
861
+	 *
862
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
863
+	 * @throws ExpectationFailedException
864
+	 */
865
+	public static function assertDirectoryIsNotReadable(string $directory, string $message = ''): void
866
+	{
867
+		self::assertDirectoryExists($directory, $message);
868
+		self::assertIsNotReadable($directory, $message);
869
+	}
870
+
871
+	/**
872
+	 * Asserts that a directory exists and is not readable.
873
+	 *
874
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
875
+	 * @throws ExpectationFailedException
876
+	 *
877
+	 * @codeCoverageIgnore
878
+	 *
879
+	 * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4071
880
+	 */
881
+	public static function assertDirectoryNotIsReadable(string $directory, string $message = ''): void
882
+	{
883
+		self::createWarning('assertDirectoryNotIsReadable() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertDirectoryIsNotReadable() instead.');
884
+
885
+		self::assertDirectoryExists($directory, $message);
886
+		self::assertIsNotReadable($directory, $message);
887
+	}
888
+
889
+	/**
890
+	 * Asserts that a directory exists and is writable.
891
+	 *
892
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
893
+	 * @throws ExpectationFailedException
894
+	 */
895
+	public static function assertDirectoryIsWritable(string $directory, string $message = ''): void
896
+	{
897
+		self::assertDirectoryExists($directory, $message);
898
+		self::assertIsWritable($directory, $message);
899
+	}
900
+
901
+	/**
902
+	 * Asserts that a directory exists and is not writable.
903
+	 *
904
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
905
+	 * @throws ExpectationFailedException
906
+	 */
907
+	public static function assertDirectoryIsNotWritable(string $directory, string $message = ''): void
908
+	{
909
+		self::assertDirectoryExists($directory, $message);
910
+		self::assertIsNotWritable($directory, $message);
911
+	}
912
+
913
+	/**
914
+	 * Asserts that a directory exists and is not writable.
915
+	 *
916
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
917
+	 * @throws ExpectationFailedException
918
+	 *
919
+	 * @codeCoverageIgnore
920
+	 *
921
+	 * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4074
922
+	 */
923
+	public static function assertDirectoryNotIsWritable(string $directory, string $message = ''): void
924
+	{
925
+		self::createWarning('assertDirectoryNotIsWritable() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertDirectoryIsNotWritable() instead.');
926
+
927
+		self::assertDirectoryExists($directory, $message);
928
+		self::assertIsNotWritable($directory, $message);
929
+	}
930
+
931
+	/**
932
+	 * Asserts that a file exists.
933
+	 *
934
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
935
+	 * @throws ExpectationFailedException
936
+	 */
937
+	public static function assertFileExists(string $filename, string $message = ''): void
938
+	{
939
+		static::assertThat($filename, new FileExists, $message);
940
+	}
941
+
942
+	/**
943
+	 * Asserts that a file does not exist.
944
+	 *
945
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
946
+	 * @throws ExpectationFailedException
947
+	 */
948
+	public static function assertFileDoesNotExist(string $filename, string $message = ''): void
949
+	{
950
+		static::assertThat($filename, new LogicalNot(new FileExists), $message);
951
+	}
952
+
953
+	/**
954
+	 * Asserts that a file does not exist.
955
+	 *
956
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
957
+	 * @throws ExpectationFailedException
958
+	 *
959
+	 * @codeCoverageIgnore
960
+	 *
961
+	 * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4077
962
+	 */
963
+	public static function assertFileNotExists(string $filename, string $message = ''): void
964
+	{
965
+		self::createWarning('assertFileNotExists() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertFileDoesNotExist() instead.');
966
+
967
+		static::assertThat($filename, new LogicalNot(new FileExists), $message);
968
+	}
969
+
970
+	/**
971
+	 * Asserts that a file exists and is readable.
972
+	 *
973
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
974
+	 * @throws ExpectationFailedException
975
+	 */
976
+	public static function assertFileIsReadable(string $file, string $message = ''): void
977
+	{
978
+		self::assertFileExists($file, $message);
979
+		self::assertIsReadable($file, $message);
980
+	}
981
+
982
+	/**
983
+	 * Asserts that a file exists and is not readable.
984
+	 *
985
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
986
+	 * @throws ExpectationFailedException
987
+	 */
988
+	public static function assertFileIsNotReadable(string $file, string $message = ''): void
989
+	{
990
+		self::assertFileExists($file, $message);
991
+		self::assertIsNotReadable($file, $message);
992
+	}
993
+
994
+	/**
995
+	 * Asserts that a file exists and is not readable.
996
+	 *
997
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
998
+	 * @throws ExpectationFailedException
999
+	 *
1000
+	 * @codeCoverageIgnore
1001
+	 *
1002
+	 * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4080
1003
+	 */
1004
+	public static function assertFileNotIsReadable(string $file, string $message = ''): void
1005
+	{
1006
+		self::createWarning('assertFileNotIsReadable() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertFileIsNotReadable() instead.');
1007
+
1008
+		self::assertFileExists($file, $message);
1009
+		self::assertIsNotReadable($file, $message);
1010
+	}
1011
+
1012
+	/**
1013
+	 * Asserts that a file exists and is writable.
1014
+	 *
1015
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1016
+	 * @throws ExpectationFailedException
1017
+	 */
1018
+	public static function assertFileIsWritable(string $file, string $message = ''): void
1019
+	{
1020
+		self::assertFileExists($file, $message);
1021
+		self::assertIsWritable($file, $message);
1022
+	}
1023
+
1024
+	/**
1025
+	 * Asserts that a file exists and is not writable.
1026
+	 *
1027
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1028
+	 * @throws ExpectationFailedException
1029
+	 */
1030
+	public static function assertFileIsNotWritable(string $file, string $message = ''): void
1031
+	{
1032
+		self::assertFileExists($file, $message);
1033
+		self::assertIsNotWritable($file, $message);
1034
+	}
1035
+
1036
+	/**
1037
+	 * Asserts that a file exists and is not writable.
1038
+	 *
1039
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1040
+	 * @throws ExpectationFailedException
1041
+	 *
1042
+	 * @codeCoverageIgnore
1043
+	 *
1044
+	 * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4083
1045
+	 */
1046
+	public static function assertFileNotIsWritable(string $file, string $message = ''): void
1047
+	{
1048
+		self::createWarning('assertFileNotIsWritable() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertFileIsNotWritable() instead.');
1049
+
1050
+		self::assertFileExists($file, $message);
1051
+		self::assertIsNotWritable($file, $message);
1052
+	}
1053
+
1054
+	/**
1055
+	 * Asserts that a condition is true.
1056
+	 *
1057
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1058
+	 * @throws ExpectationFailedException
1059
+	 *
1060
+	 * @psalm-assert true $condition
1061
+	 */
1062
+	public static function assertTrue($condition, string $message = ''): void
1063
+	{
1064
+		static::assertThat($condition, static::isTrue(), $message);
1065
+	}
1066
+
1067
+	/**
1068
+	 * Asserts that a condition is not true.
1069
+	 *
1070
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1071
+	 * @throws ExpectationFailedException
1072
+	 *
1073
+	 * @psalm-assert !true $condition
1074
+	 */
1075
+	public static function assertNotTrue($condition, string $message = ''): void
1076
+	{
1077
+		static::assertThat($condition, static::logicalNot(static::isTrue()), $message);
1078
+	}
1079
+
1080
+	/**
1081
+	 * Asserts that a condition is false.
1082
+	 *
1083
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1084
+	 * @throws ExpectationFailedException
1085
+	 *
1086
+	 * @psalm-assert false $condition
1087
+	 */
1088
+	public static function assertFalse($condition, string $message = ''): void
1089
+	{
1090
+		static::assertThat($condition, static::isFalse(), $message);
1091
+	}
1092
+
1093
+	/**
1094
+	 * Asserts that a condition is not false.
1095
+	 *
1096
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1097
+	 * @throws ExpectationFailedException
1098
+	 *
1099
+	 * @psalm-assert !false $condition
1100
+	 */
1101
+	public static function assertNotFalse($condition, string $message = ''): void
1102
+	{
1103
+		static::assertThat($condition, static::logicalNot(static::isFalse()), $message);
1104
+	}
1105
+
1106
+	/**
1107
+	 * Asserts that a variable is null.
1108
+	 *
1109
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1110
+	 * @throws ExpectationFailedException
1111
+	 *
1112
+	 * @psalm-assert null $actual
1113
+	 */
1114
+	public static function assertNull($actual, string $message = ''): void
1115
+	{
1116
+		static::assertThat($actual, static::isNull(), $message);
1117
+	}
1118
+
1119
+	/**
1120
+	 * Asserts that a variable is not null.
1121
+	 *
1122
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1123
+	 * @throws ExpectationFailedException
1124
+	 *
1125
+	 * @psalm-assert !null $actual
1126
+	 */
1127
+	public static function assertNotNull($actual, string $message = ''): void
1128
+	{
1129
+		static::assertThat($actual, static::logicalNot(static::isNull()), $message);
1130
+	}
1131
+
1132
+	/**
1133
+	 * Asserts that a variable is finite.
1134
+	 *
1135
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1136
+	 * @throws ExpectationFailedException
1137
+	 */
1138
+	public static function assertFinite($actual, string $message = ''): void
1139
+	{
1140
+		static::assertThat($actual, static::isFinite(), $message);
1141
+	}
1142
+
1143
+	/**
1144
+	 * Asserts that a variable is infinite.
1145
+	 *
1146
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1147
+	 * @throws ExpectationFailedException
1148
+	 */
1149
+	public static function assertInfinite($actual, string $message = ''): void
1150
+	{
1151
+		static::assertThat($actual, static::isInfinite(), $message);
1152
+	}
1153
+
1154
+	/**
1155
+	 * Asserts that a variable is nan.
1156
+	 *
1157
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1158
+	 * @throws ExpectationFailedException
1159
+	 */
1160
+	public static function assertNan($actual, string $message = ''): void
1161
+	{
1162
+		static::assertThat($actual, static::isNan(), $message);
1163
+	}
1164
+
1165
+	/**
1166
+	 * Asserts that a class has a specified attribute.
1167
+	 *
1168
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1169
+	 * @throws Exception
1170
+	 * @throws ExpectationFailedException
1171
+	 */
1172
+	public static function assertClassHasAttribute(string $attributeName, string $className, string $message = ''): void
1173
+	{
1174
+		if (!self::isValidClassAttributeName($attributeName)) {
1175
+			throw InvalidArgumentException::create(1, 'valid attribute name');
1176
+		}
1177
+
1178
+		if (!class_exists($className)) {
1179
+			throw InvalidArgumentException::create(2, 'class name');
1180
+		}
1181
+
1182
+		static::assertThat($className, new ClassHasAttribute($attributeName), $message);
1183
+	}
1184
+
1185
+	/**
1186
+	 * Asserts that a class does not have a specified attribute.
1187
+	 *
1188
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1189
+	 * @throws Exception
1190
+	 * @throws ExpectationFailedException
1191
+	 */
1192
+	public static function assertClassNotHasAttribute(string $attributeName, string $className, string $message = ''): void
1193
+	{
1194
+		if (!self::isValidClassAttributeName($attributeName)) {
1195
+			throw InvalidArgumentException::create(1, 'valid attribute name');
1196
+		}
1197
+
1198
+		if (!class_exists($className)) {
1199
+			throw InvalidArgumentException::create(2, 'class name');
1200
+		}
1201
+
1202
+		static::assertThat(
1203
+			$className,
1204
+			new LogicalNot(
1205
+				new ClassHasAttribute($attributeName)
1206
+			),
1207
+			$message
1208
+		);
1209
+	}
1210
+
1211
+	/**
1212
+	 * Asserts that a class has a specified static attribute.
1213
+	 *
1214
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1215
+	 * @throws Exception
1216
+	 * @throws ExpectationFailedException
1217
+	 */
1218
+	public static function assertClassHasStaticAttribute(string $attributeName, string $className, string $message = ''): void
1219
+	{
1220
+		if (!self::isValidClassAttributeName($attributeName)) {
1221
+			throw InvalidArgumentException::create(1, 'valid attribute name');
1222
+		}
1223
+
1224
+		if (!class_exists($className)) {
1225
+			throw InvalidArgumentException::create(2, 'class name');
1226
+		}
1227
+
1228
+		static::assertThat(
1229
+			$className,
1230
+			new ClassHasStaticAttribute($attributeName),
1231
+			$message
1232
+		);
1233
+	}
1234
+
1235
+	/**
1236
+	 * Asserts that a class does not have a specified static attribute.
1237
+	 *
1238
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1239
+	 * @throws Exception
1240
+	 * @throws ExpectationFailedException
1241
+	 */
1242
+	public static function assertClassNotHasStaticAttribute(string $attributeName, string $className, string $message = ''): void
1243
+	{
1244
+		if (!self::isValidClassAttributeName($attributeName)) {
1245
+			throw InvalidArgumentException::create(1, 'valid attribute name');
1246
+		}
1247
+
1248
+		if (!class_exists($className)) {
1249
+			throw InvalidArgumentException::create(2, 'class name');
1250
+		}
1251
+
1252
+		static::assertThat(
1253
+			$className,
1254
+			new LogicalNot(
1255
+				new ClassHasStaticAttribute($attributeName)
1256
+			),
1257
+			$message
1258
+		);
1259
+	}
1260
+
1261
+	/**
1262
+	 * Asserts that an object has a specified attribute.
1263
+	 *
1264
+	 * @param object $object
1265
+	 *
1266
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1267
+	 * @throws Exception
1268
+	 * @throws ExpectationFailedException
1269
+	 */
1270
+	public static function assertObjectHasAttribute(string $attributeName, $object, string $message = ''): void
1271
+	{
1272
+		if (!self::isValidObjectAttributeName($attributeName)) {
1273
+			throw InvalidArgumentException::create(1, 'valid attribute name');
1274
+		}
1275
+
1276
+		if (!is_object($object)) {
1277
+			throw InvalidArgumentException::create(2, 'object');
1278
+		}
1279
+
1280
+		static::assertThat(
1281
+			$object,
1282
+			new ObjectHasAttribute($attributeName),
1283
+			$message
1284
+		);
1285
+	}
1286
+
1287
+	/**
1288
+	 * Asserts that an object does not have a specified attribute.
1289
+	 *
1290
+	 * @param object $object
1291
+	 *
1292
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1293
+	 * @throws Exception
1294
+	 * @throws ExpectationFailedException
1295
+	 */
1296
+	public static function assertObjectNotHasAttribute(string $attributeName, $object, string $message = ''): void
1297
+	{
1298
+		if (!self::isValidObjectAttributeName($attributeName)) {
1299
+			throw InvalidArgumentException::create(1, 'valid attribute name');
1300
+		}
1301
+
1302
+		if (!is_object($object)) {
1303
+			throw InvalidArgumentException::create(2, 'object');
1304
+		}
1305
+
1306
+		static::assertThat(
1307
+			$object,
1308
+			new LogicalNot(
1309
+				new ObjectHasAttribute($attributeName)
1310
+			),
1311
+			$message
1312
+		);
1313
+	}
1314
+
1315
+	/**
1316
+	 * Asserts that two variables have the same type and value.
1317
+	 * Used on objects, it asserts that two variables reference
1318
+	 * the same object.
1319
+	 *
1320
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1321
+	 * @throws ExpectationFailedException
1322
+	 *
1323
+	 * @psalm-template ExpectedType
1324
+	 *
1325
+	 * @psalm-param ExpectedType $expected
1326
+	 *
1327
+	 * @psalm-assert =ExpectedType $actual
1328
+	 */
1329
+	public static function assertSame($expected, $actual, string $message = ''): void
1330
+	{
1331
+		static::assertThat(
1332
+			$actual,
1333
+			new IsIdentical($expected),
1334
+			$message
1335
+		);
1336
+	}
1337
+
1338
+	/**
1339
+	 * Asserts that two variables do not have the same type and value.
1340
+	 * Used on objects, it asserts that two variables do not reference
1341
+	 * the same object.
1342
+	 *
1343
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1344
+	 * @throws ExpectationFailedException
1345
+	 */
1346
+	public static function assertNotSame($expected, $actual, string $message = ''): void
1347
+	{
1348
+		if (is_bool($expected) && is_bool($actual)) {
1349
+			static::assertNotEquals($expected, $actual, $message);
1350
+		}
1351
+
1352
+		static::assertThat(
1353
+			$actual,
1354
+			new LogicalNot(
1355
+				new IsIdentical($expected)
1356
+			),
1357
+			$message
1358
+		);
1359
+	}
1360
+
1361
+	/**
1362
+	 * Asserts that a variable is of a given type.
1363
+	 *
1364
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1365
+	 * @throws Exception
1366
+	 * @throws ExpectationFailedException
1367
+	 *
1368
+	 * @psalm-template ExpectedType of object
1369
+	 *
1370
+	 * @psalm-param class-string<ExpectedType> $expected
1371
+	 *
1372
+	 * @psalm-assert =ExpectedType $actual
1373
+	 */
1374
+	public static function assertInstanceOf(string $expected, $actual, string $message = ''): void
1375
+	{
1376
+		if (!class_exists($expected) && !interface_exists($expected)) {
1377
+			throw InvalidArgumentException::create(1, 'class or interface name');
1378
+		}
1379
+
1380
+		static::assertThat(
1381
+			$actual,
1382
+			new IsInstanceOf($expected),
1383
+			$message
1384
+		);
1385
+	}
1386
+
1387
+	/**
1388
+	 * Asserts that a variable is not of a given type.
1389
+	 *
1390
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1391
+	 * @throws Exception
1392
+	 * @throws ExpectationFailedException
1393
+	 *
1394
+	 * @psalm-template ExpectedType of object
1395
+	 *
1396
+	 * @psalm-param class-string<ExpectedType> $expected
1397
+	 *
1398
+	 * @psalm-assert !ExpectedType $actual
1399
+	 */
1400
+	public static function assertNotInstanceOf(string $expected, $actual, string $message = ''): void
1401
+	{
1402
+		if (!class_exists($expected) && !interface_exists($expected)) {
1403
+			throw InvalidArgumentException::create(1, 'class or interface name');
1404
+		}
1405
+
1406
+		static::assertThat(
1407
+			$actual,
1408
+			new LogicalNot(
1409
+				new IsInstanceOf($expected)
1410
+			),
1411
+			$message
1412
+		);
1413
+	}
1414
+
1415
+	/**
1416
+	 * Asserts that a variable is of type array.
1417
+	 *
1418
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1419
+	 * @throws ExpectationFailedException
1420
+	 *
1421
+	 * @psalm-assert array $actual
1422
+	 */
1423
+	public static function assertIsArray($actual, string $message = ''): void
1424
+	{
1425
+		static::assertThat(
1426
+			$actual,
1427
+			new IsType(IsType::TYPE_ARRAY),
1428
+			$message
1429
+		);
1430
+	}
1431
+
1432
+	/**
1433
+	 * Asserts that a variable is of type bool.
1434
+	 *
1435
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1436
+	 * @throws ExpectationFailedException
1437
+	 *
1438
+	 * @psalm-assert bool $actual
1439
+	 */
1440
+	public static function assertIsBool($actual, string $message = ''): void
1441
+	{
1442
+		static::assertThat(
1443
+			$actual,
1444
+			new IsType(IsType::TYPE_BOOL),
1445
+			$message
1446
+		);
1447
+	}
1448
+
1449
+	/**
1450
+	 * Asserts that a variable is of type float.
1451
+	 *
1452
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1453
+	 * @throws ExpectationFailedException
1454
+	 *
1455
+	 * @psalm-assert float $actual
1456
+	 */
1457
+	public static function assertIsFloat($actual, string $message = ''): void
1458
+	{
1459
+		static::assertThat(
1460
+			$actual,
1461
+			new IsType(IsType::TYPE_FLOAT),
1462
+			$message
1463
+		);
1464
+	}
1465
+
1466
+	/**
1467
+	 * Asserts that a variable is of type int.
1468
+	 *
1469
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1470
+	 * @throws ExpectationFailedException
1471
+	 *
1472
+	 * @psalm-assert int $actual
1473
+	 */
1474
+	public static function assertIsInt($actual, string $message = ''): void
1475
+	{
1476
+		static::assertThat(
1477
+			$actual,
1478
+			new IsType(IsType::TYPE_INT),
1479
+			$message
1480
+		);
1481
+	}
1482
+
1483
+	/**
1484
+	 * Asserts that a variable is of type numeric.
1485
+	 *
1486
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1487
+	 * @throws ExpectationFailedException
1488
+	 *
1489
+	 * @psalm-assert numeric $actual
1490
+	 */
1491
+	public static function assertIsNumeric($actual, string $message = ''): void
1492
+	{
1493
+		static::assertThat(
1494
+			$actual,
1495
+			new IsType(IsType::TYPE_NUMERIC),
1496
+			$message
1497
+		);
1498
+	}
1499
+
1500
+	/**
1501
+	 * Asserts that a variable is of type object.
1502
+	 *
1503
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1504
+	 * @throws ExpectationFailedException
1505
+	 *
1506
+	 * @psalm-assert object $actual
1507
+	 */
1508
+	public static function assertIsObject($actual, string $message = ''): void
1509
+	{
1510
+		static::assertThat(
1511
+			$actual,
1512
+			new IsType(IsType::TYPE_OBJECT),
1513
+			$message
1514
+		);
1515
+	}
1516
+
1517
+	/**
1518
+	 * Asserts that a variable is of type resource.
1519
+	 *
1520
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1521
+	 * @throws ExpectationFailedException
1522
+	 *
1523
+	 * @psalm-assert resource $actual
1524
+	 */
1525
+	public static function assertIsResource($actual, string $message = ''): void
1526
+	{
1527
+		static::assertThat(
1528
+			$actual,
1529
+			new IsType(IsType::TYPE_RESOURCE),
1530
+			$message
1531
+		);
1532
+	}
1533
+
1534
+	/**
1535
+	 * Asserts that a variable is of type resource and is closed.
1536
+	 *
1537
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1538
+	 * @throws ExpectationFailedException
1539
+	 *
1540
+	 * @psalm-assert resource $actual
1541
+	 */
1542
+	public static function assertIsClosedResource($actual, string $message = ''): void
1543
+	{
1544
+		static::assertThat(
1545
+			$actual,
1546
+			new IsType(IsType::TYPE_CLOSED_RESOURCE),
1547
+			$message
1548
+		);
1549
+	}
1550
+
1551
+	/**
1552
+	 * Asserts that a variable is of type string.
1553
+	 *
1554
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1555
+	 * @throws ExpectationFailedException
1556
+	 *
1557
+	 * @psalm-assert string $actual
1558
+	 */
1559
+	public static function assertIsString($actual, string $message = ''): void
1560
+	{
1561
+		static::assertThat(
1562
+			$actual,
1563
+			new IsType(IsType::TYPE_STRING),
1564
+			$message
1565
+		);
1566
+	}
1567
+
1568
+	/**
1569
+	 * Asserts that a variable is of type scalar.
1570
+	 *
1571
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1572
+	 * @throws ExpectationFailedException
1573
+	 *
1574
+	 * @psalm-assert scalar $actual
1575
+	 */
1576
+	public static function assertIsScalar($actual, string $message = ''): void
1577
+	{
1578
+		static::assertThat(
1579
+			$actual,
1580
+			new IsType(IsType::TYPE_SCALAR),
1581
+			$message
1582
+		);
1583
+	}
1584
+
1585
+	/**
1586
+	 * Asserts that a variable is of type callable.
1587
+	 *
1588
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1589
+	 * @throws ExpectationFailedException
1590
+	 *
1591
+	 * @psalm-assert callable $actual
1592
+	 */
1593
+	public static function assertIsCallable($actual, string $message = ''): void
1594
+	{
1595
+		static::assertThat(
1596
+			$actual,
1597
+			new IsType(IsType::TYPE_CALLABLE),
1598
+			$message
1599
+		);
1600
+	}
1601
+
1602
+	/**
1603
+	 * Asserts that a variable is of type iterable.
1604
+	 *
1605
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1606
+	 * @throws ExpectationFailedException
1607
+	 *
1608
+	 * @psalm-assert iterable $actual
1609
+	 */
1610
+	public static function assertIsIterable($actual, string $message = ''): void
1611
+	{
1612
+		static::assertThat(
1613
+			$actual,
1614
+			new IsType(IsType::TYPE_ITERABLE),
1615
+			$message
1616
+		);
1617
+	}
1618
+
1619
+	/**
1620
+	 * Asserts that a variable is not of type array.
1621
+	 *
1622
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1623
+	 * @throws ExpectationFailedException
1624
+	 *
1625
+	 * @psalm-assert !array $actual
1626
+	 */
1627
+	public static function assertIsNotArray($actual, string $message = ''): void
1628
+	{
1629
+		static::assertThat(
1630
+			$actual,
1631
+			new LogicalNot(new IsType(IsType::TYPE_ARRAY)),
1632
+			$message
1633
+		);
1634
+	}
1635
+
1636
+	/**
1637
+	 * Asserts that a variable is not of type bool.
1638
+	 *
1639
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1640
+	 * @throws ExpectationFailedException
1641
+	 *
1642
+	 * @psalm-assert !bool $actual
1643
+	 */
1644
+	public static function assertIsNotBool($actual, string $message = ''): void
1645
+	{
1646
+		static::assertThat(
1647
+			$actual,
1648
+			new LogicalNot(new IsType(IsType::TYPE_BOOL)),
1649
+			$message
1650
+		);
1651
+	}
1652
+
1653
+	/**
1654
+	 * Asserts that a variable is not of type float.
1655
+	 *
1656
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1657
+	 * @throws ExpectationFailedException
1658
+	 *
1659
+	 * @psalm-assert !float $actual
1660
+	 */
1661
+	public static function assertIsNotFloat($actual, string $message = ''): void
1662
+	{
1663
+		static::assertThat(
1664
+			$actual,
1665
+			new LogicalNot(new IsType(IsType::TYPE_FLOAT)),
1666
+			$message
1667
+		);
1668
+	}
1669
+
1670
+	/**
1671
+	 * Asserts that a variable is not of type int.
1672
+	 *
1673
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1674
+	 * @throws ExpectationFailedException
1675
+	 *
1676
+	 * @psalm-assert !int $actual
1677
+	 */
1678
+	public static function assertIsNotInt($actual, string $message = ''): void
1679
+	{
1680
+		static::assertThat(
1681
+			$actual,
1682
+			new LogicalNot(new IsType(IsType::TYPE_INT)),
1683
+			$message
1684
+		);
1685
+	}
1686
+
1687
+	/**
1688
+	 * Asserts that a variable is not of type numeric.
1689
+	 *
1690
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1691
+	 * @throws ExpectationFailedException
1692
+	 *
1693
+	 * @psalm-assert !numeric $actual
1694
+	 */
1695
+	public static function assertIsNotNumeric($actual, string $message = ''): void
1696
+	{
1697
+		static::assertThat(
1698
+			$actual,
1699
+			new LogicalNot(new IsType(IsType::TYPE_NUMERIC)),
1700
+			$message
1701
+		);
1702
+	}
1703
+
1704
+	/**
1705
+	 * Asserts that a variable is not of type object.
1706
+	 *
1707
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1708
+	 * @throws ExpectationFailedException
1709
+	 *
1710
+	 * @psalm-assert !object $actual
1711
+	 */
1712
+	public static function assertIsNotObject($actual, string $message = ''): void
1713
+	{
1714
+		static::assertThat(
1715
+			$actual,
1716
+			new LogicalNot(new IsType(IsType::TYPE_OBJECT)),
1717
+			$message
1718
+		);
1719
+	}
1720
+
1721
+	/**
1722
+	 * Asserts that a variable is not of type resource.
1723
+	 *
1724
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1725
+	 * @throws ExpectationFailedException
1726
+	 *
1727
+	 * @psalm-assert !resource $actual
1728
+	 */
1729
+	public static function assertIsNotResource($actual, string $message = ''): void
1730
+	{
1731
+		static::assertThat(
1732
+			$actual,
1733
+			new LogicalNot(new IsType(IsType::TYPE_RESOURCE)),
1734
+			$message
1735
+		);
1736
+	}
1737
+
1738
+	/**
1739
+	 * Asserts that a variable is not of type resource.
1740
+	 *
1741
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1742
+	 * @throws ExpectationFailedException
1743
+	 *
1744
+	 * @psalm-assert !resource $actual
1745
+	 */
1746
+	public static function assertIsNotClosedResource($actual, string $message = ''): void
1747
+	{
1748
+		static::assertThat(
1749
+			$actual,
1750
+			new LogicalNot(new IsType(IsType::TYPE_CLOSED_RESOURCE)),
1751
+			$message
1752
+		);
1753
+	}
1754
+
1755
+	/**
1756
+	 * Asserts that a variable is not of type string.
1757
+	 *
1758
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1759
+	 * @throws ExpectationFailedException
1760
+	 *
1761
+	 * @psalm-assert !string $actual
1762
+	 */
1763
+	public static function assertIsNotString($actual, string $message = ''): void
1764
+	{
1765
+		static::assertThat(
1766
+			$actual,
1767
+			new LogicalNot(new IsType(IsType::TYPE_STRING)),
1768
+			$message
1769
+		);
1770
+	}
1771
+
1772
+	/**
1773
+	 * Asserts that a variable is not of type scalar.
1774
+	 *
1775
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1776
+	 * @throws ExpectationFailedException
1777
+	 *
1778
+	 * @psalm-assert !scalar $actual
1779
+	 */
1780
+	public static function assertIsNotScalar($actual, string $message = ''): void
1781
+	{
1782
+		static::assertThat(
1783
+			$actual,
1784
+			new LogicalNot(new IsType(IsType::TYPE_SCALAR)),
1785
+			$message
1786
+		);
1787
+	}
1788
+
1789
+	/**
1790
+	 * Asserts that a variable is not of type callable.
1791
+	 *
1792
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1793
+	 * @throws ExpectationFailedException
1794
+	 *
1795
+	 * @psalm-assert !callable $actual
1796
+	 */
1797
+	public static function assertIsNotCallable($actual, string $message = ''): void
1798
+	{
1799
+		static::assertThat(
1800
+			$actual,
1801
+			new LogicalNot(new IsType(IsType::TYPE_CALLABLE)),
1802
+			$message
1803
+		);
1804
+	}
1805
+
1806
+	/**
1807
+	 * Asserts that a variable is not of type iterable.
1808
+	 *
1809
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1810
+	 * @throws ExpectationFailedException
1811
+	 *
1812
+	 * @psalm-assert !iterable $actual
1813
+	 */
1814
+	public static function assertIsNotIterable($actual, string $message = ''): void
1815
+	{
1816
+		static::assertThat(
1817
+			$actual,
1818
+			new LogicalNot(new IsType(IsType::TYPE_ITERABLE)),
1819
+			$message
1820
+		);
1821
+	}
1822
+
1823
+	/**
1824
+	 * Asserts that a string matches a given regular expression.
1825
+	 *
1826
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1827
+	 * @throws ExpectationFailedException
1828
+	 */
1829
+	public static function assertMatchesRegularExpression(string $pattern, string $string, string $message = ''): void
1830
+	{
1831
+		static::assertThat($string, new RegularExpression($pattern), $message);
1832
+	}
1833
+
1834
+	/**
1835
+	 * Asserts that a string matches a given regular expression.
1836
+	 *
1837
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1838
+	 * @throws ExpectationFailedException
1839
+	 *
1840
+	 * @codeCoverageIgnore
1841
+	 *
1842
+	 * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4086
1843
+	 */
1844
+	public static function assertRegExp(string $pattern, string $string, string $message = ''): void
1845
+	{
1846
+		self::createWarning('assertRegExp() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertMatchesRegularExpression() instead.');
1847
+
1848
+		static::assertThat($string, new RegularExpression($pattern), $message);
1849
+	}
1850
+
1851
+	/**
1852
+	 * Asserts that a string does not match a given regular expression.
1853
+	 *
1854
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1855
+	 * @throws ExpectationFailedException
1856
+	 */
1857
+	public static function assertDoesNotMatchRegularExpression(string $pattern, string $string, string $message = ''): void
1858
+	{
1859
+		static::assertThat(
1860
+			$string,
1861
+			new LogicalNot(
1862
+				new RegularExpression($pattern)
1863
+			),
1864
+			$message
1865
+		);
1866
+	}
1867
+
1868
+	/**
1869
+	 * Asserts that a string does not match a given regular expression.
1870
+	 *
1871
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1872
+	 * @throws ExpectationFailedException
1873
+	 *
1874
+	 * @codeCoverageIgnore
1875
+	 *
1876
+	 * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4089
1877
+	 */
1878
+	public static function assertNotRegExp(string $pattern, string $string, string $message = ''): void
1879
+	{
1880
+		self::createWarning('assertNotRegExp() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertDoesNotMatchRegularExpression() instead.');
1881
+
1882
+		static::assertThat(
1883
+			$string,
1884
+			new LogicalNot(
1885
+				new RegularExpression($pattern)
1886
+			),
1887
+			$message
1888
+		);
1889
+	}
1890
+
1891
+	/**
1892
+	 * Assert that the size of two arrays (or `Countable` or `Traversable` objects)
1893
+	 * is the same.
1894
+	 *
1895
+	 * @param Countable|iterable $expected
1896
+	 * @param Countable|iterable $actual
1897
+	 *
1898
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1899
+	 * @throws Exception
1900
+	 * @throws ExpectationFailedException
1901
+	 */
1902
+	public static function assertSameSize($expected, $actual, string $message = ''): void
1903
+	{
1904
+		if (!$expected instanceof Countable && !is_iterable($expected)) {
1905
+			throw InvalidArgumentException::create(1, 'countable or iterable');
1906
+		}
1907
+
1908
+		if (!$actual instanceof Countable && !is_iterable($actual)) {
1909
+			throw InvalidArgumentException::create(2, 'countable or iterable');
1910
+		}
1911
+
1912
+		static::assertThat(
1913
+			$actual,
1914
+			new SameSize($expected),
1915
+			$message
1916
+		);
1917
+	}
1918
+
1919
+	/**
1920
+	 * Assert that the size of two arrays (or `Countable` or `Traversable` objects)
1921
+	 * is not the same.
1922
+	 *
1923
+	 * @param Countable|iterable $expected
1924
+	 * @param Countable|iterable $actual
1925
+	 *
1926
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1927
+	 * @throws Exception
1928
+	 * @throws ExpectationFailedException
1929
+	 */
1930
+	public static function assertNotSameSize($expected, $actual, string $message = ''): void
1931
+	{
1932
+		if (!$expected instanceof Countable && !is_iterable($expected)) {
1933
+			throw InvalidArgumentException::create(1, 'countable or iterable');
1934
+		}
1935
+
1936
+		if (!$actual instanceof Countable && !is_iterable($actual)) {
1937
+			throw InvalidArgumentException::create(2, 'countable or iterable');
1938
+		}
1939
+
1940
+		static::assertThat(
1941
+			$actual,
1942
+			new LogicalNot(
1943
+				new SameSize($expected)
1944
+			),
1945
+			$message
1946
+		);
1947
+	}
1948
+
1949
+	/**
1950
+	 * Asserts that a string matches a given format string.
1951
+	 *
1952
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1953
+	 * @throws ExpectationFailedException
1954
+	 */
1955
+	public static function assertStringMatchesFormat(string $format, string $string, string $message = ''): void
1956
+	{
1957
+		static::assertThat($string, new StringMatchesFormatDescription($format), $message);
1958
+	}
1959
+
1960
+	/**
1961
+	 * Asserts that a string does not match a given format string.
1962
+	 *
1963
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1964
+	 * @throws ExpectationFailedException
1965
+	 */
1966
+	public static function assertStringNotMatchesFormat(string $format, string $string, string $message = ''): void
1967
+	{
1968
+		static::assertThat(
1969
+			$string,
1970
+			new LogicalNot(
1971
+				new StringMatchesFormatDescription($format)
1972
+			),
1973
+			$message
1974
+		);
1975
+	}
1976
+
1977
+	/**
1978
+	 * Asserts that a string matches a given format file.
1979
+	 *
1980
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
1981
+	 * @throws ExpectationFailedException
1982
+	 */
1983
+	public static function assertStringMatchesFormatFile(string $formatFile, string $string, string $message = ''): void
1984
+	{
1985
+		static::assertFileExists($formatFile, $message);
1986
+
1987
+		static::assertThat(
1988
+			$string,
1989
+			new StringMatchesFormatDescription(
1990
+				file_get_contents($formatFile)
1991
+			),
1992
+			$message
1993
+		);
1994
+	}
1995
+
1996
+	/**
1997
+	 * Asserts that a string does not match a given format string.
1998
+	 *
1999
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2000
+	 * @throws ExpectationFailedException
2001
+	 */
2002
+	public static function assertStringNotMatchesFormatFile(string $formatFile, string $string, string $message = ''): void
2003
+	{
2004
+		static::assertFileExists($formatFile, $message);
2005
+
2006
+		static::assertThat(
2007
+			$string,
2008
+			new LogicalNot(
2009
+				new StringMatchesFormatDescription(
2010
+					file_get_contents($formatFile)
2011
+				)
2012
+			),
2013
+			$message
2014
+		);
2015
+	}
2016
+
2017
+	/**
2018
+	 * Asserts that a string starts with a given prefix.
2019
+	 *
2020
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2021
+	 * @throws ExpectationFailedException
2022
+	 */
2023
+	public static function assertStringStartsWith(string $prefix, string $string, string $message = ''): void
2024
+	{
2025
+		static::assertThat($string, new StringStartsWith($prefix), $message);
2026
+	}
2027
+
2028
+	/**
2029
+	 * Asserts that a string starts not with a given prefix.
2030
+	 *
2031
+	 * @param string $prefix
2032
+	 * @param string $string
2033
+	 *
2034
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2035
+	 * @throws ExpectationFailedException
2036
+	 */
2037
+	public static function assertStringStartsNotWith($prefix, $string, string $message = ''): void
2038
+	{
2039
+		static::assertThat(
2040
+			$string,
2041
+			new LogicalNot(
2042
+				new StringStartsWith($prefix)
2043
+			),
2044
+			$message
2045
+		);
2046
+	}
2047
+
2048
+	/**
2049
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2050
+	 * @throws ExpectationFailedException
2051
+	 */
2052
+	public static function assertStringContainsString(string $needle, string $haystack, string $message = ''): void
2053
+	{
2054
+		$constraint = new StringContains($needle, false);
2055
+
2056
+		static::assertThat($haystack, $constraint, $message);
2057
+	}
2058
+
2059
+	/**
2060
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2061
+	 * @throws ExpectationFailedException
2062
+	 */
2063
+	public static function assertStringContainsStringIgnoringCase(string $needle, string $haystack, string $message = ''): void
2064
+	{
2065
+		$constraint = new StringContains($needle, true);
2066
+
2067
+		static::assertThat($haystack, $constraint, $message);
2068
+	}
2069
+
2070
+	/**
2071
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2072
+	 * @throws ExpectationFailedException
2073
+	 */
2074
+	public static function assertStringNotContainsString(string $needle, string $haystack, string $message = ''): void
2075
+	{
2076
+		$constraint = new LogicalNot(new StringContains($needle));
2077
+
2078
+		static::assertThat($haystack, $constraint, $message);
2079
+	}
2080
+
2081
+	/**
2082
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2083
+	 * @throws ExpectationFailedException
2084
+	 */
2085
+	public static function assertStringNotContainsStringIgnoringCase(string $needle, string $haystack, string $message = ''): void
2086
+	{
2087
+		$constraint = new LogicalNot(new StringContains($needle, true));
2088
+
2089
+		static::assertThat($haystack, $constraint, $message);
2090
+	}
2091
+
2092
+	/**
2093
+	 * Asserts that a string ends with a given suffix.
2094
+	 *
2095
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2096
+	 * @throws ExpectationFailedException
2097
+	 */
2098
+	public static function assertStringEndsWith(string $suffix, string $string, string $message = ''): void
2099
+	{
2100
+		static::assertThat($string, new StringEndsWith($suffix), $message);
2101
+	}
2102
+
2103
+	/**
2104
+	 * Asserts that a string ends not with a given suffix.
2105
+	 *
2106
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2107
+	 * @throws ExpectationFailedException
2108
+	 */
2109
+	public static function assertStringEndsNotWith(string $suffix, string $string, string $message = ''): void
2110
+	{
2111
+		static::assertThat(
2112
+			$string,
2113
+			new LogicalNot(
2114
+				new StringEndsWith($suffix)
2115
+			),
2116
+			$message
2117
+		);
2118
+	}
2119
+
2120
+	/**
2121
+	 * Asserts that two XML files are equal.
2122
+	 *
2123
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2124
+	 * @throws Exception
2125
+	 * @throws ExpectationFailedException
2126
+	 */
2127
+	public static function assertXmlFileEqualsXmlFile(string $expectedFile, string $actualFile, string $message = ''): void
2128
+	{
2129
+		$expected = (new XmlLoader)->loadFile($expectedFile);
2130
+		$actual   = (new XmlLoader)->loadFile($actualFile);
2131
+
2132
+		static::assertEquals($expected, $actual, $message);
2133
+	}
2134
+
2135
+	/**
2136
+	 * Asserts that two XML files are not equal.
2137
+	 *
2138
+	 * @throws \PHPUnit\Util\Exception
2139
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2140
+	 * @throws ExpectationFailedException
2141
+	 */
2142
+	public static function assertXmlFileNotEqualsXmlFile(string $expectedFile, string $actualFile, string $message = ''): void
2143
+	{
2144
+		$expected = (new XmlLoader)->loadFile($expectedFile);
2145
+		$actual   = (new XmlLoader)->loadFile($actualFile);
2146
+
2147
+		static::assertNotEquals($expected, $actual, $message);
2148
+	}
2149
+
2150
+	/**
2151
+	 * Asserts that two XML documents are equal.
2152
+	 *
2153
+	 * @param DOMDocument|string $actualXml
2154
+	 *
2155
+	 * @throws \PHPUnit\Util\Xml\Exception
2156
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2157
+	 * @throws ExpectationFailedException
2158
+	 */
2159
+	public static function assertXmlStringEqualsXmlFile(string $expectedFile, $actualXml, string $message = ''): void
2160
+	{
2161
+		if (!is_string($actualXml)) {
2162
+			self::createWarning('Passing an argument of type DOMDocument for the $actualXml parameter is deprecated. Support for this will be removed in PHPUnit 10.');
2163
+
2164
+			$actual = $actualXml;
2165
+		} else {
2166
+			$actual = (new XmlLoader)->load($actualXml);
2167
+		}
2168
+
2169
+		$expected = (new XmlLoader)->loadFile($expectedFile);
2170
+
2171
+		static::assertEquals($expected, $actual, $message);
2172
+	}
2173
+
2174
+	/**
2175
+	 * Asserts that two XML documents are not equal.
2176
+	 *
2177
+	 * @param DOMDocument|string $actualXml
2178
+	 *
2179
+	 * @throws \PHPUnit\Util\Xml\Exception
2180
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2181
+	 * @throws ExpectationFailedException
2182
+	 */
2183
+	public static function assertXmlStringNotEqualsXmlFile(string $expectedFile, $actualXml, string $message = ''): void
2184
+	{
2185
+		if (!is_string($actualXml)) {
2186
+			self::createWarning('Passing an argument of type DOMDocument for the $actualXml parameter is deprecated. Support for this will be removed in PHPUnit 10.');
2187
+
2188
+			$actual = $actualXml;
2189
+		} else {
2190
+			$actual = (new XmlLoader)->load($actualXml);
2191
+		}
2192
+
2193
+		$expected = (new XmlLoader)->loadFile($expectedFile);
2194
+
2195
+		static::assertNotEquals($expected, $actual, $message);
2196
+	}
2197
+
2198
+	/**
2199
+	 * Asserts that two XML documents are equal.
2200
+	 *
2201
+	 * @param DOMDocument|string $expectedXml
2202
+	 * @param DOMDocument|string $actualXml
2203
+	 *
2204
+	 * @throws \PHPUnit\Util\Xml\Exception
2205
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2206
+	 * @throws ExpectationFailedException
2207
+	 */
2208
+	public static function assertXmlStringEqualsXmlString($expectedXml, $actualXml, string $message = ''): void
2209
+	{
2210
+		if (!is_string($expectedXml)) {
2211
+			self::createWarning('Passing an argument of type DOMDocument for the $expectedXml parameter is deprecated. Support for this will be removed in PHPUnit 10.');
2212
+
2213
+			$expected = $expectedXml;
2214
+		} else {
2215
+			$expected = (new XmlLoader)->load($expectedXml);
2216
+		}
2217
+
2218
+		if (!is_string($actualXml)) {
2219
+			self::createWarning('Passing an argument of type DOMDocument for the $actualXml parameter is deprecated. Support for this will be removed in PHPUnit 10.');
2220
+
2221
+			$actual = $actualXml;
2222
+		} else {
2223
+			$actual = (new XmlLoader)->load($actualXml);
2224
+		}
2225
+
2226
+		static::assertEquals($expected, $actual, $message);
2227
+	}
2228
+
2229
+	/**
2230
+	 * Asserts that two XML documents are not equal.
2231
+	 *
2232
+	 * @param DOMDocument|string $expectedXml
2233
+	 * @param DOMDocument|string $actualXml
2234
+	 *
2235
+	 * @throws \PHPUnit\Util\Xml\Exception
2236
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2237
+	 * @throws ExpectationFailedException
2238
+	 */
2239
+	public static function assertXmlStringNotEqualsXmlString($expectedXml, $actualXml, string $message = ''): void
2240
+	{
2241
+		if (!is_string($expectedXml)) {
2242
+			self::createWarning('Passing an argument of type DOMDocument for the $expectedXml parameter is deprecated. Support for this will be removed in PHPUnit 10.');
2243
+
2244
+			$expected = $expectedXml;
2245
+		} else {
2246
+			$expected = (new XmlLoader)->load($expectedXml);
2247
+		}
2248
+
2249
+		if (!is_string($actualXml)) {
2250
+			self::createWarning('Passing an argument of type DOMDocument for the $actualXml parameter is deprecated. Support for this will be removed in PHPUnit 10.');
2251
+
2252
+			$actual = $actualXml;
2253
+		} else {
2254
+			$actual = (new XmlLoader)->load($actualXml);
2255
+		}
2256
+
2257
+		static::assertNotEquals($expected, $actual, $message);
2258
+	}
2259
+
2260
+	/**
2261
+	 * Asserts that a hierarchy of DOMElements matches.
2262
+	 *
2263
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2264
+	 * @throws AssertionFailedError
2265
+	 * @throws ExpectationFailedException
2266
+	 *
2267
+	 * @codeCoverageIgnore
2268
+	 *
2269
+	 * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4091
2270
+	 */
2271
+	public static function assertEqualXMLStructure(DOMElement $expectedElement, DOMElement $actualElement, bool $checkAttributes = false, string $message = ''): void
2272
+	{
2273
+		self::createWarning('assertEqualXMLStructure() is deprecated and will be removed in PHPUnit 10.');
2274
+
2275
+		$expectedElement = Xml::import($expectedElement);
2276
+		$actualElement   = Xml::import($actualElement);
2277
+
2278
+		static::assertSame(
2279
+			$expectedElement->tagName,
2280
+			$actualElement->tagName,
2281
+			$message
2282
+		);
2283
+
2284
+		if ($checkAttributes) {
2285
+			static::assertSame(
2286
+				$expectedElement->attributes->length,
2287
+				$actualElement->attributes->length,
2288
+				sprintf(
2289
+					'%s%sNumber of attributes on node "%s" does not match',
2290
+					$message,
2291
+					!empty($message) ? "\n" : '',
2292
+					$expectedElement->tagName
2293
+				)
2294
+			);
2295
+
2296
+			for ($i = 0; $i < $expectedElement->attributes->length; $i++) {
2297
+				$expectedAttribute = $expectedElement->attributes->item($i);
2298
+				$actualAttribute   = $actualElement->attributes->getNamedItem($expectedAttribute->name);
2299
+
2300
+				assert($expectedAttribute instanceof DOMAttr);
2301
+
2302
+				if (!$actualAttribute) {
2303
+					static::fail(
2304
+						sprintf(
2305
+							'%s%sCould not find attribute "%s" on node "%s"',
2306
+							$message,
2307
+							!empty($message) ? "\n" : '',
2308
+							$expectedAttribute->name,
2309
+							$expectedElement->tagName
2310
+						)
2311
+					);
2312
+				}
2313
+			}
2314
+		}
2315
+
2316
+		Xml::removeCharacterDataNodes($expectedElement);
2317
+		Xml::removeCharacterDataNodes($actualElement);
2318
+
2319
+		static::assertSame(
2320
+			$expectedElement->childNodes->length,
2321
+			$actualElement->childNodes->length,
2322
+			sprintf(
2323
+				'%s%sNumber of child nodes of "%s" differs',
2324
+				$message,
2325
+				!empty($message) ? "\n" : '',
2326
+				$expectedElement->tagName
2327
+			)
2328
+		);
2329
+
2330
+		for ($i = 0; $i < $expectedElement->childNodes->length; $i++) {
2331
+			static::assertEqualXMLStructure(
2332
+				$expectedElement->childNodes->item($i),
2333
+				$actualElement->childNodes->item($i),
2334
+				$checkAttributes,
2335
+				$message
2336
+			);
2337
+		}
2338
+	}
2339
+
2340
+	/**
2341
+	 * Evaluates a PHPUnit\Framework\Constraint matcher object.
2342
+	 *
2343
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2344
+	 * @throws ExpectationFailedException
2345
+	 */
2346
+	public static function assertThat($value, Constraint $constraint, string $message = ''): void
2347
+	{
2348
+		self::$count += count($constraint);
2349
+
2350
+		$constraint->evaluate($value, $message);
2351
+	}
2352
+
2353
+	/**
2354
+	 * Asserts that a string is a valid JSON string.
2355
+	 *
2356
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2357
+	 * @throws ExpectationFailedException
2358
+	 */
2359
+	public static function assertJson(string $actualJson, string $message = ''): void
2360
+	{
2361
+		static::assertThat($actualJson, static::isJson(), $message);
2362
+	}
2363
+
2364
+	/**
2365
+	 * Asserts that two given JSON encoded objects or arrays are equal.
2366
+	 *
2367
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2368
+	 * @throws ExpectationFailedException
2369
+	 */
2370
+	public static function assertJsonStringEqualsJsonString(string $expectedJson, string $actualJson, string $message = ''): void
2371
+	{
2372
+		static::assertJson($expectedJson, $message);
2373
+		static::assertJson($actualJson, $message);
2374
+
2375
+		static::assertThat($actualJson, new JsonMatches($expectedJson), $message);
2376
+	}
2377
+
2378
+	/**
2379
+	 * Asserts that two given JSON encoded objects or arrays are not equal.
2380
+	 *
2381
+	 * @param string $expectedJson
2382
+	 * @param string $actualJson
2383
+	 *
2384
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2385
+	 * @throws ExpectationFailedException
2386
+	 */
2387
+	public static function assertJsonStringNotEqualsJsonString($expectedJson, $actualJson, string $message = ''): void
2388
+	{
2389
+		static::assertJson($expectedJson, $message);
2390
+		static::assertJson($actualJson, $message);
2391
+
2392
+		static::assertThat(
2393
+			$actualJson,
2394
+			new LogicalNot(
2395
+				new JsonMatches($expectedJson)
2396
+			),
2397
+			$message
2398
+		);
2399
+	}
2400
+
2401
+	/**
2402
+	 * Asserts that the generated JSON encoded object and the content of the given file are equal.
2403
+	 *
2404
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2405
+	 * @throws ExpectationFailedException
2406
+	 */
2407
+	public static function assertJsonStringEqualsJsonFile(string $expectedFile, string $actualJson, string $message = ''): void
2408
+	{
2409
+		static::assertFileExists($expectedFile, $message);
2410
+		$expectedJson = file_get_contents($expectedFile);
2411
+
2412
+		static::assertJson($expectedJson, $message);
2413
+		static::assertJson($actualJson, $message);
2414
+
2415
+		static::assertThat($actualJson, new JsonMatches($expectedJson), $message);
2416
+	}
2417
+
2418
+	/**
2419
+	 * Asserts that the generated JSON encoded object and the content of the given file are not equal.
2420
+	 *
2421
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2422
+	 * @throws ExpectationFailedException
2423
+	 */
2424
+	public static function assertJsonStringNotEqualsJsonFile(string $expectedFile, string $actualJson, string $message = ''): void
2425
+	{
2426
+		static::assertFileExists($expectedFile, $message);
2427
+		$expectedJson = file_get_contents($expectedFile);
2428
+
2429
+		static::assertJson($expectedJson, $message);
2430
+		static::assertJson($actualJson, $message);
2431
+
2432
+		static::assertThat(
2433
+			$actualJson,
2434
+			new LogicalNot(
2435
+				new JsonMatches($expectedJson)
2436
+			),
2437
+			$message
2438
+		);
2439
+	}
2440
+
2441
+	/**
2442
+	 * Asserts that two JSON files are equal.
2443
+	 *
2444
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2445
+	 * @throws ExpectationFailedException
2446
+	 */
2447
+	public static function assertJsonFileEqualsJsonFile(string $expectedFile, string $actualFile, string $message = ''): void
2448
+	{
2449
+		static::assertFileExists($expectedFile, $message);
2450
+		static::assertFileExists($actualFile, $message);
2451
+
2452
+		$actualJson   = file_get_contents($actualFile);
2453
+		$expectedJson = file_get_contents($expectedFile);
2454
+
2455
+		static::assertJson($expectedJson, $message);
2456
+		static::assertJson($actualJson, $message);
2457
+
2458
+		$constraintExpected = new JsonMatches(
2459
+			$expectedJson
2460
+		);
2461
+
2462
+		$constraintActual = new JsonMatches($actualJson);
2463
+
2464
+		static::assertThat($expectedJson, $constraintActual, $message);
2465
+		static::assertThat($actualJson, $constraintExpected, $message);
2466
+	}
2467
+
2468
+	/**
2469
+	 * Asserts that two JSON files are not equal.
2470
+	 *
2471
+	 * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
2472
+	 * @throws ExpectationFailedException
2473
+	 */
2474
+	public static function assertJsonFileNotEqualsJsonFile(string $expectedFile, string $actualFile, string $message = ''): void
2475
+	{
2476
+		static::assertFileExists($expectedFile, $message);
2477
+		static::assertFileExists($actualFile, $message);
2478
+
2479
+		$actualJson   = file_get_contents($actualFile);
2480
+		$expectedJson = file_get_contents($expectedFile);
2481
+
2482
+		static::assertJson($expectedJson, $message);
2483
+		static::assertJson($actualJson, $message);
2484
+
2485
+		$constraintExpected = new JsonMatches(
2486
+			$expectedJson
2487
+		);
2488
+
2489
+		$constraintActual = new JsonMatches($actualJson);
2490
+
2491
+		static::assertThat($expectedJson, new LogicalNot($constraintActual), $message);
2492
+		static::assertThat($actualJson, new LogicalNot($constraintExpected), $message);
2493
+	}
2494
+
2495
+	/**
2496
+	 * @throws Exception
2497
+	 */
2498
+	public static function logicalAnd(): LogicalAnd
2499
+	{
2500
+		$constraints = func_get_args();
2501
+
2502
+		$constraint = new LogicalAnd;
2503
+		$constraint->setConstraints($constraints);
2504
+
2505
+		return $constraint;
2506
+	}
2507
+
2508
+	public static function logicalOr(): LogicalOr
2509
+	{
2510
+		$constraints = func_get_args();
2511
+
2512
+		$constraint = new LogicalOr;
2513
+		$constraint->setConstraints($constraints);
2514
+
2515
+		return $constraint;
2516
+	}
2517
+
2518
+	public static function logicalNot(Constraint $constraint): LogicalNot
2519
+	{
2520
+		return new LogicalNot($constraint);
2521
+	}
2522
+
2523
+	public static function logicalXor(): LogicalXor
2524
+	{
2525
+		$constraints = func_get_args();
2526
+
2527
+		$constraint = new LogicalXor;
2528
+		$constraint->setConstraints($constraints);
2529
+
2530
+		return $constraint;
2531
+	}
2532
+
2533
+	public static function anything(): IsAnything
2534
+	{
2535
+		return new IsAnything;
2536
+	}
2537
+
2538
+	public static function isTrue(): IsTrue
2539
+	{
2540
+		return new IsTrue;
2541
+	}
2542
+
2543
+	/**
2544
+	 * @psalm-template CallbackInput of mixed
2545
+	 *
2546
+	 * @psalm-param callable(CallbackInput $callback): bool $callback
2547
+	 *
2548
+	 * @psalm-return Callback<CallbackInput>
2549
+	 */
2550
+	public static function callback(callable $callback): Callback
2551
+	{
2552
+		return new Callback($callback);
2553
+	}
2554
+
2555
+	public static function isFalse(): IsFalse
2556
+	{
2557
+		return new IsFalse;
2558
+	}
2559
+
2560
+	public static function isJson(): IsJson
2561
+	{
2562
+		return new IsJson;
2563
+	}
2564
+
2565
+	public static function isNull(): IsNull
2566
+	{
2567
+		return new IsNull;
2568
+	}
2569
+
2570
+	public static function isFinite(): IsFinite
2571
+	{
2572
+		return new IsFinite;
2573
+	}
2574
+
2575
+	public static function isInfinite(): IsInfinite
2576
+	{
2577
+		return new IsInfinite;
2578
+	}
2579
+
2580
+	public static function isNan(): IsNan
2581
+	{
2582
+		return new IsNan;
2583
+	}
2584
+
2585
+	public static function containsEqual($value): TraversableContainsEqual
2586
+	{
2587
+		return new TraversableContainsEqual($value);
2588
+	}
2589
+
2590
+	public static function containsIdentical($value): TraversableContainsIdentical
2591
+	{
2592
+		return new TraversableContainsIdentical($value);
2593
+	}
2594
+
2595
+	public static function containsOnly(string $type): TraversableContainsOnly
2596
+	{
2597
+		return new TraversableContainsOnly($type);
2598
+	}
2599
+
2600
+	public static function containsOnlyInstancesOf(string $className): TraversableContainsOnly
2601
+	{
2602
+		return new TraversableContainsOnly($className, false);
2603
+	}
2604
+
2605
+	/**
2606
+	 * @param int|string $key
2607
+	 */
2608
+	public static function arrayHasKey($key): ArrayHasKey
2609
+	{
2610
+		return new ArrayHasKey($key);
2611
+	}
2612
+
2613
+	public static function equalTo($value): IsEqual
2614
+	{
2615
+		return new IsEqual($value, 0.0, false, false);
2616
+	}
2617
+
2618
+	public static function equalToCanonicalizing($value): IsEqualCanonicalizing
2619
+	{
2620
+		return new IsEqualCanonicalizing($value);
2621
+	}
2622
+
2623
+	public static function equalToIgnoringCase($value): IsEqualIgnoringCase
2624
+	{
2625
+		return new IsEqualIgnoringCase($value);
2626
+	}
2627
+
2628
+	public static function equalToWithDelta($value, float $delta): IsEqualWithDelta
2629
+	{
2630
+		return new IsEqualWithDelta($value, $delta);
2631
+	}
2632
+
2633
+	public static function isEmpty(): IsEmpty
2634
+	{
2635
+		return new IsEmpty;
2636
+	}
2637
+
2638
+	public static function isWritable(): IsWritable
2639
+	{
2640
+		return new IsWritable;
2641
+	}
2642
+
2643
+	public static function isReadable(): IsReadable
2644
+	{
2645
+		return new IsReadable;
2646
+	}
2647
+
2648
+	public static function directoryExists(): DirectoryExists
2649
+	{
2650
+		return new DirectoryExists;
2651
+	}
2652
+
2653
+	public static function fileExists(): FileExists
2654
+	{
2655
+		return new FileExists;
2656
+	}
2657
+
2658
+	public static function greaterThan($value): GreaterThan
2659
+	{
2660
+		return new GreaterThan($value);
2661
+	}
2662
+
2663
+	public static function greaterThanOrEqual($value): LogicalOr
2664
+	{
2665
+		return static::logicalOr(
2666
+			new IsEqual($value),
2667
+			new GreaterThan($value)
2668
+		);
2669
+	}
2670
+
2671
+	public static function classHasAttribute(string $attributeName): ClassHasAttribute
2672
+	{
2673
+		return new ClassHasAttribute($attributeName);
2674
+	}
2675
+
2676
+	public static function classHasStaticAttribute(string $attributeName): ClassHasStaticAttribute
2677
+	{
2678
+		return new ClassHasStaticAttribute($attributeName);
2679
+	}
2680
+
2681
+	public static function objectHasAttribute($attributeName): ObjectHasAttribute
2682
+	{
2683
+		return new ObjectHasAttribute($attributeName);
2684
+	}
2685
+
2686
+	public static function identicalTo($value): IsIdentical
2687
+	{
2688
+		return new IsIdentical($value);
2689
+	}
2690
+
2691
+	public static function isInstanceOf(string $className): IsInstanceOf
2692
+	{
2693
+		return new IsInstanceOf($className);
2694
+	}
2695
+
2696
+	public static function isType(string $type): IsType
2697
+	{
2698
+		return new IsType($type);
2699
+	}
2700
+
2701
+	public static function lessThan($value): LessThan
2702
+	{
2703
+		return new LessThan($value);
2704
+	}
2705
+
2706
+	public static function lessThanOrEqual($value): LogicalOr
2707
+	{
2708
+		return static::logicalOr(
2709
+			new IsEqual($value),
2710
+			new LessThan($value)
2711
+		);
2712
+	}
2713
+
2714
+	public static function matchesRegularExpression(string $pattern): RegularExpression
2715
+	{
2716
+		return new RegularExpression($pattern);
2717
+	}
2718
+
2719
+	public static function matches(string $string): StringMatchesFormatDescription
2720
+	{
2721
+		return new StringMatchesFormatDescription($string);
2722
+	}
2723
+
2724
+	public static function stringStartsWith($prefix): StringStartsWith
2725
+	{
2726
+		return new StringStartsWith($prefix);
2727
+	}
2728
+
2729
+	public static function stringContains(string $string, bool $case = true): StringContains
2730
+	{
2731
+		return new StringContains($string, $case);
2732
+	}
2733
+
2734
+	public static function stringEndsWith(string $suffix): StringEndsWith
2735
+	{
2736
+		return new StringEndsWith($suffix);
2737
+	}
2738
+
2739
+	public static function countOf(int $count): Count
2740
+	{
2741
+		return new Count($count);
2742
+	}
2743
+
2744
+	public static function objectEquals(object $object, string $method = 'equals'): ObjectEquals
2745
+	{
2746
+		return new ObjectEquals($object, $method);
2747
+	}
2748
+
2749
+	/**
2750
+	 * Fails a test with the given message.
2751
+	 *
2752
+	 * @throws AssertionFailedError
2753
+	 *
2754
+	 * @psalm-return never-return
2755
+	 */
2756
+	public static function fail(string $message = ''): void
2757
+	{
2758
+		self::$count++;
2759
+
2760
+		throw new AssertionFailedError($message);
2761
+	}
2762
+
2763
+	/**
2764
+	 * Mark the test as incomplete.
2765
+	 *
2766
+	 * @throws IncompleteTestError
2767
+	 *
2768
+	 * @psalm-return never-return
2769
+	 */
2770
+	public static function markTestIncomplete(string $message = ''): void
2771
+	{
2772
+		throw new IncompleteTestError($message);
2773
+	}
2774
+
2775
+	/**
2776
+	 * Mark the test as skipped.
2777
+	 *
2778
+	 * @throws SkippedTestError
2779
+	 * @throws SyntheticSkippedError
2780
+	 *
2781
+	 * @psalm-return never-return
2782
+	 */
2783
+	public static function markTestSkipped(string $message = ''): void
2784
+	{
2785
+		if ($hint = self::detectLocationHint($message)) {
2786
+			$trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
2787
+			array_unshift($trace, $hint);
2788
+
2789
+			throw new SyntheticSkippedError($hint['message'], 0, $hint['file'], (int) $hint['line'], $trace);
2790
+		}
2791
+
2792
+		throw new SkippedTestError($message);
2793
+	}
2794
+
2795
+	/**
2796
+	 * Return the current assertion count.
2797
+	 */
2798
+	public static function getCount(): int
2799
+	{
2800
+		return self::$count;
2801
+	}
2802
+
2803
+	/**
2804
+	 * Reset the assertion counter.
2805
+	 */
2806
+	public static function resetCount(): void
2807
+	{
2808
+		self::$count = 0;
2809
+	}
2810
+
2811
+	private static function detectLocationHint(string $message): ?array
2812
+	{
2813
+		$hint  = null;
2814
+		$lines = preg_split('/\r\n|\r|\n/', $message);
2815
+
2816
+		while (strpos($lines[0], '__OFFSET') !== false) {
2817
+			$offset = explode('=', array_shift($lines));
2818
+
2819
+			if ($offset[0] === '__OFFSET_FILE') {
2820
+				$hint['file'] = $offset[1];
2821
+			}
2822
+
2823
+			if ($offset[0] === '__OFFSET_LINE') {
2824
+				$hint['line'] = $offset[1];
2825
+			}
2826
+		}
2827
+
2828
+		if ($hint) {
2829
+			$hint['message'] = implode(PHP_EOL, $lines);
2830
+		}
2831
+
2832
+		return $hint;
2833
+	}
2834
+
2835
+	private static function isValidObjectAttributeName(string $attributeName): bool
2836
+	{
2837
+		return (bool) preg_match('/[^\x00-\x1f\x7f-\x9f]+/', $attributeName);
2838
+	}
2839
+
2840
+	private static function isValidClassAttributeName(string $attributeName): bool
2841
+	{
2842
+		return (bool) preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/', $attributeName);
2843
+	}
2844
+
2845
+	/**
2846
+	 * @codeCoverageIgnore
2847
+	 */
2848
+	private static function createWarning(string $warning): void
2849
+	{
2850
+		foreach (debug_backtrace() as $step) {
2851
+			if (isset($step['object']) && $step['object'] instanceof TestCase) {
2852
+				assert($step['object'] instanceof TestCase);
2853
+
2854
+				$step['object']->addWarning($warning);
2855
+
2856
+				break;
2857
+			}
2858
+		}
2859
+	}
2860 2860
 }
Please login to merge, or discard this patch.