e107inc/e107

View on GitHub
e107_plugins/featurebox/e_shortcode.php

Summary

Maintainability
A
30 mins
Test Coverage
C
75%

Avoid too many return statements within this method.
Open

        return e107::getRender()->tablerender(LAN_PLUGIN_FEATUREBOX_NAME, $ret, vartrue($parm['tablestyle'], 'featurebox'), true);
Severity: Major
Found in e107_plugins/featurebox/e_shortcode.php - About 30 mins to fix

    Suspicious array access to nullable ?array
    Open

            $category = $this->getCategoryModel($ctemplate, (vartrue($parm['force']) ? true : false));

    Call to undeclared method \e_model::setCategory
    Open

                        $node->setCategory($model)
    Severity: Critical
    Found in e107_plugins/featurebox/e_shortcode.php by phan

    Suspicious array access to nullable ?array
    Open

            return e107::getRender()->tablerender(LAN_PLUGIN_FEATUREBOX_NAME, $ret, vartrue($parm['tablestyle'], 'featurebox'), true);

    Call to undeclared method \e_object::toHTML
    Open

                    $tmp[] = $model->setParam('counter', $index)
    Severity: Critical
    Found in e107_plugins/featurebox/e_shortcode.php by phan

    Argument 3 (parm) is ?array but \featurebox_shortcodes::render() takes array defined at /code/e107_plugins/featurebox/e_shortcode.php:327
    Open

            $ret = $this->render($category, $ctemplate, $parm);

    Call to undeclared method \e_object::toHTML
    Open

                            $tmpl_item .= $tmp->setParam('counter', $counter + $index)
    Severity: Critical
    Found in e107_plugins/featurebox/e_shortcode.php by phan

    Argument 1 (params) is ?array but \e_model::updateParams() takes array defined at /code/e107_handlers/model_class.php:242
    Open

                ->updateParams($parm);

    array to string conversion
    Open

                $tmpl_item = $tmpl['item_start'].$tmpl_item.$tmpl['item_end'];

    Argument 4 (override) is 'front' but \e107::getTemplate() takes bool|true defined at /code/e107_handlers/e107_class.php:3403
    Open

            $tmpl = e107::getTemplate('featurebox', 'featurebox_category', $ctemplate, 'front');  

    There are no issues that match your filters.

    Category
    Status