nopolabs/yabot

View on GitHub

Showing 285 of 286 total issues

Client has 32 functions (exceeds 20 allowed). Consider refactoring.
Open

class Client
{
use ConfigTrait;
use LogTrait;
 
 
Severity: Minor
Found in src/Slack/Client.php - About 4 hrs to fix

    The class Client has 15 public methods. Consider refactoring Client to keep number of public methods under 10.
    Open

    class Client
    {
    use ConfigTrait;
    use LogTrait;
     
     
    Severity: Minor
    Found in src/Slack/Client.php by phpmd

    Method __construct has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    string $name,
    $isBot,
    array $channels,
    array $users,
    array $patterns,
    Severity: Major
    Found in src/Plugin/MethodMatcher.php - About 50 mins to fix

      Avoid variables with short names like $id. Configured minimum length is 3.
      Open

      public function byId($id)
      Severity: Minor
      Found in src/Slack/AbstractIdNameMap.php by phpmd

      Method __construct has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      LoggerInterface $logger,
      LoopInterface $eventLoop,
      Client $slackClient,
      MessageFactory $messageFactory,
      PluginManager $pluginManager,
      Severity: Minor
      Found in src/Yabot.php - About 45 mins to fix

        Method __construct has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        RealTimeClient $realTimeClient,
        Users $users,
        Bots $bots,
        Channels $channels,
        array $config = [],
        Severity: Minor
        Found in src/Slack/Client.php - About 45 mins to fix

          Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          string $pluginId,
          bool $isBot = null,
          array $channels,
          array $users,
          LoggerInterface $logger = null)
          Severity: Minor
          Found in src/Plugin/PluginMatcher.php - About 35 mins to fix

            Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            Client $slackClient,
            array $data,
            string $formattedText,
            User $user = null,
            Channel $channel)
            Severity: Minor
            Found in src/Message/Message.php - About 35 mins to fix

              There must be one blank line after the namespace declaration
              Open

              namespace Nopolabs\Yabot\Plugin;

              The closing parenthesis of a multi-line function declaration must be on a new line
              Open

              LoggerInterface $log = null)
              Severity: Minor
              Found in src/Slack/Client.php by phpcodesniffer

              Blank line found at end of control structure
              Open

               
               
              Severity: Minor
              Found in src/Plugin/PluginManager.php by phpcodesniffer

              Blank line found at start of control structure
              Open

              if ($interval = $this->get('connection_monitor.interval')) {
              Severity: Minor
              Found in src/Yabot.php by phpcodesniffer

              There must be one blank line after the namespace declaration
              Open

              namespace Nopolabs\Yabot\Helpers;
              Severity: Minor
              Found in src/Helpers/ConfigTrait.php by phpcodesniffer

              Expected 1 space after FUNCTION keyword; 0 found
              Open

              return function() use ($function) {
              Severity: Minor
              Found in src/Helpers/LoopTrait.php by phpcodesniffer

              The closing parenthesis and the opening brace of a multi-line function declaration must be on the same line
              Open

              {
              Severity: Minor
              Found in src/Plugin/PluginMatcher.php by phpcodesniffer

              Each PHP statement must be on a line by itself
              Open

              $onRejected = $onRejected ?? function($reason) { $this->logRejection($reason); };
              Severity: Minor
              Found in src/Guzzle/Guzzle.php by phpcodesniffer

              There must be one blank line after the namespace declaration
              Open

              namespace Nopolabs\Yabot\Plugin;
              Severity: Minor
              Found in src/Plugin/MethodMatcher.php by phpcodesniffer

              Expected 1 space after FUNCTION keyword; 0 found
              Open

              $params['patterns'] = array_map(function($pattern) use ($search, $replace) {
              Severity: Minor
              Found in src/Plugin/PluginTrait.php by phpcodesniffer

              There must be one blank line after the namespace declaration
              Open

              namespace Nopolabs\Yabot\Helpers;
              Severity: Minor
              Found in src/Helpers/LogTrait.php by phpcodesniffer

              There must be one blank line after the namespace declaration
              Open

              namespace Nopolabs\Yabot\Helpers;
              Severity: Minor
              Found in src/Helpers/MatcherTrait.php by phpcodesniffer
              Severity
              Category
              Status
              Source
              Language