DX: fix phpstan errors

This commit is contained in:
2023-02-04 01:19:34 +01:00
parent 856eea37ee
commit 584ac05b53
12 changed files with 34 additions and 136 deletions

View File

@@ -88,22 +88,12 @@ class PickThirdPartyTypeCategoryType extends \Symfony\Component\Form\AbstractTyp
return ChoiceType::class;
}
public function reverseTransform($value)
private function reverseTransform($value)
{
if (null === $value) {
return null;
}
if (is_array($value)) {
$r = [];
foreach ($value as $v) {
$r[] = $this->transform($v);
}
return $r;
}
if ($value instanceof ThirdPartyCategory) {
return 'category:' . $value->getId();
}