cs: Fix code-style (using PHPCSFixer and PHPCS).

This commit is contained in:
Pol Dellaiera
2021-12-21 10:59:23 +01:00
parent b7360955f7
commit 8401ce2656
280 changed files with 742 additions and 319 deletions

View File

@@ -21,6 +21,7 @@ use Doctrine\ORM\EntityManager;
use LogicException;
use Symfony\Component\Security\Core\Security;
use UnexpectedValueException;
use function array_fill;
use function array_key_exists;
use function array_merge;
@@ -121,28 +122,34 @@ class TimelineReportProvider implements TimelineProviderInterface
$subtitle = null;
foreach ($entity->getCFGroup()->getCustomFields() as $customField) {
if (in_array(
$customField->getSlug(),
$entity->getCFGroup()->getOptions()['summary_fields'],
true
)) {
if (
in_array(
$customField->getSlug(),
$entity->getCFGroup()->getOptions()['summary_fields'],
true
)
) {
// if we do not want to show empty values
if (false === $this->showEmptyValues) {
if ($customField->getType() === 'title') {
$options = $customField->getOptions();
switch ($options['type']) {
case 'title': $title = $customField;
case 'title':
$title = $customField;
break;
break;
case 'subtitle': $subtitle = $customField;
case 'subtitle':
$subtitle = $customField;
break;
break;
}
} else {
if ($this->customFieldsHelper->isEmptyValue($entity->getCFData(), $customField)
=== false) {
if (
$this->customFieldsHelper->isEmptyValue($entity->getCFData(), $customField)
=== false
) {
if (null !== $title) {
$gatheredFields[] = $title;
$title = null;