cs: Fix code style (safe rules only).

This commit is contained in:
Pol Dellaiera
2021-11-23 14:06:38 +01:00
parent 149d7ce991
commit 8f96a1121d
1223 changed files with 65199 additions and 64625 deletions

View File

@@ -1,69 +1,74 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\CustomFieldsBundle\CustomFields;
use Symfony\Component\Form\FormBuilderInterface;
use Chill\CustomFieldsBundle\Entity\CustomField;
use Symfony\Component\Form\FormBuilderInterface;
/**
*
* @author Julien Fastré <julien.fastre@champs-libres.coop>
*/
interface CustomFieldInterface
{
/**
* Return a form type to edit the custom field. This form is shown to the
* user.
* Return a form type to edit the custom field. This form is shown to the
* user.
*
* @param \Chill\CustomFieldsBundle\CustomField\FormBuilderInterface $builder
* @param \Chill\CustomFieldsBundle\CustomField\CustomField $customField
*
* @return \Symfony\Component\Form\FormTypeInterface the form type
*/
public function buildForm(FormBuilderInterface $builder, CustomField $customField);
/**
* Transform the value into a format that can be stored in DB
*
* @param mixed $value
* @param \Chill\CustomFieldsBundle\CustomField\CustomField $customField
* Return a formType which allow to edit option for the custom type.
* This FormType is shown in admin.
*
* @param \Chill\CustomFieldsBundle\CustomField\FormBuilderInterface $builder
*
* @return \Symfony\Component\Form\FormTypeInterface|null the form type
*/
public function serialize($value, CustomField $customField);
public function buildOptionsForm(FormBuilderInterface $builder);
/**
* Transform the representation of the value, stored in db, into the
* value which may be used in the process.
*
* @param mixed $value
*
* @param \Chill\CustomFieldsBundle\CustomField\CustomField $customField
* @param mixed $serialized
*/
public function deserialize($serialized, CustomField $customField);
public function getName();
/**
* Return if the value can be considered as empty.
*
* @param mixed $value the value passed throug the deserialize function
*/
public function isEmptyValue($value, CustomField $customField);
/**
* Return a repsentation of the value of the CustomField.
*
*
* @param mixed $value the raw value, **not deserialized** (= as stored in the db)
* @param \Chill\CustomFieldsBundle\CustomField\CustomField $customField
* @param mixed $documentType
*
* @return string an html representation of the value
*/
public function render($value, CustomField $customField, $documentType = 'html');
public function getName();
/**
* Return a formType which allow to edit option for the custom type.
* This FormType is shown in admin
*
* @param \Chill\CustomFieldsBundle\CustomField\FormBuilderInterface $builder
* @return \Symfony\Component\Form\FormTypeInterface|null the form type
* Transform the value into a format that can be stored in DB.
*
* @param mixed $value
* @param \Chill\CustomFieldsBundle\CustomField\CustomField $customField
*/
public function buildOptionsForm(FormBuilderInterface $builder);
/**
* Return if the value can be considered as empty
*
* @param mixed $value the value passed throug the deserialize function
* @param CustomField $customField
*/
public function isEmptyValue($value, CustomField $customField);
public function serialize($value, CustomField $customField);
}