devboard/github-object-api-facade

View on GitHub

Showing 14 of 14 total issues

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

<?php

namespace tests\DevBoardLib\GithubObjectApiFacade\Repo\Branch\Converter;

use DevBoardLib\GithubObjectApiFacade\Repo\Branch\Converter\GithubBranchConverter;
Severity: Major
Found in tests/Repo/Branch/Converter/GithubBranchConverterTest.php and 2 other locations - About 4 hrs to fix
tests/Repo/PullRequest/Converter/GithubPullRequestConverterTest.php on lines 1..66
tests/Repo/Tag/Converter/GithubTagConverterTest.php on lines 1..66

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 180.

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 3 locations. Consider refactoring.
Open

<?php

namespace tests\DevBoardLib\GithubObjectApiFacade\Repo\Tag\Converter;

use DevBoardLib\GithubObjectApiFacade\Repo\Tag\Converter\GithubTagConverter;
Severity: Major
Found in tests/Repo/Tag/Converter/GithubTagConverterTest.php and 2 other locations - About 4 hrs to fix
tests/Repo/Branch/Converter/GithubBranchConverterTest.php on lines 1..66
tests/Repo/PullRequest/Converter/GithubPullRequestConverterTest.php on lines 1..66

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 180.

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 3 locations. Consider refactoring.
Open

<?php

namespace tests\DevBoardLib\GithubObjectApiFacade\Repo\PullRequest\Converter;

use DevBoardLib\GithubObjectApiFacade\Repo\PullRequest\Converter\GithubPullRequestConverter;
tests/Repo/Branch/Converter/GithubBranchConverterTest.php on lines 1..66
tests/Repo/Tag/Converter/GithubTagConverterTest.php on lines 1..66

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 180.

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

GithubMilestoneConverterSpec has 32 functions (exceeds 20 allowed). Consider refactoring.
Open

class GithubMilestoneConverterSpec extends ObjectBehavior
{
    public function it_is_initializable()
    {
        $this->shouldHaveType('DevBoardLib\GithubObjectApiFacade\Repo\Milestone\Converter\GithubMilestoneConverter');
Severity: Minor
Found in spec/Repo/Milestone/Converter/GithubMilestoneConverterSpec.php - About 4 hrs to fix

    GithubIssueConverterSpec has 30 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class GithubIssueConverterSpec extends ObjectBehavior
    {
        public function it_is_initializable()
        {
            $this->shouldHaveType('DevBoardLib\GithubObjectApiFacade\Repo\Issue\Converter\GithubIssueConverter');
    Severity: Minor
    Found in spec/Repo/Issue/Converter/GithubIssueConverterSpec.php - About 3 hrs to fix

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

      <?php
      
      namespace tests\DevBoardLib\GithubObjectApiFacade\Repo\Issue\Converter;
      
      use DevBoardLib\GithubObjectApiFacade\Repo\Issue\Converter\GithubIssueConverter;
      Severity: Major
      Found in tests/Repo/Issue/Converter/GithubIssueConverterTest.php and 1 other location - About 2 hrs to fix
      tests/Repo/Milestone/Converter/GithubMilestoneConverterTest.php on lines 1..60

      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 129.

      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

      <?php
      
      namespace tests\DevBoardLib\GithubObjectApiFacade\Repo\Milestone\Converter;
      
      use DevBoardLib\GithubObjectApiFacade\Repo\Milestone\Converter\GithubMilestoneConverter;
      tests/Repo/Issue/Converter/GithubIssueConverterTest.php on lines 1..60

      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 129.

      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

      Method __construct has 9 arguments (exceeds 4 allowed). Consider refactoring.
      Open

              RepoFacade $repoFacade,
              GithubRepoConverter $githubRepoConverter,
              GithubBranchConverter $githubBranchConverter,
              GithubTagConverter $githubTagConverter,
              GithubPullRequestConverter $githubPullRequestConverter,
      Severity: Major
      Found in src/Repo/SimpleRepoFacade.php - About 1 hr to fix

        Method let has 9 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                RepoFacade $repoFacade,
                GithubRepoConverter $githubRepoConverter,
                GithubBranchConverter $githubBranchConverter,
                GithubTagConverter $githubTagConverter,
                GithubPullRequestConverter $githubPullRequestConverter,
        Severity: Major
        Found in spec/Repo/SimpleRepoFacadeSpec.php - About 1 hr to fix

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

          <?php
          
          namespace DevBoardLib\GithubObjectApiFacade\Repo\Branch\Converter;
          
          use DateTime;
          Severity: Major
          Found in src/Repo/Branch/Converter/GithubBranchConverter.php and 2 other locations - About 50 mins to fix
          src/Repo/Issue/Converter/GithubIssueConverter.php on lines 1..56
          src/Repo/Tag/Converter/GithubTagConverter.php on lines 1..56

          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 97.

          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 3 locations. Consider refactoring.
          Open

          <?php
          
          namespace DevBoardLib\GithubObjectApiFacade\Repo\Issue\Converter;
          
          use DateTime;
          Severity: Major
          Found in src/Repo/Issue/Converter/GithubIssueConverter.php and 2 other locations - About 50 mins to fix
          src/Repo/Branch/Converter/GithubBranchConverter.php on lines 1..56
          src/Repo/Tag/Converter/GithubTagConverter.php on lines 1..56

          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 97.

          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 3 locations. Consider refactoring.
          Open

          <?php
          
          namespace DevBoardLib\GithubObjectApiFacade\Repo\Tag\Converter;
          
          use DateTime;
          Severity: Major
          Found in src/Repo/Tag/Converter/GithubTagConverter.php and 2 other locations - About 50 mins to fix
          src/Repo/Branch/Converter/GithubBranchConverter.php on lines 1..56
          src/Repo/Issue/Converter/GithubIssueConverter.php on lines 1..56

          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 97.

          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

          <?php
          
          namespace DevBoardLib\GithubObjectApiFacade\Repo\CommitStatus\Converter;
          
          use DateTime;
          Severity: Minor
          Found in src/Repo/CommitStatus/Converter/GithubCommitStatusConverter.php and 1 other location - About 35 mins to fix
          src/Repo/Milestone/Converter/GithubMilestoneConverter.php on lines 1..54

          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 92.

          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

          <?php
          
          namespace DevBoardLib\GithubObjectApiFacade\Repo\Milestone\Converter;
          
          use DateTime;
          Severity: Minor
          Found in src/Repo/Milestone/Converter/GithubMilestoneConverter.php and 1 other location - About 35 mins to fix
          src/Repo/CommitStatus/Converter/GithubCommitStatusConverter.php on lines 1..54

          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 92.

          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

          Severity
          Category
          Status
          Source
          Language