open-orchestra/open-orchestra-cms-bundle

View on GitHub
Backoffice/Form/Type/RedirectionType.php

Summary

Maintainability
A
1 hr
Test Coverage

Method buildForm has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder->add('siteId', 'oo_site_choice', array(
            'label'        => 'open_orchestra_backoffice.form.redirection.site_name',
            'group_id'     => 'redirection',
Severity: Minor
Found in Backoffice/Form/Type/RedirectionType.php - About 1 hr to fix

Call to method setDefaults from undeclared class \Symfony\Component\OptionsResolver\OptionsResolver
Open

        $resolver->setDefaults(array(
Severity: Critical
Found in Backoffice/Form/Type/RedirectionType.php by phan

Call to method add from undeclared class \Symfony\Component\Form\FormBuilderInterface
Open

        $builder->add('routePattern', 'text', array(
Severity: Critical
Found in Backoffice/Form/Type/RedirectionType.php by phan

Reference to instance property vars from undeclared class \Symfony\Component\Form\FormView
Open

        $view->vars['new_button'] = $options['new_button'];

Call to method get from undeclared class \Symfony\Component\Form\FormInterface
Open

            if ('' !== trim($form->get('url')->getData())) {
Severity: Critical
Found in Backoffice/Form/Type/RedirectionType.php by phan

Call to method add from undeclared class \Symfony\Component\Form\FormBuilderInterface
Open

        $builder->add('locale', 'orchestra_language', array(
Severity: Critical
Found in Backoffice/Form/Type/RedirectionType.php by phan

Call to method add from undeclared class \Symfony\Component\Form\FormBuilderInterface
Open

        $builder->add('url', 'text', array(
Severity: Critical
Found in Backoffice/Form/Type/RedirectionType.php by phan

Call to method add from undeclared class \Symfony\Component\Form\FormBuilderInterface
Open

        $builder->add('permanent', 'checkbox', array(
Severity: Critical
Found in Backoffice/Form/Type/RedirectionType.php by phan

Call to method addEventSubscriber from undeclared class \Symfony\Component\Form\FormBuilderInterface
Open

        $builder->addEventSubscriber(new RedirectionTypeSubscriber());
Severity: Critical
Found in Backoffice/Form/Type/RedirectionType.php by phan

Call to method setAttribute from undeclared class \Symfony\Component\Form\FormBuilderInterface
Open

            $builder->setAttribute('disabled', $options['disabled']);
Severity: Critical
Found in Backoffice/Form/Type/RedirectionType.php by phan

Parameter $resolver has undeclared type \Symfony\Component\OptionsResolver\OptionsResolver
Open

    public function configureOptions(OptionsResolver $resolver)

Call to method add from undeclared class \Symfony\Component\Form\FormBuilderInterface
Open

        $builder->add('siteId', 'oo_site_choice', array(
Severity: Critical
Found in Backoffice/Form/Type/RedirectionType.php by phan

Parameter $builder has undeclared type \Symfony\Component\Form\FormBuilderInterface
Open

    public function buildForm(FormBuilderInterface $builder, array $options)

Parameter $form has undeclared type \Symfony\Component\Form\FormInterface
Open

    public function buildView(FormView $view, FormInterface $form, array $options)

Call to method add from undeclared class \Symfony\Component\Form\FormBuilderInterface
Open

        $builder->add('type', 'choice', array(
Severity: Critical
Found in Backoffice/Form/Type/RedirectionType.php by phan

Call to method get from undeclared class \Symfony\Component\Form\FormInterface
Open

            $form->get('type')->setData($type);
Severity: Critical
Found in Backoffice/Form/Type/RedirectionType.php by phan

Call to method add from undeclared class \Symfony\Component\Form\FormBuilderInterface
Open

        $builder->add('nodeId', 'oo_node_choice', array(
Severity: Critical
Found in Backoffice/Form/Type/RedirectionType.php by phan

Class extends undeclared class \Symfony\Component\Form\AbstractType
Open

class RedirectionType extends AbstractType
Severity: Critical
Found in Backoffice/Form/Type/RedirectionType.php by phan

Parameter $view has undeclared type \Symfony\Component\Form\FormView
Open

    public function buildView(FormView $view, FormInterface $form, array $options)

Call to method get from undeclared class \Symfony\Component\Form\FormInterface
Open

        if (is_null($form->get('type')->getData())) {
Severity: Critical
Found in Backoffice/Form/Type/RedirectionType.php by phan

There are no issues that match your filters.

Category
Status