Function build_views
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
protected function build_views( &$current, $list_url = '' ) {
$capabilities = $this->manager->capabilities();
$form_id = filter_input( INPUT_GET, 'form_id', FILTER_VALIDATE_INT );
if ( empty( $form_id ) ) {
- Read upRead up
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 build_views
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function build_views( &$current, $list_url = '' ) {
$capabilities = $this->manager->capabilities();
$form_id = filter_input( INPUT_GET, 'form_id', FILTER_VALIDATE_INT );
if ( empty( $form_id ) ) {
Function timestamp_months_dropdown
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
protected function timestamp_months_dropdown( $timestamp_property ) {
global $wp_locale;
$where = '';
$where_args = array();
- Read upRead up
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 timestamp_months_dropdown
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function timestamp_months_dropdown( $timestamp_property ) {
global $wp_locale;
$where = '';
$where_args = array();
Function build_query_params
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
protected function build_query_params( $number, $offset ) {
$query_params = parent::build_query_params( $number, $offset );
$capabilities = $this->manager->capabilities();
- Read upRead up
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 build_query_params
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function build_query_params( $number, $offset ) {
$query_params = parent::build_query_params( $number, $offset );
$capabilities = $this->manager->capabilities();
Method build_row_actions
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function build_row_actions( $submission, $submission_id, $view_url = '', $edit_url = '', $list_url = '' ) {