e107inc/e107

View on GitHub
e107_admin/userclass2.php

Summary

Maintainability
A
0 mins
Test Coverage
F
30%

Assigning array<string></string> to property but \uclass_ui->fields is array{checkboxes:array{title:'',type:null,data:null,width:'5%',thclass:'center',forced:'1',class:'center',toggle:'e-multiselect'},userclass_id:array{title:'ID',type:'hidden',data:'int',width:'5%',thclass:'left'},userclass_icon:array{title:'Icon',type:'icon',tab:0,data:'str',width:'5%',thclass:'left',class:'center'},userclass_name:array{title:'Name',type:'text',tab:0,data:'str',inline:true,width:'auto',thclass:'left'},userclass_description:array{title:'Description',type:'text',tab:0,data:'str',inline:true,width:'auto',thclass:'left',writeParms:array{size:'xxlarge'}},userclass_type:array{title:'Type',type:'dropdown',tab:0,data:'int',width:'10%',thclass:'left',class:'left'},userclass_editclass:array{title:'Manager',type:'userclass',tab:0,data:'int',width:'auto',thclass:'left',writeParms:array{classlist:'nobody,public,main,admin,classes,matchclass,member, no-excludes'}},userclass_visibility:array{title:'Visibility',type:'userclass',tab:0,data:'int',width:'auto',thclass:'left',writeParms:array{}},userclass_parent:array{title:'Parent',type:'userclass',tab:0,data:'int',width:'auto',thclass:'left',writeParms:array{classlist:'main,admin,nobody,public,classes,matchclass,member, no-excludes'}},userclass_perms:array{title:'Perms',type:'hidden',tab:0,data:'str',width:'auto',thclass:'left',writeParms:array{}},options:array{title:'Options',type:'method',width:'10%',thclass:'center last',forced:true,class:'right',readParms:array{deleteClass:255}}}
Open

                $this->fields['userclass_id']['type'] = 'number';
Severity: Minor
Found in e107_admin/userclass2.php by phan

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

if (!getperms('4'))
Severity: Minor
Found in e107_admin/userclass2.php by phan

Assigning array<string></string> to property but \uclass_ui->fields is array{checkboxes:array{title:'',type:null,data:null,width:'5%',thclass:'center',forced:'1',class:'center',toggle:'e-multiselect'},userclass_id:array{title:'ID',type:'hidden',data:'int',width:'5%',thclass:'left'},userclass_icon:array{title:'Icon',type:'icon',tab:0,data:'str',width:'5%',thclass:'left',class:'center'},userclass_name:array{title:'Name',type:'text',tab:0,data:'str',inline:true,width:'auto',thclass:'left'},userclass_description:array{title:'Description',type:'text',tab:0,data:'str',inline:true,width:'auto',thclass:'left',writeParms:array{size:'xxlarge'}},userclass_type:array{title:'Type',type:'dropdown',tab:0,data:'int',width:'10%',thclass:'left',class:'left'},userclass_editclass:array{title:'Manager',type:'userclass',tab:0,data:'int',width:'auto',thclass:'left',writeParms:array{classlist:'nobody,public,main,admin,classes,matchclass,member, no-excludes'}},userclass_visibility:array{title:'Visibility',type:'userclass',tab:0,data:'int',width:'auto',thclass:'left',writeParms:array{}},userclass_parent:array{title:'Parent',type:'userclass',tab:0,data:'int',width:'auto',thclass:'left',writeParms:array{classlist:'main,admin,nobody,public,classes,matchclass,member, no-excludes'}},userclass_perms:array{title:'Perms',type:'hidden',tab:0,data:'str',width:'auto',thclass:'left',writeParms:array{}},options:array{title:'Options',type:'method',width:'10%',thclass:'center last',forced:true,class:'right',readParms:array{deleteClass:255}}}
Open

                $this->fields['userclass_perms']['type'] = 'method';
Severity: Minor
Found in e107_admin/userclass2.php by phan

