<commit_before><?php
namespace AppBundle\Export\Sheet;


use AppBundle\Entity\Event;
use AppBundle\Entity\Participation;
use AppBundle\Entity\PhoneNumber;
use libphonenumber\PhoneNumberUtil;

class ParticipantsMailSheet extends ParticipantsSheet
{

    public function __construct(\PHPExcel_Worksheet $sheet, Event $event, array $participants)
    {
        parent::__construct($sheet, $event, $participants);

        $column = new EntitySheetColumn('nameFirstParticipation', '<NAME>', 'participation');
        $column->setConverter(
            function (Participation $value) {
                return $value->getNameFirst();
            }
        );
        $this->addColumn($column);

        $column = new EntitySheetColumn('nameLastParticipation', '<NAME>', 'participation');
        $column->setConverter(
            function (Participation $value) {
                return $value->getNameLast();
            }
        );
        $this->addColumn($column);

        $phoneNumberUtil = PhoneNumberUtil::getInstance();
        $column          = new EntitySheetColumn('phoneNumbersParticipation', 'Eltern Telefonnummern', 'participation');
        $column->setConverter(
            function (Participation $value, $entity) use ($phoneNumberUtil) {
                $value = $value->getPhoneNumbers();

                $numberText  = '';
                $numberCount = count($value);
                $i           = 1;

                /** @var PhoneNumber $number */
                foreach ($value as $number) {
                    $numberText .= $phoneNumberUtil->formatOutOfCountryCallingNumber($number->getNumber(), 'DE');
                    if ($number->getDescription()) {
                        $numberText .= ' (';
                        $numberText .= $number->getDescription();
                        $numberText .= ')';
                    }

                    if ($i++ < $numberCount) {
                        $numberText .= ', ';
                    }
                }

                return $numberText;
            }
        );
        $this->addColumn($column);

    }
}<commit_msg>Now using newline for number separation in mail sheet⁄<commit_after><?php
namespace AppBundle\Export\Sheet;


use AppBundle\Entity\Event;
use AppBundle\Entity\Participation;
use libphonenumber\PhoneNumberUtil;

class ParticipantsMailSheet extends ParticipantsSheet
{

    public function __construct(\PHPExcel_Worksheet $sheet, Event $event, array $participants)
    {
        parent::__construct($sheet, $event, $participants);

        $column = new EntitySheetColumn('nameFirstParticipation', '<NAME>', 'participation');
        $column->setConverter(
            function (Participation $value) {
                return $value->getNameFirst();
            }
        );
        $this->addColumn($column);

        $column = new EntitySheetColumn('nameLastParticipation', '<NAME>', 'participation');
        $column->setConverter(
            function (Participation $value) {
                return $value->getNameLast();
            }
        );
        $this->addColumn($column);

        $phoneNumberUtil = PhoneNumberUtil::getInstance();
        $column          = new EntitySheetColumn('phoneNumbersParticipation', 'Eltern Telefonnummern', 'participation');
        $column->setConverter(
            function (Participation $value, $entity) use ($phoneNumberUtil) {
                $value = $value->getPhoneNumbers();

                $numberText  = '';
                $numberCount = count($value);
                $i           = 1;

                /** @var PhoneNumbUsinger $number */
                foreach ($value as $number) {
                    $numberText .= $phoneNumberUtil->formatOutOfCountryCallingNumber($number->getNumber(), 'DE');
                    if ($number->getDescription()) {
                        $numberText .= ' (';
                        $numberText .= $number->getDescription();
                        $numberText .= ')';
                    }

                    if ($i++ < $numberCount) {
                        $numberText .= "\n";
                    }
                }

                return $numberText;
            }
        );
        $this->addColumn($column);

    }
}
{'fraction_non_alphanumeric': 0.12411514865502596, 'fraction_numerical': 0.00047192071731949034, 'mean_word_length': 1.8203592814371257, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7054339', 'n_tokens_mistral': 1086, 'n_tokens_neox': 996, 'n_words': 197}