jeyroik/extas-alice

View on GitHub
src/components/yandex/calls/requests/nlu/values/ValueNumber.php

Summary

Maintainability
A
3 hrs
Test Coverage

Method is has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function is($condition, $compareTo = null): bool
    {
        $cons = [
            static::CON__EQUAL => function ($cur, $compareTo) {
                return $cur == $compareTo;
Severity: Minor
Found in src/components/yandex/calls/requests/nlu/values/ValueNumber.php - About 1 hr to fix

    Avoid too many return statements within this method.
    Open

                    return empty($cur);
    Severity: Major
    Found in src/components/yandex/calls/requests/nlu/values/ValueNumber.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                      return strpos($cur, $compareTo) !== false;
      Severity: Major
      Found in src/components/yandex/calls/requests/nlu/values/ValueNumber.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                return isset($cons[$condition])
                    ? $cons[$condition]($this->getValue(), $compareTo)
                    : false;
        Severity: Major
        Found in src/components/yandex/calls/requests/nlu/values/ValueNumber.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                          return $cur <= $compareTo;
          Severity: Major
          Found in src/components/yandex/calls/requests/nlu/values/ValueNumber.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                            return $cur >= $compareTo;
            Severity: Major
            Found in src/components/yandex/calls/requests/nlu/values/ValueNumber.php - About 30 mins to fix

              There are no issues that match your filters.

              Category
              Status