cs: Enable more risky rules.

This commit is contained in:
Pol Dellaiera
2021-11-30 11:28:52 +01:00
parent 3631fd99fd
commit c8195e6df5
65 changed files with 155 additions and 139 deletions

View File

@@ -693,7 +693,7 @@ final class ImportPeopleFromCSVCommand extends Command
protected function matchColumnToCustomField($row)
{
$cfMappingsOptions = $this->input->getOption('custom-field');
/* @var $em \Doctrine\Persistence\ObjectManager */
/** @var \Doctrine\Persistence\ObjectManager $em */
$em = $this->em;
foreach ($cfMappingsOptions as $cfMappingStringOption) {
@@ -877,7 +877,7 @@ final class ImportPeopleFromCSVCommand extends Command
$this->output->writeln($this->helper->localize($cf->getName()));
// printing the possible answers
/* @var $table \Symfony\Component\Console\Helper\Table */
/** @var \Symfony\Component\Console\Helper\Table $table */
$table = new Table($this->output);
$table->setHeaders(['#', 'label', 'value']);
$i = 0;
@@ -954,7 +954,7 @@ final class ImportPeopleFromCSVCommand extends Command
}
// we skip if the opening date is now (or after yesterday)
/* @var $period \Chill\PersonBundle\Entity\AccompanyingPeriod */
/** @var \Chill\PersonBundle\Entity\AccompanyingPeriod $period */
$period = $person->getCurrentAccompanyingPeriod();
if ($period->getOpeningDate() > new DateTime('yesterday')) {
@@ -1037,11 +1037,11 @@ final class ImportPeopleFromCSVCommand extends Command
*/
protected function processingCustomFields(Person $person, $row)
{
/* @var $cfProvider \Chill\CustomFieldsBundle\Service\CustomFieldProvider */
/** @var \Chill\CustomFieldsBundle\Service\CustomFieldProvider $cfProvider */
$cfProvider = $this->customFieldProvider;
$cfData = [];
/* @var $$customField \Chill\CustomFieldsBundle\Entity\CustomField */
/** @var \Chill\CustomFieldsBundle\Entity\CustomField $$customField */
foreach ($this->customFieldMapping as $rowNumber => $customField) {
$builder = $this->formFactory->createBuilder();
$cfProvider->getCustomFieldByType($customField->getType())
@@ -1139,7 +1139,7 @@ final class ImportPeopleFromCSVCommand extends Command
{
$answers = [];
/* @var $choice \Symfony\Component\Form\ChoiceList\View\ChoiceView */
/** @var \Symfony\Component\Form\ChoiceList\View\ChoiceView $choice */
foreach ($choices as $choice) {
if ($choice instanceof \Symfony\Component\Form\ChoiceList\View\ChoiceView) {
$answers[$choice->value] = $choice->label;