mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
cs: Enable a couple of risky rules.
This commit is contained in:
@@ -64,7 +64,7 @@ class LoadCustomField extends AbstractFixture implements OrderedFixtureInterface
|
||||
];
|
||||
|
||||
for ($i = 0; 25 >= $i; ++$i) {
|
||||
$cFType = $cFTypes[rand(0, sizeof($cFTypes) - 1)];
|
||||
$cFType = $cFTypes[rand(0, count($cFTypes) - 1)];
|
||||
|
||||
$customField = (new CustomField())
|
||||
->setSlug("cf_report_{$i}")
|
||||
|
@@ -417,7 +417,7 @@ class ReportList implements ListInterface, ExportElementValidatedInterface
|
||||
$cfType = $this->customFieldProvider->getCustomFieldByType($cf->getType());
|
||||
|
||||
// if is multiple, split into multiple columns
|
||||
if ($cfType instanceof CustomFieldChoice and $cfType->isMultiple($cf)) {
|
||||
if ($cfType instanceof CustomFieldChoice && $cfType->isMultiple($cf)) {
|
||||
foreach ($cfType->getChoices($cf) as $choiceSlug => $label) {
|
||||
$slug = $this->slugToDQL($cf->getSlug(), 'choice', ['choiceSlug' => $choiceSlug]);
|
||||
$qb->addSelect(
|
||||
@@ -525,7 +525,7 @@ class ReportList implements ListInterface, ExportElementValidatedInterface
|
||||
->render(json_decode($value, true), $cf, 'csv');
|
||||
};
|
||||
|
||||
if ($cfType instanceof CustomFieldChoice and $cfType->isMultiple($cf)) {
|
||||
if ($cfType instanceof CustomFieldChoice && $cfType->isMultiple($cf)) {
|
||||
return function ($value) use ($cf, $cfType, $key) {
|
||||
$slugChoice = $this->extractInfosFromSlug($key)['additionnalInfos']['choiceSlug'];
|
||||
$decoded = \json_decode($value, true);
|
||||
@@ -537,7 +537,7 @@ class ReportList implements ListInterface, ExportElementValidatedInterface
|
||||
. ' | ' . $label;
|
||||
}
|
||||
|
||||
if ('_other' === $slugChoice and $cfType->isChecked($cf, $choiceSlug, $decoded)) {
|
||||
if ('_other' === $slugChoice && $cfType->isChecked($cf, $choiceSlug, $decoded)) {
|
||||
return $cfType->extractOtherValue($cf, $decoded);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user