Skip to content

Commit 8f71172

Browse files
authored
Fix scrutinizer issues (#11)
1 parent f881e52 commit 8f71172

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/App/Helper/MinMaxHelper.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ private function appendStringDoc(StringDoc $doc, Constraint $constraint)
3636
{
3737
if ($constraint instanceof Assert\Length) {
3838
if (null !== $constraint->min) {
39-
$doc->setMinLength($constraint->min);
39+
$doc->setMinLength((int) $constraint->min);
4040
}
4141
if (null !== $constraint->max) {
42-
$doc->setMaxLength($constraint->max);
42+
$doc->setMaxLength((int) $constraint->max);
4343
}
4444
} elseif ($constraint instanceof Assert\NotBlank && null === $doc->getMinLength()) {
4545
// Not blank so minimum 1 character
@@ -73,17 +73,17 @@ private function appendCollectionDoc(CollectionDoc $doc, Constraint $constraint)
7373
{
7474
if ($constraint instanceof Assert\Choice) {
7575
if (null !== $constraint->min) {
76-
$doc->setMinItem($constraint->min);
76+
$doc->setMinItem((int) $constraint->min);
7777
}
7878
if (null !== $constraint->max) {
79-
$doc->setMaxItem($constraint->max);
79+
$doc->setMaxItem((int) $constraint->max);
8080
}
8181
} elseif ($constraint instanceof Assert\Count) {
8282
if (null !== $constraint->min) {
83-
$doc->setMinItem($constraint->min);
83+
$doc->setMinItem((int) $constraint->min);
8484
}
8585
if (null !== $constraint->max) {
86-
$doc->setMaxItem($constraint->max);
86+
$doc->setMaxItem((int) $constraint->max);
8787
}
8888
} elseif ($constraint instanceof Assert\NotBlank && null === $doc->getMinItem()) {
8989
// Not blank so minimum 1 item

0 commit comments

Comments
 (0)