herpaderpaldent/seat-notifications

View on GitHub
src/Channels/Slack/SlackMessage.php

Summary

Maintainability
A
0 mins
Test Coverage

The class SlackMessage has 13 public methods. Consider refactoring SlackMessage to keep number of public methods under 10.
Open

class SlackMessage
{
    /**
     * The "level" of the notification (info, success, warning, error).
     *
Severity: Minor
Found in src/Channels/Slack/SlackMessage.php by phpmd

TooManyPublicMethods

Since: 0.1

A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

By default it ignores methods starting with 'get' or 'set'.

Example

Source https://phpmd.org/rules/codesize.html#toomanypublicmethods

Avoid using short method names like SlackMessage::to(). The configured minimum method name length is 3.
Open

    public function to($channel)
    {
        $this->channel = $channel;

        return $this;
Severity: Minor
Found in src/Channels/Slack/SlackMessage.php by phpmd

ShortMethodName

Since: 0.2

Detects when very short method names are used.

Example

class ShortMethod {
    public function a( $index ) { // Violation
    }
}

Source https://phpmd.org/rules/naming.html#shortmethodname

There are no issues that match your filters.

Category
Status