From edf6b70175936f96c35a02b29602015fd8199b4f Mon Sep 17 00:00:00 2001 From: Guilhem Niot Date: Thu, 6 Aug 2020 10:26:59 +0200 Subject: [PATCH] Apply StyleCI fixes --- Describer/ExternalDocDescriber.php | 1 - Describer/RouteDescriber.php | 2 -- ModelDescriber/FormModelDescriber.php | 9 +---- ModelDescriber/JMSModelDescriber.php | 2 -- Routing/FilteredRouteCollectionBuilder.php | 2 +- .../Functional/Entity/SymfonyConstraints.php | 35 ------------------- Tests/Functional/Entity/User.php | 13 ------- Tests/Functional/FunctionalTest.php | 2 +- Util/ControllerReflector.php | 2 -- 9 files changed, 3 insertions(+), 65 deletions(-) diff --git a/Describer/ExternalDocDescriber.php b/Describer/ExternalDocDescriber.php index d322c44..97a95d2 100644 --- a/Describer/ExternalDocDescriber.php +++ b/Describer/ExternalDocDescriber.php @@ -21,7 +21,6 @@ class ExternalDocDescriber implements DescriberInterface /** * @param array|callable $externalDoc - * @param bool $overwrite */ public function __construct($externalDoc, bool $overwrite = false) { diff --git a/Describer/RouteDescriber.php b/Describer/RouteDescriber.php index aefc63d..b1d1d81 100644 --- a/Describer/RouteDescriber.php +++ b/Describer/RouteDescriber.php @@ -28,8 +28,6 @@ final class RouteDescriber implements DescriberInterface, ModelRegistryAwareInte private $routeDescribers; /** - * @param RouteCollection $routeCollection - * @param ControllerReflector $controllerReflector * @param RouteDescriberInterface[]|iterable $routeDescribers */ public function __construct(RouteCollection $routeCollection, ControllerReflector $controllerReflector, $routeDescribers) diff --git a/ModelDescriber/FormModelDescriber.php b/ModelDescriber/FormModelDescriber.php index 0255df2..c18f270 100644 --- a/ModelDescriber/FormModelDescriber.php +++ b/ModelDescriber/FormModelDescriber.php @@ -92,8 +92,7 @@ final class FormModelDescriber implements ModelDescriberInterface, ModelRegistry * * Returns true if a native Swagger type was found, false otherwise * - * @param FormConfigBuilderInterface $config - * @param $property + * @param $property */ private function findFormType(FormConfigBuilderInterface $config, $property) { @@ -232,8 +231,6 @@ final class FormModelDescriber implements ModelDescriberInterface, ModelRegistry } /** - * @param array $array - * * @return bool true if $array contains only numbers, false otherwise */ private function isNumbersArray(array $array): bool @@ -248,8 +245,6 @@ final class FormModelDescriber implements ModelDescriberInterface, ModelRegistry } /** - * @param array $array - * * @return bool true if $array contains only booleans, false otherwise */ private function isBooleansArray(array $array): bool @@ -264,8 +259,6 @@ final class FormModelDescriber implements ModelDescriberInterface, ModelRegistry } /** - * @param ResolvedFormTypeInterface $type - * * @return ResolvedFormTypeInterface|null */ private function getBuiltinFormType(ResolvedFormTypeInterface $type) diff --git a/ModelDescriber/JMSModelDescriber.php b/ModelDescriber/JMSModelDescriber.php index 86282fa..0711be2 100644 --- a/ModelDescriber/JMSModelDescriber.php +++ b/ModelDescriber/JMSModelDescriber.php @@ -273,8 +273,6 @@ class JMSModelDescriber implements ModelDescriberInterface, ModelRegistryAwareIn } /** - * @param array $type - * * @return bool|null */ private function propertyTypeUsesGroups(array $type) diff --git a/Routing/FilteredRouteCollectionBuilder.php b/Routing/FilteredRouteCollectionBuilder.php index fb23807..a0a81ce 100644 --- a/Routing/FilteredRouteCollectionBuilder.php +++ b/Routing/FilteredRouteCollectionBuilder.php @@ -127,7 +127,7 @@ final class FilteredRouteCollectionBuilder return false; } - /** @var null|Areas $areas */ + /** @var Areas|null $areas */ $areas = $this->annotationReader->getMethodAnnotation( $method, Areas::class diff --git a/Tests/Functional/Entity/SymfonyConstraints.php b/Tests/Functional/Entity/SymfonyConstraints.php index 1e1bf6e..2fa149e 100644 --- a/Tests/Functional/Entity/SymfonyConstraints.php +++ b/Tests/Functional/Entity/SymfonyConstraints.php @@ -104,97 +104,62 @@ class SymfonyConstraints /** * @Assert\Count(min="0", max="10") - * - * @param int $propertyNotBlank */ public function setPropertyNotBlank(int $propertyNotBlank): void { $this->propertyNotBlank = $propertyNotBlank; } - /** - * @param int $propertyNotNull - */ public function setPropertyNotNull(int $propertyNotNull): void { $this->propertyNotNull = $propertyNotNull; } - /** - * @param int $propertyAssertLength - */ public function setPropertyAssertLength(int $propertyAssertLength): void { $this->propertyAssertLength = $propertyAssertLength; } - /** - * @param int $propertyRegex - */ public function setPropertyRegex(int $propertyRegex): void { $this->propertyRegex = $propertyRegex; } - /** - * @param int $propertyCount - */ public function setPropertyCount(int $propertyCount): void { $this->propertyCount = $propertyCount; } - /** - * @param int $propertyChoice - */ public function setPropertyChoice(int $propertyChoice): void { $this->propertyChoice = $propertyChoice; } - /** - * @param int $propertyChoiceWithCallback - */ public function setPropertyChoiceWithCallback(int $propertyChoiceWithCallback): void { $this->propertyChoiceWithCallback = $propertyChoiceWithCallback; } - /** - * @param int $propertyChoiceWithCallbackWithoutClass - */ public function setPropertyChoiceWithCallbackWithoutClass(int $propertyChoiceWithCallbackWithoutClass): void { $this->propertyChoiceWithCallbackWithoutClass = $propertyChoiceWithCallbackWithoutClass; } - /** - * @param int $propertyExpression - */ public function setPropertyExpression(int $propertyExpression): void { $this->propertyExpression = $propertyExpression; } - /** - * @param int $propertyRange - */ public function setPropertyRange(int $propertyRange): void { $this->propertyRange = $propertyRange; } - /** - * @param int $propertyLessThan - */ public function setPropertyLessThan(int $propertyLessThan): void { $this->propertyLessThan = $propertyLessThan; } - /** - * @param int $propertyLessThanOrEqual - */ public function setPropertyLessThanOrEqual(int $propertyLessThanOrEqual): void { $this->propertyLessThanOrEqual = $propertyLessThanOrEqual; diff --git a/Tests/Functional/Entity/User.php b/Tests/Functional/Entity/User.php index aa41000..69a9b62 100644 --- a/Tests/Functional/Entity/User.php +++ b/Tests/Functional/Entity/User.php @@ -83,16 +83,12 @@ class User */ private $dateAsInterface; - /** - * @param float $money - */ public function setMoney(float $money) { $this->money = $money; } /** - * @param int $id * @SWG\Property(example=1) */ public function setId(int $id) @@ -113,9 +109,6 @@ class User $this->roles = $roles; } - /** - * @param int $friendsNumber - */ public function setFriendsNumber(int $friendsNumber) { $this->friendsNumber = $friendsNumber; @@ -141,17 +134,11 @@ class User { } - /** - * @return \DateTimeInterface - */ public function getDateAsInterface(): \DateTimeInterface { return $this->dateAsInterface; } - /** - * @param \DateTimeInterface $dateAsInterface - */ public function setDateAsInterface(\DateTimeInterface $dateAsInterface) { $this->dateAsInterface = $dateAsInterface; diff --git a/Tests/Functional/FunctionalTest.php b/Tests/Functional/FunctionalTest.php index cd6e002..f9023e1 100644 --- a/Tests/Functional/FunctionalTest.php +++ b/Tests/Functional/FunctionalTest.php @@ -412,7 +412,7 @@ class FunctionalTest extends WebTestCase public function testSerializedNameAction() { - if (!class_exists(SerializedName::class)) { + if (!class_exists(SerializedName::class)) { $this->markTestSkipped('Annotation @SerializedName doesn\'t exist.'); } diff --git a/Util/ControllerReflector.php b/Util/ControllerReflector.php index 4b4fcb1..9a102b4 100644 --- a/Util/ControllerReflector.php +++ b/Util/ControllerReflector.php @@ -38,8 +38,6 @@ class ControllerReflector /** * Returns the ReflectionMethod for the given controller string. * - * @param string $controller - * * @return \ReflectionMethod|null */ public function getReflectionMethod(string $controller)