Showing 16 of 51 total issues
Function ApplyCommand
has 189 lines of code (exceeds 25 allowed). Consider refactoring. Open
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);
File CQRSGraph.ts
has 361 lines of code (exceeds 250 allowed). Consider refactoring. Open
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";
CQRSGraph
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
Open
export class CQRSGraph {
/**
* Cubitt-Graph
*/
private graph: Graph.GraphInterface;
Function ApplyEvent
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public ApplyEvent(event: Events.Event): void {
switch (event.type) {
case Events.EventType.ConnectorAdded:
this.AddConnector(<Events.ConnectorAddedEvent> event);
break;
Avoid too many return
statements within this function. Open
Open
return new Events.ModelPropertyDeletedEvent(
<Common.Guid> deleteModelPropertyCommand.id,
this.version - 1,
Date.now(),
<Common.Guid> deleteModelPropertyCommand.elementId,
Avoid too many return
statements within this function. Open
Open
return new Events.EdgePropertySetEvent(
<Common.Guid> setEdgePropertyCommand.id,
this.version - 1,
Date.now(),
<Common.Guid> setEdgePropertyCommand.elementId,
Avoid too many return
statements within this function. Open
Open
return new Events.EdgePropertyDeletedEvent(
<Common.Guid> deleteEdgePropertyCommand.id,
this.version - 1,
Date.now(),
<Common.Guid> deleteEdgePropertyCommand.elementId,
Avoid too many return
statements within this function. Open
Open
return new Events.NodeDeletedEvent(
<Common.Guid> deleteNodeCommand.id,
this.version - 1,
Date.now(),
<Common.Guid> deleteNodeCommand.elementId
Avoid too many return
statements within this function. Open
Open
return new Events.EdgeDeletedEvent(
<Common.Guid> deleteEdgeCommand.id,
this.version - 1,
Date.now(),
<Common.Guid> deleteEdgeCommand.elementId
Avoid too many return
statements within this function. Open
Open
return new Events.NodePropertyDeletedEvent(
<Common.Guid> deleteNodeProperty.id,
this.version - 1,
Date.now(),
<Common.Guid> deleteNodeProperty.elementId,
Avoid too many return
statements within this function. Open
Open
return new Events.ConnectorPropertyDeletedEvent(
<Common.Guid> deleteConnectorPropertyCommand.id,
this.version - 1,
Date.now(),
<Common.Guid> deleteConnectorPropertyCommand.elementId,
Avoid too many return
statements within this function. Open
Open
return new Events.NodePropertySetEvent(
<Common.Guid> setNodePropertyCommand.id,
this.version - 1,
Date.now(),
<Common.Guid> setNodePropertyCommand.elementId,
Avoid too many return
statements within this function. Open
Open
return new Events.ModelDeletedEvent(
<Common.Guid> deleteModelCommand.id,
this.version - 1,
Date.now(),
<Common.Guid> deleteModelCommand.elementId
Avoid too many return
statements within this function. Open
Open
return new Events.ConnectorPropertySetEvent(
<Common.Guid> setConnectorPropertyCommand.id,
this.version - 1,
Date.now(),
<Common.Guid> setConnectorPropertyCommand.elementId,
Avoid too many return
statements within this function. Open
Open
return new Events.ModelPropertySetEvent(
<Common.Guid> setModelPropertyCommand.id,
this.version - 1,
Date.now(),
<Common.Guid> setModelPropertyCommand.elementId,
Avoid too many return
statements within this function. Open
Open
return new Events.ConnectorDeletedEvent(
<Common.Guid> deleteConnectorCommand.id,
this.version - 1,
Date.now(),
<Common.Guid> deleteConnectorCommand.elementId