Skip to content

Commit

Permalink
Rewrote NameContext, added TypeContext
Browse files Browse the repository at this point in the history
  • Loading branch information
vudaltsov committed Feb 2, 2024
1 parent 4ef7b58 commit c739832
Show file tree
Hide file tree
Showing 34 changed files with 852 additions and 895 deletions.
1 change: 1 addition & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
__FILE__,
])
->exclude([
'unit/NameContext/functional',
'unit/ReflectorCompatibility',
]);

Expand Down
1 change: 1 addition & 0 deletions psalm.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<directory name="src"/>
<directory name="tests"/>
<ignoreFiles>
<directory name="tests/unit/NameContext/functional"/>
<directory name="tests/unit/ReflectorCompatibility"/>
<directory name="var"/>
<directory name="vendor"/>
Expand Down
14 changes: 2 additions & 12 deletions src/NameContext/FullyQualifiedName.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,14 @@
* @psalm-internal Typhoon\Reflection
* @psalm-immutable
*/
final class FullyQualifiedName extends Name
final class FullyQualifiedName
{
public function __construct(
private readonly UnqualifiedName|QualifiedName $name,
) {}

public function lastSegment(): UnqualifiedName
{
return $this->name->lastSegment();
}

public function resolveInNamespace(null|UnqualifiedName|QualifiedName $namespace = null): UnqualifiedName|QualifiedName
public function resolve(): UnqualifiedName|QualifiedName
{
return $this->name;
}

public function toString(): string
{
return '\\' . $this->name->toString();
}
}
88 changes: 0 additions & 88 deletions src/NameContext/Name.php

This file was deleted.

47 changes: 0 additions & 47 deletions src/NameContext/NameAsClassResolution.php

This file was deleted.

Loading

0 comments on commit c739832

Please sign in to comment.