1515use phpDocumentor \Reflection \DocBlock \Tags \Factory \StaticMethod ;
1616use phpDocumentor \Reflection \DocBlock \Tags \Generic ;
1717use phpDocumentor \Reflection \FqsenResolver ;
18- use phpDocumentor \Reflection \Types \Context ;
18+ use phpDocumentor \Reflection \Types \Context as TypeContext ;
1919use Webmozart \Assert \Assert ;
2020
2121/**
@@ -105,10 +105,10 @@ public function __construct(FqsenResolver $fqsenResolver, array $tagHandlers = n
105105 /**
106106 * {@inheritDoc}
107107 */
108- public function create ($ tagLine , Context $ context = null )
108+ public function create ($ tagLine , TypeContext $ context = null )
109109 {
110110 if (! $ context ) {
111- $ context = new Context ('' );
111+ $ context = new TypeContext ('' );
112112 }
113113
114114 list ($ tagName , $ tagBody ) = $ this ->extractTagParts ($ tagLine );
@@ -180,11 +180,11 @@ private function extractTagParts($tagLine)
180180 *
181181 * @param string $body
182182 * @param string $name
183- * @param Context $context
183+ * @param TypeContext $context
184184 *
185185 * @return Tag|null
186186 */
187- private function createTag ($ body , $ name , Context $ context )
187+ private function createTag ($ body , $ name , TypeContext $ context )
188188 {
189189 $ handlerClassName = $ this ->findHandlerClassName ($ name , $ context );
190190 $ arguments = $ this ->getArgumentsForParametersFromWiring (
@@ -200,11 +200,11 @@ private function createTag($body, $name, Context $context)
200200 * Determines the Fully Qualified Class Name of the Factory or Tag (containing a Factory Method `create`).
201201 *
202202 * @param string $tagName
203- * @param Context $context
203+ * @param TypeContext $context
204204 *
205205 * @return string
206206 */
207- private function findHandlerClassName ($ tagName , Context $ context )
207+ private function findHandlerClassName ($ tagName , TypeContext $ context )
208208 {
209209 $ handlerClassName = Generic::class;
210210 if (isset ($ this ->tagHandlerMappings [$ tagName ])) {
@@ -273,20 +273,20 @@ private function fetchParametersForHandlerFactoryMethod($handlerClassName)
273273 * Returns a copy of this class' Service Locator with added dynamic parameters, such as the tag's name, body and
274274 * Context.
275275 *
276- * @param Context $context The Context (namespace and aliasses) that may be passed and is used to resolve FQSENs.
277- * @param string $tagName The name of the tag that may be passed onto the factory method of the Tag class.
278- * @param string $tagBody The body of the tag that may be passed onto the factory method of the Tag class.
276+ * @param TypeContext $context The Context (namespace and aliasses) that may be passed and is used to resolve FQSENs.
277+ * @param string $tagName The name of the tag that may be passed onto the factory method of the Tag class.
278+ * @param string $tagBody The body of the tag that may be passed onto the factory method of the Tag class.
279279 *
280280 * @return mixed[]
281281 */
282- private function getServiceLocatorWithDynamicParameters (Context $ context , $ tagName , $ tagBody )
282+ private function getServiceLocatorWithDynamicParameters (TypeContext $ context , $ tagName , $ tagBody )
283283 {
284284 $ locator = array_merge (
285285 $ this ->serviceLocator ,
286286 [
287- 'name ' => $ tagName ,
288- 'body ' => $ tagBody ,
289- Context ::class => $ context
287+ 'name ' => $ tagName ,
288+ 'body ' => $ tagBody ,
289+ TypeContext ::class => $ context
290290 ]
291291 );
292292
0 commit comments