microting/eform-sdk-dotnet

View on GitHub
eFormCore/Communication/HttpFake.cs

Summary

Maintainability
D
2 days
Test Coverage

Class HttpFake has 56 methods (exceeds 20 allowed). Consider refactoring.
Open

    public class HttpFake : IHttp
    {
        // var
//        private string protocolXml = "6";

Severity: Major
Found in eFormCore/Communication/HttpFake.cs - About 1 day to fix

    File HttpFake.cs has 427 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    using System;
    using System.IO;
    using System.Net;
    using System.Net.Security;
    using System.Security.Cryptography.X509Certificates;
    Severity: Minor
    Found in eFormCore/Communication/HttpFake.cs - About 6 hrs to fix

      Method OrganizationLoadAllFromRemote has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              public async Task<string> OrganizationLoadAllFromRemote()
              {
                  await Task.Run(() => { });
      //            int id = t.GetRandomInt(6);
                  JObject contentToServer = JObject.FromObject(new
      Severity: Minor
      Found in eFormCore/Communication/HttpFake.cs - About 1 hr to fix

        Method UnitUpdate has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                public async Task<string> UnitUpdate(int id, bool newOtp, int siteId, bool pushEnabled, bool syncDelayEnabled,
                    bool syncDialogEnabled)
        Severity: Minor
        Found in eFormCore/Communication/HttpFake.cs - About 45 mins to fix

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

                  public async Task<bool> EntitySelectItemUpdate(string entitySelectGroupId, string entitySelectItemId,
                      string name, int displayOrder, string id)
          Severity: Minor
          Found in eFormCore/Communication/HttpFake.cs - About 35 mins to fix

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

                    public async Task<bool> FolderUpdate(int id, string name, string description, string languageCode,
                        int? parentId)
            Severity: Minor
            Found in eFormCore/Communication/HttpFake.cs - About 35 mins to fix

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

                      public async Task<bool> EntitySearchItemUpdate(string entitySearchGroupId, string entitySearchItemId,
                          string name, string description, string id)
              Severity: Minor
              Found in eFormCore/Communication/HttpFake.cs - About 35 mins to fix

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                            {
                                int MicrotingUid = t.GetRandomInt(6);
                                JObject contentToServer = JObject.FromObject(new
                                {
                                    Name = name, MicrotingUid, CreatedAt = "2018-01-12T01:01:00Z", UpdatedAt = "2018-01-12T01:01:10Z"
                Severity: Minor
                Found in eFormCore/Communication/HttpFake.cs and 1 other location - About 45 mins to fix
                eFormCore/Communication/HttpFake.cs on lines 220..227

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 73.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                            {
                                int MicrotingUid = t.GetRandomInt(6);
                                JObject contentToServer = JObject.FromObject(new
                                {
                                    Name = name, MicrotingUid, CreatedAt = "2018-01-12T01:01:00Z", UpdatedAt = "2018-01-12T01:01:10Z"
                Severity: Minor
                Found in eFormCore/Communication/HttpFake.cs and 1 other location - About 45 mins to fix
                eFormCore/Communication/HttpFake.cs on lines 229..236

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 73.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        {
                            await Task.Run(() => { });
                            JObject contentToServer = JObject.FromObject(new { workflow_state = Constants.WorkflowStates.Created });
                            return contentToServer.ToString();
                        }
                Severity: Minor
                Found in eFormCore/Communication/HttpFake.cs and 1 other location - About 30 mins to fix
                eFormCore/Communication/HttpFake.cs on lines 429..433

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 62.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        {
                            await Task.Run(() => { });
                            JObject contentToServer = JObject.FromObject(new { workflow_state = Constants.WorkflowStates.Removed });
                            return contentToServer.ToString();
                        }
                Severity: Minor
                Found in eFormCore/Communication/HttpFake.cs and 1 other location - About 30 mins to fix
                eFormCore/Communication/HttpFake.cs on lines 436..440

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 62.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        public async Task<string> EntitySearchItemCreate(string entitySearchGroupId, string name, string description,
                            string id)
                        {
                            await Task.Run(() => { });
                            return t.GetRandomInt(6).ToString();
                Severity: Minor
                Found in eFormCore/Communication/HttpFake.cs and 1 other location - About 30 mins to fix
                eFormCore/Communication/HttpFake.cs on lines 172..177

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 60.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        public async Task<string> EntitySelectItemCreate(string entitySelectGroupId, string name, int displayOrder,
                            string id)
                        {
                            await Task.Run(() => { });
                            return t.GetRandomInt(6).ToString();
                Severity: Minor
                Found in eFormCore/Communication/HttpFake.cs and 1 other location - About 30 mins to fix
                eFormCore/Communication/HttpFake.cs on lines 132..137

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 60.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                There are no issues that match your filters.

                Category
                Status