Assigning array<string></string> to property but \uclass_ui->fields is array{checkboxes:array{title:'',type:null,data:null,width:'5%',thclass:'center',forced:'1',class:'center',toggle:'e-multiselect'},userclass_id:array{title:'ID',type:'hidden',data:'int',width:'5%',thclass:'left'},userclass_icon:array{title:'Icon',type:'icon',tab:0,data:'str',width:'5%',thclass:'left',class:'center'},userclass_name:array{title:'Name',type:'text',tab:0,data:'str',inline:true,width:'auto',thclass:'left'},userclass_description:array{title:'Description',type:'text',tab:0,data:'str',inline:true,width:'auto',thclass:'left',writeParms:array{size:'xxlarge'}},userclass_type:array{title:'Type',type:'dropdown',tab:0,data:'int',width:'10%',thclass:'left',class:'left'},userclass_editclass:array{title:'Manager',type:'userclass',tab:0,data:'int',width:'auto',thclass:'left',writeParms:array{classlist:'nobody,public,main,admin,classes,matchclass,member, no-excludes'}},userclass_visibility:array{title:'Visibility',type:'userclass',tab:0,data:'int',width:'auto',thclass:'left',writeParms:array{}},userclass_parent:array{title:'Parent',type:'userclass',tab:0,data:'int',width:'auto',thclass:'left',writeParms:array{classlist:'main,admin,nobody,public,classes,matchclass,member, no-excludes'}},userclass_perms:array{title:'Perms',type:'hidden',tab:0,data:'str',width:'auto',thclass:'left',writeParms:array{}},options:array{title:'Options',type:'method',width:'10%',thclass:'center last',forced:true,class:'right',readParms:array{deleteClass:255}}}
Open

            $this->fields['userclass_editclass']['writeParms']['default']   = e_UC_ADMIN;
Severity: Minor
Found in e107_admin/userclass2.php by phan

Assigning array<string></string> to property but \uclass_ui->fields is array{checkboxes:array{title:'',type:null,data:null,width:'5%',thclass:'center',forced:'1',class:'center',toggle:'e-multiselect'},userclass_id:array{title:'ID',type:'hidden',data:'int',width:'5%',thclass:'left'},userclass_icon:array{title:'Icon',type:'icon',tab:0,data:'str',width:'5%',thclass:'left',class:'center'},userclass_name:array{title:'Name',type:'text',tab:0,data:'str',inline:true,width:'auto',thclass:'left'},userclass_description:array{title:'Description',type:'text',tab:0,data:'str',inline:true,width:'auto',thclass:'left',writeParms:array{size:'xxlarge'}},userclass_type:array{title:'Type',type:'dropdown',tab:0,data:'int',width:'10%',thclass:'left',class:'left'},userclass_editclass:array{title:'Manager',type:'userclass',tab:0,data:'int',width:'auto',thclass:'left',writeParms:array{classlist:'nobody,public,main,admin,classes,matchclass,member, no-excludes'}},userclass_visibility:array{title:'Visibility',type:'userclass',tab:0,data:'int',width:'auto',thclass:'left',writeParms:array{}},userclass_parent:array{title:'Parent',type:'userclass',tab:0,data:'int',width:'auto',thclass:'left',writeParms:array{classlist:'main,admin,nobody,public,classes,matchclass,member, no-excludes'}},userclass_perms:array{title:'Perms',type:'hidden',tab:0,data:'str',width:'auto',thclass:'left',writeParms:array{}},options:array{title:'Options',type:'method',width:'10%',thclass:'center last',forced:true,class:'right',readParms:array{deleteClass:255}}}
Open

                $this->fields['userclass_perms']['tab'] = 1;
Severity: Minor
Found in e107_admin/userclass2.php by phan

