mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Rector rules: apply rules for 5.0 types
This commit is contained in:
parent
4c52aa366a
commit
c6bb7b1d98
@ -28,7 +28,7 @@ class AddressDataMapper implements DataMapperInterface
|
||||
* @param Address $address
|
||||
* @param \Iterator $forms
|
||||
*/
|
||||
public function mapDataToForms($address, $forms)
|
||||
public function mapDataToForms($address, iterable $forms)
|
||||
{
|
||||
if (null === $address) {
|
||||
return;
|
||||
@ -78,7 +78,7 @@ class AddressDataMapper implements DataMapperInterface
|
||||
* @param \Iterator $forms
|
||||
* @param Address $address
|
||||
*/
|
||||
public function mapFormsToData($forms, &$address)
|
||||
public function mapFormsToData(iterable $forms, &$address)
|
||||
{
|
||||
if (!$address instanceof Address) {
|
||||
$address = new Address();
|
||||
|
@ -17,7 +17,7 @@ use Symfony\Component\Form\FormInterface;
|
||||
|
||||
final readonly class ExportPickCenterDataMapper implements DataMapperInterface
|
||||
{
|
||||
public function mapDataToForms($viewData, $forms): void
|
||||
public function mapDataToForms($viewData, iterable $forms): void
|
||||
{
|
||||
if (null === $viewData) {
|
||||
return;
|
||||
@ -31,7 +31,7 @@ final readonly class ExportPickCenterDataMapper implements DataMapperInterface
|
||||
// NOTE: we do not map back the regroupments
|
||||
}
|
||||
|
||||
public function mapFormsToData($forms, &$viewData): void
|
||||
public function mapFormsToData(iterable $forms, &$viewData): void
|
||||
{
|
||||
/** @var array<string, FormInterface> $forms */
|
||||
$forms = iterator_to_array($forms);
|
||||
|
@ -21,7 +21,7 @@ final class PrivateCommentDataMapper extends AbstractType implements DataMapperI
|
||||
{
|
||||
public function __construct(private readonly Security $security) {}
|
||||
|
||||
public function mapDataToForms($viewData, $forms)
|
||||
public function mapDataToForms($viewData, iterable $forms)
|
||||
{
|
||||
if (null === $viewData) {
|
||||
return null;
|
||||
@ -36,7 +36,7 @@ final class PrivateCommentDataMapper extends AbstractType implements DataMapperI
|
||||
$forms['comments']->setData($viewData->getCommentForUser($this->security->getUser()));
|
||||
}
|
||||
|
||||
public function mapFormsToData($forms, &$viewData)
|
||||
public function mapFormsToData(iterable $forms, &$viewData)
|
||||
{
|
||||
$forms = iterator_to_array($forms);
|
||||
|
||||
|
@ -17,7 +17,7 @@ use Symfony\Component\Form\Exception;
|
||||
|
||||
class RollingDateDataMapper implements DataMapperInterface
|
||||
{
|
||||
public function mapDataToForms($viewData, $forms)
|
||||
public function mapDataToForms($viewData, iterable $forms)
|
||||
{
|
||||
if (null === $viewData) {
|
||||
return;
|
||||
@ -33,7 +33,7 @@ class RollingDateDataMapper implements DataMapperInterface
|
||||
$forms['fixedDate']->setData($viewData->getFixedDate());
|
||||
}
|
||||
|
||||
public function mapFormsToData($forms, &$viewData): void
|
||||
public function mapFormsToData(iterable $forms, &$viewData): void
|
||||
{
|
||||
$forms = iterator_to_array($forms);
|
||||
|
||||
|
@ -18,7 +18,7 @@ class ScopePickerDataMapper implements DataMapperInterface
|
||||
{
|
||||
public function __construct(private readonly ?Scope $scope = null) {}
|
||||
|
||||
public function mapDataToForms($data, $forms)
|
||||
public function mapDataToForms($data, iterable $forms)
|
||||
{
|
||||
$forms = iterator_to_array($forms);
|
||||
|
||||
@ -37,7 +37,7 @@ class ScopePickerDataMapper implements DataMapperInterface
|
||||
}
|
||||
}
|
||||
|
||||
public function mapFormsToData($forms, &$data)
|
||||
public function mapFormsToData(iterable $forms, &$data)
|
||||
{
|
||||
$forms = iterator_to_array($forms);
|
||||
|
||||
|
@ -19,7 +19,7 @@ use Symfony\Component\Form\Exception\UnexpectedTypeException;
|
||||
|
||||
class PersonAltNameDataMapper implements DataMapperInterface
|
||||
{
|
||||
public function mapDataToForms($viewData, $forms)
|
||||
public function mapDataToForms($viewData, iterable $forms)
|
||||
{
|
||||
if (null === $viewData) {
|
||||
return;
|
||||
@ -47,7 +47,7 @@ class PersonAltNameDataMapper implements DataMapperInterface
|
||||
* @param FormInterface[] $forms
|
||||
* @param Collection $viewData
|
||||
*/
|
||||
public function mapFormsToData($forms, &$viewData)
|
||||
public function mapFormsToData(iterable $forms, &$viewData)
|
||||
{
|
||||
$mapIndexToKey = [];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user