e107inc/e107

View on GitHub
e107_plugins/social/admin_config.php

Summary

Maintainability
A
0 mins
Test Coverage
F
22%

Argument 2 (fname) is true but \e107::lan() takes string defined at /code/e107_handlers/e107_class.php:3987
Open

e107::lan('social',true, true);
Severity: Minor
Found in e107_plugins/social/admin_config.php by phan

Reference to undeclared constant \ADMIN_FALSE_ICON
Open

            $textEnabled = ($slcm->isProviderEnabled($provider_name)) ? ADMIN_TRUE_ICON : ADMIN_FALSE_ICON;
Severity: Minor
Found in e107_plugins/social/admin_config.php by phan

Argument 1 (title) is int but \social_ui::addTitle() takes string|true defined at /code/e107_handlers/admin_ui.php:2023
Open

            $this->addTitle($var);
Severity: Minor
Found in e107_plugins/social/admin_config.php by phan

Argument 2 (value) is 1 but \e_form::button() takes array|string defined at /code/e107_handlers/form_handler.php:3876
Open

            ".$frm->button('save_social_logins',1,'submit',LAN_SAVE)."
Severity: Minor
Found in e107_plugins/social/admin_config.php by phan

Argument 1 (str) is int but \strtolower() takes string
Open

        $radio_label = strtolower($provider_name);
Severity: Minor
Found in e107_plugins/social/admin_config.php by phan

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

if (!getperms('P'))
Severity: Minor
Found in e107_plugins/social/admin_config.php by phan

Reference to undeclared constant \ADMIN_TRUE_ICON
Open

            $textEnabled = ($slcm->isProviderEnabled($provider_name)) ? ADMIN_TRUE_ICON : ADMIN_FALSE_ICON;
Severity: Minor
Found in e107_plugins/social/admin_config.php by phan

Argument #1 of this call to \str_replace is typically a literal or constant but isn't, but argument #3 (which is typically a variable) is a literal or constant. The arguments may be in the wrong order.
Open

                e107::getMessage()->addInfo(str_replace($srch,$repl, LAN_SOCIAL_ADMIN_43));
Severity: Minor
Found in e107_plugins/social/admin_config.php by phan

Assigning array<string></string> to property but \social_ui->prefs is array{facebook_comments_limit:array{title:'Limit',type:'number',tab:2,data:'int',help:'Number of comments to display.'},facebook_comments_theme:array{title:'Theme',type:'dropdown',tab:2,writeParms:array{optArray:array{light:'Light',dark:'Dark'}},data:'str',help:''},facebook_comments_loadingtext:array{title:'Text while loading',type:'text',tab:2,data:'str',writeParms:array{placeholder:'Loading...'},help:''},facebook_like_menu_theme:array{title:'Theme',type:'dropdown',tab:3,writeParms:array{optArray:array{light:'Light',dark:'Dark'}},data:'str'},facebook_like_menu_action:array{title:'Action',type:'dropdown',tab:3,writeParms:array{optArray:array{like:'Like',recommend:'Recommend'}},data:'str'},facebook_like_menu_width:array{title:'Width',type:'number',tab:3,data:'int',help:'Width in px'},twitter_menu_theme:array{title:'Theme',type:'dropdown',tab:4,writeParms:array{optArray:array{light:'Light',dark:'Dark'}},data:'str'},twitter_menu_height:array{title:'Height',type:'number',tab:4,data:'int',help:'Height in px'},twitter_menu_limit:array{title:'Limit',type:'number',tab:4,data:'int',help:'Number of tweets to display.'},sharing_mode:array{title:'Display Mode',type:'dropdown',tab:1,writeParms:array{optArray:array{normal:'Normal',dropdown:'Dropdown',off:'Disabled'}},data:'str',help:''},sharing_hashtags:array{title:'Hashtags',type:'tags',tab:1,data:'str',help:'Excluding the # symbol.'},sharing_providers:array{title:'Providers',type:'checkboxes',tab:1,writeParms:array{},data:'str',help:''},xup_login_update_username:array{title:'Update User Display Name',type:'bool',tab:0,writeParms:array{},data:'str',help:''},xup_login_update_avatar:array{title:'Update User Avatar',type:'bool',tab:0,writeParms:array{},data:'str',help:''},og_image:array{title:'Custom Image',type:'image',tab:5,data:'str',help:'og:image'},xurl_rss:array{title:'RSS',type:'bool',tab:'pages',data:'str',help:'Enable to include RSS with Social page icons \x28XURL\x29'}}
Open

                $this->prefs['sharing_providers']['writeParms']['optArray'][$k] = $k;
Severity: Minor
Found in e107_plugins/social/admin_config.php by phan

