for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace PH\Bundle\CoreBundle\Form\Extension;
use Symfony\Component\Form\AbstractTypeExtension;
use Symfony\Component\Form\Extension\Core\Type\IntegerType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Validator\Constraints\NotBlank;
use Symfony\Component\Validator\Constraints\Range;
use Symfony\Component\Validator\Constraints\Type;
abstract class AbstractGatewayConfigurationExtension extends AbstractTypeExtension
{
/**
* {@inheritdoc}
*/
public function buildForm(FormBuilderInterface $builder, array $options)
$builder
->add('minAmount', IntegerType::class, [
'constraints' => [
new NotBlank([
'groups' => 'ph',
]),
new Range([
'min' => 0,
new Type('integer'),
],
])
->add('maxAmount', IntegerType::class, [
;
}