modules/stanford_notifications/src/NotificationService.php
Method toolbar
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function toolbar() {
$notification_list = $this->getToolbarTrayItems($this->getUserNotifications());
$items['notifications'] = [
'#type' => 'toolbar_item',
Avoid using undefined variables such as '$items' which will lead to PHP notices. Open
Open
return $items;
- 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 '$items' which will lead to PHP notices. Open
Open
$items['notifications'] = [
- 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
Doc comment short description must end with a full stop Open
Open
* {@inheritDoc}
- Exclude checks
Doc comment short description must start with a capital letter Open
Open
* {@inheritDoc}
- Exclude checks
Doc comment short description must end with a full stop Open
Open
* {@inheritDoc}
- Exclude checks
Doc comment short description must start with a capital letter Open
Open
* {@inheritDoc}
- Exclude checks
Doc comment short description must end with a full stop Open
Open
* {@inheritDoc}
- Exclude checks
Doc comment short description must end with a full stop Open
Open
* {@inheritDoc}
- Exclude checks
Doc comment short description must start with a capital letter Open
Open
* {@inheritDoc}
- Exclude checks
Doc comment short description must start with a capital letter Open
Open
* {@inheritDoc}
- Exclude checks