nutgram/laravel

View on GitHub
src/Console/ListCommand.php

Summary

Maintainability
A
3 hrs
Test Coverage
A
98%

Method resolveMessageListener has 56 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function resolveMessageListener(string $signature): string
    {
        $subHandlerSignature = Str::after($signature, 'message.');
        $subHandlerName = explode('.', $subHandlerSignature)[0] ?? null;

Severity: Major
Found in src/Console/ListCommand.php - About 2 hrs to fix

    Method resolveUpdateListener has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        protected function resolveUpdateListener(string $signature): string
        {
            return match (Str::before($signature, '.')) {
                'message' => $this->resolveMessageListener($signature),
                'edited_message' => 'onEditedMessage',
    Severity: Minor
    Found in src/Console/ListCommand.php - About 1 hr to fix

      Avoid too many return statements within this method.
      Open

              return 'unknown';
      Severity: Major
      Found in src/Console/ListCommand.php - About 30 mins to fix

        There are no issues that match your filters.

        Category
        Status