YetiForceCompany/YetiForceCRM

View on GitHub
app/Mail/RecordFinder.php

Summary

Maintainability
D
1 day
Test Coverage
F
0%

Function findByDomainField has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
Open

    public static function findByDomainField(string $moduleName, array $fields, array $emails): array
    {
        $return = $activeFields = $domainsAndEmails = [];
        foreach ($emails as $email) {
            $domainsAndEmails[mb_strtolower(explode('@', $email)[1])][] = $email;
Severity: Minor
Found in app/Mail/RecordFinder.php - About 5 hrs to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

class RecordFinder
{
    /**
     * Emails cache.
     *
Severity: Minor
Found in app/Mail/RecordFinder.php by phpmd

Function findByEmailField has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

    public static function findByEmailField(string $moduleName, array $fields, array $emails): array
    {
        $activeFields = $conditions = $return = [];
        foreach ($emails as $i => $email) {
            if (isset(self::$emailsCache[$moduleName][$email])) {
Severity: Minor
Found in app/Mail/RecordFinder.php - About 2 hrs to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method findByDomainField has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static function findByDomainField(string $moduleName, array $fields, array $emails): array
    {
        $return = $activeFields = $domainsAndEmails = [];
        foreach ($emails as $email) {
            $domainsAndEmails[mb_strtolower(explode('@', $email)[1])][] = $email;
Severity: Minor
Found in app/Mail/RecordFinder.php - About 1 hr to fix

    Method findByEmailField has 37 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public static function findByEmailField(string $moduleName, array $fields, array $emails): array
        {
            $activeFields = $conditions = $return = [];
            foreach ($emails as $i => $email) {
                if (isset(self::$emailsCache[$moduleName][$email])) {
    Severity: Minor
    Found in app/Mail/RecordFinder.php - About 1 hr to fix

      Function findByRecordNumber has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          public static function findByRecordNumber(array $numbers, string $moduleName, array $fields): array
          {
              $return = [];
              foreach ($numbers as $i => $number) {
                  if (isset(self::$recordNumberCache[$moduleName][$number])) {
      Severity: Minor
      Found in app/Mail/RecordFinder.php - About 1 hr to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Method getRecordNumberFromString has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public static function getRecordNumberFromString(string $value, string $moduleName, bool $multi = false)
          {
              $moduleData = \App\Fields\RecordNumber::getInstance($moduleName);
              $prefix = str_replace(['\{\{YYYY\}\}', '\{\{YY\}\}', '\{\{MM\}\}', '\{\{DD\}\}', '\{\{M\}\}', '\{\{D\}\}'], ['\d{4}', '\d{2}', '\d{2}', '\d{2}', '\d{1,2}', '\d{1,2}'], preg_quote($moduleData->get('prefix'), '/'));
              $postfix = str_replace(['\{\{YYYY\}\}', '\{\{YY\}\}', '\{\{MM\}\}', '\{\{DD\}\}', '\{\{M\}\}', '\{\{D\}\}'], ['\d{4}', '\d{2}', '\d{2}', '\d{2}', '\d{1,2}', '\d{1,2}'], preg_quote($moduleData->get('postfix'), '/'));
      Severity: Minor
      Found in app/Mail/RecordFinder.php - About 1 hr to fix

        Function getRecordNumberFromString has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
        Open

            public static function getRecordNumberFromString(string $value, string $moduleName, bool $multi = false)
            {
                $moduleData = \App\Fields\RecordNumber::getInstance($moduleName);
                $prefix = str_replace(['\{\{YYYY\}\}', '\{\{YY\}\}', '\{\{MM\}\}', '\{\{DD\}\}', '\{\{M\}\}', '\{\{D\}\}'], ['\d{4}', '\d{2}', '\d{2}', '\d{2}', '\d{1,2}', '\d{1,2}'], preg_quote($moduleData->get('prefix'), '/'));
                $postfix = str_replace(['\{\{YYYY\}\}', '\{\{YY\}\}', '\{\{MM\}\}', '\{\{DD\}\}', '\{\{M\}\}', '\{\{D\}\}'], ['\d{4}', '\d{2}', '\d{2}', '\d{2}', '\d{1,2}', '\d{1,2}'], preg_quote($moduleData->get('postfix'), '/'));
        Severity: Minor
        Found in app/Mail/RecordFinder.php - About 55 mins to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function findByEmail has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
        Open

            public static function findByEmail($emails, array $modulesFields): array
            {
                if (empty($emails)) {
                    return [];
                }
        Severity: Minor
        Found in app/Mail/RecordFinder.php - About 55 mins to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Avoid too many return statements within this method.
        Open

                return false;
        Severity: Major
        Found in app/Mail/RecordFinder.php - About 30 mins to fix

          The method findByDomainField() has an NPath complexity of 200. The configured NPath complexity threshold is 200.
          Open

              public static function findByDomainField(string $moduleName, array $fields, array $emails): array
              {
                  $return = $activeFields = $domainsAndEmails = [];
                  foreach ($emails as $email) {
                      $domainsAndEmails[mb_strtolower(explode('@', $email)[1])][] = $email;
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpmd

          NPathComplexity

          Since: 0.1

          The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

          Example

          class Foo {
              function bar() {
                  // lots of complicated code
              }
          }

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

          The method findByDomainField() has a Cyclomatic Complexity of 14. The configured cyclomatic complexity threshold is 10.
          Open

              public static function findByDomainField(string $moduleName, array $fields, array $emails): array
              {
                  $return = $activeFields = $domainsAndEmails = [];
                  foreach ($emails as $email) {
                      $domainsAndEmails[mb_strtolower(explode('@', $email)[1])][] = $email;
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpmd

          CyclomaticComplexity

          Since: 0.1

          Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

          Example

          // Cyclomatic Complexity = 11
          class Foo {
          1   public function example() {
          2       if ($a == $b) {
          3           if ($a1 == $b1) {
                          fiddle();
          4           } elseif ($a2 == $b2) {
                          fiddle();
                      } else {
                          fiddle();
                      }
          5       } elseif ($c == $d) {
          6           while ($c == $d) {
                          fiddle();
                      }
          7        } elseif ($e == $f) {
          8           for ($n = 0; $n < $h; $n++) {
                          fiddle();
                      }
                  } else {
                      switch ($z) {
          9               case 1:
                              fiddle();
                              break;
          10              case 2:
                              fiddle();
                              break;
          11              case 3:
                              fiddle();
                              break;
                          default:
                              fiddle();
                              break;
                      }
                  }
              }
          }

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

          The method findByEmailField() has a Cyclomatic Complexity of 11. The configured cyclomatic complexity threshold is 10.
          Open

              public static function findByEmailField(string $moduleName, array $fields, array $emails): array
              {
                  $activeFields = $conditions = $return = [];
                  foreach ($emails as $i => $email) {
                      if (isset(self::$emailsCache[$moduleName][$email])) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpmd

          CyclomaticComplexity

          Since: 0.1

          Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

          Example

          // Cyclomatic Complexity = 11
          class Foo {
          1   public function example() {
          2       if ($a == $b) {
          3           if ($a1 == $b1) {
                          fiddle();
          4           } elseif ($a2 == $b2) {
                          fiddle();
                      } else {
                          fiddle();
                      }
          5       } elseif ($c == $d) {
          6           while ($c == $d) {
                          fiddle();
                      }
          7        } elseif ($e == $f) {
          8           for ($n = 0; $n < $h; $n++) {
                          fiddle();
                      }
                  } else {
                      switch ($z) {
          9               case 1:
                              fiddle();
                              break;
          10              case 2:
                              fiddle();
                              break;
          11              case 3:
                              fiddle();
                              break;
                          default:
                              fiddle();
                              break;
                      }
                  }
              }
          }

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

          Refactor this function to reduce its Cognitive Complexity from 19 to the 15 allowed.
          Open

              public static function findByEmailField(string $moduleName, array $fields, array $emails): array
          Severity: Critical
          Found in app/Mail/RecordFinder.php by sonar-php

          Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

          See

          Refactor this function to reduce its Cognitive Complexity from 41 to the 15 allowed.
          Open

              public static function findByDomainField(string $moduleName, array $fields, array $emails): array
          Severity: Critical
          Found in app/Mail/RecordFinder.php by sonar-php

          Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

          See

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

              public static function getRecordNumberFromString(string $value, string $moduleName, bool $multi = false)
          Severity: Minor
          Found in app/Mail/RecordFinder.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

          Missing class import via use statement (line '248', column '26').
          Open

                      $queryGenerator = new \App\QueryGenerator($moduleName);
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpmd

          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

          Missing class import via use statement (line '85', column '25').
          Open

                  $queryGenerator = new \App\QueryGenerator($moduleName);
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpmd

          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

          Missing class import via use statement (line '133', column '25').
          Open

                  $queryGenerator = new \App\QueryGenerator($moduleName);
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpmd

          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

          The method findByEmail uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
          Open

                          } else {
                              $ids = array_replace_recursive($ids, static::findByEmailField($module, $fields, $emails));
                          }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpmd

          ElseExpression

          Since: 1.4.0

          An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

          Example

          class Foo
          {
              public function bar($flag)
              {
                  if ($flag) {
                      // one branch
                  } else {
                      // another branch
                  }
              }
          }

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

          Avoid assigning values to variables in if clauses and the like (line '88', column '8').
          Open

              public static function findByEmailField(string $moduleName, array $fields, array $emails): array
              {
                  $activeFields = $conditions = $return = [];
                  foreach ($emails as $i => $email) {
                      if (isset(self::$emailsCache[$moduleName][$email])) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpmd

          IfStatementAssignment

          Since: 2.7.0

          Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

          Example

          class Foo
          {
              public function bar($flag)
              {
                  if ($foo = 'bar') { // possible typo
                      // ...
                  }
                  if ($baz = 0) { // always false
                      // ...
                  }
              }
          }

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

          Avoid using static access to class '\App\Fields\Picklist' in method 'getRecordNumberFromString'.
          Open

                      $picklistPrefix = array_column(\App\Fields\Picklist::getValues($matches[1]), 'prefix');
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpmd

          StaticAccess

          Since: 1.4.0

          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

          Example

          class Foo
          {
              public function bar()
              {
                  Bar::baz();
              }
          }

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

          Avoid using static access to class '\App\Utils' in method 'findBySubject'.
          Open

                      $records = array_merge($records, \App\Utils::flatten(self::findByRecordNumber($numbers, $moduleName, \App\Utils::flatten($fields))));
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpmd

          StaticAccess

          Since: 1.4.0

          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

          Example

          class Foo
          {
              public function bar()
              {
                  Bar::baz();
              }
          }

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

          Avoid using static access to class '\App\Utils' in method 'findBySubject'.
          Open

                      $records = array_merge($records, \App\Utils::flatten(self::findByRecordNumber($numbers, $moduleName, \App\Utils::flatten($fields))));
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpmd

          StaticAccess

          Since: 1.4.0

          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

          Example

          class Foo
          {
              public function bar()
              {
                  Bar::baz();
              }
          }

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

          The method getRecordNumberFromString uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
          Open

                  } else {
                      preg_match($redex, $value, $match);
                      if (!empty($match)) {
                          return trim($match[0], '[,]');
                      }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpmd

          ElseExpression

          Since: 1.4.0

          An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

          Example

          class Foo
          {
              public function bar($flag)
              {
                  if ($flag) {
                      // one branch
                  } else {
                      // another branch
                  }
              }
          }

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

          Avoid using static access to class '\App\Fields\RecordNumber' in method 'getRecordNumberFromString'.
          Open

                  $moduleData = \App\Fields\RecordNumber::getInstance($moduleName);
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpmd

          StaticAccess

          Since: 1.4.0

          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

          Example

          class Foo
          {
              public function bar()
              {
                  Bar::baz();
              }
          }

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

          Avoid using static access to class '\Users_Module_Model' in method 'findUserEmail'.
          Open

                      if (!\Users_Module_Model::checkMailExist($email)) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpmd

          StaticAccess

          Since: 1.4.0

          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

          Example

          class Foo
          {
              public function bar()
              {
                  Bar::baz();
              }
          }

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

          Avoid assigning values to variables in if clauses and the like (line '150', column '10').
          Open

              public static function findByDomainField(string $moduleName, array $fields, array $emails): array
              {
                  $return = $activeFields = $domainsAndEmails = [];
                  foreach ($emails as $email) {
                      $domainsAndEmails[mb_strtolower(explode('@', $email)[1])][] = $email;
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpmd

          IfStatementAssignment

          Since: 2.7.0

          Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

          Example

          class Foo
          {
              public function bar($flag)
              {
                  if ($foo = 'bar') { // possible typo
                      // ...
                  }
                  if ($baz = 0) { // always false
                      // ...
                  }
              }
          }

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

          Define a constant instead of duplicating this literal "\d{1,2}" 4 times.
          Open

                  $prefix = str_replace(['\{\{YYYY\}\}', '\{\{YY\}\}', '\{\{MM\}\}', '\{\{DD\}\}', '\{\{M\}\}', '\{\{D\}\}'], ['\d{4}', '\d{2}', '\d{2}', '\d{2}', '\d{1,2}', '\d{1,2}'], preg_quote($moduleData->get('prefix'), '/'));
          Severity: Critical
          Found in app/Mail/RecordFinder.php by sonar-php

          Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

          On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

          Noncompliant Code Example

          With the default threshold of 3:

          function run() {
            prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
            execute('action1');
            release('action1');
          }
          

          Compliant Solution

          ACTION_1 = 'action1';
          
          function run() {
            prepare(ACTION_1);
            execute(ACTION_1);
            release(ACTION_1);
          }
          

          Exceptions

          To prevent generating some false-positives, literals having less than 5 characters are excluded.

          Define a constant instead of duplicating this literal "\d{2}" 6 times.
          Open

                  $prefix = str_replace(['\{\{YYYY\}\}', '\{\{YY\}\}', '\{\{MM\}\}', '\{\{DD\}\}', '\{\{M\}\}', '\{\{D\}\}'], ['\d{4}', '\d{2}', '\d{2}', '\d{2}', '\d{1,2}', '\d{1,2}'], preg_quote($moduleData->get('prefix'), '/'));
          Severity: Critical
          Found in app/Mail/RecordFinder.php by sonar-php

          Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

          On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

          Noncompliant Code Example

          With the default threshold of 3:

          function run() {
            prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
            execute('action1');
            release('action1');
          }
          

          Compliant Solution

          ACTION_1 = 'action1';
          
          function run() {
            prepare(ACTION_1);
            execute(ACTION_1);
            release(ACTION_1);
          }
          

          Exceptions

          To prevent generating some false-positives, literals having less than 5 characters are excluded.

          Call to method setOrder from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
          Open

                      $queryGenerator->setOrder('id', 'DESC');
          Severity: Critical
          Found in app/Mail/RecordFinder.php by phan

          Call to method __construct from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
          Open

                  $queryGenerator = new \App\QueryGenerator($moduleName);
          Severity: Critical
          Found in app/Mail/RecordFinder.php by phan

          Call to method addCondition from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
          Open

                              $queryGenerator->addCondition($field, $domain, 'a', false);
          Severity: Critical
          Found in app/Mail/RecordFinder.php by phan

          Call to method addCondition from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
          Open

                          $queryGenerator->addCondition($fieldName, $numbers, 'e', false);
          Severity: Critical
          Found in app/Mail/RecordFinder.php by phan

          Call to method getModuleField from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
          Open

                      if ($queryGenerator->getModuleField($field)) {
          Severity: Critical
          Found in app/Mail/RecordFinder.php by phan

          Call to method setFields from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
          Open

                      $queryGenerator->setFields(array_merge(['id'], $activeFields));
          Severity: Critical
          Found in app/Mail/RecordFinder.php by phan

          Call to method __construct from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
          Open

                      $queryGenerator = new \App\QueryGenerator($moduleName);
          Severity: Critical
          Found in app/Mail/RecordFinder.php by phan

          Call to method setFields from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
          Open

                      $queryGenerator->setFields(array_merge(['id'], $activeFields));
          Severity: Critical
          Found in app/Mail/RecordFinder.php by phan

          Call to method createQuery from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
          Open

                      $dataReader = $queryGenerator->createQuery()->createCommand()->query();
          Severity: Critical
          Found in app/Mail/RecordFinder.php by phan

          Reference to instance property permissions from undeclared class \App\QueryGenerator
          Open

                  $queryGenerator->permissions = false;
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phan

          Call to method createQuery from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
          Open

                      $dataReader = $queryGenerator->createQuery()->createCommand()->query();
          Severity: Critical
          Found in app/Mail/RecordFinder.php by phan

          Call to method getInstance from undeclared class \App\Fields\RecordNumber (Did you mean class \Tests\Base\RecordNumber)
          Open

                  $moduleData = \App\Fields\RecordNumber::getInstance($moduleName);
          Severity: Critical
          Found in app/Mail/RecordFinder.php by phan

          Reference to instance property permissions from undeclared class \App\QueryGenerator
          Open

                      $queryGenerator->permissions = false;
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phan

          Reference to instance property permissions from undeclared class \App\QueryGenerator
          Open

                  $queryGenerator->permissions = false;
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phan

          Call to method __construct from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
          Open

                  $queryGenerator = new \App\QueryGenerator($moduleName);
          Severity: Critical
          Found in app/Mail/RecordFinder.php by phan

          Call to method createQuery from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
          Open

                      $query = $queryGenerator->createQuery();
          Severity: Critical
          Found in app/Mail/RecordFinder.php by phan

          Call to method getModuleField from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
          Open

                      if ($fieldsModel = $queryGenerator->getModuleField($field)) {
          Severity: Critical
          Found in app/Mail/RecordFinder.php by phan

          Call to method setFields from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
          Open

                      $queryGenerator->setFields(array_merge(['id'], $fields));
          Severity: Critical
          Found in app/Mail/RecordFinder.php by phan

          Spaces must be used to indent lines; tabs are not allowed
          Open

              /**
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              /**
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * Record number cache.
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               */
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              public static function findByEmail($emails, array $modulesFields): array
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  if (!\is_array($emails)) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $ids = [];
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              $ids = array_replace_recursive($ids, static::findByDomainField($module, $fields, $emails));
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      $queryGenerator->setFields(array_merge(['id'], $activeFields));
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  return $return;
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @param string[] $fields
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  foreach ($emails as $email) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      $queryGenerator->setFields(array_merge(['id'], $activeFields));
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                          }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * Emails cache.
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * Domain cache.
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * Search crm ids by emails field and module name.
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $queryGenerator->permissions = false;
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  foreach ($fields as $field) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          $activeFields[] = $field;
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  if (!$activeFields) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          foreach ($activeFields as $field) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          } else {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      if ($queryGenerator->getModuleField($field)) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          $activeFields[] = $field;
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          self::$domainCache[$moduleName][$email] = $return[$email] = [];
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              /**
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  foreach ($modulesFields as $module => $fieldsByType) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              $ids = array_replace_recursive($ids, static::findByEmailField($module, $fields, $emails));
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          unset($emails[$i]);
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      $query = $queryGenerator->createQuery();
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @param string[] $emails
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  foreach ($fields as $field) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              private static $recordNumberCache = [];
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @param string   $moduleName
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $domains = array_keys($domainsAndEmails);
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              $queryGenerator->addCondition($field, $domain, 'a', false);
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      $dataReader = $queryGenerator->createQuery()->createCommand()->query();
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @param string   $moduleName
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @param string[] $fields
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @return array
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      if (isset(self::$emailsCache[$moduleName][$email])) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      $query->andWhere(array_merge(['or'], $conditions));
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      $dataReader = $query->createCommand()->query();
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  self::$emailsCache[$moduleName][$rowEmail][] = $return[$rowEmail][] = $row['id'];
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      foreach ($emails as $i => $email) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               */
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              $rowDomains = $row[$field];
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               */
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              public static function findByEmailField(string $moduleName, array $fields, array $emails): array
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              public static function findByDomainField(string $moduleName, array $fields, array $emails): array
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      $domainsAndEmails[mb_strtolower(explode('@', $email)[1])][] = $email;
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                              unset($emails[array_search($email, $emails)]);
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                      if (isset($domainsAndEmails[$intersectRow])) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * Find email address.
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  return $ids;
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      return [];
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      while ($row = $dataReader->read()) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $queryGenerator->permissions = false;
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      while ($row = $dataReader->read()) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               */
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              /**
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      $emails = explode(',', $emails);
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              /**
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @param string[] $emails
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          if (319 === $uiType) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  unset($emails[array_search($rowEmail, $emails)]);
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                          foreach ($domainsAndEmails[$intersectRow] as $email) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              /**
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          foreach ($activeFields as $field) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              $rowDomains = $rowDomains ? explode(',', trim($rowDomains, ',')) : [];
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              if ($intersectRows = array_intersect($domains, $rowDomains)) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                              self::$domainCache[$moduleName][$email][] = $return[$email][] = $row['id'];
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * Gets the prefix from text.
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @param bool   $multi
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      return '((' . implode('|', $picklistPrefix) . ')*)';
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              public static function findByRecordNumber(array $numbers, string $moduleName, array $fields): array
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      $queryGenerator->setFields(array_merge(['id'], $fields));
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      $queryGenerator->setOrder('id', 'DESC');
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      while ($row = $dataReader->read()) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              private static $emailsCache = [];
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               */
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $activeFields = $conditions = $return = [];
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          $return[$email] = self::$emailsCache[$moduleName][$email];
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          $conditions[] = [$fieldsModel->getColumnName() => $emails];
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  if ($emails) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @return array
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  foreach ($intersectRows as $intersectRow) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      foreach ($emails as $email) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              private static $domainCache = [];
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @param array $modulesFields
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $queryGenerator = new \App\QueryGenerator($moduleName);
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              $rowEmail = $row[$field];
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              if (\in_array($rowEmail, $emails)) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          foreach ($domains as $domain) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  if ($activeFields) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * Find email address.
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      if (!$picklistPrefix) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      if (!empty($match[0])) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      $queryGenerator->permissions = false;
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               */
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @param mixed $emails
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      return [];
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      foreach ($fieldsByType as $uiType => $fields) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      if ($fieldsModel = $queryGenerator->getModuleField($field)) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          self::$emailsCache[$moduleName][$email] = $return[$email] = [];
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * Search crm ids by domains field and module name.
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @param string $subject
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      if (!$numbers || !$fields) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @return bool|string|array
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $redex = preg_replace_callback('/\\\\{\\\\{picklist\\\\:([a-z0-9_]+)\\\\}\\\\}/i', function ($matches) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @param array  $numbers
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @var array
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @return array
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  if (empty($emails)) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                      }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $records = [];
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      $numbers = self::getRecordNumberFromString($subject, $moduleName, true);
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  } else {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      preg_match($redex, $value, $match);
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  if ($numbers) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      $queryGenerator = new \App\QueryGenerator($moduleName);
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          foreach ($fields as $fieldName) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  return $return;
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  return $return;
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          return '';
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      preg_match_all($redex, $value, $match);
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          $return = [];
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          $queryGenerator->addCondition($fieldName, $numbers, 'e', false);
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      if (!\Users_Module_Model::checkMailExist($email)) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @var array
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @var array
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  foreach ($emails as $i => $email) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $return = $activeFields = $domainsAndEmails = [];
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $queryGenerator = new \App\QueryGenerator($moduleName);
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  if ($multi) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              $return[] = trim($row, '[,]');
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          return $return;
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @param array  $fields
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @param array  $modulesFields
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @param string $value
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $postfix = str_replace(['\{\{YYYY\}\}', '\{\{YY\}\}', '\{\{MM\}\}', '\{\{DD\}\}', '\{\{M\}\}', '\{\{D\}\}'], ['\d{4}', '\d{2}', '\d{2}', '\d{2}', '\d{1,2}', '\d{1,2}'], preg_quote($moduleData->get('postfix'), '/'));
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  return false;
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @param string $moduleName
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               */
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      $picklistPrefix = array_column(\App\Fields\Picklist::getValues($matches[1]), 'prefix');
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              public static function findUserEmail(array $emails): array
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          foreach ($match[0] as $row) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      if (!empty($match)) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  foreach ($numbers as $i => $number) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      foreach ($fields as $fieldName) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  foreach ($emails as $key => $email) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          unset($emails[$key]);
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              public static function findBySubject($subject, array $modulesFields): array
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  foreach ($modulesFields as $moduleName => $fields) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               */
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Line exceeds 120 characters; contains 221 characters
          Open

                  $prefix = str_replace(['\{\{YYYY\}\}', '\{\{YY\}\}', '\{\{MM\}\}', '\{\{DD\}\}', '\{\{M\}\}', '\{\{D\}\}'], ['\d{4}', '\d{2}', '\d{2}', '\d{2}', '\d{1,2}', '\d{1,2}'], preg_quote($moduleData->get('prefix'), '/'));
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Line exceeds 120 characters; contains 223 characters
          Open

                  $postfix = str_replace(['\{\{YYYY\}\}', '\{\{YY\}\}', '\{\{MM\}\}', '\{\{DD\}\}', '\{\{M\}\}', '\{\{D\}\}'], ['\d{4}', '\d{2}', '\d{2}', '\d{2}', '\d{1,2}', '\d{1,2}'], preg_quote($moduleData->get('postfix'), '/'));
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @return array
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      if (isset(self::$recordNumberCache[$moduleName][$number])) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      $dataReader = $queryGenerator->createQuery()->createCommand()->query();
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              self::$recordNumberCache[$moduleName][$number] = $return[$number][] = $row['id'];
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @return array
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              /**
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               */
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              $number = $row[$fieldName];
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              /**
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              /**
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              {
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      $records = array_merge($records, \App\Utils::flatten(self::findByRecordNumber($numbers, $moduleName, \App\Utils::flatten($fields))));
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Line exceeds 120 characters; contains 145 characters
          Open

                      $records = array_merge($records, \App\Utils::flatten(self::findByRecordNumber($numbers, $moduleName, \App\Utils::flatten($fields))));
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  return $records;
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              public static function getRecordNumberFromString(string $value, string $moduleName, bool $multi = false)
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $moduleData = \App\Fields\RecordNumber::getInstance($moduleName);
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          return trim($match[0], '[,]');
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              /**
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * Find record by sequence number field.
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * Find user email.
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @return string[]
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @param array $emails
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          continue;
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @param string $moduleName
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          unset($numbers[$i]);
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  return $emails;
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $prefix = str_replace(['\{\{YYYY\}\}', '\{\{YY\}\}', '\{\{MM\}\}', '\{\{DD\}\}', '\{\{M\}\}', '\{\{D\}\}'], ['\d{4}', '\d{2}', '\d{2}', '\d{2}', '\d{1,2}', '\d{1,2}'], preg_quote($moduleData->get('prefix'), '/'));
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  }, '/\[' . $prefix . '([0-9]*)' . $postfix . '\]/');
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $return = [];
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          $return[$number] = self::$recordNumberCache[$moduleName][$number];
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               */
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      }
          Severity: Minor
          Found in app/Mail/RecordFinder.php by phpcodesniffer

          There are no issues that match your filters.

          Category
          Status