apply more cs rules for php-cs

This commit is contained in:
2023-10-17 13:27:03 +02:00
parent 0b0cbed9db
commit bc2041cbdd
1485 changed files with 8169 additions and 9620 deletions

View File

@@ -13,7 +13,6 @@ namespace Chill\CustomFieldsBundle\CustomFields;
use Chill\CustomFieldsBundle\Entity\CustomField;
use Chill\MainBundle\Templating\TranslatableStringHelper;
use Symfony\Bundle\TwigBundle\TwigEngine;
use Symfony\Component\Form\Extension\Core\Type\IntegerType;
use Symfony\Component\Form\Extension\Core\Type\NumberType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
@@ -49,10 +48,10 @@ class CustomFieldNumber extends AbstractCustomField
{
$options = $customField->getOptions();
//select the type depending to the SCALE
// select the type depending to the SCALE
$type = (0 === $options[self::SCALE] || null === $options[self::SCALE]) ?
IntegerType::class : NumberType::class;
//'integer' : 'number';
// 'integer' : 'number';
$fieldOptions = $this->prepareFieldOptions($customField, $type);
@@ -97,7 +96,7 @@ class CustomFieldNumber extends AbstractCustomField
public function render($value, CustomField $customField, $documentType = 'html')
{
$template = 'ChillCustomFieldsBundle:CustomFieldsRendering:number.'
. $documentType . '.twig';
.$documentType.'.twig';
$options = $customField->getOptions();
return $this->templating
@@ -132,7 +131,7 @@ class CustomFieldNumber extends AbstractCustomField
// add required
$fieldOptions['required'] = false;
//add label
// add label
$fieldOptions['label'] = $this->translatableStringHelper->localize($customField->getName());
// add constraints if required