for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* MIT License
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
*/
namespace SprykerEco\Yves\Computop\Form;
use Spryker\Yves\StepEngine\Dependency\Form\AbstractSubFormType;
use Spryker\Yves\StepEngine\Dependency\Form\SubFormInterface;
use Spryker\Yves\StepEngine\Dependency\Form\SubFormProviderNameInterface;
use SprykerEco\Shared\Computop\ComputopConfig;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\Constraints\NotBlank;
abstract class AbstractSubForm extends AbstractSubFormType implements SubFormInterface, SubFormProviderNameInterface
{
* @var string
public const FIELD_URL = 'url';
* @return string
public function getProviderName(): string
return ComputopConfig::PROVIDER_NAME;
}
public function getTemplatePath(): string
return sprintf("%s/%s", ComputopConfig::PROVIDER_NAME, static::PAYMENT_METHOD);
SprykerEco\Yves\Computop...SubForm::PAYMENT_METHOD
* @param \Symfony\Component\Form\FormBuilderInterface $builder
* @param array $options
*
* @return $this
protected function addLink(FormBuilderInterface $builder, array $options)
$options
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
protected function addLink(FormBuilderInterface $builder, /** @scrutinizer ignore-unused */ array $options)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
$builder->add(
static::FIELD_URL,
'hidden',
);
return $this;
* @return \Symfony\Component\Validator\Constraint
protected function createNotBlankConstraint(): Constraint
return new NotBlank(['groups' => $this->getPropertyPath()]);