CloudSlang/cs-actions

View on GitHub
cs-mail/src/main/java/io/cloudslang/content/mail/entities/GetMailAttachmentInput.java

Summary

Maintainability
D
1 day
Test Coverage

GetMailAttachmentInput has 31 methods (exceeds 20 allowed). Consider refactoring.
Open

public class GetMailAttachmentInput implements GetMailInput, DecryptableMailInput {

    private String hostname;
    private Short port;
    private String protocol;

    File GetMailAttachmentInput.java has 326 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*
     * Copyright 2021-2024 Open Text
     * This program and the accompanying materials
     * are made available under the terms of the Apache License v2.0 which accompany this distribution.
     *

      Builder has 29 methods (exceeds 20 allowed). Consider refactoring.
      Open

          public static class Builder {
      
              private String hostname;
              private String port;
              private String protocol;

        Method build has 48 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                public GetMailAttachmentInput build() throws Exception {
                    GetMailAttachmentInput input = new GetMailAttachmentInput();
        
                    input.hostname = buildHostname(hostname);
        
        

          Method build has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

                  public GetMailAttachmentInput build() throws Exception {
                      GetMailAttachmentInput input = new GetMailAttachmentInput();
          
                      input.hostname = buildHostname(hostname);
          
          

          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

          There are no issues that match your filters.

          Category
          Status