open-orchestra/open-orchestra-cms-bundle

View on GitHub
Backoffice/EventSubscriber/WebSiteSubscriber.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid unused parameters such as '$event'.
Open

    public function preSubmit(FormEvent $event)

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

Call to method remove from undeclared class \Symfony\Component\HttpFoundation\Session\Session
Open

        $this->session->remove(ContextBackOfficeInterface::KEY_SITE);

Parameter $event has undeclared type \Symfony\Component\Form\FormEvent
Open

    public function onPreSetData(FormEvent $event)

Call to method getForm from undeclared class \Symfony\Component\Form\FormEvent
Open

        $form = $event->getForm();

Reference to constant PRE_SET_DATA from undeclared class \Symfony\Component\Form\FormEvents
Open

            FormEvents::PRE_SET_DATA => 'onPreSetData',

Parameter $event has undeclared type \Symfony\Component\Form\FormEvent
Open

    public function preSubmit(FormEvent $event)

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

        $data = $event->getData();

Class implements undeclared interface \Symfony\Component\EventDispatcher\EventSubscriberInterface
Open

class WebSiteSubscriber implements EventSubscriberInterface

Reference to constant PRE_SUBMIT from undeclared class \Symfony\Component\Form\FormEvents
Open

            FormEvents::PRE_SUBMIT => 'preSubmit',

Parameter $session has undeclared type \Symfony\Component\HttpFoundation\Session\Session
Open

    public function __construct(

There are no issues that match your filters.

Category
Status