Ontica/Empiria.Land.Intranet

View on GitHub

Showing 53 of 516 total issues

Function execute has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  execute<T>(command: Command): Promise<T> {

    switch (command.type as CommandType) {

      case CommandType.CREATE_TRANSACTION:
Severity: Minor
Found in src/app/presentation/land/transaction.presentation.handler.ts - About 1 hr to fix

    Function dispatch has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      dispatch(actionType: ActionType, params?: any): void {
        switch (actionType) {
    
          case ActionType.SELECT_TRANSACTION_INSTRUMENT_RECORDING:
            Assertion.assertValue(params.transactionInstrumentRecording, 'params.transactionInstrumentRecording');
    Severity: Minor
    Found in src/app/presentation/land/registration.presentation.handler.ts - About 1 hr to fix

      Function dispatch has 34 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        dispatch(actionType: ActionType, params?: any): void {
          switch (actionType) {
      
            case ActionType.SELECT_TRANSACTION:
              Assertion.assertValue(params.transactionUID, 'params.transactionUID');
      Severity: Minor
      Found in src/app/presentation/land/transaction.presentation.handler.ts - About 1 hr to fix

        Function onInstrumentEditorEvent has 33 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          onInstrumentEditorEvent(event: EventInfo) {
            if (this.submitted) {
              return;
            }
        
        

          Function reportHttpProgress has 31 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export function reportHttpProgress(saver?: (b: Blob) => void):
            (source: Observable<HttpEvent<Blob>>) => Observable<Progress> {
          
            return (source: Observable<HttpEvent<Blob>>) =>
              source.pipe(
          Severity: Minor
          Found in src/app/data-services/file-services/http-progress.ts - About 1 hr to fix

            Function execute has 30 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              execute<U>(command: Command): Promise<U> {
            
                switch (command.type as CommandType) {
            
                  case CommandType.CREATE_INSTRUMENT_RECORDING:
            Severity: Minor
            Found in src/app/presentation/land/registration.presentation.handler.ts - About 1 hr to fix

              Function onBookEntryListEvent has 29 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                onBookEntryListEvent(event) {
                  if (this.submitted) {
                    return;
                  }
              
              

                Function tryParse has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  private static tryParse(value: string): Date {
                    const dateParts: string[] = this.tryToConvertToDatePartsArray(value);
                
                    if (!dateParts) {
                      return null;
                Severity: Minor
                Found in src/app/core/data-types/date-string-library.ts - About 1 hr to fix

                  Function onESignExplorerEvent has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    onESignExplorerEvent(event: EventInfo) {
                      switch (event.type as LandExplorerEventType) {
                  
                        case LandExplorerEventType.RECEIVE_ITEMS_CLICKED:
                          this.displayWorkflowCommanderOption = WorkflowCommanderOptions.ReceiveTransactions;

                    Function onTransactionExplorerEvent has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      onTransactionExplorerEvent(event: EventInfo) {
                        switch (event.type as LandExplorerEventType) {
                    
                          case LandExplorerEventType.CREATE_ITEM_CLICKED:
                            this.displayOptionModalSelected = 'CreateTransactionEditor';

                      Function tryParse has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                      Open

                        private static tryParse(value: string): Date {
                          const dateParts: string[] = this.tryToConvertToDatePartsArray(value);
                      
                          if (!dateParts) {
                            return null;
                      Severity: Minor
                      Found in src/app/core/data-types/date-string-library.ts - About 1 hr to fix

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

                      Function initTexts has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                      Open

                        private initTexts(){
                          this.cardTitle = this.displayRecordingAct ? 'Editor del acto jurídico' : 'Editor ';
                          this.tabEditorLabel = 'Datos ';
                      
                          if (this.isRealEstate) {

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

                      Function onRecordingBookSelectorEvent has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        onRecordingBookSelectorEvent(event: EventInfo){
                      
                          switch (event.type as RecordingBookSelectorEventType) {
                      
                            case RecordingBookSelectorEventType.RECORDING_BOOK_CHANGED:

                        Function getServiceFromList has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          private getServiceFromList(servicePathOrUID: string,
                                                     method: HttpMethod): Observable<Service> {
                            let condition: (Service) => boolean;
                        
                            if (servicePathOrUID.includes('/')) {
                        Severity: Minor
                        Found in src/app/core/http/directory.service.ts - About 1 hr to fix

                          Function getNewPasswordErrorsList has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                          Open

                            private getNewPasswordErrorsList(): string[] {
                              let rules: string[] = [];
                          
                              if (this.passwordRules.minlengthRequired &&
                                (this.form.controls.newPassword.errors?.required || this.form.controls.newPassword.errors?.minlength)) {

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Function amendmentRecordingActPlaceholder has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                          Open

                            get amendmentRecordingActPlaceholder(): string {
                              if (this.registrationCommandRules.selectSubject &&
                                this.formHelper.isControlInvalid(this.form.controls.recordableSubject)) {
                                return 'Seleccione el folio real';
                              }

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Function validateSelectBookEntryRule has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                          Open

                            private validateSelectBookEntryRule(data: CreateCertificateCommandPayload) {
                              if (this.certificateRulesSelected.selectBookEntry) {
                                const formModel = this.form.getRawValue();
                          
                                data.recordingBookUID = formModel.recordingBook.uid ?? '';
                          Severity: Minor
                          Found in src/app/views/certificate-emission/certificate-creator.component.ts - About 35 mins to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Function validateSelectBookEntryRule has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                          Open

                            private validateSelectBookEntryRule(data: RegistrationCommandPayload) {
                              if (this.registrationCommandRules.selectBookEntry) {
                                const formModel = this.form.getRawValue();
                          
                                data.recordingBookUID = formModel.recordingBook.uid ?? '';

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Function includesAll has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                          Open

                            static includesAll(source: string, keywords: string): boolean {
                              if (!source || StringLibrary.trimAll(source).length === 0) {
                                return false;
                              }
                              if (!keywords || StringLibrary.trimAll(keywords).length === 0) {
                          Severity: Minor
                          Found in src/app/core/data-types/string-library.ts - About 35 mins to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Function compareDates has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                          Open

                            static compareDates(value1: DateString, value2: DateString): number {
                              const date1 = this.datePart(value1);
                              const date2 = this.datePart(value2);
                          
                              if (date1 && date2) {
                          Severity: Minor
                          Found in src/app/core/data-types/date-string-library.ts - About 35 mins to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Severity
                          Category
                          Status
                          Source
                          Language