• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

dg / dresscode / 41044778467

30 Oct 2026 10:08AM UTC coverage: 97.234% (-0.3%) from 97.495%
41044778467

push

github

dg
upgrade: a decision only the data of the target version turn on belongs to the jump, the project as it is today resolved without narrowing, so that the plan no longer fixes it in the bridge, where nothing runs it

837123ff-7353-45e9-8cd7-ba68b373e93e

5 of 5 new or added lines in 1 file covered. (100.0%)

160 existing lines in 33 files now uncovered.

27315 of 28092 relevant lines covered (97.23%)

0.97 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

97.77
/src/Analyses/Declarations.php
1
<?php declare(strict_types=1);
2

3
/**
4
 * This file is part of the DressCode, a coding style and upgrade tool for PHP (https://dresscode.run)
5
 * Copyright (c) 2026 David Grudl (https://davidgrudl.com)
6
 */
7

8
namespace DressCode\Analyses;
9

10
use DressCode\{QualifiedNames, Tristate};
11
use PHPStan\Reflection\{
12
        ClassConstantReflection, ClassMemberReflection, ClassReflection, ExtendedMethodReflection, ExtendedParameterReflection,
13
};
14
use PHPStan\Reflection\Php\{PhpMethodReflection, PhpPropertyReflection};
15
use PHPStan\TrinaryLogic;
16
use PHPStan\Type\{MixedType, Type, VerbosityLevel};
17
use function count, is_bool;
18

19

20
/**
21
 * What the declarations of the project, its packages and PHP say of a class and its members, asked by their names: one
22
 * object per PHPStan, so that its answers hold for every pass of every file that PHPStan reads. Each question is that of
23
 * the same name of `Types`, which describes it and asks it here.
24
 * @internal
25
 */
