SU-SWS/stanford_profile_helper

View on GitHub
modules/stanford_notifications/src/NotificationService.php

Summary

Maintainability
A
1 hr
Test Coverage
A
100%

Method toolbar has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  public function toolbar() {
    $notification_list = $this->getToolbarTrayItems($this->getUserNotifications());

    $items['notifications'] = [
      '#type' => 'toolbar_item',
Severity: Minor
Found in modules/stanford_notifications/src/NotificationService.php - About 1 hr to fix

    Avoid using undefined variables such as '$items' which will lead to PHP notices.
    Open

        return $items;

    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

        $items['notifications'] = [

    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

       * {@inheritDoc}

    Doc comment short description must start with a capital letter
    Open

       * {@inheritDoc}

    Doc comment short description must end with a full stop
    Open

       * {@inheritDoc}

    Doc comment short description must start with a capital letter
    Open

       * {@inheritDoc}

    Doc comment short description must start with a capital letter
    Open

       * {@inheritDoc}

    Doc comment short description must end with a full stop
    Open

       * {@inheritDoc}

    Doc comment short description must end with a full stop
    Open

       * {@inheritDoc}

    Doc comment short description must start with a capital letter
    Open

       * {@inheritDoc}

    There are no issues that match your filters.

    Category
    Status