for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Starkerxp\LeadBundle\Form\Type;
use Starkerxp\LeadBundle\Constraints\LeadExist;
use Starkerxp\LeadBundle\Constraints\LeadNotExist;
use Starkerxp\StructureBundle\Form\Type\AbstractType;
use Symfony\Component\Form\Extension\Core\Type;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Validator\Constraints;
class LeadType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
$builder
->add(
'origin',
Type\TextType::class,
[
'constraints' => [
new Constraints\NotBlank(),
new Constraints\Length(['min' => 3]),
],
]
)
'external_reference',
new Constraints\Length(['min' => 1]),
$options['method'] === "PUT" ? new LeadNotExist() : new LeadExist(),
'product',
'date_event',
Type\DateTimeType::class,
'widget' => 'single_text',
'format' => 'yyyy-MM-dd HH:mm:ss',
'ip_address',
"constraints" => [
new Constraints\Ip(),
->add('pixel', Type\TextType::class);
}
This check marks files that end in a newline character, i.e. an empy line.
This check marks files that end in a newline character, i.e. an empy line.