classFunctionShape
final class FunctionShape
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.
One free function the analyzer can look up and, when it is worth it, step into.
Properties§
public string $namepublic list<ParameterShape> $parameterspublic TypeShape $returnTypepublic FunctionLike|null $node = nullpublic string $file = ''Methods§
public function __construct(
public string $name,
public list<ParameterShape> $parameters,
public TypeShape $returnType,
public FunctionLike|null $node = null,
public string $file = '',
)Parameters
$name | string | The function name, fully qualified without a leading backslash |
$parameters | list<ParameterShape> | The declared parameters, in order |
$returnType | TypeShape | The declared return type |
$node | FunctionLike|null | The declaration, when its body is available to step into |
$file | string | The file the declaration was read from |
Test cases 27§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
Other tests reaching this symbol 26
CatalogCommandTestcallsCallEvaluatorTest::testFollowWithoutReturnsToReadNamesTheCalleecallsCalleeReturnsTest::testReadDoesNotRememberWhatAnExhaustedBudgetCutShortcallsCalleeReturnsTest::testReadEntersTheCalleeSoACallBackIntoItIsNotFollowedAgaincallsCalleeReturnsTest::testReadReturnsNullFromABodyWithoutAReturncallsCalleeReturnsTest::testReadRunsAMethodInItsOwnClassAndAFunctionInTheCallersClasscallsCalleeReturnsTest::testReadUnitesWhatEveryReturnCanReturncallsCalleeReturnsTest::testValueOfAnswersACallWithTheSameArgumentsFromMemorycallsCalleeReturnsTest::testValueOfKeepsAbsenceDistinctFromUnresolvedReturnscallsCalleeReturnsTest::testValueOfLeavesAFunctionWithoutABodyAsACallItDidNotFollowcallsCalleeReturnsTest::testValueOfReadsWhatTheCalleeReturnscallsCalleeReturnsTest::testValueOfStopsAtACallAlreadyBeingFollowedcallsCalleeReturnsTest::testValueOfStopsAtTheDepthLimitAndFollowsJustBelowItcallsCalleeReturnsTest::testValueOfStopsOnceTheBudgetIsExhaustedcallsCallersTestcallsDeriverTestcallsEntryBinderTestcallsWriteEffectsTestcallsExpressionEvaluatorTestcallsInterpreterTestcallsProgramIndexBuilderTestcallsProgramIndexTest::testFindFunctionIgnoresCasecallsCallModelTestcallsAnalyzerTestcallsJsonReporterTestcallsTextReporterTestcalls
Relations§
Instantiated in 1
Type declarations 4
- 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:42