giansalex/greenter

View on GitHub

Showing 97 of 97 total issues

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

class Shipment
{
    /**
     * Motivo del traslado.
     *
Severity: Minor
Found in packages/core/src/Core/Model/Despatch/Shipment.php - About 5 hrs to fix

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

    <?php
    /**
     * Created by PhpStorm.
     * User: Giansalex
     * Date: 10/03/2019
    Severity: Major
    Found in packages/data/src/Data/Generator/VoidedStore.php and 1 other location - About 5 hrs to fix
    packages/data/src/Data/Generator/ReversionStore.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 193.

    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
    /**
     * Created by PhpStorm.
     * User: Giansalex
     * Date: 10/03/2019
    Severity: Major
    Found in packages/data/src/Data/Generator/ReversionStore.php and 1 other location - About 5 hrs to fix
    packages/data/src/Data/Generator/VoidedStore.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 193.

    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

    SummaryDetail has 38 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class SummaryDetail
    {
        /**
         * @var string
         */
    Severity: Minor
    Found in packages/core/src/Core/Model/Summary/SummaryDetail.php - About 5 hrs to fix

      Invoice has 36 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class Invoice extends BaseSale
      {
          /**
           * Tipo operacion (Catálogo 51).
           *
      Severity: Minor
      Found in packages/core/src/Core/Model/Sale/Invoice.php - About 4 hrs to fix

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

        <?php
        /**
         * Created by PhpStorm.
         * User: Giansalex
         * Date: 15/07/2017
        Severity: Major
        Found in packages/core/src/Core/Model/Voided/VoidedDetail.php and 1 other location - About 4 hrs to fix
        packages/core/src/Core/Model/Sale/Charge.php on lines 1..114

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

        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
        /**
         * Created by PhpStorm.
         * User: Giansalex
         * Date: 04/10/2018
        Severity: Major
        Found in packages/core/src/Core/Model/Sale/Charge.php and 1 other location - About 4 hrs to fix
        packages/core/src/Core/Model/Voided/VoidedDetail.php on lines 1..117

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

        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

        File BaseSale.php has 350 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        /**
         * Created by PhpStorm.
         * User: Giansalex
         * Date: 17/07/2017
        Severity: Minor
        Found in packages/core/src/Core/Model/Sale/BaseSale.php - About 4 hrs to fix

          Method create has 109 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function create(): ?DocumentInterface
              {
                  $perc = new SalePerception();
                  $perc->setCodReg('01') // 51 on UBL2.1 - Catalog 53
                  ->setMto(2)
          Severity: Major
          Found in packages/data/src/Data/Generator/InvoiceStore.php - About 4 hrs to fix

            Method create has 96 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function create(): ?DocumentInterface
                {
                    $rel = new AdditionalDoc();
                    $rel->setTipoDesc('Factura')
                        ->setTipo('01')
            Severity: Major
            Found in packages/data/src/Data/Generator/Despatch2022Store.php - About 3 hrs to fix

              Despatch has 31 functions (exceeds 20 allowed). Consider refactoring.
              Open

              class Despatch implements DocumentInterface
              {
                  /**
                   * @var string
                   */
              Severity: Minor
              Found in packages/core/src/Core/Model/Despatch/Despatch.php - About 3 hrs to fix

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

                <?php
                
                declare(strict_types=1);
                
                namespace Greenter\Model\Sale;
                Severity: Major
                Found in packages/core/src/Core/Model/Sale/Cuota.php and 1 other location - About 2 hrs to fix
                packages/core/src/Core/Model/Retention/Payment.php on lines 1..100

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

                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
                /**
                 * Created by PhpStorm.
                 * User: Administrador
                 * Date: 08/08/2017
                Severity: Major
                Found in packages/core/src/Core/Model/Retention/Payment.php and 1 other location - About 2 hrs to fix
                packages/core/src/Core/Model/Sale/Cuota.php on lines 1..79

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

                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

                File InvoiceParser.php has 288 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                <?php
                /**
                 * Created by PhpStorm.
                 * User: Giansalex
                 * Date: 05/10/2017
                Severity: Minor
                Found in packages/xml-parser/src/Xml/Parser/InvoiceParser.php - About 2 hrs to fix

                  File SaleDetail.php has 286 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  <?php
                  /**
                   * Created by PhpStorm.
                   * User: Giansalex
                   * Date: 15/07/2017
                  Severity: Minor
                  Found in packages/core/src/Core/Model/Sale/SaleDetail.php - About 2 hrs to fix

                    Method load has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function load(ClassMetadata $metadata)
                        {
                            $metadata->addPropertyConstraints('tipoDoc', [
                                new Assert\NotBlank(),
                                new Assert\Length([
                    Severity: Major
                    Found in packages/validator/src/Validator/Loader/NoteLoader.php - About 2 hrs to fix

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

                      <?php
                      /**
                       * Created by PhpStorm.
                       * User: Administrador
                       * Date: 27/09/2017
                      Severity: Major
                      Found in packages/core/src/Core/Model/Sale/Prepayment.php and 1 other location - About 2 hrs to fix
                      packages/core/src/Core/Model/Sale/PaymentTerms.php on lines 1..77

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

                      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
                      
                      declare(strict_types=1);
                      
                      namespace Greenter\Model\Sale;
                      Severity: Major
                      Found in packages/core/src/Core/Model/Sale/PaymentTerms.php and 1 other location - About 2 hrs to fix
                      packages/core/src/Core/Model/Sale/Prepayment.php on lines 1..92

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

                      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 create has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function create(): ?DocumentInterface
                          {
                              $detiail1 = new SummaryDetail();
                              $detiail1->setTipoDoc('03')
                                  ->setSerieNro('B001-1')
                      Severity: Major
                      Found in packages/data/src/Data/Generator/SummaryStore.php - About 2 hrs to fix

                        Perception has 23 functions (exceeds 20 allowed). Consider refactoring.
                        Open

                        class Perception implements DocumentInterface
                        {
                            /**
                             * Serie del Documento (ejem: P001).
                             *
                        Severity: Minor
                        Found in packages/core/src/Core/Model/Perception/Perception.php - About 2 hrs to fix
                          Severity
                          Category
                          Status
                          Source
                          Language