Invalid operator: left operand of << is bool (expected int)
Open

                        !!$_POST['social_login_test_page'] << social_login_config::ENABLE_BIT_TEST_PAGE;
Severity: Minor
Found in e107_plugins/social/admin_config.php by phan

Call to method getCode from undeclared class \Hybridauth\Exception\InvalidArgumentException (Did you mean class \InvalidArgumentException)
Open

                e107::getMessage()->addError("[{$e->getCode()}] {$e->getMessage()}");
Severity: Critical
Found in e107_plugins/social/admin_config.php by phan

Assigning array<string></string> to property but \social_adminarea->adminMenu is array{main/pages:array{caption:'Pages',perm:'P'},main/configure:array{caption:'Configured Login Providers',perm:'P'},main/add:array{caption:'Add New Provider',perm:'P'},main/unsupported:array{caption:'Broken Configured Providers',perm:'P'},main/prefs:array{caption:'Preferences',perm:'P'}}
Open

            $this->adminMenu['main/unsupported']['badge'] = array('value' => count($unsupported_providers), 'type'=>'warning');
Severity: Minor
Found in e107_plugins/social/admin_config.php by phan

Returning type null but renderHelp() is declared to return string
Open

                    return null; // todo?
Severity: Minor
Found in e107_plugins/social/admin_config.php by phan

Argument 2 (value) is 1 but \e_admin_form_ui::button() takes array|string defined at /code/e107_handlers/form_handler.php:3876
Open

            ".$frm->button('save_social_pages',1,'submit',LAN_SAVE)."
Severity: Minor
Found in e107_plugins/social/admin_config.php by phan

Argument 3 (target) is null but \e_form::open() takes string defined at /code/e107_handlers/form_handler.php:153
Open

            $ret =  $frm->open('social','post',null, 'class=form-horizontal').$text;
Severity: Minor
Found in e107_plugins/social/admin_config.php by phan

Catching undeclared class \Hybridauth\Exception\UnexpectedValueException (Did you mean class \UnexpectedValueException)
Open

            catch (\Hybridauth\Exception\UnexpectedValueException $ignored)
Severity: Critical
Found in e107_plugins/social/admin_config.php by phan

Argument 2 (fname) is false but \e107::lan() takes string defined at /code/e107_handlers/e107_class.php:3987
Open

e107::lan('social',false, true);
Severity: Minor
Found in e107_plugins/social/admin_config.php by phan

Returning type array{caption:'Help',text:string} but renderHelp() is declared to return string
Open

            return array("caption"=>LAN_HELP,'text'=> $tp->toHTML($notice,true));
Severity: Minor
Found in e107_plugins/social/admin_config.php by phan

Argument 3 (target) is null but \e_admin_form_ui::open() takes string defined at /code/e107_handlers/form_handler.php:153
Open

            $ret =  $frm->open('social','post',null, 'class=form-horizontal');
Severity: Minor
Found in e107_plugins/social/admin_config.php by phan

Catching undeclared class \Hybridauth\Exception\InvalidArgumentException (Did you mean class \InvalidArgumentException)
Open

            catch (\Hybridauth\Exception\InvalidArgumentException $e)
Severity: Critical
Found in e107_plugins/social/admin_config.php by phan

Call to method getMessage from undeclared class \Hybridauth\Exception\InvalidArgumentException (Did you mean class \InvalidArgumentException)
Open

                e107::getMessage()->addError("[{$e->getCode()}] {$e->getMessage()}");
Severity: Critical
Found in e107_plugins/social/admin_config.php by phan

Argument 2 (value) is 1 but \e_admin_form_ui::button() takes array|string defined at /code/e107_handlers/form_handler.php:3876
Open

            $text .= "<div class='buttons-bar center'>".$frm->button('save_social_logins',1,'submit',LAN_ADD)."</div>";
Severity: Minor
Found in e107_plugins/social/admin_config.php by phan

Invalid operator: left operand of << is bool (expected int)
Open

                        !!$_POST['social_login_active'] << social_login_config::ENABLE_BIT_GLOBAL |
Severity: Minor
Found in e107_plugins/social/admin_config.php by phan

Saw an @param annotation for text, but it was not found in the param list of function generateSocialLoginSection(array $provider_names, mixed $readonly = null) : string
Open

     * @param $text
Severity: Info
Found in e107_plugins/social/admin_config.php by phan

Method \social_admin_tree_model::loadBatch is declared to return \e_tree_model but has no return value
Open

    function loadBatch($force=false)
Severity: Minor
Found in e107_plugins/social/admin_config.php by phan

There are no issues that match your filters.

Category
Status