Skip to content

Commit

Permalink
Bring BuiltinMethodReflection from the dead for BC reasons
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Nov 19, 2023
1 parent dacb505 commit 3863da9
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions src/Reflection/Php/BuiltinMethodReflection.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?php declare(strict_types = 1);

namespace PHPStan\Reflection\Php;

use PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnum;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionIntersectionType;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionMethod;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionNamedType;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionParameter;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionUnionType;
use PHPStan\TrinaryLogic;

/**
* @deprecated
*/
interface BuiltinMethodReflection
{

public function getName(): string;

public function getReflection(): ?ReflectionMethod;

public function getFileName(): ?string;

public function getDeclaringClass(): ReflectionClass|ReflectionEnum;

public function getStartLine(): ?int;

Check failure on line 29 in src/Reflection/Php/BuiltinMethodReflection.php

View workflow job for this annotation

GitHub Actions / PHPStan (7.2, ubuntu-latest)

Method PHPStan\Reflection\Php\BuiltinMethodReflection::getDeclaringClass() has invalid return type PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnum.

Check failure on line 29 in src/Reflection/Php/BuiltinMethodReflection.php

View workflow job for this annotation

GitHub Actions / PHPStan (7.2, windows-latest)

Method PHPStan\Reflection\Php\BuiltinMethodReflection::getDeclaringClass() has invalid return type PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnum.

Check failure on line 29 in src/Reflection/Php/BuiltinMethodReflection.php

View workflow job for this annotation

GitHub Actions / PHPStan (7.3, ubuntu-latest)

Method PHPStan\Reflection\Php\BuiltinMethodReflection::getDeclaringClass() has invalid return type PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnum.

Check failure on line 29 in src/Reflection/Php/BuiltinMethodReflection.php

View workflow job for this annotation

GitHub Actions / PHPStan (7.3, windows-latest)

Method PHPStan\Reflection\Php\BuiltinMethodReflection::getDeclaringClass() has invalid return type PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnum.
public function getEndLine(): ?int;

public function getDocComment(): ?string;

public function isStatic(): bool;

public function isPrivate(): bool;

public function isPublic(): bool;

public function getPrototype(): self;

public function isDeprecated(): TrinaryLogic;

public function isVariadic(): bool;

public function getReturnType(): ReflectionIntersectionType|ReflectionNamedType|ReflectionUnionType|null;

public function getTentativeReturnType(): ReflectionIntersectionType|ReflectionNamedType|ReflectionUnionType|null;

/**
* @return ReflectionParameter[]
*/
public function getParameters(): array;

public function isFinal(): bool;

public function isInternal(): bool;

public function isAbstract(): bool;

public function returnsByReference(): TrinaryLogic;

}

0 comments on commit 3863da9

Please sign in to comment.