26
final class Declarations
27
{
28
        /** @var array<string, Tristate>  lowercased "class ancestor" => whether the one is the other's subtype */
29
        private array $subtypes = [];
30

31
        /** @var array<string, bool>  lowercased class => whether something declares every ancestor it names */
32
        private array $seenWhole = [];
33

34

35
        public function __construct(
36
                private readonly PhpStan $phpstan,
1 ✔
37
        ) {
38
        }
1 ✔
39

40

41
        /** @return ?list<Parameter> */
42
        public function findMethodParameters(string $class, string $method): ?array
43
        {
44
                $reflection = $this->phpstan->findClass($class);
1 ✔
45
                $variants = $reflection !== null && $reflection->hasNativeMethod($method)
1 ✔
46
                        ? $reflection->getNativeMethod($method)->getVariants()
1 ✔
47
                        : [];
1 ✔
48
                return count($variants) === 1 ? array_map(self::toParameter(...), $variants[0]->getParameters()) : null;
1 ✔
49
        }
50

51

52
        /** @return ?list<Parameter> */
53
        public function findFunctionParameters(string $function): ?array
54
        {
55
                $variants = $this->phpstan->findFunction($function)?->getVariants() ?? [];
1 ✔
56
                return count($variants) === 1 ? array_map(self::toParameter(...), $variants[0]->getParameters()) : null;
1 ✔
57
        }
58

59

60
        public function isOverridable(string $class, string $method): Tristate
61
        {
62
                $reflection = $this->phpstan->findClass($class);
1 ✔
63
                if ($reflection === null || !$reflection->hasNativeMethod($method)) {
1 ✔
64
                        return Tristate::Maybe;
×
65
                }
66

67
                $declaration = $reflection->getNativeMethod($method);
1 ✔
68
                return $declaration->isPrivate() || $declaration->isFinal()->yes() || $reflection->isFinalByKeyword()
1 ✔
69
                        ? Tristate::No
1 ✔
70
                        : Tristate::Yes;
1 ✔
71
        }
72

73

74
        public function countsArguments(string $class, string $method): bool
75
        {
76
                $reflection = $this->phpstan->findClass($class);
1 ✔
77
                if ($reflection === null || !$reflection->hasNativeMethod($method)) {
1 ✔
78
                        return true;
×
79
                }
80

81
                return array_any(
1 ✔
82
                        $reflection->getNativeMethod($method)->getVariants(),
1 ✔
83
                        fn($variant) => $variant->isVariadic()
1 ✔
84
                                && !array_any($variant->getParameters(), fn(ExtendedParameterReflection $parameter) => $parameter->isVariadic()),
1 ✔
85
                );
86
        }
87

88

89
        /**
90
         * @return list<array{string, string, list<string>, string, list<string>}>  per method the class takes from a trait
91
         *   that a parent or an interface declares with parameters named otherwise: its name, the trait, the names of its
92
         *   parameters, the ancestor and the names of its parameters
93
         */
94
        public function findTraitParameterNames(string $class): array
95
        {
96
                $reflection = $this->phpstan->findClass($class);
1 ✔
97
                if ($reflection === null) {
1 ✔
98
                        return [];
×
99
                }
100

101
                $result = [];
1 ✔
102
                foreach ($reflection->getNativeReflection()->getMethods() as $native) {
1 ✔
103
                        $method = $reflection->getNativeMethod($native->getName());
1 ✔
104
                        $trait = $method instanceof PhpMethodReflection ? $method->getDeclaringTrait() : null;
1 ✔
105
                        $ancestor = $trait === null ? null : array_find(
1 ✔
106
                                [...array_slice($reflection->getParents(), 0, 1), ...array_values($reflection->getInterfaces())],
1 ✔
107
                                fn(ClassReflection $ancestor) => $ancestor->hasNativeMethod($method->getName())
1 ✔
108
                                        && !$ancestor->getNativeMethod($method->getName())->isPrivate(),
1 ✔
109
                        );
110
                        if ($trait === null || $ancestor === null) {
1 ✔
111
                                continue;
1 ✔
112
                        }
113

114
                        $names = fn(ClassReflection $class) => count($variants = $class->getNativeMethod($method->getName())->getVariants()) === 1
1 ✔
115
                                ? array_map(fn(ExtendedParameterReflection $parameter) => $parameter->getName(), $variants[0]->getParameters())
1 ✔
116
                                : [];
1 ✔
117
                        [$own, $theirs] = [$names($reflection), $names($ancestor)];
1 ✔
118
                        if (array_slice($own, 0, count($theirs)) !== array_slice($theirs, 0, count($own))) {
1 ✔
119
                                $result[] = [$method->getName(), $trait->getName(), $own, $ancestor->getName(), $theirs];
1 ✔
120
                        }
121
                }
122

123
                return $result;
1 ✔
124
        }
125

126

127
        public static function toParameter(ExtendedParameterReflection $parameter): Parameter
128
        {
129
                return new Parameter(
1 ✔
130
                        $parameter->getName(),
1 ✔
131
                        self::renderNativeType($parameter->getNativeType()),
1 ✔
132
                        $parameter->isOptional(),
1 ✔
133
                        $parameter->isVariadic(),
1 ✔
134
                        $parameter->passedByReference()->yes(),
1 ✔
135
                        self::renderValue($parameter->getDefaultValue()),
1 ✔
136
                );
137
        }
138

139

140
        /** The native type as PHP describes it; null for a declaration without one. */
141
        public static function renderNativeType(Type $type): ?string
142
        {
143
                return $type instanceof MixedType && !$type->isExplicitMixed() ? null : $type->describe(VerbosityLevel::typeOnly());
1 ✔
144
        }
145

146

147
        /** The value as PHP code; null for none and for a value that is no scalar, null or empty array. */
148
        private static function renderValue(?Type $value): ?string
149
        {
150
                $scalars = $value?->getConstantScalarValues() ?? [];
1 ✔
151
                return match (true) {
1 ✔
152
                        $value === null => null,
1 ✔
153
                        $value->isNull()->yes() => 'null',
1 ✔
154
                        count($scalars) === 1 && is_bool($scalars[0]) => $scalars[0] ? 'true' : 'false',
1 ✔
155
                        count($scalars) === 1 && $scalars[0] !== null => var_export($scalars[0], return: true),
1 ✔
156
                        $value->isArray()->yes() && $value->isIterableAtLeastOnce()->no() => '[]',
1 ✔
157
                        default => null,
1 ✔
158
                };
159
        }
160

161

162
        public function findDeprecation(Member $member): ?Deprecation
163
        {
164
                $class = $this->phpstan->findClass($member->declaringClass);
1 ✔
165
                $reflection = $class === null ? null : self::findNativeMember($class, $member->kind, $member->name);
1 ✔
166
                if ($reflection === null || !$reflection->isDeprecated()->yes()) {
1 ✔
167
                        return null;
1 ✔
168
                }
169

170
                $file = $reflection->getDeclaringClass()->getFileName();
1 ✔
171
                $description = $reflection->getDeprecatedDescription() ?? '';
1 ✔
172
                return match (true) {
173
                        $this->phpstan->isAheadOfSupport($file) => null,
1 ✔
174
                        $this->phpstan->isUnbounded($file) => new Deprecation($description),
1 ✔
175
                        default => Deprecation::fromDescription($description),
1 ✔
176
                };
177
        }
178

179

180
        public function isAbstract(Member $member): Tristate
181
        {
182
                $class = $this->phpstan->findClass($member->declaringClass);
1 ✔
183
                $reflection = $class === null ? null : self::findNativeMember($class, $member->kind, $member->name);
1 ✔
184
                $abstract = $reflection instanceof ClassConstantReflection ? false : $reflection?->isAbstract();
1 ✔
185
                return self::toTristate($abstract instanceof TrinaryLogic ? ($abstract->maybe() ? null : $abstract->yes()) : $abstract);
1 ✔
186
        }
187

188

189
        public function canReplace(Member $member, string $name): bool
190
        {
191
                $class = $this->phpstan->findClass($member->declaringClass);
1 ✔
192
                $own = $class === null ? null : self::findNativeMember($class, $member->kind, $member->name);
1 ✔
193
                $replacement = $class === null ? null : self::findNativeMember($class, $member->kind, $name);
1 ✔
194
                return $own !== null && $replacement !== null
1 ✔
195
                        && self::rankVisibility($replacement, $class) >= self::rankVisibility($own, $class)
1 ✔
196
                        && match ($member->kind) {
1 ✔
197
                                MemberKind::Constant => true,
1 ✔
198
                                MemberKind::Property,
1 ✔
199
                                MemberKind::StaticProperty => $replacement->isStatic() === ($member->kind === MemberKind::StaticProperty)
1 ✔
200
                                        && $own instanceof PhpPropertyReflection && $replacement instanceof PhpPropertyReflection
1 ✔
201
                                        && self::rankWriting($replacement) >= self::rankWriting($own)
1 ✔
202
                                        && $replacement->getNativeType()->equals($own->getNativeType()),
1 ✔
203
                                MemberKind::Constructor => false,
1 ✔
204
                                MemberKind::Method, MemberKind::StaticMethod => $this->takesCalls($member, $member->declaringClass, $name, named: true),
1 ✔
205
                        };
206
        }
207

208

209
        public function canReplaceByStaticMethod(Member $member, string $class, string $method, bool $named): bool
210
        {
211
                $target = $this->phpstan->findClass($class);
1 ✔
212
                $replacement = $target === null ? null : self::findNativeMember($target, MemberKind::StaticMethod, $method);
1 ✔
213
                return $member->kind === MemberKind::StaticMethod
1 ✔
214
                        && $replacement instanceof ExtendedMethodReflection
1 ✔
215
                        && $replacement->isPublic()
1 ✔
216
                        && $replacement->isStatic()
1 ✔
217
                        // a package installed newer than the project supports, or supported from no version, need not have the
218
                        // replacement in the oldest version
219
                        && !$this->phpstan->isAheadOfSupport($replacement->getDeclaringClass()->getFileName())
1 ✔
220
                        && !$this->phpstan->isUnbounded($replacement->getDeclaringClass()->getFileName())
1 ✔
221
                        && $this->takesCalls($member, $class, $method, $named);
1 ✔
222
        }
223

224

225
        /** The member of that kind the class declares natively, itself or through an ancestor. */
226
        public static function findNativeMember(
227
                ClassReflection $class,
228
                MemberKind $kind,
229
                string $name,
230
        ): ClassConstantReflection|ExtendedMethodReflection|PhpPropertyReflection|null
231
        {
232
                return match ($kind) {
233
                        MemberKind::Constant => $class->hasConstant($name) ? $class->getConstant($name) : null,
1 ✔
234
                        MemberKind::Method, MemberKind::StaticMethod, MemberKind::Constructor => $class->hasNativeMethod($name)
1 ✔
235
                                ? $class->getNativeMethod($name)
1 ✔
236
                                : null,
1 ✔
237
                        MemberKind::Property, MemberKind::StaticProperty => $class->hasNativeProperty($name) ? $class->getNativeProperty($name) : null,
1 ✔
238
                };
239
        }
240

241

242
        /** How widely the member of the class is seen: public, protected, private, and a private one of an ancestor least. */
243
        private static function rankVisibility(ClassMemberReflection $member, ClassReflection $class): int
244
        {
245
                return match (true) {
246
                        $member->isPublic() => 3,
1 ✔
247
                        !$member->isPrivate() => 2,
1 ✔
248
                        $member->getDeclaringClass()->getName() === $class->getName() => 1,
1 ✔
249
                        default => 0,
1 ✔
250
                };
251
        }
252

253

254
        /** How widely the property is written: nowhere outside its declaration, from its class, from it and its children, from anywhere. */
255
        private static function rankWriting(PhpPropertyReflection $property): int
256
        {
257
                return match (true) {
258
                        $property->isReadOnly(),
1 ✔
259
                        $property->isReadOnlyByPhpDoc(),
1 ✔
260
                        !$property->isWritable(),
1 ✔
261
                        $property->hasHook('get') && !$property->hasHook('set') => 0,
1 ✔
262
                        $property->isPrivateSet() => 1,
1 ✔
263
                        $property->isProtectedSet() => 2,
1 ✔
264
                        default => 3,
1 ✔
265
                };
266
        }
267

268

269
        /**
270
         * Whether the method of that name of the class takes every call of the method of the member the same way, the names
271
         * of the parameters counting where a call may name its arguments.
272
         */
273
        private function takesCalls(Member $member, string $class, string $name, bool $named): bool
274
        {
275
                $ownStatic = $this->isStaticMethod($member->declaringClass, $member->name);
1 ✔
276
                $old = $this->findMethodParameters($member->declaringClass, $member->name);
1 ✔
277
                $new = $this->findMethodParameters($class, $name);
1 ✔
278
                if ($old === null || $new === null || $ownStatic !== $this->isStaticMethod($class, $name)) {
1 ✔
279
                        return false;
×
280
                }
281

282
                foreach ($new as $i => $parameter) {
1 ✔
283
                        $replaced = $old[$i] ?? null;
1 ✔
284
                        if ($replaced === null ? !$parameter->optional : (
1 ✔
285
                                ($named && $parameter->name !== $replaced->name)
1 ✔
286
                                || $parameter->variadic !== $replaced->variadic
1 ✔
287
                                || (!$parameter->optional && $replaced->optional)
1 ✔
288
                                || !$parameter->canReplace($replaced)
1 ✔
289
                        )) {
290
                                return false;
1 ✔
291
                        }
292
                }
293

294
                return count($new) >= count($old);
1 ✔
295
        }
296

297

298
        public function findClassName(string $name, bool $traits = false): ?string
299
        {
300
                return $this->phpstan->findClassName($name, $traits);
1 ✔
301
        }
302

303

304
        public function findFunctionName(string $name): ?string
305
        {
306
                return $this->phpstan->findFunctionName($name);
1 ✔
307
        }
308

309

310
        public function isSubtype(string $class, string $ancestor): Tristate
311
        {
312
                if (strcasecmp($class, $ancestor) === 0) {
1 ✔
313
                        return Tristate::Yes;
1 ✔
314
                }
315

316
                $key = strtolower("$class $ancestor");
1 ✔
317
                if (!isset($this->subtypes[$key])) {
1 ✔
318
                        $reflection = $this->phpstan->findClass($class);
1 ✔
319
                        $ancestorReflection = $this->phpstan->findClass($ancestor);
1 ✔
320
                        $this->subtypes[$key] = match (true) {
1 ✔
321
                                $reflection === null || $ancestorReflection === null => Tristate::Maybe,
1 ✔
322
                                $ancestorReflection->isTrait()
1 ✔
323
                                        ? $reflection->hasTraitUse($ancestorReflection->getName())
1 ✔
324
                                        : $reflection->isSubclassOfClass($ancestorReflection) => Tristate::Yes,
1 ✔
325
                                $this->isSeenWhole($reflection) => Tristate::No,
1 ✔
326
                                default => Tristate::Maybe,
1 ✔
327
                        };
328
                }
329

330
                return $this->subtypes[$key];
1 ✔
331
        }
332

333

334
        public function isAlias(string $class, string $of): bool
335
        {
336
                $reflection = $this->phpstan->findClass($class);
1 ✔
337
                if ($reflection !== null && strcasecmp($reflection->getName(), $class) !== 0) {
1 ✔
338
                        return strcasecmp($reflection->getName(), $of) === 0; // an alias the process made at run time
1 ✔
339
                }
340

341
                $native = $reflection?->getNativeReflection()->getBetterReflection();
1 ✔
342
                return $native !== null
1 ✔
343
                        && $this->isSubtype($class, $of) === Tristate::Yes
1 ✔
344
                        && $native->getImmediateMethods() === []
1 ✔
345
                        && $native->getImmediateProperties() === []
1 ✔
346
                        && $native->getImmediateConstants() === [];
1 ✔
347
        }
348

349

350
        public function isAttributeClass(string $class): Tristate
351
        {
352
                return self::toTristate($this->phpstan->findClass($class)?->isAttributeClass());
1 ✔
353
        }
354

355

356
        public function isInterface(string $class): Tristate
357
        {
358
                return self::toTristate($this->phpstan->findClass($class)?->isInterface());
1 ✔
359
        }
360

361

362
        public function isFinalClass(string $class): Tristate
363
        {
364
                return self::toTristate($this->phpstan->findClass($class)?->isFinalByKeyword());
1 ✔
365
        }
366

367

368
        public function allowsDynamicProperties(string $class): Tristate
369
        {
370
                return self::toTristate($this->phpstan->findClass($class)?->allowsDynamicProperties());
1 ✔
371
        }
372

373

374
        /** @return list<Member> */
375
        public function findUnimplementedMethods(string $class): array
376
        {
377
                $reflection = $this->phpstan->findClass($class);
1 ✔
378
                if ($reflection === null || $reflection->isAbstract() || $reflection->isInterface() || $reflection->isTrait()) {
1 ✔
UNCOV
379
                        return [];
×
380
                }
381

382
                $methods = [];
1 ✔
383
                foreach ($reflection->getNativeReflection()->getMethods() as $method) {
1 ✔
384
                        if ($method->isAbstract()) {
1 ✔
385
                                $native = $reflection->getNativeMethod($method->getName());
1 ✔
386
                                $declaring = ($native instanceof PhpMethodReflection ? $native->getDeclaringTrait() : null) ?? $native->getDeclaringClass();
1 ✔
387
                                $methods[] = new Member(
1 ✔
388
                                        $method->isStatic() ? MemberKind::StaticMethod : MemberKind::Method,
1 ✔
389
                                        $method->getName(),
1 ✔
390
                                        $declaring->getName(),
1 ✔
391
                                );
392
                        }
393
                }
394

395
                return $methods;
1 ✔
396
        }
397

398

399
        public function hasMember(string $class, MemberKind $kind, string $name): bool
400
        {
401
                $reflection = $this->phpstan->findClass($class);
1 ✔
402
                return $reflection !== null && match ($kind) {
1 ✔
403
                        MemberKind::Constant => $reflection->hasConstant($name),
1 ✔
404
                        MemberKind::Method, MemberKind::StaticMethod, MemberKind::Constructor => $reflection->hasNativeMethod($name),
1 ✔
405
                        MemberKind::Property, MemberKind::StaticProperty => $reflection->hasNativeProperty($name),
1 ✔
406
                };
407
        }
408

409

410
        public function isStaticMethod(string $class, string $method): Tristate
411
        {
412
                $reflection = $this->phpstan->findClass($class);
1 ✔
413
                return match (true) {
1 ✔
414
                        $reflection === null => Tristate::Maybe,
1 ✔
415
                        $reflection->hasNativeMethod($method) => $reflection->getNativeMethod($method)->isStatic() ? Tristate::Yes : Tristate::No,
1 ✔
416
                        $this->isSeenWhole($reflection) => Tristate::No,
1 ✔
417
                        default => Tristate::Maybe,
1 ✔
418
                };
419
        }
420

421

422
        /** Whether every ancestor the class and its ancestors name, its parent, interfaces and traits, is one something declares. */
423
        private function isSeenWhole(ClassReflection $class): bool
424
        {
425
                return $this->seenWhole[strtolower($class->getName())] ??= array_all(
1 ✔
426
                        $class->getAncestors(),
1 ✔
427
                        function (ClassReflection $ancestor): bool {
1 ✔
428
                                $native = $ancestor->getNativeReflection()->getBetterReflection();
1 ✔
429
                                return array_all(
1 ✔
430
                                        array_filter([$native->getParentClassName(), ...$native->getInterfaceClassNames(), ...$native->getTraitClassNames()]),
1 ✔
431
                                        fn(string $name) => $this->phpstan->findClass($name) !== null,
1 ✔
432
                                );
433
                        },
1 ✔
434
                );
435
        }
436

437

438
        private static function toTristate(?bool $answer): Tristate
439
        {
440
                return match ($answer) {
1 ✔
441
                        true => Tristate::Yes,
1 ✔
442
                        false => Tristate::No,
1 ✔
443
                        null => Tristate::Maybe,
1 ✔
444
                };
445
        }
446

447

448
        public function findFunctionDeprecation(string $function): ?Deprecation
449
        {
450
                $reflection = $this->phpstan->findFunction($function);
1 ✔
451
                if (
452
                        $reflection === null
1 ✔
453
                        || !$reflection->isDeprecated()->yes()
1 ✔
454
                        || $this->phpstan->isAheadOfSupport($reflection->getFileName())
1 ✔
455
                ) {
456
                        return null;
1 ✔
457
                }
458

459
                $description = $reflection->getDeprecatedDescription() ?? '';
1 ✔
460
                if (
461
                        $this->phpstan->isUnbounded($reflection->getFileName())
1 ✔
462
                        || !preg_match('~^\\\\?(\w+(?:\\\\\w+)*)\(\)$~D', Deprecation::findReplacementCode($description) ?? '', $m)
1 ✔
463
                ) {
464
                        return new Deprecation($description);
1 ✔
465
                }
466

467
                $beside = ltrim(QualifiedNames::extractNamespace($reflection->getName()) . '\\' . $m[1], '\\');
1 ✔
468
                $replacement = str_contains($m[1], '\\')
1 ✔
469
                        ? $this->findFunctionName($m[1]) ?? $this->findFunctionName($beside)
1 ✔
470
                        : $this->findFunctionName($beside) ?? $this->findFunctionName($m[1]);
1 ✔
471
                return new Deprecation($description, replacementName: $replacement, replacementIsCall: $replacement !== null);
1 ✔
472
        }
473

474

475
        public function findClassDeprecation(string $class): ?Deprecation
476
        {
477
                $reflection = $this->phpstan->findClass($class);
1 ✔
478
                if ($reflection === null) {
1 ✔
479
                        return null;
1 ✔
480
                } elseif (strcasecmp($reflection->getName(), $class) === 0) {
1 ✔
481
                        $file = $reflection->getFileName();
1 ✔
482
                        $description = $reflection->isDeprecated() ? $reflection->getDeprecatedDescription() ?? '' : null;
1 ✔
483
                } else {
484
                        // an alias the process made at run time is reflected as the class aliased, which is not what the name declares
485
                        $file = $this->phpstan->findAutoloadedFile($class);
1 ✔
486
                        $description = $file === null ? null : $this->phpstan->findDeclaredDeprecation($class, $file);
1 ✔
487
                }
488

489
                if ($description === null || $this->phpstan->isAheadOfSupport($file)) {
1 ✔
490
                        return null;
1 ✔
491
                }
492

493
                $namespace = QualifiedNames::extractNamespace($class);
1 ✔
494
                if (
495
                        $this->phpstan->isUnbounded($file)
1 ✔
496
                        || !preg_match('~^\\\\?(\w+(?:\\\\\w+)*)$~D', Deprecation::findReplacementCode($description) ?? '', $m)
1 ✔
497
                ) {
498
                        return new Deprecation($description);
1 ✔
499
                }
500

501
                $beside = ltrim("$namespace\\$m[1]", '\\');
1 ✔
502
                $replacement = str_contains($m[1], '\\')
1 ✔
503
                        ? $this->findClassName($m[1]) ?? $this->findClassName($beside)
1 ✔
504
                        : $this->findClassName($beside) ?? $this->findClassName($m[1]);
1 ✔
505
                return new Deprecation($description, $replacement);
1 ✔
506
        }
507
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc