herpaderpaldent/seat-notifications

View on GitHub
src/Drivers/DiscourseNotificationDriver.php

Summary

Maintainability
A
1 hr
Test Coverage

Method getCategories has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private static function getCategories(int $category_id = null): Collection
    {
        $params = [
            'api_key' => setting('herpaderp.seatnotifications.discourse.credentials.api_key', true),
        ];
Severity: Minor
Found in src/Drivers/DiscourseNotificationDriver.php - About 1 hr to fix

    Avoid unused parameters such as '$notification'.
    Open

        public static function getPublicDriverId(string $notification) : ?string

    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

    There are no issues that match your filters.

    Category
    Status