mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-09 08:14:59 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user