Showing 5 of 21 total issues
Avoid using undefined variables such as '$node_ids' which will lead to PHP notices. Open
Open
$node_ids[] = $item[0];
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$node_ids' which will lead to PHP notices. Open
Open
->loadMultiple($node_ids);
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
The class CloneNode has a coupling between objects value of 22. Consider to reduce the number of dependencies under 13. Open
Open
class CloneNode extends ViewsBulkOperationsActionBase implements PluginFormInterface, ContainerFactoryPluginInterface {
/**
* {@inheritdoc}
*/
- Read upRead up
- Exclude checks
CouplingBetweenObjects
Since: 1.1.0
A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability
Example
class Foo {
/**
* @var \foo\bar\X
*/
private $x = null;
/**
* @var \foo\bar\Y
*/
private $y = null;
/**
* @var \foo\bar\Z
*/
private $z = null;
public function setFoo(\Foo $foo) {}
public function setBar(\Bar $bar) {}
public function setBaz(\Baz $baz) {}
/**
* @return \SplObjectStorage
* @throws \OutOfRangeException
* @throws \InvalidArgumentException
* @throws \ErrorException
*/
public function process(\Iterator $it) {}
// ...
}
Source https://phpmd.org/rules/design.html#couplingbetweenobjects
Call with 3 arg(s) to \Drupal\stanford_actions\Plugin\Action\FieldClone\FieldCloneBase::__construct()
which only takes 0 arg(s) defined at /code/src/Plugin/Action/FieldClone/FieldCloneBase.php:14
Open
Open
return new static($configuration, $plugin_id, $plugin_definition);
- Exclude checks
Instantiation of abstract class \Drupal\stanford_actions\Plugin\Action\FieldClone\FieldCloneBase
Open
Open
return new static($configuration, $plugin_id, $plugin_definition);
- Exclude checks