RebelCode/expression-wp-query-builder-abstract

View on GitHub
src/GetWpQueryMetaCompareTypeCapableTrait.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid using empty try-catch blocks in _getWpQueryMetaCompareType.
Open

        } catch (OutOfRangeException $ex) {
        }

EmptyCatchBlock

Since: 2.7.0

Usually empty try-catch is a bad idea because you are silently swallowing an error condition and then continuing execution. Occasionally this may be the right thing to do, but often it's a sign that a developer saw an exception, didn't know what to do about it, and so used an empty catch to silence the problem.

Example

class Foo {

  public function bar()
  {
      try {
          // ...
      } catch (Exception $e) {} // empty catch block
  }
}

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

There are no issues that match your filters.

Category
Status