classMethodShape
final class MethodShape
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.
One method the analyzer can look up and, when it is worth it, step into.
Properties§
public string $classNamepublic string $namepublic list<ParameterShape> $parameterspublic TypeShape $returnTypepublic bool $static = falsepublic FunctionLike|null $node = nullpublic string $file = ''Methods§
public function __construct(
public string $className,
public string $name,
public list<ParameterShape> $parameters,
public TypeShape $returnType,
public bool $static = false,
public FunctionLike|null $node = null,
public string $file = '',
)Parameters
$className | string | The declaring class, fully qualified without a leading backslash |
$name | string | The method name as written |
$parameters | list<ParameterShape> | The declared parameters, in order |
$returnType | TypeShape | The declared return type |
$static | bool | Whether the method is declared static |
$node | FunctionLike|null | The declaration, when its body is available to step into |
$file | string | The file the declaration was read from |
public function qualifiedName(): stringThe method named the way findings refer to it.
Returns
stringTest cases 1
Test cases 17§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 2
Other tests reaching this symbol 15
CallEvaluatorTest::testEvaluateMethodFollowsAMethodDeclaredWithoutABodycallsCallEvaluatorTest::testFollowWithoutReturnsToReadNamesTheCalleecallsCalleeReturnsTest::testReadRunsAMethodInItsOwnClassAndAFunctionInTheCallersClasscallsCalleeReturnsTest::testValueOfLeavesAnAbstractMethodAsACallItDidNotFollowcallsCallersTestcallsDeriverTestcallsEntryBinderTestcallsPropertyWritesTestcallsInterpreterTestcallsReferenceEvaluatorTestcallsProgramIndexBuilderTestcallsProgramIndexTestcallsCallbackModelTestcallsModelMetadataTestcallsAnalyzerTestcalls
Relations§
Instantiated in 1
Type checks 3
- instanceof SqlCatalog\Core\Analysis\CallEvaluator::follow() packages/sql-catalog/src/Core/Analysis/CallEvaluator.php:409
- instanceof SqlCatalog\Core\Analysis\Derivation\CalleeReturns::valueOf() packages/sql-catalog/src/Core/Analysis/Derivation/CalleeReturns.php:71
- instanceof SqlCatalog\Core\Analysis\Derivation\CalleeReturns::read() packages/sql-catalog/src/Core/Analysis/Derivation/CalleeReturns.php:97
Type declarations 5
- type SqlCatalog\Core\Analysis\CallEvaluator packages/sql-catalog/src/Core/Analysis/CallEvaluator.php:403
- type SqlCatalog\Core\Analysis\Derivation\CalleeReturns packages/sql-catalog/src/Core/Analysis/Derivation/CalleeReturns.php:66
- type SqlCatalog\Core\Analysis\Derivation\CalleeReturns packages/sql-catalog/src/Core/Analysis/Derivation/CalleeReturns.php:90
- type SqlCatalog\Core\Php\ProgramIndex packages/sql-catalog/src/Core/Php/ProgramIndex.php:58
- type SqlCatalog\Core\Php\ProgramIndexBuilder packages/sql-catalog/src/Core/Php/ProgramIndexBuilder.php:301