e107inc/e107

View on GitHub
e107_handlers/user_model.php

Summary

Maintainability
A
1 hr
Test Coverage
F
28%

Avoid too many return statements within this method.
Open

            return $this;
Severity: Major
Found in e107_handlers/user_model.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

            return $this;
    Severity: Major
    Found in e107_handlers/user_model.php - About 30 mins to fix

      Assigning \e_user_extended_model to property but \e_user->_parent_extmodel is null
      Open

                          $this->_parent_extmodel = $this->_extended_model;
      Severity: Minor
      Found in e107_handlers/user_model.php by phan

      Returning type null but getNodeId() is declared to return int
      Open

              return (isset($this->_name_index[$name]) ? $this->_name_index[$name] : null);
      Severity: Minor
      Found in e107_handlers/user_model.php by phan

      Assigning null to property but \e_user_model->_editor is \e_user_model
      Open

              $this->_editor = null;
      Severity: Minor
      Found in e107_handlers/user_model.php by phan

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

              if(getperms('0') && E107_DEBUG_LEVEL > 0)
      Severity: Minor
      Found in e107_handlers/user_model.php by phan

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

              return null;
      Severity: Minor
      Found in e107_handlers/user_model.php by phan

      Assigning null to property but \e_user->_extended_structure is \e_user_extended_structure
      Open

                          $this->_extended_model = $this->_extended_structure = $this->_user_config = null;
      Severity: Minor
      Found in e107_handlers/user_model.php by phan

      Invalid offset "header" of array type array{attachments:''}|array{bcc:''}|array{body:''}|array{cc:''}|array{subject:''}
      Open

                  if(!varset($EMAIL_TEMPLATE['signup']['header']))
      Severity: Minor
      Found in e107_handlers/user_model.php by phan

      Invalid offset "footer" of array type array{attachments:''}|array{bcc:''}|array{body:''}|array{cc:''}|array{subject:''}
      Open

                  if(!varset($EMAIL_TEMPLATE['signup']['footer']))
      Severity: Minor
      Found in e107_handlers/user_model.php by phan

      Parameter $noEditorCheck has undeclared type \boolen (Did you mean bool)
      Open

          public function save($noEditorCheck = false, $force = false, $session = false)
      Severity: Minor
      Found in e107_handlers/user_model.php by phan

      Cannot assign void return value
      Open

              $ret['CORE_FIELDS'] = parent::saveDebug(true, $undo);
      Severity: Info
      Found in e107_handlers/user_model.php by phan

      Returning type array|array<int>|array<int>|array<int>|array<int>|array<int>|array<int>|array<int>|array<int>|array<int>|int[]</int></int></int></int></int></int></int></int></int> but getClassList() is declared to return string
      Open

              return ($toString ? implode(',', $this->_class_list) : $this->_class_list);
      Severity: Minor
      Found in e107_handlers/user_model.php by phan

      Call with 2 arg(s) to \e_user::_load() which only takes 1 arg(s) defined at /code/e107_handlers/user_model.php:2298
      Open

                  $this->_load(1, $force);
      Severity: Info
      Found in e107_handlers/user_model.php by phan

      Assigning null to property but \e_user_model->_user_config is \e_user_pref
      Open

              $this->_user_config = null;
      Severity: Minor
      Found in e107_handlers/user_model.php by phan

      Declaration of function _onLoad(\e_user_extended_structure_model $model) : \e_tree_model should be compatible with function _onLoad(\e_model $node) : \e_tree_model defined in /code/e107_handlers/model_class.php:3425
      Open

          protected function _onLoad($model)
      Severity: Minor
      Found in e107_handlers/user_model.php by phan

      Reference to undeclared property \e107Email->template
      Open

              $mailer->template = $eml['template'];
      Severity: Minor
      Found in e107_handlers/user_model.php by phan

      Argument 2 (value) is int but \cookie() takes string defined at /code/class2.php:1786
      Open

                  cookie($key, $user_id);
      Severity: Minor
      Found in e107_handlers/user_model.php by phan

      Assigning \e_user_extended_structure to property but \e_user->_parent_extstruct is null
      Open

                          $this->_parent_extstruct = $this->_extended_structure;
      Severity: Minor
      Found in e107_handlers/user_model.php by phan

      Returning type null but getNodeByName() is declared to return \e_model|\e_user_extended_structure_model
      Open

              return null;
      Severity: Minor
      Found in e107_handlers/user_model.php by phan

      Assigning \e_user_model to property but \e_user->_parent_model is null
      Open

                      $this->_parent_model = new e_user_model($this->getData());
      Severity: Minor
      Found in e107_handlers/user_model.php by phan

      Assigning null to property but \e_user_model->_extended_structure is \e_user_extended_structure
      Open

              $this->_extended_structure = null;
      Severity: Minor
      Found in e107_handlers/user_model.php by phan

      Returning type 0 but save() is declared to return bool
      Open

                  return 0;
      Severity: Minor
      Found in e107_handlers/user_model.php by phan

      Property \e_user_model->_extended_structure has undeclared type \e_user_extended_structure (Did you mean class \e_user_extended_structure_tree or class \user_extended_struct_ui)
      Open

          protected $_extended_structure = null;
      Severity: Minor
      Found in e107_handlers/user_model.php by phan

      Argument 2 (str) is null but \explode() takes string
      Open

                  list($uid, $upw) = explode('.', $this->_session_data);
      Severity: Minor
      Found in e107_handlers/user_model.php by phan

      Argument 1 (prefix) is int but \uniqid() takes string
      Open

              return md5(uniqid(rand(), 1));
      Severity: Minor
      Found in e107_handlers/user_model.php by phan

      Default value for string $uchallange can't be false
      Open

          final public function login($uname, $upass_plain, $uauto = false, $uchallange = false, $noredirect = true)
      Severity: Minor
      Found in e107_handlers/user_model.php by phan

      Assigning null to property but \e_user->_extended_model is \e_user_extended_model
      Open

                          $this->_extended_model = $this->_extended_structure = $this->_user_config = null;
      Severity: Minor
      Found in e107_handlers/user_model.php by phan

      Method \e_user_model::load is declared to return \e_front_model but has no return value
      Open

          public function load($user_id = 0, $force = false)
      Severity: Minor
      Found in e107_handlers/user_model.php by phan

      Assigning null to property but \e_user_model->_extended_model is \e_user_extended_model
      Open

                   $this->_extended_model = null;
      Severity: Minor
      Found in e107_handlers/user_model.php by phan

      When appending to a value of type string, found an array access index of type 'signup', but expected the index to be of type int
      Open

                  $EMAIL_TEMPLATE['signup']['subject']         = $SIGNUPEMAIL_SUBJECT;
      Severity: Minor
      Found in e107_handlers/user_model.php by phan

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

                  $pass_show = e107::pref('core','user_reg_secureveri', false);
      Severity: Minor
      Found in e107_handlers/user_model.php by phan

      Call to method getData on non-class type null
      Open

                          $this->setData($this->_parent_model->getData());
      Severity: Critical
      Found in e107_handlers/user_model.php by phan

      Cannot assign void return value
      Open

                  $ret['EXTENDED_FIELDS'] = $this->_extended_model->saveDebug(true, $undo);
      Severity: Info
      Found in e107_handlers/user_model.php by phan

      Argument 4 (response) is false but \userlogin::login() takes string defined at /code/e107_handlers/login.php:84
      Open

              $userlogin->login($xup, '', 'provider', false, true);
      Severity: Minor
      Found in e107_handlers/user_model.php by phan

      Assigning null to property but \e_user->_user_config is \e_user_pref
      Open

                          $this->_user_config = $this->_parent_config;
      Severity: Minor
      Found in e107_handlers/user_model.php by phan

      Call with 2 arg(s) to \e_user::_load() which only takes 1 arg(s) defined at /code/e107_handlers/user_model.php:2298
      Open

                  $udata = $this->_load($uid, $force);
      Severity: Info
      Found in e107_handlers/user_model.php by phan

      Assigning true to property but \e_user_extended_structure_tree->_cache_force is \boolen
      Open

          protected $_cache_force = true;
      Severity: Minor
      Found in e107_handlers/user_model.php by phan

      Property \e_user_extended_structure_tree->_cache_force has undeclared type \boolen (Did you mean bool)
      Open

          protected $_cache_force = true;
      Severity: Minor
      Found in e107_handlers/user_model.php by phan

      Call to undeclared method \e_model::apply
      Open

              $this->removeData()->apply();
      Severity: Critical
      Found in e107_handlers/user_model.php by phan

      Argument 2 (more_entropy) is 1 but \uniqid() takes bool
      Open

              return md5(uniqid(rand(), 1));
      Severity: Minor
      Found in e107_handlers/user_model.php by phan

      Assigning null to property but \e_user->_user_config is \e_user_pref
      Open

                          $this->_extended_model = $this->_extended_structure = $this->_user_config = null;
      Severity: Minor
      Found in e107_handlers/user_model.php by phan

      There are no issues that match your filters.

      Category
      Status