musonza/chat

View on GitHub

Showing 4 of 4 total issues

Conversation has 25 functions (exceeds 20 allowed). Consider refactoring.
Open

class Conversation extends BaseModel
{
    protected $table = ConfigurationManager::CONVERSATIONS_TABLE;
    protected $fillable = ['data', 'direct_message'];
    protected $casts = [
Severity: Minor
Found in src/Models/Conversation.php - About 2 hrs to fix

    Method up has 63 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function up()
        {
            Schema::create(ConfigurationManager::CONVERSATIONS_TABLE, function (Blueprint $table) {
                $table->bigIncrements('id');
                $table->boolean('private')->default(true);
    Severity: Major
    Found in database/migrations/create_chat_tables.php - About 2 hrs to fix

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

          public function send(Conversation $conversation, string $body, Participation $participant, string $type = 'text', array $data = []): Model
      Severity: Minor
      Found in src/Models/Message.php - About 35 mins to fix

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

            public function __construct(Conversation $conversation, $body, Model $sender, $type = 'text', $data)
        Severity: Minor
        Found in src/Messages/SendMessageCommand.php - About 35 mins to fix
          Severity
          Category
          Status
          Source
          Language