Skip to content
Draft

WIP #738

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public function enterNode(Node $node): int|null
$this->parts->push('::' . $node->name . '()');
$this->setFqsen($node);

return NodeTraverser::DONT_TRAVERSE_CHILDREN;
break;

case ClassConst::class:
$this->parts->push('::');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,13 @@ protected function pExpr_ClassConstFetch(Expr\ClassConstFetch $node): string
return $placeholder;
}

// protected function pExpr_ConstFetch(Expr\ConstFetch $node): string
// {
// $className = parent::pName($node->name);
// $className = $this->typeResolver->resolve($className, $this->context);
// return 'trst';
// }

/** @return array<string, Fqsen|Type> */
public function getParts(): array
{
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/ProjectCreationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,9 @@ public function testFunctionContantDefaultIsResolved() : void

self::assertEquals(
new Expression(
'{{ PHPDOCa8cfde6331bd59eb2ac96f8911c4b666 }}',
'{{ PHPDOC0de51a5acf75f22ec3c4a9568981d703 }}',
[
'{{ PHPDOCa8cfde6331bd59eb2ac96f8911c4b666 }}' => new Object_(),
'{{ PHPDOC0de51a5acf75f22ec3c4a9568981d703 }}' => new Fqsen('\OBJECT'),
],
),
$functions['\bar()']->getArguments()[0]->getDefault(false)
Expand Down
Loading