open-orchestra/open-orchestra-cms-bundle

View on GitHub
Workflow/Form/Type/StatusType.php

Summary

Maintainability
A
1 hr
Test Coverage

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

    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('name', 'text', array(
                'label'    => 'open_orchestra_workflow_admin.form.status.name',
Severity: Minor
Found in Workflow/Form/Type/StatusType.php - About 1 hr to fix

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

        $builder
Severity: Critical
Found in Workflow/Form/Type/StatusType.php by phan

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

        $status = $form->getData();
Severity: Critical
Found in Workflow/Form/Type/StatusType.php by phan

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

        $view->vars['delete_button'] = $options['delete_button'];
Severity: Minor
Found in Workflow/Form/Type/StatusType.php by phan

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

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

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

    public function buildView(FormView $view, FormInterface $form, array $options)
Severity: Minor
Found in Workflow/Form/Type/StatusType.php by phan

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

    public function buildView(FormView $view, FormInterface $form, array $options)
Severity: Minor
Found in Workflow/Form/Type/StatusType.php by phan

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

    public function buildForm(FormBuilderInterface $builder, array $options)
Severity: Minor
Found in Workflow/Form/Type/StatusType.php by phan

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

        $view->vars['enable_delete_button'] = $options['enable_delete_button'];
Severity: Minor
Found in Workflow/Form/Type/StatusType.php by phan

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

        $view->vars['new_button'] = $options['new_button'];
Severity: Minor
Found in Workflow/Form/Type/StatusType.php by phan

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

class StatusType extends AbstractType
Severity: Critical
Found in Workflow/Form/Type/StatusType.php by phan

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

        $view->vars['properties'] = $properties;
Severity: Minor
Found in Workflow/Form/Type/StatusType.php by phan

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

    public function configureOptions(OptionsResolver $resolver)
Severity: Minor
Found in Workflow/Form/Type/StatusType.php by phan

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

        $view->vars['delete_help_text'] = $options['delete_help_text'];
Severity: Minor
Found in Workflow/Form/Type/StatusType.php by phan

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

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

The closing brace for the class must go on the next line after the body
Open

}

There are no issues that match your filters.

Category
Status