Assigning array<string></string> to property but \uclass_ui->fields is array{checkboxes:array{title:'',type:null,data:null,width:'5%',thclass:'center',forced:'1',class:'center',toggle:'e-multiselect'},userclass_id:array{title:'ID',type:'hidden',data:'int',width:'5%',thclass:'left'},userclass_icon:array{title:'Icon',type:'icon',tab:0,data:'str',width:'5%',thclass:'left',class:'center'},userclass_name:array{title:'Name',type:'text',tab:0,data:'str',inline:true,width:'auto',thclass:'left'},userclass_description:array{title:'Description',type:'text',tab:0,data:'str',inline:true,width:'auto',thclass:'left',writeParms:array{size:'xxlarge'}},userclass_type:array{title:'Type',type:'dropdown',tab:0,data:'int',width:'10%',thclass:'left',class:'left'},userclass_editclass:array{title:'Manager',type:'userclass',tab:0,data:'int',width:'auto',thclass:'left',writeParms:array{classlist:'nobody,public,main,admin,classes,matchclass,member, no-excludes'}},userclass_visibility:array{title:'Visibility',type:'userclass',tab:0,data:'int',width:'auto',thclass:'left',writeParms:array{}},userclass_parent:array{title:'Parent',type:'userclass',tab:0,data:'int',width:'auto',thclass:'left',writeParms:array{classlist:'main,admin,nobody,public,classes,matchclass,member, no-excludes'}},userclass_perms:array{title:'Perms',type:'hidden',tab:0,data:'str',width:'auto',thclass:'left',writeParms:array{}},options:array{title:'Options',type:'method',width:'10%',thclass:'center last',forced:true,class:'right',readParms:array{deleteClass:255}}}
Open

            $this->fields['userclass_type']['writeParms']                   = array(UC_TYPE_STD => UCSLAN_80,    UC_TYPE_GROUP => UCSLAN_81);
Severity: Minor
Found in e107_admin/userclass2.php by phan

Assigning array<string></string> to property but \uclass_ui->fields is array{checkboxes:array{title:'',type:null,data:null,width:'5%',thclass:'center',forced:'1',class:'center',toggle:'e-multiselect'},userclass_id:array{title:'ID',type:'hidden',data:'int',width:'5%',thclass:'left'},userclass_icon:array{title:'Icon',type:'icon',tab:0,data:'str',width:'5%',thclass:'left',class:'center'},userclass_name:array{title:'Name',type:'text',tab:0,data:'str',inline:true,width:'auto',thclass:'left'},userclass_description:array{title:'Description',type:'text',tab:0,data:'str',inline:true,width:'auto',thclass:'left',writeParms:array{size:'xxlarge'}},userclass_type:array{title:'Type',type:'dropdown',tab:0,data:'int',width:'10%',thclass:'left',class:'left'},userclass_editclass:array{title:'Manager',type:'userclass',tab:0,data:'int',width:'auto',thclass:'left',writeParms:array{classlist:'nobody,public,main,admin,classes,matchclass,member, no-excludes'}},userclass_visibility:array{title:'Visibility',type:'userclass',tab:0,data:'int',width:'auto',thclass:'left',writeParms:array{}},userclass_parent:array{title:'Parent',type:'userclass',tab:0,data:'int',width:'auto',thclass:'left',writeParms:array{classlist:'main,admin,nobody,public,classes,matchclass,member, no-excludes'}},userclass_perms:array{title:'Perms',type:'hidden',tab:0,data:'str',width:'auto',thclass:'left',writeParms:array{}},options:array{title:'Options',type:'method',width:'10%',thclass:'center last',forced:true,class:'right',readParms:array{deleteClass:255}}}
Open

            $this->fields['userclass_parent']['writeParms']['default']      = e_UC_NOBODY;
Severity: Minor
Found in e107_admin/userclass2.php by phan

Variable $pref was undeclared, but array fields are being added to it.
Open

            $pref['init_class_stage'] = intval($_POST['init_class_stage']);
Severity: Info
Found in e107_admin/userclass2.php by phan

