YetiForceCompany/YetiForceCRM

View on GitHub
app/Request.php

Summary

Maintainability
F
3 days
Test Coverage
C
72%

isAjax accesses the super-global variable $_SERVER.
Open

    public function isAjax()
    {
        if (!empty($_SERVER['HTTP_X_PJAX']) && true === $_SERVER['HTTP_X_PJAX']) {
            return true;
        }
Severity: Minor
Found in app/Request.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

validateReadAccess accesses the super-global variable $_SERVER.
Open

    public function validateReadAccess()
    {
        // Referer check if present - to over come && Check for user post authentication.
        if (\Config\Security::$verifyRefererHeader && isset($_SERVER['HTTP_REFERER']) && \App\User::getCurrentUserId() && 'Install' !== $this->get('module')) {
            $allowed = array_merge(\Config\Security::$allowedFrameDomains, \Config\Security::$allowedFormDomains);
Severity: Minor
Found in app/Request.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

getServer accesses the super-global variable $_SERVER.
Open

    public function getServer($key, $default = false)
    {
        if (!isset($_SERVER[$key])) {
            return $default;
        }
Severity: Minor
Found in app/Request.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

isAjax accesses the super-global variable $_SERVER.
Open

    public function isAjax()
    {
        if (!empty($_SERVER['HTTP_X_PJAX']) && true === $_SERVER['HTTP_X_PJAX']) {
            return true;
        }
Severity: Minor
Found in app/Request.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

init accesses the super-global variable $_REQUEST.
Open

    public static function init($request = false)
    {
        if (!static::$request) {
            static::$request = new self($request ?: $_REQUEST);
        }
Severity: Minor
Found in app/Request.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

getRequestMethod accesses the super-global variable $_SERVER.
Open

    public static function getRequestMethod()
    {
        $method = $_SERVER['REQUEST_METHOD'];
        if ('POST' === $method && isset($_SERVER['HTTP_X_HTTP_METHOD'])) {
            if ('DELETE' === $_SERVER['HTTP_X_HTTP_METHOD']) {
Severity: Minor
Found in app/Request.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

getServer accesses the super-global variable $_SERVER.
Open

    public function getServer($key, $default = false)
    {
        if (!isset($_SERVER[$key])) {
            return $default;
        }
Severity: Minor
Found in app/Request.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

isAjax accesses the super-global variable $_SERVER.
Open

    public function isAjax()
    {
        if (!empty($_SERVER['HTTP_X_PJAX']) && true === $_SERVER['HTTP_X_PJAX']) {
            return true;
        }
Severity: Minor
Found in app/Request.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

getRequestMethod accesses the super-global variable $_SERVER.
Open

    public static function getRequestMethod()
    {
        $method = $_SERVER['REQUEST_METHOD'];
        if ('POST' === $method && isset($_SERVER['HTTP_X_HTTP_METHOD'])) {
            if ('DELETE' === $_SERVER['HTTP_X_HTTP_METHOD']) {
Severity: Minor
Found in app/Request.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

getRequestMethod accesses the super-global variable $_SERVER.
Open

    public static function getRequestMethod()
    {
        $method = $_SERVER['REQUEST_METHOD'];
        if ('POST' === $method && isset($_SERVER['HTTP_X_HTTP_METHOD'])) {
            if ('DELETE' === $_SERVER['HTTP_X_HTTP_METHOD']) {
Severity: Minor
Found in app/Request.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

getRequestMethod accesses the super-global variable $_SERVER.
Open

    public static function getRequestMethod()
    {
        $method = $_SERVER['REQUEST_METHOD'];
        if ('POST' === $method && isset($_SERVER['HTTP_X_HTTP_METHOD'])) {
            if ('DELETE' === $_SERVER['HTTP_X_HTTP_METHOD']) {
Severity: Minor
Found in app/Request.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

validateReadAccess accesses the super-global variable $_SERVER.
Open

    public function validateReadAccess()
    {
        // Referer check if present - to over come && Check for user post authentication.
        if (\Config\Security::$verifyRefererHeader && isset($_SERVER['HTTP_REFERER']) && \App\User::getCurrentUserId() && 'Install' !== $this->get('module')) {
            $allowed = array_merge(\Config\Security::$allowedFrameDomains, \Config\Security::$allowedFormDomains);
Severity: Minor
Found in app/Request.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

validateWriteAccess accesses the super-global variable $_SERVER.
Open

    public function validateWriteAccess($skipRequestTypeCheck = false)
    {
        if (!$skipRequestTypeCheck && 'POST' !== $_SERVER['REQUEST_METHOD']) {
            throw new \App\Exceptions\Csrf('Invalid request - validate Write Access', 403);
        }
Severity: Minor
Found in app/Request.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

File Request.php has 399 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * Request basic class.
 *
 * @package App
Severity: Minor
Found in app/Request.php - About 5 hrs to fix

    Function purifyMultiDimensionArray has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring.
    Open

        private function purifyMultiDimensionArray($values, $template)
        {
            if (\is_array($template)) {
                foreach ($values as $firstKey => $value) {
                    if (\is_array($value)) {
    Severity: Minor
    Found in app/Request.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

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

    class Request
    {
        /**
         * Raw request data.
         *
    Severity: Minor
    Found in app/Request.php - About 4 hrs to fix

      Function getArray has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
      Open

          public function getArray($key, $type = false, $value = [], ?string $keyType = null)
          {
              if (isset($this->purifiedValuesByArray[$key])) {
                  return $this->purifiedValuesByArray[$key];
              }
      Severity: Minor
      Found in app/Request.php - About 3 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 Request has an overall complexity of 136 which is very high. The configured complexity threshold is 50.
      Open

      class Request
      {
          /**
           * Raw request data.
           *
      Severity: Minor
      Found in app/Request.php by phpmd

      Method purifyMultiDimensionArray has 34 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private function purifyMultiDimensionArray($values, $template)
          {
              if (\is_array($template)) {
                  foreach ($values as $firstKey => $value) {
                      if (\is_array($value)) {
      Severity: Minor
      Found in app/Request.php - About 1 hr to fix

        Method getArray has 33 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function getArray($key, $type = false, $value = [], ?string $keyType = null)
            {
                if (isset($this->purifiedValuesByArray[$key])) {
                    return $this->purifiedValuesByArray[$key];
                }
        Severity: Minor
        Found in app/Request.php - About 1 hr to fix

          Function getMultiDimensionArray has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
          Open

              public function getMultiDimensionArray(string $key, array $template): array
              {
                  $return = [];
                  if (isset($this->purifiedValuesByMultiDimension[$key])) {
                      $return = $this->purifiedValuesByMultiDimension[$key];
          Severity: Minor
          Found in app/Request.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 delete has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function delete($key)
              {
                  if (isset($this->purifiedValuesByGet[$key])) {
                      unset($this->purifiedValuesByGet[$key]);
                  }
          Severity: Minor
          Found in app/Request.php - About 1 hr to fix

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

                public function delete($key)
                {
                    if (isset($this->purifiedValuesByGet[$key])) {
                        unset($this->purifiedValuesByGet[$key]);
                    }
            Severity: Minor
            Found in app/Request.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 validateReadAccess has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
            Open

                public function validateReadAccess()
                {
                    // Referer check if present - to over come && Check for user post authentication.
                    if (\Config\Security::$verifyRefererHeader && isset($_SERVER['HTTP_REFERER']) && \App\User::getCurrentUserId() && 'Install' !== $this->get('module')) {
                        $allowed = array_merge(\Config\Security::$allowedFrameDomains, \Config\Security::$allowedFormDomains);
            Severity: Minor
            Found in app/Request.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 get has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
            Open

                public function get($key, $value = '')
                {
                    if (isset($this->purifiedValuesByGet[$key])) {
                        return $this->purifiedValuesByGet[$key];
                    }
            Severity: Minor
            Found in app/Request.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 getExploded has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                public function getExploded($key, $delimiter = ',', $type = false)
                {
                    if (isset($this->purifiedValuesByExploded[$key])) {
                        return $this->purifiedValuesByExploded[$key];
                    }
            Severity: Minor
            Found in app/Request.php - About 25 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 getRequestMethod has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                public static function getRequestMethod()
                {
                    $method = $_SERVER['REQUEST_METHOD'];
                    if ('POST' === $method && isset($_SERVER['HTTP_X_HTTP_METHOD'])) {
                        if ('DELETE' === $_SERVER['HTTP_X_HTTP_METHOD']) {
            Severity: Minor
            Found in app/Request.php - About 25 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

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

                public function delete($key)
                {
                    if (isset($this->purifiedValuesByGet[$key])) {
                        unset($this->purifiedValuesByGet[$key]);
                    }
            Severity: Minor
            Found in app/Request.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 getArray() has an NPath complexity of 202. The configured NPath complexity threshold is 200.
            Open

                public function getArray($key, $type = false, $value = [], ?string $keyType = null)
                {
                    if (isset($this->purifiedValuesByArray[$key])) {
                        return $this->purifiedValuesByArray[$key];
                    }
            Severity: Minor
            Found in app/Request.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 delete() has a Cyclomatic Complexity of 10. The configured cyclomatic complexity threshold is 10.
            Open

                public function delete($key)
                {
                    if (isset($this->purifiedValuesByGet[$key])) {
                        unset($this->purifiedValuesByGet[$key]);
                    }
            Severity: Minor
            Found in app/Request.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 purifyMultiDimensionArray() has a Cyclomatic Complexity of 14. The configured cyclomatic complexity threshold is 10.
            Open

                private function purifyMultiDimensionArray($values, $template)
                {
                    if (\is_array($template)) {
                        foreach ($values as $firstKey => $value) {
                            if (\is_array($value)) {
            Severity: Minor
            Found in app/Request.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 getArray() has a Cyclomatic Complexity of 15. The configured cyclomatic complexity threshold is 10.
            Open

                public function getArray($key, $type = false, $value = [], ?string $keyType = null)
                {
                    if (isset($this->purifiedValuesByArray[$key])) {
                        return $this->purifiedValuesByArray[$key];
                    }
            Severity: Minor
            Found in app/Request.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 42 to the 15 allowed.
            Open

                public function getArray($key, $type = false, $value = [], ?string $keyType = null)
            Severity: Critical
            Found in app/Request.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

            Reduce the number of returns of this function 4, down to the maximum allowed 3.
            Open

                public function getExploded($key, $delimiter = ',', $type = false)
            Severity: Major
            Found in app/Request.php by sonar-php

            Having too many return statements in a function increases the function's essential complexity because the flow of execution is broken each time a return statement is encountered. This makes it harder to read and understand the logic of the function.

            Noncompliant Code Example

            With the default threshold of 3:

            function myFunction(){ // Noncompliant as there are 4 return statements
              if (condition1) {
                return true;
              } else {
                if (condition2) {
                  return false;
                } else {
                  return true;
                }
              }
              return false;
            }
            

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

                private function purifyMultiDimensionArray($values, $template)
            Severity: Critical
            Found in app/Request.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

            Class "Request" has 32 methods, which is greater than 20 authorized. Split it into smaller classes.
            Open

            class Request
            Severity: Major
            Found in app/Request.php by sonar-php

            A class that grows too much tends to aggregate too many responsibilities and inevitably becomes harder to understand and therefore to maintain. Above a specific threshold, it is strongly advised to refactor the class into smaller ones which focus on well defined topics.

            Reduce the number of returns of this function 4, down to the maximum allowed 3.
            Open

                public function getArray($key, $type = false, $value = [], ?string $keyType = null)
            Severity: Major
            Found in app/Request.php by sonar-php

            Having too many return statements in a function increases the function's essential complexity because the flow of execution is broken each time a return statement is encountered. This makes it harder to read and understand the logic of the function.

            Noncompliant Code Example

            With the default threshold of 3:

            function myFunction(){ // Noncompliant as there are 4 return statements
              if (condition1) {
                return true;
              } else {
                if (condition2) {
                  return false;
                } else {
                  return true;
                }
              }
              return false;
            }
            

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

                public function getByType($key, $type = 'Standard', $convert = false)
            Severity: Minor
            Found in app/Request.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

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

                public function __construct($rawValues, $overwrite = true)
            Severity: Minor
            Found in app/Request.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 '212', column '13').
            Open

                    throw new \App\Exceptions\IllegalValue("ERR_NOT_ALLOWED_VALUE||$key||{$this->rawValues[$key]}", 406);
            Severity: Minor
            Found in app/Request.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 set has a boolean flag argument $onlyRaw, which is a certain sign of a Single Responsibility Principle violation.
            Open

                public function set($key, $value, bool $onlyRaw = false): self
            Severity: Minor
            Found in app/Request.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 '695', column '15').
            Open

                            throw new \App\Exceptions\Csrf('Illegal request');
            Severity: Minor
            Found in app/Request.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 getModule has a boolean flag argument $raw, which is a certain sign of a Single Responsibility Principle violation.
            Open

                public function getModule($raw = true)
            Severity: Minor
            Found in app/Request.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

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

                public function getExploded($key, $delimiter = ',', $type = false)
            Severity: Minor
            Found in app/Request.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

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

                public function getArray($key, $type = false, $value = [], ?string $keyType = null)
            Severity: Minor
            Found in app/Request.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

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

                public static function init($request = false)
            Severity: Minor
            Found in app/Request.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 '750', column '14').
            Open

                        throw new \App\Exceptions\AppException('Method not found');
            Severity: Minor
            Found in app/Request.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 '519', column '15').
            Open

                            throw new \App\Exceptions\AppException('Unexpected Header');
            Severity: Minor
            Found in app/Request.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 getServer has a boolean flag argument $default, which is a certain sign of a Single Responsibility Principle violation.
            Open

                public function getServer($key, $default = false)
            Severity: Minor
            Found in app/Request.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

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

                public function isEmpty($key, $emptyFunction = false)
            Severity: Minor
            Found in app/Request.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 '710', column '14').
            Open

                        throw new \App\Exceptions\Csrf('Invalid request - validate Write Access', 403);
            Severity: Minor
            Found in app/Request.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 getForSql has a boolean flag argument $skipEmtpy, which is a certain sign of a Single Responsibility Principle violation.
            Open

                public function getForSql($key, $skipEmtpy = true)
            Severity: Minor
            Found in app/Request.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

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

                public function validateWriteAccess($skipRequestTypeCheck = false)
            Severity: Minor
            Found in app/Request.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

            Avoid using static access to class 'App\Json' in method 'get'.
            Open

                        $decodeValue = Json::decode($value);
            Severity: Minor
            Found in app/Request.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 get uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
            Open

                    } else {
                        return $value;
                    }
            Severity: Minor
            Found in app/Request.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\Purifier' in method 'get'.
            Open

                        $value = Purifier::purify($value);
            Severity: Minor
            Found in app/Request.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 '208', column '18').
            Open

                public function getInteger($key, $value = 0)
                {
                    if (isset($this->purifiedValuesByInteger[$key])) {
                        return $this->purifiedValuesByInteger[$key];
                    }
            Severity: Minor
            Found in app/Request.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\Purifier' in method 'getArray'.
            Open

                                $value = $type ? Purifier::purifyByType($value, $type) : Purifier::purify($value);
            Severity: Minor
            Found in app/Request.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 purifyMultiDimensionArray uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
            Open

                                    } else {
                                        $tempTemplate = $tempTemplate[$secondKey];
                                    }
            Severity: Minor
            Found in app/Request.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\Purifier' in method 'getForHtml'.
            Open

                        $value = \App\Purifier::purifyHtml($value);
            Severity: Minor
            Found in app/Request.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\User' in method 'validateReadAccess'.
            Open

                    if (\Config\Security::$verifyRefererHeader && isset($_SERVER['HTTP_REFERER']) && \App\User::getCurrentUserId() && 'Install' !== $this->get('module')) {
            Severity: Minor
            Found in app/Request.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\Purifier' in method 'getForSql'.
            Open

                    return Purifier::purifySql($this->get($key), $skipEmtpy);
            Severity: Minor
            Found in app/Request.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\Purifier' in method 'getExploded'.
            Open

                            $value = $type ? Purifier::purifyByType($value, $type) : Purifier::purify($value);
            Severity: Minor
            Found in app/Request.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 '\CsrfMagic\Csrf' in method 'validateWriteAccess'.
            Open

                        \CsrfMagic\Csrf::check();
            Severity: Minor
            Found in app/Request.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\Purifier' in method 'getByType'.
            Open

                        return $this->purifiedValuesByType[$key][$type] = Purifier::purifyByType($this->rawValues[$key], $type, $convert);
            Severity: Minor
            Found in app/Request.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\Purifier' in method 'getArray'.
            Open

                                        $k = $keyType ? Purifier::purifyByType($k, $keyType) : Purifier::purify($k);
            Severity: Minor
            Found in app/Request.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 set uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
            Open

                    } else {
                        $this->rawValues[$key] = $this->purifiedValuesByGet[$key] = $this->purifiedValuesByInteger[$key] = $this->purifiedValuesByHtml[$key] = $value;
                        $this->purifiedValuesByType[$key] = [];
                    }
            Severity: Minor
            Found in app/Request.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\Config' in method 'validateReadAccess'.
            Open

                        $allowed[] = \App\Config::main('site_URL');
            Severity: Minor
            Found in app/Request.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 getMultiDimensionArray uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
            Open

                            } else {
                                Log::warning('Invalid data format, problem encountered while decoding JSON. Data should be in JSON format. Data: ' . $value);
                            }
            Severity: Minor
            Found in app/Request.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

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

                        } else {
                            throw new \App\Exceptions\AppException('Unexpected Header');
                        }
            Severity: Minor
            Found in app/Request.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 '551', column '67').
            Open

                public function getModule($raw = true)
                {
                    $moduleName = $this->getByType('module', \App\Purifier::ALNUM);
                    if (!$raw && !$this->isEmpty('parent', true) && 'Settings' === ($parentModule = $this->getByType('parent', \App\Purifier::ALNUM))) {
                        $moduleName = "$parentModule:$moduleName";
            Severity: Minor
            Found in app/Request.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

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

                            } else {
                                $value = $type ? Purifier::purifyByType($value, $type) : Purifier::purify($value);
                            }
            Severity: Minor
            Found in app/Request.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

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

                            } else {
                                if (\is_array($template) && 1 === \count($template)) {
                                    $values[$firstKey] = $this->purifyMultiDimensionArray($value, current($template));
                                } elseif (isset($template[$firstKey])) {
                                    $values[$firstKey] = $this->purifyMultiDimensionArray($value, $template[$firstKey]);
            Severity: Minor
            Found in app/Request.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\Purifier' in method 'purifyMultiDimensionArray'.
            Open

                        $values = empty($values) ? $values : ($template ? Purifier::purifyByType($values, $template) : Purifier::purify($values));
            Severity: Minor
            Found in app/Request.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\Json' in method 'getMultiDimensionArray'.
            Open

                            $decodeValue = Json::decode($value);
            Severity: Minor
            Found in app/Request.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\Purifier' in method 'getArray'.
            Open

                                        $k = $keyType ? Purifier::purifyByType($k, $keyType) : Purifier::purify($k);
            Severity: Minor
            Found in app/Request.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\Purifier' in method 'getExploded'.
            Open

                            $value = $type ? Purifier::purifyByType($value, $type) : Purifier::purify($value);
            Severity: Minor
            Found in app/Request.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\Json' in method 'getArray'.
            Open

                            $decodeValue = Json::decode($value);
            Severity: Minor
            Found in app/Request.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\Log' in method 'getArray'.
            Open

                                \App\Log::warning('Invalid data format, problem encountered while decoding JSON. Data should be in JSON format. Data: ' . $value);
            Severity: Minor
            Found in app/Request.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\Purifier' in method 'getArray'.
            Open

                                $value = $type ? Purifier::purifyByType($value, $type) : Purifier::purify($value);
            Severity: Minor
            Found in app/Request.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 getArray uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
            Open

                            } else {
                                \App\Log::warning('Invalid data format, problem encountered while decoding JSON. Data should be in JSON format. Data: ' . $value);
                            }
            Severity: Minor
            Found in app/Request.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\Purifier' in method 'getArray'.
            Open

                                    $input[$k] = $type ? Purifier::purifyByType($v, $type) : Purifier::purify($v);
            Severity: Minor
            Found in app/Request.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\Purifier' in method 'purifyMultiDimensionArray'.
            Open

                        $values = empty($values) ? $values : ($template ? Purifier::purifyByType($values, $template) : Purifier::purify($values));
            Severity: Minor
            Found in app/Request.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 purifyMultiDimensionArray uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
            Open

                    } else {
                        $values = empty($values) ? $values : ($template ? Purifier::purifyByType($values, $template) : Purifier::purify($values));
                    }
            Severity: Minor
            Found in app/Request.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 '354', column '47').
            Open

                public function getMultiDimensionArray(string $key, array $template): array
                {
                    $return = [];
                    if (isset($this->purifiedValuesByMultiDimension[$key])) {
                        $return = $this->purifiedValuesByMultiDimension[$key];
            Severity: Minor
            Found in app/Request.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\Purifier' in method 'getHeaders'.
            Open

                            $value = isset($this->headersPurifierMap[$key]) ? Purifier::purifyByType($value, $this->headersPurifierMap[$key]) : Purifier::purify($value);
            Severity: Minor
            Found in app/Request.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\Purifier' in method 'getArray'.
            Open

                                    $input[$k] = $type ? Purifier::purifyByType($v, $type) : Purifier::purify($v);
            Severity: Minor
            Found in app/Request.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\Log' in method 'getMultiDimensionArray'.
            Open

                                Log::warning('Invalid data format, problem encountered while decoding JSON. Data should be in JSON format. Data: ' . $value);
            Severity: Minor
            Found in app/Request.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\Purifier' in method 'getHeaders'.
            Open

                            $value = isset($this->headersPurifierMap[$key]) ? Purifier::purifyByType($value, $this->headersPurifierMap[$key]) : Purifier::purify($value);
            Severity: Minor
            Found in app/Request.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\Purifier' in method 'getServer'.
            Open

                    return Purifier::purifyByType($_SERVER[$key], 'Text');
            Severity: Minor
            Found in app/Request.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 purifyMultiDimensionArray uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
            Open

                                } else {
                                    throw new Exceptions\IllegalValue("ERR_NOT_ALLOWED_VALUE||{$firstKey}||" . print_r($template, true), 406);
                                }
            Severity: Minor
            Found in app/Request.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\Config' in method 'validateWriteAccess'.
            Open

                    if (\App\Config::security('csrfActive')) {
            Severity: Minor
            Found in app/Request.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

            Define a constant instead of duplicating this literal "HTTP_X_HTTP_METHOD" 3 times.
            Open

                    if ('POST' === $method && isset($_SERVER['HTTP_X_HTTP_METHOD'])) {
            Severity: Critical
            Found in app/Request.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.

            Avoid unused local variables such as '$value'.
            Open

                    foreach ($this->rawValues as $key => $value) {
            Severity: Minor
            Found in app/Request.php by phpmd

            UnusedLocalVariable

            Since: 0.2

            Detects when a local variable is declared and/or assigned, but not used.

            Example

            class Foo {
                public function doSomething()
                {
                    $i = 5; // Unused
                }
            }

            Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

            Argument 1 (input) is array<int></int> but \App\Purifier::purify() takes string defined at /code/app/Purifier.php:122
            Open

                            $value = $type ? Purifier::purifyByType($value, $type) : Purifier::purify($value);
            Severity: Minor
            Found in app/Request.php by phan

            Call to method warning from undeclared class \App\Log
            Open

                                Log::warning('Invalid data format, problem encountered while decoding JSON. Data should be in JSON format. Data: ' . $value);
            Severity: Critical
            Found in app/Request.php by phan

            Doc-block of $defaultValue in getBoolean is phpdoc param type bool which is not a permitted replacement of the nullable param type ?bool declared in the signature ('?T' should be documented as 'T|null' or '?T')
            Open

                 * @param bool   $defaultValue Default value
            Severity: Minor
            Found in app/Request.php by phan

            Call to method getCurrentUserId from undeclared class \App\User (Did you mean class \Tests\App\User)
            Open

                    if (\Config\Security::$verifyRefererHeader && isset($_SERVER['HTTP_REFERER']) && \App\User::getCurrentUserId() && 'Install' !== $this->get('module')) {
            Severity: Critical
            Found in app/Request.php by phan

            Call to method check from undeclared class \CsrfMagic\Csrf
            Open

                        \CsrfMagic\Csrf::check();
            Severity: Critical
            Found in app/Request.php by phan

            Call to method warning from undeclared class \App\Log
            Open

                                \App\Log::warning('Invalid data format, problem encountered while decoding JSON. Data should be in JSON format. Data: ' . $value);
            Severity: Critical
            Found in app/Request.php by phan

            Avoid excessively long variable names like $purifiedValuesByMultiDimension. Keep variable name length under 20.
            Open

                protected $purifiedValuesByMultiDimension = [];
            Severity: Minor
            Found in app/Request.php by phpmd

            LongVariable

            Since: 0.2

            Detects when a field, formal or local variable is declared with a long name.

            Example

            class Something {
                protected $reallyLongIntName = -3; // VIOLATION - Field
                public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                    $otherReallyLongName = -5; // VIOLATION - Local
                    for ($interestingIntIndex = 0; // VIOLATION - For
                         $interestingIntIndex < 10;
                         $interestingIntIndex++ ) {
                    }
                }
            }

            Source https://phpmd.org/rules/naming.html#longvariable

            Avoid excessively long variable names like $purifiedValuesByExploded. Keep variable name length under 20.
            Open

                protected $purifiedValuesByExploded = [];
            Severity: Minor
            Found in app/Request.php by phpmd

            LongVariable

            Since: 0.2

            Detects when a field, formal or local variable is declared with a long name.

            Example

            class Something {
                protected $reallyLongIntName = -3; // VIOLATION - Field
                public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                    $otherReallyLongName = -5; // VIOLATION - Local
                    for ($interestingIntIndex = 0; // VIOLATION - For
                         $interestingIntIndex < 10;
                         $interestingIntIndex++ ) {
                    }
                }
            }

            Source https://phpmd.org/rules/naming.html#longvariable

            Avoid excessively long variable names like $purifiedValuesByInteger. Keep variable name length under 20.
            Open

                protected $purifiedValuesByInteger = [];
            Severity: Minor
            Found in app/Request.php by phpmd

            LongVariable

            Since: 0.2

            Detects when a field, formal or local variable is declared with a long name.

            Example

            class Something {
                protected $reallyLongIntName = -3; // VIOLATION - Field
                public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                    $otherReallyLongName = -5; // VIOLATION - Local
                    for ($interestingIntIndex = 0; // VIOLATION - For
                         $interestingIntIndex < 10;
                         $interestingIntIndex++ ) {
                    }
                }
            }

            Source https://phpmd.org/rules/naming.html#longvariable

            Avoid excessively long variable names like $purifiedValuesByDateRange. Keep variable name length under 20.
            Open

                protected $purifiedValuesByDateRange = [];
            Severity: Minor
            Found in app/Request.php by phpmd

            LongVariable

            Since: 0.2

            Detects when a field, formal or local variable is declared with a long name.

            Example

            class Something {
                protected $reallyLongIntName = -3; // VIOLATION - Field
                public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                    $otherReallyLongName = -5; // VIOLATION - Local
                    for ($interestingIntIndex = 0; // VIOLATION - For
                         $interestingIntIndex < 10;
                         $interestingIntIndex++ ) {
                    }
                }
            }

            Source https://phpmd.org/rules/naming.html#longvariable

            Avoid excessively long variable names like $purifiedValuesByArray. Keep variable name length under 20.
            Open

                protected $purifiedValuesByArray = [];
            Severity: Minor
            Found in app/Request.php by phpmd

            LongVariable

            Since: 0.2

            Detects when a field, formal or local variable is declared with a long name.

            Example

            class Something {
                protected $reallyLongIntName = -3; // VIOLATION - Field
                public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                    $otherReallyLongName = -5; // VIOLATION - Local
                    for ($interestingIntIndex = 0; // VIOLATION - For
                         $interestingIntIndex < 10;
                         $interestingIntIndex++ ) {
                    }
                }
            }

            Source https://phpmd.org/rules/naming.html#longvariable

            The 'getBoolean()' method which returns a boolean should be named 'is...()' or 'has...()'
            Open

                public function getBoolean(string $key, bool $defaultValue = null)
                {
                    $value = $this->get($key, $defaultValue);
                    if (\is_bool($value)) {
                        return $value;
            Severity: Minor
            Found in app/Request.php by phpmd

            BooleanGetMethodName

            Since: 0.2

            Looks for methods named 'getX()' with 'boolean' as the return type. The convention is to name these methods 'isX()' or 'hasX()'.

            Example

            class Foo {
                /**
                 * @return boolean
                 */
                public function getFoo() {} // bad
                /**
                 * @return bool
                 */
                public function isFoo(); // ok
                /**
                 * @return boolean
                 */
                public function getFoo($bar); // ok, unless checkParameterizedMethods=true
            }

            Source https://phpmd.org/rules/naming.html#booleangetmethodname

            The 'getServer()' method which returns a boolean should be named 'is...()' or 'has...()'
            Open

                public function getServer($key, $default = false)
                {
                    if (!isset($_SERVER[$key])) {
                        return $default;
                    }
            Severity: Minor
            Found in app/Request.php by phpmd

            BooleanGetMethodName

            Since: 0.2

            Looks for methods named 'getX()' with 'boolean' as the return type. The convention is to name these methods 'isX()' or 'hasX()'.

            Example

            class Foo {
                /**
                 * @return boolean
                 */
                public function getFoo() {} // bad
                /**
                 * @return bool
                 */
                public function isFoo(); // ok
                /**
                 * @return boolean
                 */
                public function getFoo($bar); // ok, unless checkParameterizedMethods=true
            }

            Source https://phpmd.org/rules/naming.html#booleangetmethodname

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

                 * Self instance.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

                 * Purified request values for array.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                 * Purified request values for get.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                protected $rawValues = [];
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

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

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

                protected $headers;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                protected static $request;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * Purified request values for integer.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * Raw request data.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

                 * Headers request.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

                 * @var Request
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * Purified request values for type.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                protected $purifiedValuesByType = [];
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                protected $purifiedValuesByInteger = [];
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

                protected $purifiedValuesByGet = [];
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * @param array $rawValues
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * @param int|string $type    Data type that is only acceptable, default only words 'Standard'
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

                 * @param int    $value
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                        return $this->purifiedValuesByInteger[$key];
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

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

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

                protected $purifiedValuesByHtml = [];
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                            $value = $decodeValue;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                    if ($value) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * 1 - only words
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * Alnum - word and int
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * @param string $key
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                 * Function to get the array values for a given key.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                public $headersPurifierMap = [
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                public function get($key, $value = '')
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                        if (isset($decodeValue)) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

                    $this->rawValues = $rawValues;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

                public function getByType($key, $type = 'Standard', $convert = false)
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Line exceeds 120 characters; contains 126 characters
            Open

                        return $this->purifiedValuesByType[$key][$type] = Purifier::purifyByType($this->rawValues[$key], $type, $convert);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                 * Function to get the integer value for a given key.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                    if (false !== ($value = filter_var($this->rawValues[$key], FILTER_VALIDATE_INT))) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

                        return $value;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

                    if (isset($this->rawValues[$key])) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                 * @return bool|mixed
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * @param string $key
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                    $value = $this->get($key, $defaultValue);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                    if (\is_bool($value)) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                    throw new \App\Exceptions\IllegalValue("ERR_NOT_ALLOWED_VALUE||$key||{$this->rawValues[$key]}", 406);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                 * @param string      $key
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                protected $purifiedValuesByArray = [];
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

                ];
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

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

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

                        return $this->purifiedValuesByGet[$key];
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                        return $value;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                 * @param mixed      $convert
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

                protected $purifiedValuesByDateRange = [];
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * @param string $key
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * @param string     $key     Key name
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

                    if (isset($this->purifiedValuesByArray[$key])) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

                        return $this->purifiedValuesByType[$key][$type];
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                public function getBoolean(string $key, bool $defaultValue = null)
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * @return int
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                    if (isset($this->purifiedValuesByInteger[$key])) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * List of headings and sanitization methods.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                    if ($overwrite) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                        $decodeValue = Json::decode($value);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

                 * @param array       $value
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * @param string|null $keyType
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                public function __construct($rawValues, $overwrite = true)
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                 * Type list:
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * Standard - only words
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                        return $this->purifiedValuesByType[$key][$type] = Purifier::purifyByType($this->rawValues[$key], $type, $convert);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                 * Function to get the boolean value for a given key.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * @param bool   $defaultValue Default value
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                 * @param mixed       $type
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                protected $purifiedValuesByExploded = [];
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

                 * Function to get the value for a given key.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                        $value = Purifier::purify($value);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * Purify by data type.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                 * 2 - word and int
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                    if (isset($this->purifiedValuesByType[$key][$type])) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                    return 0 === strcasecmp('true', (string) $value) || '1' === (string) $value;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                    if (!isset($this->rawValues[$key])) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * Purified request values for date html.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                        return $this->purifiedValuesByInteger[$key] = $value;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

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

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

                 * Constructor.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                        static::$request = $this;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                 * @param mixed  $value Default value
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                public function getInteger($key, $value = 0)
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * Purified request values for multi dimension array.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                 * @param bool  $overwrite
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                 * @return mixed
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                    if (isset($this->purifiedValuesByGet[$key])) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                    return $this->purifiedValuesByGet[$key] = $value;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

                 * @return bool
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                protected $purifiedValuesByMultiDimension = [];
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                        $value = $this->rawValues[$key];
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                    if (\is_string($value) && (0 === strpos($value, '[') || 0 === strpos($value, '{'))) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                        return $value;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                 * Purified request values for exploded.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                 * Purified request values for date range.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

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

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

                    if (isset($this->rawValues[$key])) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                public function getArray($key, $type = false, $value = [], ?string $keyType = null)
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                        if (!$value) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                            $decodeValue = Json::decode($value);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                                $input = [];
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                            return $value;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

                            if (isset($decodeValue)) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                        if ($value) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                                    $values[$firstKey][$secondKey] = $this->purifyMultiDimensionArray($val, $tempTemplate);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                    if (isset($this->purifiedValuesByMultiDimension[$key])) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

                public function getExploded($key, $delimiter = ',', $type = false)
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

                                        $tempTemplate = $template[$firstKey];
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                        $values = empty($values) ? $values : ($template ? Purifier::purifyByType($values, $template) : Purifier::purify($values));
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Line exceeds 120 characters; contains 145 characters
            Open

                                Log::warning('Invalid data format, problem encountered while decoding JSON. Data should be in JSON format. Data: ' . $value);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * Function to get the date range values for a given key.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

                                $value = $decodeValue;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

                                    $tempTemplate = $template;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

                        if (\is_string($value) && (0 === strpos($value, '[') || 0 === strpos($value, '{'))) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

                public function getDateRange($key)
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                    if (isset($this->rawValues[$key])) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                        if (\is_string($value) && (0 === strpos($value, '[') || 0 === strpos($value, '{'))) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                                    if (!\is_int($k)) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                                    $input[$k] = $type ? Purifier::purifyByType($v, $type) : Purifier::purify($v);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                            if (\is_array($value)) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                    return $values;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                 * Function to get multi dimension array.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                                foreach ($value as $k => $v) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

                    return $value;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * @param string      $delimiter
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                private function purifyMultiDimensionArray($values, $template)
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                                foreach ($value as $secondKey => $val) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                                if (\is_array($template) && 1 === \count($template)) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Line exceeds 120 characters; contains 134 characters
            Open

                        $values = empty($values) ? $values : ($template ? Purifier::purifyByType($values, $template) : Purifier::purify($values));
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * @param string $key
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                            $decodeValue = Json::decode($value);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                                        $k = $keyType ? Purifier::purifyByType($k, $keyType) : Purifier::purify($k);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                                $value = $type ? Purifier::purifyByType($value, $type) : Purifier::purify($value);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

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

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

                    return $value;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * @return mixed
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

            Line exceeds 120 characters; contains 150 characters
            Open

                                \App\Log::warning('Invalid data format, problem encountered while decoding JSON. Data should be in JSON format. Data: ' . $value);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                            if (\is_array($value)) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                        return $this->purifiedValuesByArray[$key] = (array) $value;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                    if (isset($this->purifiedValuesByExploded[$key])) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                    if (\is_array($template)) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                                        throw new Exceptions\IllegalValue("ERR_NOT_ALLOWED_VALUE||{$secondKey}", 406);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                    $value = [];
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                        if ('' === $this->rawValues[$key]) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                            $value = $type ? Purifier::purifyByType($value, $type) : Purifier::purify($value);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                                    $values[$firstKey] = $this->purifyMultiDimensionArray($value, current($template));
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * @param array  $template
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                    } elseif (isset($this->rawValues[$key]) && ($value = $this->rawValues[$key])) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                            if (null !== $decodeValue) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                                $value = $decodeValue;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                                \App\Log::warning('Invalid data format, problem encountered while decoding JSON. Data should be in JSON format. Data: ' . $value);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                        return $this->purifiedValuesByExploded[$key];
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

                                    } elseif (!isset($tempTemplate[$secondKey])) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

                        $value = $this->rawValues[$key];
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                        if ($value) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                 * @param array|string $template
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                                } elseif (isset($template[$firstKey])) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                                    throw new Exceptions\IllegalValue("ERR_NOT_ALLOWED_VALUE||{$firstKey}||" . print_r($template, true), 406);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Line exceeds 120 characters; contains 130 characters
            Open

                                    throw new Exceptions\IllegalValue("ERR_NOT_ALLOWED_VALUE||{$firstKey}||" . print_r($template, true), 406);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                                Log::warning('Invalid data format, problem encountered while decoding JSON. Data should be in JSON format. Data: ' . $value);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                        $value = (array) $this->purifyMultiDimensionArray($value, $template);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

                    return $this->getByType($key, 'DateRangeUserFormat');
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                 * Function to get the exploded values for a given key.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * @param string      $key
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                                $value = $input;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                 * @throws \App\Exceptions\IllegalValue
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                                    if (1 === \count($tempTemplate)) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                public function getMultiDimensionArray(string $key, array $template): array
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                 * @param string $key request param like 'createdtime'
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                        return $this->purifiedValuesByArray[$key];
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

                    if (isset($this->rawValues[$key])) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * Purify multi dimension array.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

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

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

                        $return = $this->purifiedValuesByMultiDimension[$key] = $value;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

                 * @param bool|string $type
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

                        $value = explode($delimiter, $this->rawValues[$key]);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                        return $this->purifiedValuesByExploded[$key] = $value;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                                if (1 === \count($template)) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                                    if (isset($template[$firstKey])) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                                        $tempTemplate = current($tempTemplate);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                                        $tempTemplate = $tempTemplate[$secondKey];
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                                    $values[$firstKey] = $this->purifyMultiDimensionArray($value, $template[$firstKey]);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

                        $return = $this->purifiedValuesByMultiDimension[$key];
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                 * @param mixed        $values
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                        foreach ($values as $firstKey => $value) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                                    $template = current($template);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

                 * Get raw value.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * @param string $key
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

                public function getHeaders()
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

                    foreach ($this->rawValues as $key => $value) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

                        return $this->headers;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                    return $this->headers = $data;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                    return Purifier::purifyByType($_SERVER[$key], 'Text');
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

                    return $this->purifiedValuesByGet;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                public function getAllRaw()
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                    if (isset($this->rawValues[$key])) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * @return mixed
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

                        $this->get($key);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

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

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

                        return $this->rawValues[$key];
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                 * Get header for a given key.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                        $this->getHeaders();
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

                    if (isset($this->rawValues[$key])) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * @return string
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                 * Get all data.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                    return $this->headers[$key] ?? null;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                        return $default;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                        $value = $this->rawValues[$key];
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * Function to get the value if its safe to use for SQL Query (column).
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                public function getForSql($key, $skipEmtpy = true)
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                    return $defaultValue;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                    $data = array_change_key_case(getallheaders(), CASE_LOWER);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                public static function getRequestMethod()
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                 * Function to get html the value for a given key.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * @param string $key
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

                 * @throws \App\Exceptions\AppException
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * @param string $key
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                        return $this->purifiedValuesByHtml[$key];
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                 * @return mixed
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

                 * Get request method.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                    if (!isset($_SERVER[$key])) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                    if ($value) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                    return '' !== $this->getRaw('mode') ? $this->getByType('mode', 'Alnum') : '';
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * Get all raw data.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                 * @param mixed  $defaultValue
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * @return string
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

                 * @param mixed  $default
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                        $value = \App\Purifier::purifyHtml($value);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * Function to get the request mode.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                    return $this->rawValues;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

                        if ('DELETE' === $_SERVER['HTTP_X_HTTP_METHOD']) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                            $method = 'PUT';
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                 * @param bool $raw
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                public function getMode()
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                    $method = $_SERVER['REQUEST_METHOD'];
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                    if ('POST' === $method && isset($_SERVER['HTTP_X_HTTP_METHOD'])) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                            $method = 'DELETE';
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                            throw new \App\Exceptions\AppException('Unexpected Header');
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                public function getServer($key, $default = false)
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * Get module name.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                    return $this->purifiedValuesByHtml[$key] = $value;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

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

            Line exceeds 120 characters; contains 157 characters
            Open

                            $value = isset($this->headersPurifierMap[$key]) ? Purifier::purifyByType($value, $this->headersPurifierMap[$key]) : Purifier::purify($value);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                 * @return bool
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

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

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

                public function getRaw($key, $defaultValue = '')
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                    foreach ($data as $key => &$value) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                        if ('' !== $value) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                public function getHeader($key)
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * Get server and execution environment information.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                    return Purifier::purifySql($this->get($key), $skipEmtpy);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                public function getAll()
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * Get all headers.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                    if (isset($this->headers)) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                        } elseif ('PUT' === $_SERVER['HTTP_X_HTTP_METHOD']) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * @param mixed  $value
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * @param string $key
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * @param bool   $skipEmtpy
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * @return string
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

                            $value = isset($this->headersPurifierMap[$key]) ? Purifier::purifyByType($value, $this->headersPurifierMap[$key]) : Purifier::purify($value);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                 * @param string $key
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                    if (!isset($this->headers)) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                    return strtoupper($method);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                public function getForHtml($key, $value = '')
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                    if (isset($this->purifiedValuesByHtml[$key])) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

                 * @return string
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

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

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

                    $moduleName = $this->getByType('module', \App\Purifier::ALNUM);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                public function delete($key)
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

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

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

                    return $moduleName;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                    if ($emptyFunction) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                 * @return $this
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                    if (isset($this->purifiedValuesByInteger[$key])) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                        unset($this->purifiedValuesByArray[$key]);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                    if (isset($this->purifiedValuesByDateRange[$key])) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                public function getKeys()
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

                 * @return bool
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                        unset($this->purifiedValuesByInteger[$key]);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                    if (isset($this->purifiedValuesByHtml[$key])) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                        unset($this->purifiedValuesByDateRange[$key]);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                        unset($this->rawValues[$key]);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

                public function isJSON()
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Line exceeds 120 characters; contains 159 characters
            Open

                    if (\Config\Security::$verifyRefererHeader && isset($_SERVER['HTTP_REFERER']) && \App\User::getCurrentUserId() && 'Install' !== $this->get('module')) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                    return isset($this->rawValues[$key]);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

                 * @param string $key
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

                        unset($this->purifiedValuesByHtml[$key]);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                        $allowed = array_merge(\Config\Security::$allowedFrameDomains, \Config\Security::$allowedFormDomains);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                            if (0 === stripos($_SERVER['HTTP_REFERER'], $value)) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                public function has($key)
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                        return empty($this->rawValues[$key]);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

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

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

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

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

                 * Validating read access request.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

                    if (\Config\Security::$verifyRefererHeader && isset($_SERVER['HTTP_REFERER']) && \App\User::getCurrentUserId() && 'Install' !== $this->get('module')) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

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

                 * @return string
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

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

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

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    if (!$raw && !$this->isEmpty('parent', true) && 'Settings' === ($parentModule = $this->getByType('parent', \App\Purifier::ALNUM))) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                /**
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 * @param mixed  $value
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                public function set($key, $value, bool $onlyRaw = false): self
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    if ($onlyRaw) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    } else {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                        unset($this->purifiedValuesByType[$key]);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    }
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    if (isset($this->purifiedValuesByExploded[$key])) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    }
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    if (isset($this->purifiedValuesByMultiDimension[$key])) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    return array_keys($this->rawValues);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Line exceeds 120 characters; contains 140 characters
            Open

                    if (!$raw && !$this->isEmpty('parent', true) && 'Settings' === ($parentModule = $this->getByType('parent', \App\Purifier::ALNUM))) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 * Function to check if the key is empty.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 * @param bool   $emptyFunction
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                public function isEmpty($key, $emptyFunction = false)
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 * Function to set the value for a given key.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                        $this->rawValues[$key] = $this->purifiedValuesByGet[$key] = $this->purifiedValuesByInteger[$key] = $this->purifiedValuesByHtml[$key] = $value;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    return $this;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    if (isset($this->purifiedValuesByGet[$key])) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    }
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                /**
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                public function getModule($raw = true)
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 * @param string $key
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    }
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                        unset($this->purifiedValuesByMultiDimension[$key]);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    }
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                }
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                        foreach ($allowed as $value) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                        if ($throw) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                }
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 * Check for existence of key.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Line exceeds 120 characters; contains 154 characters
            Open

                        $this->rawValues[$key] = $this->purifiedValuesByGet[$key] = $this->purifiedValuesByInteger[$key] = $this->purifiedValuesByHtml[$key] = $value;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 * Get all request keys.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 *
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    // Referer check if present - to over come && Check for user post authentication.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    }
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    }
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                /**
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 *
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                }
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                /**
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 *
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 *
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 *
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    return !isset($this->rawValues[$key]) || '' === $this->rawValues[$key];
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 */
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    }
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                        $this->rawValues[$key] = $value;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    if (isset($this->purifiedValuesByArray[$key])) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                }
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 *
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 */
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                public function isAjax()
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                /**
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    if (!empty($_SERVER['HTTP_X_PJAX']) && true === $_SERVER['HTTP_X_PJAX']) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                        return true;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    if (!empty($_SERVER['HTTP_X_REQUESTED_WITH'])) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 * @return bool
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    return false;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 */
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 * Is json.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                public function validateReadAccess()
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                        $throw = true;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                                $throw = false;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                            throw new \App\Exceptions\Csrf('Illegal request');
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                        $moduleName = "$parentModule:$moduleName";
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                }
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 * @param string $key
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 *
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 */
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                /**
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 * @param bool   $onlyRaw
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                        unset($this->purifiedValuesByGet[$key]);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    }
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                /**
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                /**
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                }
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    }
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    if (isset($this->rawValues[$key])) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                }
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 * @return bool
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                        return true;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 * @throws \App\Exceptions\Csrf
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                        $allowed[] = \App\Config::main('site_URL');
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 * @return bool
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                }
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 * Function to remove the value for a given key.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 * @param string $key
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    return false !== strpos($this->getHeader('accept'), 'application/json');
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                }
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                        $this->purifiedValuesByType[$key] = [];
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    }
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    if (isset($this->purifiedValuesByType[$key])) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                        unset($this->purifiedValuesByExploded[$key]);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 * Function to check if the ajax request.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 */
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                public static function init($request = false)
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    $first = array_shift($arguments);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    if (!static::$request) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                }
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 *
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 */
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 * Support static methods, all functions must start with "_".
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 * @param string     $name
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 *
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                public static function __callStatic($name, $arguments = null)
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    if (!method_exists(static::$request, $function)) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    if (empty($arguments)) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    if (!$skipRequestTypeCheck && 'POST' !== $_SERVER['REQUEST_METHOD']) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                        throw new \App\Exceptions\Csrf('Invalid request - validate Write Access', 403);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    }
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    if (\App\Config::security('csrfActive')) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    }
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 * @param bool $skipRequestTypeCheck
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                        \CsrfMagic\Csrf::check();
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    if (!static::$request) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                /**
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    }
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 */
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                /**
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 * @param array|null $arguments
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                        static::init();
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    if (empty($arguments)) {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    }
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                }
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 * @throws \App\Exceptions\AppException
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    return static::$request->{$function}($first, $arguments[0]);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 *
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 * @return Request
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 *
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    $this->validateReadAccess();
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 * Static instance initialization.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    return static::$request;
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 * @return mixed
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                        throw new \App\Exceptions\AppException('Method not found');
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    }
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                        return static::$request->{$function}($first);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 * @throws \App\Exceptions\Csrf
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 * @param array|bool $request
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                        static::$request = new self($request ?: $_REQUEST);
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 * Validating write access request.
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 *
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 *
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    $function = ltrim($name, '_');
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                }
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    }
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                {
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 */
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                 *
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                        return static::$request->{$function}();
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                public function validateWriteAccess($skipRequestTypeCheck = false)
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            Spaces must be used to indent lines; tabs are not allowed
            Open

                    }
            Severity: Minor
            Found in app/Request.php by phpcodesniffer

            There are no issues that match your filters.

            Category
            Status