public function it_should_extract_metadata_from_method_collection(TypeResolver $typeResolver)
 {
     $typeResolver->extractTypeFromCollectionType(Argument::any())->willReturn(null);
     $typeResolver->resolvePropertyType(new \ReflectionProperty(DocRequest::class, 'someElem'))->willReturn(DocRequestElem::class);
     $typeResolver->resolvePropertyType(new \ReflectionProperty(DocRequestElem::class, 'prop'))->willReturn('string');
     $typeResolver->resolvePropertyType(new \ReflectionProperty(DocRequestElem::class, 'req'))->willReturn(DocRequest::class);
     $typeResolver->resolvePropertyType(new \ReflectionProperty(DocResponse::class, 'docResponseElem'))->willReturn(DocResponseElem::class);
     $typeResolver->resolvePropertyType(new \ReflectionProperty(DocResponseElem::class, 'prop'))->willReturn('string');
     $typeResolver->resolveFunctionReturnType(new \ReflectionMethod(DocService::class, 'wellDocumentedFunction'))->willReturn(DocResponse::class);
     $this->extract(new MethodCollection(['doc.service' => [new DocService(), 'wellDocumentedFunction']]))->shouldBeLike([['method' => 'doc.service', 'description' => 'Some desc of method.', 'parameters' => [['name' => 'someElem', 'description' => 'Some description of property.', 'type' => 'object', 'properties' => [['name' => 'prop', 'description' => '', 'type' => 'string'], ['name' => 'req', 'description' => '', 'type' => 'object', 'properties' => []]]]], 'returns' => [['name' => 'docResponseElem', 'description' => 'Some desc of response.', 'type' => 'object', 'properties' => [['name' => 'prop', 'description' => '', 'type' => 'string']]]]]]);
 }
 /**
  * @param \ReflectionProperty $reflectionProperty
  *
  * @return null|string
  */
 private function determinePropertyType(\ReflectionProperty $reflectionProperty)
 {
     return $this->typeResolver->resolvePropertyType($reflectionProperty);
 }