zibios/wrike-php-jmsserializer

View on GitHub

Showing 15 of 15 total issues

TaskResourceModel has 60 functions (exceeds 20 allowed). Consider refactoring.
Open

class TaskResourceModel extends AbstractModel implements ResourceModelInterface
{
    /**
     * Task ID.
     *
Severity: Major
Found in src/Model/Task/TaskResourceModel.php - About 1 day to fix

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

    <?php
    
    /*
     * This file is part of the zibios/wrike-php-jmsserializer package.
     *
    Severity: Major
    Found in src/Model/Common/ProjectModel.php and 1 other location - About 7 hrs to fix
    src/Model/Timelog/TimelogResourceModel.php on lines 1..242

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

    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
    
    /*
     * This file is part of the zibios/wrike-php-jmsserializer package.
     *
    Severity: Major
    Found in src/Model/Timelog/TimelogResourceModel.php and 1 other location - About 7 hrs to fix
    src/Model/Common/ProjectModel.php on lines 1..252

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

    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
    
    /*
     * This file is part of the zibios/wrike-php-jmsserializer package.
     *
    Severity: Major
    Found in src/Model/CustomField/CustomFieldResourceModel.php and 2 other locations - About 5 hrs to fix
    src/Model/Common/CustomStatusModel.php on lines 1..211
    src/Model/Common/UserProfileModel.php on lines 1..206

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

    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
    
    /*
     * This file is part of the zibios/wrike-php-jmsserializer package.
     *
    Severity: Major
    Found in src/Model/Common/CustomStatusModel.php and 2 other locations - About 5 hrs to fix
    src/Model/Common/UserProfileModel.php on lines 1..206
    src/Model/CustomField/CustomFieldResourceModel.php on lines 1..211

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

    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
    
    /*
     * This file is part of the zibios/wrike-php-jmsserializer package.
     *
    Severity: Major
    Found in src/Model/Common/UserProfileModel.php and 2 other locations - About 5 hrs to fix
    src/Model/Common/CustomStatusModel.php on lines 1..211
    src/Model/CustomField/CustomFieldResourceModel.php on lines 1..211

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

    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

    FolderResourceModel has 42 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class FolderResourceModel extends AbstractModel implements ResourceModelInterface
    {
        /**
         * Folder ID.
         *
    Severity: Minor
    Found in src/Model/Folder/FolderResourceModel.php - About 5 hrs to fix

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

      <?php
      
      /*
       * This file is part of the zibios/wrike-php-jmsserializer package.
       *
      Severity: Major
      Found in src/Model/Workflow/WorkflowResourceModel.php and 1 other location - About 4 hrs to fix
      src/Model/Common/TaskDatesModel.php on lines 1..182

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

      <?php
      
      /*
       * This file is part of the zibios/wrike-php-jmsserializer package.
       *
      Severity: Major
      Found in src/Model/Common/TaskDatesModel.php and 1 other location - About 4 hrs to fix
      src/Model/Workflow/WorkflowResourceModel.php on lines 1..178

      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

      ContactResourceModel has 34 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class ContactResourceModel extends AbstractModel implements ResourceModelInterface
      {
          /**
           * Contact ID.
           *
      Severity: Minor
      Found in src/Model/Contact/ContactResourceModel.php - About 4 hrs to fix

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

        class AttachmentResourceModel extends AbstractModel implements ResourceModelInterface
        {
            /**
             * Attachment ID.
             *
        Severity: Minor
        Found in src/Model/Attachment/AttachmentResourceModel.php - About 3 hrs to fix

          File TaskResourceModel.php has 311 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          
          /*
           * This file is part of the zibios/wrike-php-jmsserializer package.
           *
          Severity: Minor
          Found in src/Model/Task/TaskResourceModel.php - About 3 hrs to fix

            AccountResourceModel has 24 functions (exceeds 20 allowed). Consider refactoring.
            Open

            class AccountResourceModel extends AbstractModel implements ResourceModelInterface
            {
                /**
                 * Account ID.
                 *
            Severity: Minor
            Found in src/Model/Account/AccountResourceModel.php - About 2 hrs to fix

              InvitationResourceModel has 22 functions (exceeds 20 allowed). Consider refactoring.
              Open

              class InvitationResourceModel extends AbstractModel implements ResourceModelInterface
              {
                  /**
                   * Invitation ID.
                   *
              Severity: Minor
              Found in src/Model/Invitation/InvitationResourceModel.php - About 2 hrs to fix

                Missing class import via use statement (line '106', column '23').
                Open

                            throw new \InvalidArgumentException(sprintf('"%s" class not supported', $resourceClass));

                MissingImport

                Since: 2.7.0

                Importing all external classes in a file through use statements makes them clearly visible.

                Example

                function make() {
                    return new \stdClass();
                }

                Source http://phpmd.org/rules/cleancode.html#MissingImport

                Severity
                Category
                Status
                Source
                Language