From 68bf1670f3e4592f52e81781c93832b694f5e5f3 Mon Sep 17 00:00:00 2001 From: Guilhem Niot Date: Fri, 20 Nov 2020 17:10:21 +0100 Subject: [PATCH] Fix CS --- Exception/UndocumentedArrayItemsException.php | 2 +- ModelDescriber/ObjectModelDescriber.php | 2 +- PropertyDescriber/ArrayPropertyDescriber.php | 2 +- Tests/Functional/Entity/ArrayItemsError/Bar.php | 2 -- Tests/Functional/Entity/ArrayItemsError/Foo.php | 2 -- Tests/Functional/TestKernel.php | 2 +- 6 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Exception/UndocumentedArrayItemsException.php b/Exception/UndocumentedArrayItemsException.php index 570642f..b44c05f 100644 --- a/Exception/UndocumentedArrayItemsException.php +++ b/Exception/UndocumentedArrayItemsException.php @@ -16,7 +16,7 @@ class UndocumentedArrayItemsException extends \LogicException private $class; private $path; - public function __construct(string $class = null, string $path = "") + public function __construct(string $class = null, string $path = '') { $this->class = $class; $this->path = $path; diff --git a/ModelDescriber/ObjectModelDescriber.php b/ModelDescriber/ObjectModelDescriber.php index 6350bfc..0f41324 100644 --- a/ModelDescriber/ObjectModelDescriber.php +++ b/ModelDescriber/ObjectModelDescriber.php @@ -152,7 +152,7 @@ class ObjectModelDescriber implements ModelDescriberInterface, ModelRegistryAwar throw $e; // This exception is already complete } - throw new UndocumentedArrayItemsException($model->getType()->getClassName(), sprintf("%s%s", $propertyName, $e->getPath())); + throw new UndocumentedArrayItemsException($model->getType()->getClassName(), sprintf('%s%s', $propertyName, $e->getPath())); } return; diff --git a/PropertyDescriber/ArrayPropertyDescriber.php b/PropertyDescriber/ArrayPropertyDescriber.php index fe8f63a..defb84f 100644 --- a/PropertyDescriber/ArrayPropertyDescriber.php +++ b/PropertyDescriber/ArrayPropertyDescriber.php @@ -51,7 +51,7 @@ class ArrayPropertyDescriber implements PropertyDescriberInterface, ModelRegistr throw $e; // This exception is already complete } - throw new UndocumentedArrayItemsException(null, sprintf("%s[]", $e->getPath())); + throw new UndocumentedArrayItemsException(null, sprintf('%s[]', $e->getPath())); } break; diff --git a/Tests/Functional/Entity/ArrayItemsError/Bar.php b/Tests/Functional/Entity/ArrayItemsError/Bar.php index fc020cc..76a8073 100644 --- a/Tests/Functional/Entity/ArrayItemsError/Bar.php +++ b/Tests/Functional/Entity/ArrayItemsError/Bar.php @@ -11,8 +11,6 @@ namespace Nelmio\ApiDocBundle\Tests\Functional\Entity\ArrayItemsError; -use Symfony\Component\Serializer\Annotation\Groups; - /** * @author Guilhem N. */ diff --git a/Tests/Functional/Entity/ArrayItemsError/Foo.php b/Tests/Functional/Entity/ArrayItemsError/Foo.php index 177a84f..c9d7704 100644 --- a/Tests/Functional/Entity/ArrayItemsError/Foo.php +++ b/Tests/Functional/Entity/ArrayItemsError/Foo.php @@ -11,8 +11,6 @@ namespace Nelmio\ApiDocBundle\Tests\Functional\Entity\ArrayItemsError; -use Symfony\Component\Serializer\Annotation\Groups; - /** * @author Guilhem N. */ diff --git a/Tests/Functional/TestKernel.php b/Tests/Functional/TestKernel.php index edb64e4..edf9e2e 100644 --- a/Tests/Functional/TestKernel.php +++ b/Tests/Functional/TestKernel.php @@ -66,7 +66,7 @@ class TestKernel extends Kernel if ($this->flags & self::USE_JMS) { $bundles[] = new JMSSerializerBundle(); - if ($this->flags & self::USE_BAZINGA) { + if ($this->flags & self::USE_BAZINGA) { $bundles[] = new BazingaHateoasBundle(); } }