Assigning array<string></string> to property but \uclass_ui->fields is array{checkboxes:array{title:'',type:null,data:null,width:'5%',thclass:'center',forced:'1',class:'center',toggle:'e-multiselect'},userclass_id:array{title:'ID',type:'hidden',data:'int',width:'5%',thclass:'left'},userclass_icon:array{title:'Icon',type:'icon',tab:0,data:'str',width:'5%',thclass:'left',class:'center'},userclass_name:array{title:'Name',type:'text',tab:0,data:'str',inline:true,width:'auto',thclass:'left'},userclass_description:array{title:'Description',type:'text',tab:0,data:'str',inline:true,width:'auto',thclass:'left',writeParms:array{size:'xxlarge'}},userclass_type:array{title:'Type',type:'dropdown',tab:0,data:'int',width:'10%',thclass:'left',class:'left'},userclass_editclass:array{title:'Manager',type:'userclass',tab:0,data:'int',width:'auto',thclass:'left',writeParms:array{classlist:'nobody,public,main,admin,classes,matchclass,member, no-excludes'}},userclass_visibility:array{title:'Visibility',type:'userclass',tab:0,data:'int',width:'auto',thclass:'left',writeParms:array{}},userclass_parent:array{title:'Parent',type:'userclass',tab:0,data:'int',width:'auto',thclass:'left',writeParms:array{classlist:'main,admin,nobody,public,classes,matchclass,member, no-excludes'}},userclass_perms:array{title:'Perms',type:'hidden',tab:0,data:'str',width:'auto',thclass:'left',writeParms:array{}},options:array{title:'Options',type:'method',width:'10%',thclass:'center last',forced:true,class:'right',readParms:array{deleteClass:255}}}
Open

            $this->fields['userclass_visibility']['writeParms']['default']  = e_UC_ADMIN;
Severity: Minor
Found in e107_admin/userclass2.php by phan

Argument 1 (id) is string but \user_class::getName() takes int defined at /code/e107_handlers/userclass_class.php:954
Open

                if (trim($i)) $icn[] = e107::getUserClass()->getName($i);
Severity: Minor
Found in e107_admin/userclass2.php by phan

Assigning array<string></string> to property but \uclass_ui->fields is array{checkboxes:array{title:'',type:null,data:null,width:'5%',thclass:'center',forced:'1',class:'center',toggle:'e-multiselect'},userclass_id:array{title:'ID',type:'hidden',data:'int',width:'5%',thclass:'left'},userclass_icon:array{title:'Icon',type:'icon',tab:0,data:'str',width:'5%',thclass:'left',class:'center'},userclass_name:array{title:'Name',type:'text',tab:0,data:'str',inline:true,width:'auto',thclass:'left'},userclass_description:array{title:'Description',type:'text',tab:0,data:'str',inline:true,width:'auto',thclass:'left',writeParms:array{size:'xxlarge'}},userclass_type:array{title:'Type',type:'dropdown',tab:0,data:'int',width:'10%',thclass:'left',class:'left'},userclass_editclass:array{title:'Manager',type:'userclass',tab:0,data:'int',width:'auto',thclass:'left',writeParms:array{classlist:'nobody,public,main,admin,classes,matchclass,member, no-excludes'}},userclass_visibility:array{title:'Visibility',type:'userclass',tab:0,data:'int',width:'auto',thclass:'left',writeParms:array{}},userclass_parent:array{title:'Parent',type:'userclass',tab:0,data:'int',width:'auto',thclass:'left',writeParms:array{classlist:'main,admin,nobody,public,classes,matchclass,member, no-excludes'}},userclass_perms:array{title:'Perms',type:'hidden',tab:0,data:'str',width:'auto',thclass:'left',writeParms:array{}},options:array{title:'Options',type:'method',width:'10%',thclass:'center last',forced:true,class:'right',readParms:array{deleteClass:255}}}
Open

            $this->fields['userclass_id']['writeParms']['default']          =$this->getUserClassAdmin()->findNewClassID();
Severity: Minor
Found in e107_admin/userclass2.php by phan

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

            return array('caption'=>UCSLAN_91, 'text' => $text); 
Severity: Minor
Found in e107_admin/userclass2.php by phan

Call to undeclared method \e_admin_ui::getUserClassAdmin
Open

                if(!$this->getController()->getUserClassAdmin()->queryCanDeleteClass($classID))
Severity: Critical
Found in e107_admin/userclass2.php by phan

There are no issues that match your filters.

Category
Status