File UserLoader.php
has 393 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
*
* @package Gems
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');
- Read upRead up
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
*/
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
*/
- Exclude checks
Function getUserClassSelect
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
protected function getUserClassSelect($login_name, $organization)
{
$select = $this->db->select();
/**
- Read upRead up
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();
/**
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');
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);
- Read upRead up
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)) {
- Read upRead up
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);
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;
}
- Read upRead up
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);
- Read upRead up
- Exclude checks
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');
- Read upRead up
- Exclude checks
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();
/**
- Read upRead up
- Exclude checks
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
*/
- Read upRead up
- Exclude checks
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;
- Read upRead up
- Exclude checks
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;
- Read upRead up
- Exclude checks
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)) {
- Read upRead up
- Exclude checks
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;
- Read upRead up
- Exclude checks
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;
- Read upRead up
- Exclude checks
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;
- Read upRead up
- Exclude checks
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;
- Read upRead up
- Exclude checks
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)) {
- Read upRead up
- Exclude checks
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();
/**
- Read upRead up
- Exclude checks
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;
- Read upRead up
- Exclude checks
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));
- Read upRead up
- Exclude checks
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));
- Read upRead up
- Exclude checks
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;
}
- Read upRead up
- Exclude checks
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));
- Read upRead up
- Exclude checks
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;
- Read upRead up
- Exclude checks
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);
- Read upRead up
- Exclude checks
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));
- Read upRead up
- Exclude checks
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);
- Read upRead up
- Exclude checks
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);
- Read upRead up
- Exclude checks
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;
}
- Read upRead up
- Exclude checks
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();
/**
- Read upRead up
- Exclude checks
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);
- Read upRead up
- Exclude checks
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);
- Read upRead up
- Exclude checks
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);
- Read upRead up
- Exclude checks
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);
- Read upRead up
- Exclude checks
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);
- Read upRead up
- Exclude checks
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;
- Read upRead up
- Exclude checks
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;
- Read upRead up
- Exclude checks
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);
- Read upRead up
- Exclude checks
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();
/**
- Read upRead up
- Exclude checks
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;
- Read upRead up
- Exclude checks
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);
- Read upRead up
- Exclude checks
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;
- Read upRead up
- Exclude checks
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();
/**
- Read upRead up
- Exclude checks
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);
- Read upRead up
- Exclude checks
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();
/**
- Read upRead up
- Exclude checks
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)) {
- Read upRead up
- Exclude checks
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)) {
- Read upRead up
- Exclude checks
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();
}
}