GroupBundle/Form/Type/GroupElementType.php
Avoid unused parameters such as '$options'. Open
Open
public function buildView(FormView $view, FormInterface $form, array $options)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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
Avoid unused parameters such as '$form'. Open
Open
public function buildView(FormView $view, FormInterface $form, array $options)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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 add
from undeclared class \Symfony\Component\Form\FormBuilderInterface
Open
Open
$builder->add('group', 'radio', array(
- Create a ticketCreate a ticket
- Exclude checks
Parameter $builder
has undeclared type \Symfony\Component\Form\FormBuilderInterface
Open
Open
public function buildForm(FormBuilderInterface $builder, array $options)
- Create a ticketCreate a ticket
- Exclude checks
Reference to instance property vars
from undeclared class \Symfony\Component\Form\FormView
Open
Open
$view->vars['parameters'] = array(
- Create a ticketCreate a ticket
- Exclude checks
Class extends undeclared class \Symfony\Component\Form\AbstractType
Open
Open
class GroupElementType extends AbstractType
- Create a ticketCreate a ticket
- Exclude checks
Parameter $multiLanguagesChoiceManager
has undeclared type \OpenOrchestra\ModelInterface\Manager\MultiLanguagesChoiceManagerInterface
Open
Open
public function __construct(
- Create a ticketCreate a ticket
- Exclude checks
Parameter $form
has undeclared type \Symfony\Component\Form\FormInterface
Open
Open
public function buildView(FormView $view, FormInterface $form, array $options)
- Create a ticketCreate a ticket
- Exclude checks
Reference to instance property vars
from undeclared class \Symfony\Component\Form\FormView
Open
Open
$view->vars['parameters'] = array(
- Create a ticketCreate a ticket
- Exclude checks
Parameter $view
has undeclared type \Symfony\Component\Form\FormView
Open
Open
public function buildView(FormView $view, FormInterface $form, array $options)
- Create a ticketCreate a ticket
- Exclude checks
Call to method choose
from undeclared class \OpenOrchestra\ModelInterface\Manager\MultiLanguagesChoiceManagerInterface
Open
Open
'groupName' => $this->multiLanguagesChoiceManager->choose($group->getLabels()),
- Create a ticketCreate a ticket
- Exclude checks
Parameter $authorizationChecker
has undeclared type \Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface
Open
Open
public function __construct(
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\Backoffice\Repository\GroupRepositoryInterface::find
Open
Open
$group = $this->groupRepository->find($groupId);
- Create a ticketCreate a ticket
- Exclude checks
Call to method isGranted
from undeclared class \Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface
Open
Open
'disabled' => !$this->authorizationChecker->isGranted(ContributionActionInterface::READ, $group),
- Create a ticketCreate a ticket
- Exclude checks
Reference to instance property vars
from undeclared class \Symfony\Component\Form\FormView
Open
Open
$view->vars['checked'] = true;
- Create a ticketCreate a ticket
- Exclude checks
Reference to instance property vars
from undeclared class \Symfony\Component\Form\FormView
Open
Open
$groupId = $view->vars['name'];
- Create a ticketCreate a ticket
- Exclude checks
Avoid excessively long variable names like $multiLanguagesChoiceManager. Keep variable name length under 20. Open
Open
protected $multiLanguagesChoiceManager;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
LongVariable
Since: 0.2
Detects when a field, formal or local variable is declared with a long name.
Example
class Something {
protected $reallyLongIntName = -3; // VIOLATION - Field
public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
$otherReallyLongName = -5; // VIOLATION - Local
for ($interestingIntIndex = 0; // VIOLATION - For
$interestingIntIndex < 10;
$interestingIntIndex++ ) {
}
}
}
Source https://phpmd.org/rules/naming.html#longvariable
Avoid excessively long variable names like $multiLanguagesChoiceManager. Keep variable name length under 20. Open
Open
MultiLanguagesChoiceManagerInterface $multiLanguagesChoiceManager,
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
LongVariable
Since: 0.2
Detects when a field, formal or local variable is declared with a long name.
Example
class Something {
protected $reallyLongIntName = -3; // VIOLATION - Field
public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
$otherReallyLongName = -5; // VIOLATION - Local
for ($interestingIntIndex = 0; // VIOLATION - For
$interestingIntIndex < 10;
$interestingIntIndex++ ) {
}
}
}