e107inc/e107

View on GitHub
e107_plugins/tinymce4/wysiwyg_class.php

Summary

Maintainability
A
30 mins
Test Coverage
F
5%

Avoid too many return statements within this method.
Open

        return '"'.$string.'"';
Severity: Major
Found in e107_plugins/tinymce4/wysiwyg_class.php - About 30 mins to fix

    Unused result of a string literal "[\n {title: 'None', value: ''},\n {title: 'Link', value: 'btn btn-link'},\n {title: 'Alert Link', value: 'alert-link'},\n {title: 'Button (Default)', value: 'btn btn-default'},\n {title: 'Button (Primary)', value: 'btn btn-primary'},\n {title: 'Button (Success)', value: 'btn btn-success'},\n {title: 'Button (Info)', value: 'btn btn-info'},\n {title: 'Button (Warning)', value: 'btn btn-warning'},\n {title: 'Button (Danger)', value: 'btn btn-danger'}\n ]" near this line
    Open

            $ret['link_class_list'] = $this->getLinkClassList(); "[

    Suspicious array access to nullable ?array|?mixed|?string
    Open

            if($string === 'true' || $string === 'false' || $string[0] == '[')

    When fetching an array index from a value of type false|string, found an array index of type '\x40attributes', but expected the index to be of type int
    Open

            $this->configName = $config['@attributes']['name'];

    Argument 3 (default) is false but \e107::pref() takes null defined at /code/e107_handlers/e107_class.php:4016
    Open

            $useThemeStyle = (bool) e107::pref('tinymce4', 'use_theme_style', false);

    Call to deprecated function \getperms() defined at /code/class2.php:1322
    Open

            if(($template == 'mainadmin.xml' && !getperms('0')) || ($template == 'admin.xml' && !ADMIN))

    false|string passed to foreach instead of array
    Open

            foreach($config as $k=>$xml)

    Argument 3 (default) is false but \e107::pref() takes null defined at /code/e107_handlers/e107_class.php:4016
    Open

            if(e107::pref('core','smiley_activate',false))

    Suspicious array access to nullable ?array|?mixed|?string|null
    Open

            if($string === 'true' || $string === 'false' || $string[0] == '[')

    Argument 3 (default) is false but \e107::pref() takes null defined at /code/e107_handlers/e107_class.php:4016
    Open

            if(e107::pref('core','smiley_activate',false))

    Argument 4 (offset) is null but \file_get_contents() takes int
    Open

                $content = file_get_contents($f['path'].$f['fname'], null, null, null, 140);

    Call to deprecated function \getperms() defined at /code/class2.php:1322
    Open

                if(getperms('0'))

    When fetching an array index from a value of type string, found an array index of type 'name', but expected the index to be of type int
    Open

            $this->configName = $config['@attributes']['name'];

    Argument 2 (use_include_path) is null but \file_get_contents() takes bool
    Open

                $content = file_get_contents($f['path'].$f['fname'], null, null, null, 140);

    Suspicious attempt to unset an offset of a value of type false|string
    Open

            unset($config['@attributes']);

    There are no issues that match your filters.

    Category
    Status