Fix typos

This commit is contained in:
Pierre Grimaud 2020-04-21 23:47:33 +02:00
parent 2b006dab84
commit 3b6fbf936d
3 changed files with 3 additions and 3 deletions

View File

@ -53,7 +53,7 @@ final class RouteDescriber implements DescriberInterface, ModelRegistryAwareInte
// if able to resolve the controller // if able to resolve the controller
$controller = $route->getDefault('_controller'); $controller = $route->getDefault('_controller');
if ($method = $this->controllerReflector->getReflectionMethod($controller)) { if ($method = $this->controllerReflector->getReflectionMethod($controller)) {
// Extract as many informations as possible about this route // Extract as many information as possible about this route
foreach ($this->routeDescribers as $describer) { foreach ($this->routeDescribers as $describer) {
if ($describer instanceof ModelRegistryAwareInterface) { if ($describer instanceof ModelRegistryAwareInterface) {
$describer->setModelRegistry($this->modelRegistry); $describer->setModelRegistry($this->modelRegistry);

View File

@ -86,7 +86,7 @@ final class ModelRegister
} }
if ($annotation instanceof Schema) { if ($annotation instanceof Schema) {
@trigger_error(sprintf('Using `@Model` implicitely in a `@SWG\Schema`, `@SWG\Items` or `@SWG\Property` annotation in %s is deprecated since version 3.2 and won\'t be supported in 4.0. Use `ref=@Model()` instead.', $annotation->_context->getDebugLocation()), E_USER_DEPRECATED); @trigger_error(sprintf('Using `@Model` implicitly in a `@SWG\Schema`, `@SWG\Items` or `@SWG\Property` annotation in %s is deprecated since version 3.2 and won\'t be supported in 4.0. Use `ref=@Model()` instead.', $annotation->_context->getDebugLocation()), E_USER_DEPRECATED);
} }
$annotation->merge([new $annotationClass([ $annotation->merge([new $annotationClass([

View File

@ -27,7 +27,7 @@ class ModelRegisterTest extends TestCase
{ {
/** /**
* @group legacy * @group legacy
* @expectedDeprecation Using `@Model` implicitely in a `@SWG\Schema`, `@SWG\Items` or `@SWG\Property` annotation in %s. Use `ref=@Model()` instead. * @expectedDeprecation Using `@Model` implicitly in a `@SWG\Schema`, `@SWG\Items` or `@SWG\Property` annotation in %s. Use `ref=@Model()` instead.
*/ */
public function testDeprecatedImplicitUseOfModel() public function testDeprecatedImplicitUseOfModel()
{ {