Skip to content

Commit 444acff

Browse files
committed
Fix
1 parent d8dd6ec commit 444acff

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

src/App/Helper/ConstraintPayloadDocHelper.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,8 @@ protected function getPayloadDocValue(Constraint $constraint, string $documentat
9292
protected function hasPayloadDocKey(Constraint $constraint, string $documentationKey) : bool
9393
{
9494
return array_key_exists(
95-
$documentationKey,
96-
$constraint->payload[self::PAYLOAD_DOCUMENTATION_KEY]
97-
)
98-
;
95+
$documentationKey,
96+
$constraint->payload[self::PAYLOAD_DOCUMENTATION_KEY]
97+
);
9998
}
10099
}

src/App/Helper/DocTypeHelper.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@ private function guessTypeFromConstraintList(array $constraintList)
7676
$doc = $abstractTypeFound = null;
7777
foreach ($constraintList as $constraint) {
7878
$doc = $this->guessTypeFromConstraint($constraint);
79-
if (null !== $doc) {
80-
if ($this->isAbstractType($doc)) {
79+
if (null !== $doc) {
80+
if ($this->isAbstractType($doc)) {
8181
// Abstract type => continue to see if better type can be found
8282
$abstractTypeFound = $doc;
8383
$doc = null;
84-
} else {
84+
} else {
8585
break;
86-
}
86+
}
8787
}
8888
}
8989
// Try to fallback on abstractType if found
@@ -151,8 +151,7 @@ private function guessTypeFromConstraint(Constraint $constraint)
151151
// If primary type is still not defined
152152
switch (true) {
153153
case $constraint instanceof Assert\Range:
154-
if (
155-
(null !== $constraint->min && is_float($constraint->min))
154+
if ((null !== $constraint->min && is_float($constraint->min))
156155
|| (null !== $constraint->max && is_float($constraint->max))
157156
) {
158157
return new FloatDoc();

tests/Functional/App/Helper/ConstraintPayloadDocHelper/getTypeIfExistTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
* @group Helper
1515
*/
16-
class getTypeIfExistTest extends TestCase
16+
class GetTypeIfExistTest extends TestCase
1717
{
1818

1919
/** @var ConstraintPayloadDocHelper */

0 commit comments

Comments
 (0)