GemsTracker/gemstracker-library

View on GitHub
classes/Gems/User/UserLoader.php

Summary

Maintainability
D
2 days
Test Coverage
F
42%

File UserLoader.php has 393 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

/**
 *
 * @package    Gems
Severity: Minor
Found in classes/Gems/User/UserLoader.php - About 5 hrs to fix

    Function getCurrentUser has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
    Open

        public final function getCurrentUser()
        {
            if (! self::$currentUser) {
                if ($this->session->__isset('__user_definition')) {
                    $defName = $this->session->__get('__user_definition');
    Severity: Minor
    Found in classes/Gems/User/UserLoader.php - About 4 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Gems_User_UserLoader has 31 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Gems_User_UserLoader extends \Gems_Loader_TargetLoaderAbstract
    {
        /**
         * The org ID for no organization
         */
    Severity: Minor
    Found in classes/Gems/User/UserLoader.php - About 3 hrs to fix

      The class Gems_User_UserLoader has an overall complexity of 90 which is very high. The configured complexity threshold is 50.
      Open

      class Gems_User_UserLoader extends \Gems_Loader_TargetLoaderAbstract
      {
          /**
           * The org ID for no organization
           */
      Severity: Minor
      Found in classes/Gems/User/UserLoader.php by phpmd

      Function getUserClassSelect has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
      Open

          protected function getUserClassSelect($login_name, $organization)
          {
              $select = $this->db->select();
      
              /**
      Severity: Minor
      Found in classes/Gems/User/UserLoader.php - About 1 hr to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Method getUserClassSelect has 46 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          protected function getUserClassSelect($login_name, $organization)
          {
              $select = $this->db->select();
      
              /**
      Severity: Minor
      Found in classes/Gems/User/UserLoader.php - About 1 hr to fix

        Method getCurrentUser has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public final function getCurrentUser()
            {
                if (! self::$currentUser) {
                    if ($this->session->__isset('__user_definition')) {
                        $defName = $this->session->__get('__user_definition');
        Severity: Minor
        Found in classes/Gems/User/UserLoader.php - About 1 hr to fix

          Function getUserClass has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

              protected function getUserClass($login_name, $organization)
              {
                  //First check for project user, as this one can run without a db
                  if ((null !== $login_name) && $this->isProjectUser($login_name)) {
                      return $this->loadUser(self::USER_PROJECT, $organization, $login_name);
          Severity: Minor
          Found in classes/Gems/User/UserLoader.php - About 1 hr to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Function getUser has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              public function getUser($login_name, $currentOrganization)
              {
                  $user = $this->getUserClass($login_name, $currentOrganization);
                  
                  if ($this->allowLoginOnWithoutOrganization && (! $currentOrganization)) {
          Severity: Minor
          Found in classes/Gems/User/UserLoader.php - About 35 mins to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Avoid too many return statements within this method.
          Open

                  return $this->loadUser(self::USER_NOLOGIN, $organization, $login_name);
          Severity: Major
          Found in classes/Gems/User/UserLoader.php - About 30 mins to fix

            Function ensureDefaultUserValues has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                public function ensureDefaultUserValues(array $values, \Gems_User_UserDefinitionInterface $definition, $defName = null)
                {
                    if (! isset($values['user_active'])) {
                        $values['user_active'] = true;
                    }
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php - About 25 mins to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            The method getUserClass() has a Cyclomatic Complexity of 11. The configured cyclomatic complexity threshold is 10.
            Open

                protected function getUserClass($login_name, $organization)
                {
                    //First check for project user, as this one can run without a db
                    if ((null !== $login_name) && $this->isProjectUser($login_name)) {
                        return $this->loadUser(self::USER_PROJECT, $organization, $login_name);
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            CyclomaticComplexity

            Since: 0.1

            Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

            Example

            // Cyclomatic Complexity = 11
            class Foo {
            1   public function example() {
            2       if ($a == $b) {
            3           if ($a1 == $b1) {
                            fiddle();
            4           } elseif ($a2 == $b2) {
                            fiddle();
                        } else {
                            fiddle();
                        }
            5       } elseif ($c == $d) {
            6           while ($c == $d) {
                            fiddle();
                        }
            7        } elseif ($e == $f) {
            8           for ($n = 0; $n < $h; $n++) {
                            fiddle();
                        }
                    } else {
                        switch ($z) {
            9               case 1:
                                fiddle();
                                break;
            10              case 2:
                                fiddle();
                                break;
            11              case 3:
                                fiddle();
                                break;
                            default:
                                fiddle();
                                break;
                        }
                    }
                }
            }

            Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

            The method getCurrentUser() has a Cyclomatic Complexity of 11. The configured cyclomatic complexity threshold is 10.
            Open

                public final function getCurrentUser()
                {
                    if (! self::$currentUser) {
                        if ($this->session->__isset('__user_definition')) {
                            $defName = $this->session->__get('__user_definition');
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            CyclomaticComplexity

            Since: 0.1

            Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

            Example

            // Cyclomatic Complexity = 11
            class Foo {
            1   public function example() {
            2       if ($a == $b) {
            3           if ($a1 == $b1) {
                            fiddle();
            4           } elseif ($a2 == $b2) {
                            fiddle();
                        } else {
                            fiddle();
                        }
            5       } elseif ($c == $d) {
            6           while ($c == $d) {
                            fiddle();
                        }
            7        } elseif ($e == $f) {
            8           for ($n = 0; $n < $h; $n++) {
                            fiddle();
                        }
                    } else {
                        switch ($z) {
            9               case 1:
                                fiddle();
                                break;
            10              case 2:
                                fiddle();
                                break;
            11              case 3:
                                fiddle();
                                break;
                            default:
                                fiddle();
                                break;
                        }
                    }
                }
            }

            Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

            The method getUserClassSelect() has a Cyclomatic Complexity of 11. The configured cyclomatic complexity threshold is 10.
            Open

                protected function getUserClassSelect($login_name, $organization)
                {
                    $select = $this->db->select();
            
                    /**
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            CyclomaticComplexity

            Since: 0.1

            Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

            Example

            // Cyclomatic Complexity = 11
            class Foo {
            1   public function example() {
            2       if ($a == $b) {
            3           if ($a1 == $b1) {
                            fiddle();
            4           } elseif ($a2 == $b2) {
                            fiddle();
                        } else {
                            fiddle();
                        }
            5       } elseif ($c == $d) {
            6           while ($c == $d) {
                            fiddle();
                        }
            7        } elseif ($e == $f) {
            8           for ($n = 0; $n < $h; $n++) {
                            fiddle();
                        }
                    } else {
                        switch ($z) {
            9               case 1:
                                fiddle();
                                break;
            10              case 2:
                                fiddle();
                                break;
            11              case 3:
                                fiddle();
                                break;
                            default:
                                fiddle();
                                break;
                        }
                    }
                }
            }

            Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

            The class Gems_User_UserLoader has a coupling between objects value of 30. Consider to reduce the number of dependencies under 13.
            Open

            class Gems_User_UserLoader extends \Gems_Loader_TargetLoaderAbstract
            {
                /**
                 * The org ID for no organization
                 */
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            CouplingBetweenObjects

            Since: 1.1.0

            A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability

            Example

            class Foo {
                /**
                 * @var \foo\bar\X
                 */
                private $x = null;
            
                /**
                 * @var \foo\bar\Y
                 */
                private $y = null;
            
                /**
                 * @var \foo\bar\Z
                 */
                private $z = null;
            
                public function setFoo(\Foo $foo) {}
                public function setBar(\Bar $bar) {}
                public function setBaz(\Baz $baz) {}
            
                /**
                 * @return \SplObjectStorage
                 * @throws \OutOfRangeException
                 * @throws \InvalidArgumentException
                 * @throws \ErrorException
                 */
                public function process(\Iterator $it) {}
            
                // ...
            }

            Source https://phpmd.org/rules/design.html#couplingbetweenobjects

            The method getCurrentUser() contains an exit expression.
            Open

                                    exit;
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            ExitExpression

            Since: 0.2

            An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.

            Example

            class Foo {
                public function bar($param)  {
                    if ($param === 42) {
                        exit(23);
                    }
                }
            }

            Source https://phpmd.org/rules/design.html#exitexpression

            The method getCurrentUser() contains an exit expression.
            Open

                                        exit;
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            ExitExpression

            Since: 0.2

            An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.

            Example

            class Foo {
                public function bar($param)  {
                    if ($param === 42) {
                        exit(23);
                    }
                }
            }

            Source https://phpmd.org/rules/design.html#exitexpression

            Avoid unused local variables such as '$login_id'.
            Open

                    if ($login_id = $this->db->fetchOne($select)) {
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            UnusedLocalVariable

            Since: 0.2

            Detects when a local variable is declared and/or assigned, but not used.

            Example

            class Foo {
                public function doSomething()
                {
                    $i = 5; // Unused
                }
            }

            Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

            Avoid excessively long variable names like $allowLoginOnOtherOrganization. Keep variable name length under 20.
            Open

                public $allowLoginOnOtherOrganization = false;
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            LongVariable

            Since: 0.2

            Detects when a field, formal or local variable is declared with a long name.

            Example

            class Something {
                protected $reallyLongIntName = -3; // VIOLATION - Field
                public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                    $otherReallyLongName = -5; // VIOLATION - Local
                    for ($interestingIntIndex = 0; // VIOLATION - For
                         $interestingIntIndex < 10;
                         $interestingIntIndex++ ) {
                    }
                }
            }

            Source https://phpmd.org/rules/naming.html#longvariable

            Avoid excessively long variable names like $allowRespondentEmailLogin. Keep variable name length under 20.
            Open

                public $allowRespondentEmailLogin = false;
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            LongVariable

            Since: 0.2

            Detects when a field, formal or local variable is declared with a long name.

            Example

            class Something {
                protected $reallyLongIntName = -3; // VIOLATION - Field
                public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                    $otherReallyLongName = -5; // VIOLATION - Local
                    for ($interestingIntIndex = 0; // VIOLATION - For
                         $interestingIntIndex < 10;
                         $interestingIntIndex++ ) {
                    }
                }
            }

            Source https://phpmd.org/rules/naming.html#longvariable

            Avoid excessively long variable names like $authenticatorSettings. Keep variable name length under 20.
            Open

                    $authenticatorSettings = null;
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            LongVariable

            Since: 0.2

            Detects when a field, formal or local variable is declared with a long name.

            Example

            class Something {
                protected $reallyLongIntName = -3; // VIOLATION - Field
                public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                    $otherReallyLongName = -5; // VIOLATION - Local
                    for ($interestingIntIndex = 0; // VIOLATION - For
                         $interestingIntIndex < 10;
                         $interestingIntIndex++ ) {
                    }
                }
            }

            Source https://phpmd.org/rules/naming.html#longvariable

            Avoid excessively long variable names like $allowLoginOnWithoutOrganization. Keep variable name length under 20.
            Open

                public $allowLoginOnWithoutOrganization = false;
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            LongVariable

            Since: 0.2

            Detects when a field, formal or local variable is declared with a long name.

            Example

            class Something {
                protected $reallyLongIntName = -3; // VIOLATION - Field
                public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                    $otherReallyLongName = -5; // VIOLATION - Local
                    for ($interestingIntIndex = 0; // VIOLATION - For
                         $interestingIntIndex < 10;
                         $interestingIntIndex++ ) {
                    }
                }
            }

            Source https://phpmd.org/rules/naming.html#longvariable

            The parameter $login_name is not named in camelCase.
            Open

                public function getUser($login_name, $currentOrganization)
                {
                    $user = $this->getUserClass($login_name, $currentOrganization);
                    
                    if ($this->allowLoginOnWithoutOrganization && (! $currentOrganization)) {
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            CamelCaseParameterName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name parameters.

            Example

            class ClassName {
                public function doSomething($user_name) {
                }
            }

            Source

            The parameter $login_name is not named in camelCase.
            Wontfix

                protected function getUserClassSelect($login_name, $organization)
                {
                    $select = $this->db->select();
            
                    /**
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            CamelCaseParameterName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name parameters.

            Example

            class ClassName {
                public function doSomething($user_name) {
                }
            }

            Source

            The parameter $login_name is not named in camelCase.
            Open

                public function createUser($login_name, $organization, $userClassName, $userId)
                {
                    $now = new \MUtil_Db_Expr_CurrentTimestamp();;
            
                    $values['gul_user_class'] = $userClassName;
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            CamelCaseParameterName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name parameters.

            Example

            class ClassName {
                public function doSomething($user_name) {
                }
            }

            Source

            The parameter $args_array is not named in camelCase.
            Open

                public function getLayeredLoginForm($args_array = null)
                {
                    $args = \MUtil_Ra::args(func_get_args());
            
                    return $this->_loadClass('Form_LayeredLoginForm', true, array($args));
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            CamelCaseParameterName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name parameters.

            Example

            class ClassName {
                public function doSomething($user_name) {
                }
            }

            Source

            The parameter $args_array is not named in camelCase.
            Open

                public function getResetRequestForm($args_array = null)
                {
                    $args = \MUtil_Ra::args(func_get_args());
            
                    return $this->_loadClass('Form_ResetRequestForm', true, array($args));
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            CamelCaseParameterName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name parameters.

            Example

            class ClassName {
                public function doSomething($user_name) {
                }
            }

            Source

            The parameter $login_name is not named in camelCase.
            Open

                protected function isProjectUser($login_name)
                {
                    return $this->project->getSuperAdminName() == $login_name;
                }
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            CamelCaseParameterName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name parameters.

            Example

            class ClassName {
                public function doSomething($user_name) {
                }
            }

            Source

            The parameter $args_array is not named in camelCase.
            Open

                public function getLoginForm($args_array = null)
                {
                    $args = \MUtil_Ra::args(func_get_args());
            
                    return $this->_loadClass('Form_LoginForm', true, array($args));
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            CamelCaseParameterName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name parameters.

            Example

            class ClassName {
                public function doSomething($user_name) {
                }
            }

            Source

            Avoid variables with short names like $db. Configured minimum length is 3.
            Open

                protected $db;
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            ShortVariable

            Since: 0.2

            Detects when a field, local, or parameter has a very short name.

            Example

            class Something {
                private $q = 15; // VIOLATION - Field
                public static function main( array $as ) { // VIOLATION - Formal
                    $r = 20 + $this->q; // VIOLATION - Local
                    for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                        $r += $this->q;
                    }
                }
            }

            Source https://phpmd.org/rules/naming.html#shortvariable

            The parameter $login_name is not named in camelCase.
            Open

                protected function getUserClass($login_name, $organization)
                {
                    //First check for project user, as this one can run without a db
                    if ((null !== $login_name) && $this->isProjectUser($login_name)) {
                        return $this->loadUser(self::USER_PROJECT, $organization, $login_name);
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            CamelCaseParameterName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name parameters.

            Example

            class ClassName {
                public function doSomething($user_name) {
                }
            }

            Source

            The parameter $args_array is not named in camelCase.
            Open

                public function getChangePasswordForm($user, $args_array = null)
                {
                    $args = \MUtil_Ra::args(func_get_args(), array('user' => 'Gems_User_User'));
            
                    $form = $this->_loadClass('Form_ChangePasswordForm', true, array($args));
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            CamelCaseParameterName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name parameters.

            Example

            class ClassName {
                public function doSomething($user_name) {
                }
            }

            Source

            The parameter $staff_id is not named in camelCase.
            Open

                public function getUserByStaffId($staff_id)
                {
                    $data = $this->db->fetchRow("SELECT gsf_login, gsf_id_organization FROM gems__staff WHERE gsf_id_user = ?", $staff_id);
            
                    // \MUtil_Echo::track($data);
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            CamelCaseParameterName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name parameters.

            Example

            class ClassName {
                public function doSomething($user_name) {
                }
            }

            Source

            The variable $login_name is not named in camelCase.
            Open

                protected function getUserClass($login_name, $organization)
                {
                    //First check for project user, as this one can run without a db
                    if ((null !== $login_name) && $this->isProjectUser($login_name)) {
                        return $this->loadUser(self::USER_PROJECT, $organization, $login_name);
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $login_name is not named in camelCase.
            Open

                protected function isProjectUser($login_name)
                {
                    return $this->project->getSuperAdminName() == $login_name;
                }
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $login_name is not named in camelCase.
            Open

                protected function getUserClassSelect($login_name, $organization)
                {
                    $select = $this->db->select();
            
                    /**
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $login_name is not named in camelCase.
            Open

                protected function getUserClass($login_name, $organization)
                {
                    //First check for project user, as this one can run without a db
                    if ((null !== $login_name) && $this->isProjectUser($login_name)) {
                        return $this->loadUser(self::USER_PROJECT, $organization, $login_name);
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $login_name is not named in camelCase.
            Open

                protected function getUserClass($login_name, $organization)
                {
                    //First check for project user, as this one can run without a db
                    if ((null !== $login_name) && $this->isProjectUser($login_name)) {
                        return $this->loadUser(self::USER_PROJECT, $organization, $login_name);
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $login_name is not named in camelCase.
            Open

                protected function getUserClass($login_name, $organization)
                {
                    //First check for project user, as this one can run without a db
                    if ((null !== $login_name) && $this->isProjectUser($login_name)) {
                        return $this->loadUser(self::USER_PROJECT, $organization, $login_name);
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $login_name is not named in camelCase.
            Open

                protected function getUserClass($login_name, $organization)
                {
                    //First check for project user, as this one can run without a db
                    if ((null !== $login_name) && $this->isProjectUser($login_name)) {
                        return $this->loadUser(self::USER_PROJECT, $organization, $login_name);
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $login_name is not named in camelCase.
            Open

                protected function getUserClass($login_name, $organization)
                {
                    //First check for project user, as this one can run without a db
                    if ((null !== $login_name) && $this->isProjectUser($login_name)) {
                        return $this->loadUser(self::USER_PROJECT, $organization, $login_name);
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $login_name is not named in camelCase.
            Open

                public function createUser($login_name, $organization, $userClassName, $userId)
                {
                    $now = new \MUtil_Db_Expr_CurrentTimestamp();;
            
                    $values['gul_user_class'] = $userClassName;
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $login_name is not named in camelCase.
            Open

                public function createUser($login_name, $organization, $userClassName, $userId)
                {
                    $now = new \MUtil_Db_Expr_CurrentTimestamp();;
            
                    $values['gul_user_class'] = $userClassName;
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $login_name is not named in camelCase.
            Open

                protected function getUserClass($login_name, $organization)
                {
                    //First check for project user, as this one can run without a db
                    if ((null !== $login_name) && $this->isProjectUser($login_name)) {
                        return $this->loadUser(self::USER_PROJECT, $organization, $login_name);
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $login_name is not named in camelCase.
            Open

                protected function getUserClassSelect($login_name, $organization)
                {
                    $select = $this->db->select();
            
                    /**
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $login_name is not named in camelCase.
            Open

                public function createUser($login_name, $organization, $userClassName, $userId)
                {
                    $now = new \MUtil_Db_Expr_CurrentTimestamp();;
            
                    $values['gul_user_class'] = $userClassName;
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $login_name is not named in camelCase.
            Open

                protected function getUserClass($login_name, $organization)
                {
                    //First check for project user, as this one can run without a db
                    if ((null !== $login_name) && $this->isProjectUser($login_name)) {
                        return $this->loadUser(self::USER_PROJECT, $organization, $login_name);
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $login_id is not named in camelCase.
            Open

                public function createUser($login_name, $organization, $userClassName, $userId)
                {
                    $now = new \MUtil_Db_Expr_CurrentTimestamp();;
            
                    $values['gul_user_class'] = $userClassName;
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $login_name is not named in camelCase.
            Open

                protected function getUserClassSelect($login_name, $organization)
                {
                    $select = $this->db->select();
            
                    /**
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $staff_id is not named in camelCase.
            Open

                public function getUserByStaffId($staff_id)
                {
                    $data = $this->db->fetchRow("SELECT gsf_login, gsf_id_organization FROM gems__staff WHERE gsf_id_user = ?", $staff_id);
            
                    // \MUtil_Echo::track($data);
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $login_name is not named in camelCase.
            Open

                protected function getUserClassSelect($login_name, $organization)
                {
                    $select = $this->db->select();
            
                    /**
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $login_name is not named in camelCase.
            Open

                public function getUser($login_name, $currentOrganization)
                {
                    $user = $this->getUserClass($login_name, $currentOrganization);
                    
                    if ($this->allowLoginOnWithoutOrganization && (! $currentOrganization)) {
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $login_name is not named in camelCase.
            Open

                public function getUser($login_name, $currentOrganization)
                {
                    $user = $this->getUserClass($login_name, $currentOrganization);
                    
                    if ($this->allowLoginOnWithoutOrganization && (! $currentOrganization)) {
            Severity: Minor
            Found in classes/Gems/User/UserLoader.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            There are no issues that match your filters.

            Category
            Status