mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-22 15:43:51 +00:00
Rector rules: apply rules for 5.0 types
This commit is contained in:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user