Skip to content
Merged
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
7 changes: 4 additions & 3 deletions src/Visitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,17 @@ private function getSymbolName(Node $node): string
assert(isset($name), 'Node does not have a name');

if ($node instanceof Function_ || $node instanceof ClassLike) {
return $name;
assert($node->namespacedName instanceof Name);
return $node->namespacedName->toString();
}

$parent = $this->stack[count($this->stack) - 2];
assert($parent instanceof ClassLike);
assert($parent->name instanceof Identifier);
assert($parent->namespacedName instanceof Name);

return sprintf(
'%1$s::%2$s%3$s',
$parent->name->name,
$parent->namespacedName->toString(),
$node instanceof Property ? '$' : '',
$name
);
Expand Down
2 changes: 0 additions & 2 deletions wordpress-stubs.php
Original file line number Diff line number Diff line change
Expand Up @@ -24127,7 +24127,6 @@ class File implements \SimplePie\Cache\Base
* @param string $location Location string (from SimplePie::$cache_location)
* @param string $name Unique ID for the cache
* @param Base::TYPE_FEED|Base::TYPE_IMAGE $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data
* @phpstan-return void
*/
public function __construct(string $location, string $name, $type)
{
Expand Down Expand Up @@ -76318,7 +76317,6 @@ class File extends \WordPress\AiClient\Common\AbstractDataTransferObject
* @param string $file The file string (URL, base64 data, or local path).
* @param string|null $mimeType The MIME type of the file (optional).
* @throws \WordPress\AiClient\Common\Exception\InvalidArgumentException If the file format is invalid or MIME type cannot be determined.
* @phpstan-return void
*/
public function __construct(string $file, ?string $mimeType = null)
{
Expand Down
Loading