modules/stanford_publication/stanford_publication.module
Avoid using undefined variables such as '$extra' which will lead to PHP notices. Open
Open
return $extra;
- 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 '$extra' which will lead to PHP notices. Open
Open
$extra['node']['stanford_publication']['display']['citation_type'] = [
- 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
Argument 1 (parent)
is \Drupal\node\NodeInterface
but \Drupal\stanford_publication\Entity\CitationInterface::setParentEntity()
takes \Drupal\Core\Entity\ContentEntityInterface
defined at /code/modules/stanford_publication/src/Entity/CitationInterface.php:67
Open
Open
$citation_entity->setParentEntity($entity, 'su_publication_citation')
- Exclude checks