awsmug/torro-forms

View on GitHub
src/db-objects/post-type-manager.php

Summary

Maintainability
A
1 hr
Test Coverage

Method register_form_post_type has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function register_form_post_type() {
        $options      = $this->options()->get( 'general_settings', array() );
        $rewrite_slug = ! empty( $options['slug'] ) ? $options['slug'] : _x( 'forms', 'default form rewrite slug', 'torro-forms' );

        $menu_icon = '<svg viewBox="0 -750 1500 1500" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M680 161 l0 -158 -74 -6 c-83 -6 -132 -27 -148 -63 -11 -24 -5 -94 19 -238 l6 -39 -79 54 c-109 75 -201 164 -231 222 -51 102 -38 214 32 276 46 40 175 80 335 105 14 2 51 4 83 5 l57 1 0 -159z m395 130 c175 -42 237 -81 265 -167 17 -50 7 -131 -23 -191 -30 -58 -122 -147 -231 -222 l-79 -54 6 39 c24 144 30 214 19 238 -16 36 -65 57 -148 63 l-74 6 0 160 0 160 93 -7 c50 -3 128 -15 172 -25z"/></svg>';
Severity: Minor
Found in src/db-objects/post-type-manager.php - About 1 hr to fix

    There are no issues that match your filters.

    Category
    Status