Skip to content

Commit 1764acc

Browse files
committed
Add the missing context argument in snippets for resolving partial names
1 parent 55dcd43 commit 1764acc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This package provides two Resolvers that are capable of
1616

1717
## Installing
1818

19-
The easiest way to install this library is with [Composer](http://getcomposer.org) using the following command:
19+
The easiest way to install this library is with [Composer](https://getcomposer.org) using the following command:
2020

2121
$ composer require phpdocumentor/type-resolver
2222

@@ -146,7 +146,7 @@ class as second argument and the Resolvers will take this into account when reso
146146
To obtain the resolved class name for the `@var` tag in the example above you can do:
147147

148148
$typeResolver = new \phpDocumentor\Reflection\TypeResolver();
149-
$type = $typeResolver->resolve('Types\Context');
149+
$type = $typeResolver->resolve('Types\Context', $context);
150150

151151
When you do this you will receive an object of class `\phpDocumentor\Reflection\Types\Object_` for which you can call
152152
the `getFqsen` method to receive a Value Object that represents the complete FQSEN. So that would be
@@ -162,7 +162,7 @@ Another example is on how to resolve the FQSEN of a method as can be seen with t
162162
resolve that you can do the following:
163163

164164
$fqsenResolver = new \phpDocumentor\Reflection\FqsenResolver();
165-
$type = $fqsenResolver->resolve('Classy::otherFunction()');
165+
$type = $fqsenResolver->resolve('Classy::otherFunction()', $context);
166166

167167
Because Classy is a Class in the current namespace its FQSEN will have the `My\Example` namespace and by calling the
168168
`resolve` method of the FQSEN Resolver you will receive an `Fqsen` object that refers to

0 commit comments

Comments
 (0)