mrcnpdlk/teryt-api

View on GitHub
src/NativeApi.php

Summary

Maintainability
F
1 wk
Test Coverage

File NativeApi.php has 674 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

declare(strict_types=1);
/**
 * TERYT-API
Severity: Major
Found in src/NativeApi.php - About 1 day to fix

    NativeApi has 56 functions (exceeds 20 allowed). Consider refactoring.
    Open

    final class NativeApi
    {
        /**
         * @var string Wyszukiwanie wśród wszystkich rodzajów jednostek
         */
    Severity: Major
    Found in src/NativeApi.php - About 1 day to fix

      The class NativeApi has 55 non-getter- and setter-methods. Consider refactoring NativeApi to keep number of methods under 25.
      Open

      final class NativeApi
      {
          /**
           * @var string Wyszukiwanie wśród wszystkich rodzajów jednostek
           */
      Severity: Minor
      Found in src/NativeApi.php by phpmd

      TooManyMethods

      Since: 0.1

      A class with too many methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

      By default it ignores methods starting with 'get' or 'set'.

      The default was changed from 10 to 25 in PHPMD 2.3.

      Example

      Source https://phpmd.org/rules/codesize.html#toomanymethods

      The class NativeApi has an overall complexity of 91 which is very high. The configured complexity threshold is 50.
      Open

      final class NativeApi
      {
          /**
           * @var string Wyszukiwanie wśród wszystkich rodzajów jednostek
           */
      Severity: Minor
      Found in src/NativeApi.php by phpmd

      The class NativeApi has 55 public methods and attributes. Consider reducing the number of public items to less than 45.
      Open

      final class NativeApi
      {
          /**
           * @var string Wyszukiwanie wśród wszystkich rodzajów jednostek
           */
      Severity: Minor
      Found in src/NativeApi.php by phpmd

      ExcessivePublicCount

      Since: 0.1

      A large number of public methods and attributes declared in a class can indicate the class may need to be broken up as increased effort will be required to thoroughly test it.

      Example

      public class Foo {
          public $value;
          public $something;
          public $var;
          // [... more more public attributes ...]
      
          public function doWork() {}
          public function doMoreWork() {}
          public function doWorkAgain() {}
          // [... more more public methods ...]
      }

      Source https://phpmd.org/rules/codesize.html#excessivepubliccount

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

              string $provinceName,
              string $districtName,
              string $communeName,
              string $cityName,
              string $cityTypeName = null,
      Severity: Minor
      Found in src/NativeApi.php - About 45 mins to fix

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

                string $provinceName,
                string $districtName,
                string $communeName,
                string $cityName,
                string $cityTypeName = null,
        Severity: Minor
        Found in src/NativeApi.php - About 45 mins to fix

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

                  string $provinceName,
                  string $districtName,
                  string $communeName,
                  string $cityName,
                  string $cityTypeName = null
          Severity: Minor
          Found in src/NativeApi.php - About 35 mins to fix

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

                    string $provinceName,
                    string $districtName,
                    string $communeName,
                    string $cityName,
                    string $cityId = null
            Severity: Minor
            Found in src/NativeApi.php - About 35 mins to fix

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

                      string $name = null,
                      string $cityId = null,
                      array $tSimc = [],
                      array $tTerc = [],
                      string $cityTypeName = NativeApi::SEARCH_CITY_TYPE_ALL
              Severity: Minor
              Found in src/NativeApi.php - About 35 mins to fix

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

                        string $provinceName,
                        string $districtName,
                        string $communeName,
                        string $cityName,
                        string $cityTypeName = null
                Severity: Minor
                Found in src/NativeApi.php - About 35 mins to fix

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

                          string $name = null,
                          string $identityName = 'ul.',
                          string $streetId = null,
                          array $tSimc = [],
                          array $tTerc = []
                  Severity: Minor
                  Found in src/NativeApi.php - About 35 mins to fix

                    The class NativeApi has 1406 lines of code. Current threshold is 1000. Avoid really long classes.
                    Open

                    final class NativeApi
                    {
                        /**
                         * @var string Wyszukiwanie wśród wszystkich rodzajów jednostek
                         */
                    Severity: Minor
                    Found in src/NativeApi.php by phpmd

                    The class NativeApi has a coupling between objects value of 22. Consider to reduce the number of dependencies under 13.
                    Open

                    final class NativeApi
                    {
                        /**
                         * @var string Wyszukiwanie wśród wszystkich rodzajów jednostek
                         */
                    Severity: Minor
                    Found in src/NativeApi.php by phpmd

                    CouplingBetweenObjects

                    Since: 1.1.0

                    A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability

                    Example

                    class Foo {
                        /**
                         * @var \foo\bar\X
                         */
                        private $x = null;
                    
                        /**
                         * @var \foo\bar\Y
                         */
                        private $y = null;
                    
                        /**
                         * @var \foo\bar\Z
                         */
                        private $z = null;
                    
                        public function setFoo(\Foo $foo) {}
                        public function setBar(\Bar $bar) {}
                        public function setBaz(\Baz $baz) {}
                    
                        /**
                         * @return \SplObjectStorage
                         * @throws \OutOfRangeException
                         * @throws \InvalidArgumentException
                         * @throws \ErrorException
                         */
                        public function process(\Iterator $it) {}
                    
                        // ...
                    }

                    Source https://phpmd.org/rules/design.html#couplingbetweenobjects

                    The method PobierzListeUlicDlaMiejscowosci has a boolean flag argument $asAddress, which is a certain sign of a Single Responsibility Principle violation.
                    Open

                        public function PobierzListeUlicDlaMiejscowosci(int $tercId, string $cityId, bool $asAddress = false): array
                    Severity: Minor
                    Found in src/NativeApi.php by phpmd

                    BooleanArgumentFlag

                    Since: 1.4.0

                    A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

                    Example

                    class Foo {
                        public function bar($flag = true) {
                        }
                    }

                    Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

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

                        public function PobierzZmianySimcUrzedowy(DateTime $fromDate, DateTime $toDate = null): SplFileObject
                        {
                            $toDate  = $toDate ?? new DateTime();
                            $res     = $this->oConfig->request(
                                'PobierzZmianySimcUrzedowy',
                    Severity: Major
                    Found in src/NativeApi.php and 7 other locations - About 3 hrs to fix
                    src/NativeApi.php on lines 731..745
                    src/NativeApi.php on lines 760..774
                    src/NativeApi.php on lines 789..803
                    src/NativeApi.php on lines 847..861
                    src/NativeApi.php on lines 876..890
                    src/NativeApi.php on lines 905..919
                    src/NativeApi.php on lines 934..948

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

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

                        public function PobierzZmianySimcAdresowy(DateTime $fromDate, DateTime $toDate = null): SplFileObject
                        {
                            $toDate  = $toDate ?? new DateTime();
                            $res     = $this->oConfig->request(
                                'PobierzZmianySimcAdresowy',
                    Severity: Major
                    Found in src/NativeApi.php and 7 other locations - About 3 hrs to fix
                    src/NativeApi.php on lines 731..745
                    src/NativeApi.php on lines 789..803
                    src/NativeApi.php on lines 818..832
                    src/NativeApi.php on lines 847..861
                    src/NativeApi.php on lines 876..890
                    src/NativeApi.php on lines 905..919
                    src/NativeApi.php on lines 934..948

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

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

                        public function PobierzZmianyUlicAdresowy(DateTime $fromDate, DateTime $toDate = null): SplFileObject
                        {
                            $toDate  = $toDate ?? new DateTime();
                            $res     = $this->oConfig->request(
                                'PobierzZmianyUlicAdresowy',
                    Severity: Major
                    Found in src/NativeApi.php and 7 other locations - About 3 hrs to fix
                    src/NativeApi.php on lines 731..745
                    src/NativeApi.php on lines 760..774
                    src/NativeApi.php on lines 789..803
                    src/NativeApi.php on lines 818..832
                    src/NativeApi.php on lines 847..861
                    src/NativeApi.php on lines 876..890
                    src/NativeApi.php on lines 934..948

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

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

                        public function PobierzZmianyTercUrzedowy(DateTime $fromDate, DateTime $toDate = null): SplFileObject
                        {
                            $toDate  = $toDate ?? new DateTime();
                            $res     = $this->oConfig->request(
                                'PobierzZmianyTercUrzedowy',
                    Severity: Major
                    Found in src/NativeApi.php and 7 other locations - About 3 hrs to fix
                    src/NativeApi.php on lines 731..745
                    src/NativeApi.php on lines 760..774
                    src/NativeApi.php on lines 789..803
                    src/NativeApi.php on lines 818..832
                    src/NativeApi.php on lines 847..861
                    src/NativeApi.php on lines 905..919
                    src/NativeApi.php on lines 934..948

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

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

                        public function PobierzZmianyNTS(DateTime $fromDate, DateTime $toDate = null): SplFileObject
                        {
                            $toDate  = $toDate ?? new DateTime();
                            $res     = $this->oConfig->request(
                                'PobierzZmianyNTS',
                    Severity: Major
                    Found in src/NativeApi.php and 7 other locations - About 3 hrs to fix
                    src/NativeApi.php on lines 760..774
                    src/NativeApi.php on lines 789..803
                    src/NativeApi.php on lines 818..832
                    src/NativeApi.php on lines 847..861
                    src/NativeApi.php on lines 876..890
                    src/NativeApi.php on lines 905..919
                    src/NativeApi.php on lines 934..948

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

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

                        public function PobierzZmianyUlicUrzedowy(DateTime $fromDate, DateTime $toDate = null): SplFileObject
                        {
                            $toDate  = $toDate ?? new DateTime();
                            $res     = $this->oConfig->request(
                                'PobierzZmianyUlicUrzedowy',
                    Severity: Major
                    Found in src/NativeApi.php and 7 other locations - About 3 hrs to fix
                    src/NativeApi.php on lines 731..745
                    src/NativeApi.php on lines 760..774
                    src/NativeApi.php on lines 789..803
                    src/NativeApi.php on lines 818..832
                    src/NativeApi.php on lines 847..861
                    src/NativeApi.php on lines 876..890
                    src/NativeApi.php on lines 905..919

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

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

                        public function PobierzZmianyTercAdresowy(DateTime $fromDate, DateTime $toDate = null): SplFileObject
                        {
                            $toDate  = $toDate ?? new DateTime();
                            $res     = $this->oConfig->request(
                                'PobierzZmianyTercAdresowy',
                    Severity: Major
                    Found in src/NativeApi.php and 7 other locations - About 3 hrs to fix
                    src/NativeApi.php on lines 731..745
                    src/NativeApi.php on lines 760..774
                    src/NativeApi.php on lines 789..803
                    src/NativeApi.php on lines 818..832
                    src/NativeApi.php on lines 876..890
                    src/NativeApi.php on lines 905..919
                    src/NativeApi.php on lines 934..948

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

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

                        public function PobierzZmianySimcStatystyczny(DateTime $fromDate, DateTime $toDate = null): SplFileObject
                        {
                            $toDate  = $toDate ?? new DateTime();
                            $res     = $this->oConfig->request(
                                'PobierzZmianySimcStatystyczny',
                    Severity: Major
                    Found in src/NativeApi.php and 7 other locations - About 3 hrs to fix
                    src/NativeApi.php on lines 731..745
                    src/NativeApi.php on lines 760..774
                    src/NativeApi.php on lines 818..832
                    src/NativeApi.php on lines 847..861
                    src/NativeApi.php on lines 876..890
                    src/NativeApi.php on lines 905..919
                    src/NativeApi.php on lines 934..948

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

                    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 function WyszukajUliceWRejestrze(
                            string $name = null,
                            string $identityName = 'ul.',
                            string $streetId = null,
                            array $tSimc = [],
                    Severity: Major
                    Found in src/NativeApi.php and 1 other location - About 2 hrs to fix
                    src/NativeApi.php on lines 1345..1372

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

                    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 function WyszukajMiejscowoscWRejestrze(
                            string $name = null,
                            string $cityId = null,
                            array $tSimc = [],
                            array $tTerc = [],
                    Severity: Major
                    Found in src/NativeApi.php and 1 other location - About 2 hrs to fix
                    src/NativeApi.php on lines 1416..1443

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

                    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 function WeryfikujNazwaAdresUlicAdresowy(
                            string $provinceName,
                            string $districtName,
                            string $communeName,
                            string $cityName,
                    Severity: Major
                    Found in src/NativeApi.php and 1 other location - About 2 hrs to fix
                    src/NativeApi.php on lines 1132..1158

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

                    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 function WeryfikujNazwaAdresUlic(
                            string $provinceName,
                            string $districtName,
                            string $communeName,
                            string $cityName,
                    Severity: Major
                    Found in src/NativeApi.php and 1 other location - About 2 hrs to fix
                    src/NativeApi.php on lines 1176..1202

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

                    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

                        public function WyszukajMiejscowoscWJPT(
                            string $provinceName,
                            string $districtName,
                            string $communeName,
                            string $cityName,
                    Severity: Major
                    Found in src/NativeApi.php and 2 other locations - About 1 hr to fix
                    src/NativeApi.php on lines 1050..1071
                    src/NativeApi.php on lines 1091..1112

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

                    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

                        public function WeryfikujAdresWmiejscowosciAdresowy(
                            string $provinceName,
                            string $districtName,
                            string $communeName,
                            string $cityName,
                    Severity: Major
                    Found in src/NativeApi.php and 2 other locations - About 1 hr to fix
                    src/NativeApi.php on lines 1050..1071
                    src/NativeApi.php on lines 1305..1329

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

                    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

                        public function WeryfikujAdresWmiejscowosci(
                            string $provinceName,
                            string $districtName,
                            string $communeName,
                            string $cityName,
                    Severity: Major
                    Found in src/NativeApi.php and 2 other locations - About 1 hr to fix
                    src/NativeApi.php on lines 1091..1112
                    src/NativeApi.php on lines 1305..1329

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

                    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