src/Channels/Slack/SlackMessage.php
The class SlackMessage has 13 public methods. Consider refactoring SlackMessage to keep number of public methods under 10. Open
Open
class SlackMessage
{
/**
* The "level" of the notification (info, success, warning, error).
*
- Read upRead up
- Exclude checks
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
Open
public function to($channel)
{
$this->channel = $channel;
return $this;
- Read upRead up
- Exclude checks
ShortMethodName
Since: 0.2
Detects when very short method names are used.
Example
class ShortMethod {
public function a( $index ) { // Violation
}
}