uu-cubitt/graph-cqrs

View on GitHub

Showing 16 of 51 total issues

Function ApplyCommand has 189 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public ApplyCommand(command: Commands.Command): Events.Event {
        switch (command.type) {
            case Commands.CommandType.AddConnector:
                let addConnectorCommand: Commands.AddConnectorCommand = <Commands.AddConnectorCommand> command;
                this.AddConnector(addConnectorCommand);
Severity: Major
Found in src/CQRSGraph.ts - About 7 hrs to fix

    File CQRSGraph.ts has 361 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    
    import * as Graph from "cubitt-graph";
    import * as Common from "cubitt-common";
    import * as Commands from "cubitt-commands";
    import * as Events from "cubitt-events";
    Severity: Minor
    Found in src/CQRSGraph.ts - About 4 hrs to fix

      CQRSGraph has 24 functions (exceeds 20 allowed). Consider refactoring.
      Open

      export class CQRSGraph {
          /**
          * Cubitt-Graph
          */
          private graph: Graph.GraphInterface;
      Severity: Minor
      Found in src/CQRSGraph.ts - About 2 hrs to fix

        Function ApplyEvent has 53 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public ApplyEvent(event: Events.Event): void {
                switch (event.type) {
                    case Events.EventType.ConnectorAdded:
                        this.AddConnector(<Events.ConnectorAddedEvent> event);
                        break;
        Severity: Major
        Found in src/CQRSGraph.ts - About 2 hrs to fix

          Avoid too many return statements within this function.
          Open

                          return new Events.ModelPropertyDeletedEvent(
                              <Common.Guid> deleteModelPropertyCommand.id,
                              this.version - 1,
                              Date.now(),
                              <Common.Guid> deleteModelPropertyCommand.elementId,
          Severity: Major
          Found in src/CQRSGraph.ts - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                            return new Events.EdgePropertySetEvent(
                                <Common.Guid> setEdgePropertyCommand.id,
                                this.version - 1,
                                Date.now(),
                                <Common.Guid> setEdgePropertyCommand.elementId,
            Severity: Major
            Found in src/CQRSGraph.ts - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                              return new Events.EdgePropertyDeletedEvent(
                                  <Common.Guid> deleteEdgePropertyCommand.id,
                                  this.version - 1,
                                  Date.now(),
                                  <Common.Guid> deleteEdgePropertyCommand.elementId,
              Severity: Major
              Found in src/CQRSGraph.ts - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                                return new Events.NodeDeletedEvent(
                                    <Common.Guid> deleteNodeCommand.id,
                                    this.version - 1,
                                    Date.now(),
                                    <Common.Guid> deleteNodeCommand.elementId
                Severity: Major
                Found in src/CQRSGraph.ts - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                                  return new Events.EdgeDeletedEvent(
                                      <Common.Guid> deleteEdgeCommand.id,
                                      this.version - 1,
                                      Date.now(),
                                      <Common.Guid> deleteEdgeCommand.elementId
                  Severity: Major
                  Found in src/CQRSGraph.ts - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                    return new Events.NodePropertyDeletedEvent(
                                        <Common.Guid> deleteNodeProperty.id,
                                        this.version - 1,
                                        Date.now(),
                                        <Common.Guid> deleteNodeProperty.elementId,
                    Severity: Major
                    Found in src/CQRSGraph.ts - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                      return new Events.ConnectorPropertyDeletedEvent(
                                          <Common.Guid> deleteConnectorPropertyCommand.id,
                                          this.version - 1,
                                          Date.now(),
                                          <Common.Guid> deleteConnectorPropertyCommand.elementId,
                      Severity: Major
                      Found in src/CQRSGraph.ts - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                        return new Events.NodePropertySetEvent(
                                            <Common.Guid> setNodePropertyCommand.id,
                                            this.version - 1,
                                            Date.now(),
                                            <Common.Guid> setNodePropertyCommand.elementId,
                        Severity: Major
                        Found in src/CQRSGraph.ts - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                          return new Events.ModelDeletedEvent(
                                              <Common.Guid> deleteModelCommand.id,
                                              this.version - 1,
                                              Date.now(),
                                              <Common.Guid> deleteModelCommand.elementId
                          Severity: Major
                          Found in src/CQRSGraph.ts - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                            return new Events.ConnectorPropertySetEvent(
                                                <Common.Guid> setConnectorPropertyCommand.id,
                                                this.version - 1,
                                                Date.now(),
                                                <Common.Guid> setConnectorPropertyCommand.elementId,
                            Severity: Major
                            Found in src/CQRSGraph.ts - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                              return new Events.ModelPropertySetEvent(
                                                  <Common.Guid> setModelPropertyCommand.id,
                                                  this.version - 1,
                                                  Date.now(),
                                                  <Common.Guid> setModelPropertyCommand.elementId,
                              Severity: Major
                              Found in src/CQRSGraph.ts - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                                return new Events.ConnectorDeletedEvent(
                                                    <Common.Guid> deleteConnectorCommand.id,
                                                    this.version - 1,
                                                    Date.now(),
                                                    <Common.Guid> deleteConnectorCommand.elementId
                                Severity: Major
                                Found in src/CQRSGraph.ts - About 30 mins to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language